The application field of the Internet of Things (IoT) involves all aspects, and its application in the fields of industry, agriculture, environment, transportation, logistics, security and other infrastructure has effectively promoted the intelligent development of these aspects. Although the IoT has gradually grown in recent years, there are still many problems that need to be overcome in terms of technology, management, cost, policy, and security. We need to constantly weigh the benefits of trusting IoT products and the risk of leaking private data. To avoid the leakage and loss of various user data, this paper developed a hybrid algorithm of kernel function and random perturbation method based on the algorithm of non-negative matrix factorization, which realizes personalized recommendation and solves the problem of user privacy data protection in the process of personalized recommendation. Compared to non-negative matrix factorization privacy-preserving algorithm, the new algorithm does not need to know the detailed information of the data, only need to know the connection between each data; and the new algorithm can process the data points with negative characteristics. Experiments show that the new algorithm can produce recommendation results with certain accuracy under the premise of preserving users' personal privacy.