| With the development of science and technology,great changes have taken place in people’s daily life.However,due to the large number and variety of movies,it is difficult for users to find their favorite movies from the huge movie library.In order to let users find their favorite movies,more and more researchers begin to pay attention to the recommendation system.The core of the recommendation system is the recommendation algorithm.As for the recommendation algorithm,the current single recommendation algorithm has some limitations in practical applications,either it can not find the potential interests of users,or it will face problems such as sparse data and cold start of users or items.For the recommendation system,there are also some problems,such as the recommendation accuracy is not high,and the real-time performance can not meet the needs of users.In this paper,a hybrid recommendation algorithm integrating user information is designed by combining the recommendation algorithm based on demography and the collaborative filtering algorithm based on ALS(alternative least squares).Considering the cold start problem of users in the system,this paper uses the recommendation method based on demography to analyze in detail the influence of several attributes of users in the data set on the type of movie preference,and then uses the attribute vector constructed by the basic attributes to find other similar users with existing behavior records through cosine similarity calculation,and makes recommendations through the movie preferences of similar users.Considering that this recommendation method is the recommendation result calculated through the sparse scoring matrix,it is impossible to recommend some niche movies,resulting in poor actual recommendation effect.Aiming at the problem of data sparsity in the user movie scoring matrix,combined with the recommendation algorithm of collaborative filtering based on ALS,this paper uses matrix decomposition and least square method to calculate the value of the decomposed matrix,and then predicts and fills the missing value in the user scoring matrix,this method alleviates the problem of data sparsity to a certain extent.In this process,during this process,the ALS model is evaluated according to the difference between the predicted value and the actual value,and the parameters of the model are optimized.Combined with the advantages of the two algorithms,the user similarity is finally used to optimize the filled user score,and the score of each film is weighted to get the user’s recommendation list.Experiments show that compared with the single recommendation algorithm before combination,the accuracy of the combined hybrid recommendation method is improved by 3.1%and 10.2% respectively compared with the previous single recommendation algorithm,and the recommendation effect is better.To solve the problem of data overload,this paper introduces spark,a big data framework,and combines Kafka,redis and mongodb to process real-time data streams,greatly improving the efficiency of data processing and storage.In order to meet the accuracy and real-time requirements of movie recommendation,the recommendation module of the movie recommendation system is divided into two parts: offline recommendation and real-time recommendation.Offline recommendation uses the offline scheduling framework to regularly count and update the data calculation results,providing corresponding data support for real-time calculation and business.Real time recommendation uses Kafka to process the data in the form of data stream,uses redis cache database to save the user’s recent scoring data,uses the movie similarity matrix data calculated during the offline recommendation training recommendation model to generate a recommendation list,and uses the model-based recommendation method to update the user’s recommendation results in real time,Finally,the design and implementation of a movie recommendation system based on hybrid method is completed on the basis of business. |