Movie recommendation method and system, terminal and storage medium
By receiving the movies of interest input by the user, identifying their similar movie sets and similar user groups, predicting the user's ratings for unwatched movies, generating the target unwatched movie sets, and recommending movies in the similar movie sets and target unwatched movie sets to users, solving the problems of overfitting and information overload of existing recommendation systems, and realizing personalized and accurate movie recommendations.
Patent Information
- Application Number
- CN202411952700.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-22
AI Technical Summary
The existing personalized recommendation system has overfitting, which cannot effectively meet the actual needs of users, resulting in users facing the problem of information overload. Especially in terms of movie recommendation, it is difficult to screen out movies that meet users' interests and needs from a large number of movie resources.
By receiving the movies of interest input by the user, they determine their similar movie sets and similar user groups, predict the user's rating values for unwatched movies based on the ratings of similar users, generate the target unwatched movie sets, and recommend the movies in the similar movie sets and target unwatched movie sets to the user.
It realizes personalized movie recommendations, improves user experience, meets users' actual needs, and avoids the problem of information overload.
Smart Images

Figure CN119862288A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information recommendation, and in particular to a movie recommendation method, system, terminal and storage medium. Background Art
[0002] Personalized recommendation systems are becoming increasingly important in the current mobile Internet era. However, most of the current personalized recommendation systems have overfitting problems. Whether it is item recommendation or video recommendation, most of them determine the quality of the recommendation algorithm based on user click-through rate. Moreover, the current personalized recommendation systems put commercial interests first. The goal of most current personalized recommendation systems is to get users to buy more items or use related software for a longer time, which makes it easy for users to fall into consumption traps or waste too much time on video content they don’t like. It does not take users into consideration and cannot meet their actual needs. In other words, with the rapid development of the Internet and the explosive growth of information, users are facing the problem of information overload.
[0003] Therefore, how to select movies that meet user interests and needs from a large number of movie resources for movie recommendation is a problem that technicians in this field currently need to solve. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a movie recommendation method, system, terminal and storage medium to address the above-mentioned defects of the prior art, so as to provide users with personalized movie recommendations, improve user experience and meet user needs.
[0005] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0006] A movie recommendation method, wherein the method comprises:
[0007] Receive a movie of interest input by a current user, and determine similar movies to the movie of interest to obtain a corresponding similar movie set;
[0008] Determine similar users with similar movie preferences to the current user to obtain corresponding similar user groups;
[0009] Predicting a first rating value of an unwatched movie by the current user according to the first ratings of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values;
[0010] The to-be-recommended movies in the similar movie set and the target unwatched movie set are recommended to the current user.
[0011] In one implementation, the determining similar movies to the movie of interest to obtain a corresponding similar movie set includes:
[0012] Determine candidate similar movies, and obtain similarity evaluation indicators corresponding to the candidate similar movies and the movie of interest respectively;
[0013] The similarity evaluation index is vectorized using a TF-IDF word vectorization tool to obtain a vectorized similarity evaluation index;
[0014] Calculating the movie similarity between the candidate similar movie and the movie of interest based on the vectorized similarity evaluation index using cosine similarity;
[0015] Based on the movie similarity, it is determined whether the candidate similar movie is a similar movie to the movie of interest to obtain a corresponding similar movie set.
[0016] In one implementation, after determining similar movies to the movie of interest to obtain a corresponding similar movie set, the method further includes:
[0017] calculating a recommendation value of each of the similar movies in the similar movie set to generate a first target similar movie set based on the recommendation value of each of the similar movies;
[0018] The step of recommending the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user includes:
[0019] The to-be-recommended movies in the first target similar movie set and the target unwatched movie set are recommended to the current user.
[0020] In one implementation, the calculating the recommendation value of each of the similar movies in the similar movie set to generate a first target similar movie set based on the recommendation value of each of the similar movies includes:
[0021] Determine a first average rating value and a number of ratings of each of the similar movies in the similar movie set and a second average rating value of the similar movie set;
[0022] Calculating a recommendation value of each of the similar movies in the similar movie set according to the first average rating value and the number of ratings of each of the similar movies and the second average rating value of the similar movie set;
[0023] The similar movies in the similar movie set are filtered based on the recommendation value to obtain a first target similar movie set.
[0024] In one implementation, determining similar users who have similar movie preferences to the current user to obtain corresponding similar user groups includes:
[0025] Determine candidate similar users, and obtain movie rating data corresponding to the candidate similar users and the current user respectively;
[0026] Calculating the user similarity between the candidate similar user and the current user based on the movie rating data using cosine similarity;
[0027] Based on the user similarity, it is determined whether the candidate similar user is a similar user of the current user, and a corresponding similar user group is obtained.
[0028] In one implementation, predicting the first rating value of the current user for the unwatched movie based on the first rating of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating value, includes:
[0029] Determine the movies watched by each of the similar users in the similar user group to obtain a watched movie set, and determine the unwatched movies of the current user from the watched movie set to obtain an unwatched movie set;
[0030] Obtaining first ratings of the unwatched movies by the similar users;
[0031] Predicting a first rating value of the current user for the unwatched movie based on the first ratings of the unwatched movie by each of the similar users;
[0032] The unwatched movies in the unwatched movie set are filtered based on the first rating value to obtain a target unwatched movie set.
[0033] In one implementation, before recommending the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user, the method further includes:
[0034] Filtering out target similar movies rated by each of the similar users in the similar user group from the similar movie set, and obtaining second ratings of the target similar movies by each of the similar users;
[0035] Predicting a second rating value of the current user for the target similar movie according to the second rating situation, so as to generate a second target similar movie set based on the second rating value;
[0036] The step of recommending the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user includes:
[0037] Filtering the target similar movies rated by the similar users in the similar movie set to obtain a filtered similar movie set;
[0038] Filter the movies in the target unwatched movie set that are the same as the similar movies to obtain a filtered target unwatched movie set;
[0039] The to-be-recommended movies in the filtered similar movie set, the second target similar movie set, and the filtered target unwatched movie set are recommended to the current user.
[0040] The present invention also discloses a movie recommendation system, wherein the system comprises:
[0041] A similar movie determination module is used to receive a movie of interest input by a current user, and determine similar movies to the movie of interest to obtain a corresponding similar movie set;
[0042] A similar user determination module is used to determine similar users with similar movie preferences to the current user to obtain a corresponding similar user group;
[0043] a rating value prediction module, configured to predict a first rating value of an unwatched movie by a current user according to the first ratings of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values;
[0044] The movie recommendation module is used to recommend the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user.
[0045] The present invention also discloses a terminal, which includes: a memory, a processor, and a movie recommendation program stored in the memory and executable on the processor, wherein the movie recommendation program implements the steps of the movie recommendation method described above when executed by the processor.
[0046] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed to implement the steps of the movie recommendation method as described above.
[0047] The present invention provides a movie recommendation method, system, terminal and storage medium, the movie recommendation method comprising: receiving a movie of interest input by a current user, and determining similar movies of the movie of interest to obtain a corresponding similar movie set; determining similar users with similar movie preferences to the current user to obtain a corresponding similar user group; predicting the first rating value of the current user for the unwatched movie based on the first rating of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating value; and recommending the movies to be recommended in the similar movie set and the target unwatched movie set to the current user. It can be seen that the present invention combines the similarity of movies and the similarity between the user and other users to achieve personalized movie recommendation, that is, determining similar movies with similar content to the movie of interest to the current user, and at the same time determining similar users with similar movie preferences to the current user, and then predicting the rating value of the current user for the unwatched movie based on the rating of the movie by the similar users, and recommending the movies that the current user has not watched and may be interested in and similar movies similar to the movie of interest to the current user according to the rating value, so as to provide personalized movie recommendations for users, improve user experience, and meet user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of a preferred embodiment of the movie recommendation method of the present invention;
[0049] Figure 2 is a specific flow chart of a movie recommendation method disclosed in the present invention;
[0050] Figure 3 is a specific flow chart of a movie recommendation method disclosed in the present invention;
[0051] Figure 4 It is a functional principle block diagram of a preferred embodiment of the movie recommendation system of the present invention;
[0052] Figure 5 It is a functional principle block diagram of a preferred embodiment of the terminal in the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0054] See also Figure 1 , Figure 1 is a flow chart of the movie recommendation method in the present invention. Figure 1 As shown, the movie recommendation method described in the embodiment of the present invention includes:
[0055] Step S11: receiving the movie of interest input by the current user, and determining similar movies to the movie of interest to obtain a corresponding similar movie set.
[0056] It is understandable that when the current user inputs a movie that he likes (movie of interest), firstly, similar movies can be recommended based on the movie that the current user likes.
[0057] In this embodiment, similar movies to the movie of interest are determined to obtain a corresponding similar movie set. Specifically, a content filtering recommendation algorithm based on the similarity of movie content can be used. In this algorithm, the similarity between movies can be calculated through some indicators, so that similar movies with similar content to the movie of interest to the current user can be determined. The specific process is: determine candidate similar movies, and obtain similarity evaluation indicators corresponding to the candidate similar movies and the movie of interest respectively; use the TF-IDF word vectorization tool to vectorize the similarity evaluation indicator to obtain a vectorized similarity evaluation indicator; use cosine similarity and calculate the movie similarity between the candidate similar movie and the movie of interest based on the vectorized similarity evaluation indicator; determine whether the candidate similar movie is a similar movie to the movie of interest based on the movie similarity to obtain a corresponding similar movie set.
[0058] For example, a first similarity evaluation index corresponding to the candidate similar movie and a second similarity evaluation index corresponding to the movie of interest are obtained, and then the first similarity evaluation index and the second similarity evaluation index are vectorized using the TF-IDF word vectorization tool, and then the vectorized first similarity evaluation index and the vectorized second similarity evaluation index are processed using cosine similarity, so that the movie similarity between the candidate similar movie and the movie of interest can be calculated, and the movie similarity is compared with a preset movie similarity threshold to obtain a corresponding first comparison result; when the first comparison result shows that the movie similarity is not less than the preset movie similarity threshold, the candidate similar movie is determined to be a similar movie of the movie of interest, and a corresponding similar movie set is obtained; when the first comparison result shows that the movie similarity is less than the preset movie similarity threshold, the candidate similar movie is determined not to be a similar movie of the movie of interest.
[0059] Among them, the similarity evaluation indicators may include the brief description of the movie, the director and starring staff of the movie, the type of the movie and the keywords of the movie, and then they are all converted into vector representations through the TF-IDF word vectorization tool, and then the vectorized similarity evaluation indicators are processed using cosine similarity to calculate the similarity between the two movies. This calculation method can map the movie information to a new space, thereby helping to analyze the similarity and correlation between movies, so as to determine similar movies that are similar to the movie of interest to the current user.
[0060] It should be noted that when the current user has not entered any movies of interest, a most popular movie list can be generated based on a generalized recommendation algorithm based on movie popularity, and then the movies in the list can be recommended to the current user, that is, a movie data set in a movie database is obtained, and the recommendation value of each candidate movie in the movie data set is calculated to generate a default movie recommendation set based on the recommendation value of each candidate movie, and the recommendation value is a numerical value that can reflect the popularity of the candidate movie.
[0061] Furthermore, when calculating the recommendation value of each candidate movie in the movie data set, it can specifically include: determining the average rating value and the number of ratings of each candidate movie in the movie data set and the average rating value of the movie data set; and then calculating the recommendation value of each candidate movie in the movie data set according to the average rating value and the number of ratings of each candidate movie and the average rating value of the movie data set. For example, the recommendation value of the candidate movie is calculated using a preset movie weight score calculation formula, and the average rating value and the number of ratings of the candidate movie and the average rating value of the movie data set are considered.
[0062] The number of times a candidate movie is rated should be sufficient in the movie set to exclude the influence of a high weight score caused by only a few high-scoring reviews. For example, movies with a number of ratings greater than a preset rating threshold can be determined as candidate movies, so that the most popular movie list can be generated, in which high-ranking movies have both high average ratings and a large number of ratings. In addition, a popular movie list under a specific movie type can also be generated according to a specific movie type to meet the user's needs for different types of movies.
[0063] Step S12: Determine similar users who have similar movie preferences to the current user and obtain a corresponding similar user group.
[0064] In this embodiment, similar users with similar movie preferences as the current user can be determined to obtain a corresponding similar user group, so that movies liked by the similar user group can be recommended to the current user later. This can help to jump out of the "information cocoon" to a certain extent, allowing the current user to obtain cross-category movie recommendations.
[0065] Specifically, determine candidate similar users, and obtain the movie rating data corresponding to the candidate similar users and the current user respectively; use cosine similarity and calculate the user similarity between the candidate similar users and the current user based on the movie rating data; determine whether the candidate similar user is a similar user of the current user based on the user similarity, and obtain the corresponding similar user group. It can be understood that by using the user's movie rating data to calculate the similarity between users, that is, by calculating the similarity matrix between users, the similar user group of the current user can be found. In addition, when calculating the similarity between users, the singular value decomposition (SVD) algorithm can be used to analyze the similarity between users. The singular value decomposition algorithm can be used for dimensionality reduction and can more effectively reveal the similarity between users to improve the accuracy of recommendations.
[0066] For example, first movie rating data corresponding to the candidate similar user and second movie rating data corresponding to the current user are obtained; the first movie rating data and the second movie rating data are processed using cosine similarity to calculate the user similarity between the candidate similar user and the current user, and the user similarity is compared with a preset user similarity threshold to obtain a corresponding second comparison result; if the second comparison result shows that the user similarity is not less than the preset user similarity threshold, the candidate similar user is determined to be a similar user of the current user to obtain a corresponding similar user group; if the second comparison result shows that the user similarity is less than the preset user similarity threshold, the candidate similar user is determined not to be a similar user of the current user.
[0067] Step S13: predicting a first rating value of the current user for the unwatched movies according to the first ratings of the movies by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values.
[0068] In this embodiment, after determining a similar user group with similar movie preferences as the current user, the first rating value of the current user for unwatched movies can be predicted based on the ratings of the similar user group on movies, so as to generate a target unwatched movie set based on the first rating value. It can be understood that a collaborative filtering recommendation algorithm based on user similarity can be used to recommend movies that the current user has not watched but that other similar users like, that is, the algorithm uses the user's movie rating data to calculate the similarity matrix between users, can find similar user groups, and predict the current user's preference for unwatched movies based on the ratings of these similar users on movies, and provide personalized movie recommendations for users based on the predicted preference, that is, recommending movies that the user has not watched but that other similar users like.
[0069] Specifically, the watched movies of each similar user in the similar user group are determined to obtain a watched movie set, and the unwatched movies of the current user are determined from the watched movie set to obtain an unwatched movie set; the ratings of the unwatched movies by each similar user are obtained; the first rating value of the unwatched movies by the current user is predicted based on the first ratings of the unwatched movies by each similar user; and the unwatched movies in the unwatched movie set are filtered based on the first rating value to obtain a target unwatched movie set.
[0070] It should be pointed out that because user preferences may change over time, time weights based on normal distribution can be added to the collaborative filtering recommendation algorithm based on user similarity. Movies that are closer in time to the user's evaluation have higher weights, and movies that are farther away have lower weights. This can avoid the situation where the predicted recommended movies are not in line with the user's current preferences due to behavior a long time ago, thereby improving the accuracy of recommendations to a certain extent.
[0071] Step S15: recommend the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user.
[0072] In this embodiment, the content filtering recommendation algorithm based on movie content similarity determines similar movies that are similar to the movies of interest to the current user to obtain a corresponding similar movie set, and the collaborative filtering recommendation algorithm based on user similarity determines movies that the current user has not watched but that similar users like to obtain a target unwatched movie set. Then, the movies to be recommended in the similar movie set and the target unwatched movie set can be recommended to the current user, thereby providing personalized movie recommendations for the current user.
[0073] In this embodiment, some movies with high scores but few ratings can also be obtained, and then this type of movies and similar movie sets and the movies to be recommended in the target unwatched movie set can be recommended to the current user, and the number of movies recommended for this type of movies with high scores but few ratings can be selected by setting the recommendation ratio weight. For example, originally planned to recommend 10 movies, the recommendation ratio of this type of movies with high scores but few ratings is preset to 10%, then 9 of them can be recommended based on user similarity collaborative filtering and content filtering based on movie content similarity, and a movie with high scores but few ratings can be randomly recommended, such as a movie with a Douban score of 9 or above, or a movie that won an Oscar, or other small but classic movies in history, etc., which not only retains the recommendation of movies that the user may like according to his preferences, but also allows users to jump out of the constraints of the information cocoon to try different types of movies, and also allows some good movies that just lack the opportunity to be rated to get the opportunity to be recommended.
[0074] It can be seen that in the embodiments of the present invention, personalized movie recommendations are achieved by combining the similarity of movies and the similarity between the user and other users, that is, similar movies similar to the movies of interest to the current user are determined, and similar users similar to the movie preferences of the current user are simultaneously determined, and then the current user's ratings of unwatched movies are predicted based on the ratings of the similar users on the movies, and movies that the current user has not watched and may be interested in, as well as similar movies that are similar to the movies of interest to the current user, are recommended to the current user based on the ratings, thereby providing users with personalized movie recommendations, improving user experience, and meeting user needs.
[0075] See also Figure 2 As shown, the embodiment of the present invention discloses a specific movie recommendation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.
[0076] Step S21: receiving the movie of interest input by the current user, and determining similar movies to the movie of interest to obtain a corresponding similar movie set.
[0077] Step S22: Calculate the recommendation value of each of the similar movies in the similar movie set to generate a first target similar movie set based on the recommendation value of each of the similar movies.
[0078] In this embodiment, after determining similar movies of the movie of interest to obtain the corresponding similar movie set, the selected similar movies can also be weightedly scored in combination with the aforementioned recommendation algorithm based on movie popularity to filter out some similar movies with bad reputations from the similar movie set, that is, the recommendation value of each similar movie in the similar movie set is calculated to generate a first target similar movie set based on the recommendation value of each similar movie. Specifically, the first average rating value and the number of ratings of each similar movie in the similar movie set and the second average rating value of the similar movie set are determined; the recommendation value of each similar movie in the similar movie set is calculated based on the first average rating value and the number of ratings of each similar movie and the second average rating value of the similar movie set; the similar movies in the similar movie set are filtered based on the recommendation value to obtain the first target similar movie set. For example, similar movies with recommendation values less than a preset recommendation threshold are filtered out from the similar movie set, and similar movies with recommendation values not less than the preset recommendation threshold are retained.
[0079] Step S23: Determine similar users who have similar movie preferences to the current user and obtain a corresponding similar user group.
[0080] Step S24: predicting a first rating value of the current user for the unwatched movies according to the first ratings of the movies by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values.
[0081] Step S25: recommend the to-be-recommended movies in the first target similar movie set and the target unwatched movie set to the current user.
[0082] In this embodiment, only popular similar movies are retained in the first target similar movie set, and then the popular similar movies and the movies in the target unwatched movie set are recommended to the current user as the movies to be recommended. When the same movies exist in the first target similar movie set and the target unwatched movie set, the recommendations are merged to avoid duplicate recommended movies.
[0083] For the specific contents of the above-mentioned step S21 and steps S23 to S24, reference may be made to the corresponding contents disclosed in the above-mentioned embodiments, which will not be repeated here.
[0084] It can be seen that in the embodiments of the present invention, personalized movie recommendations are achieved by combining the similarity of movies and the similarity between the user and other users, that is, similar movies to the movie that the current user is interested in are determined, and then the recommendation values of the similar movies are calculated, and similar movies to the movie that the user is interested in are recommended to the current user based on the recommendation values, and similar users with similar movie preferences as the current user are determined at the same time, and then the current user's ratings of unwatched movies are predicted based on the ratings of similar users on movies, and movies that the current user has not watched and may be interested in are recommended to the current user based on the ratings, thereby providing users with personalized movie recommendations, improving user experience, and meeting user needs.
[0085] See also Figure 3 As shown, the embodiment of the present invention discloses a specific movie recommendation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.
[0086] Step S31: receiving a movie of interest input by the current user, and determining similar movies to the movie of interest to obtain a corresponding similar movie set.
[0087] Step S32: Determine similar users whose movie preferences are similar to the current user to obtain a corresponding similar user group.
[0088] Step S33: predicting a first rating value of the current user for the unwatched movies according to the first ratings of the movies by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values.
[0089] Step S34: Filter out the target similar movies rated by each of the similar users in the similar user group from the similar movie set, and obtain the second rating of each of the similar users on the target similar movies.
[0090] It is understandable that there may be movies that have been watched and rated by similar users in the similar movie set, so these movies can be filtered out from the similar movie set to obtain the target similar movies, and then the second ratings of the target similar movies by each similar user can be obtained, so as to subsequently predict the current user's liking for the target similar movies based on the second ratings, and then recommend the target similar movies to the current user based on the liking.
[0091] Step S35: predicting a second rating value of the current user for the target similar movie according to the second rating situation, so as to generate a second target similar movie set based on the second rating value.
[0092] In this embodiment, the current user's liking for the target similar movie is predicted based on the second rating situation, that is, the current user's second rating value for the target similar movie is predicted based on the second rating situation, so as to generate a second target similar movie set based on the second rating value. It can be understood that the collaborative filtering recommendation algorithm based on user similarity can recommend target similar movies that the current user may be interested in.
[0093] For example, after obtaining the second ratings of the target similar movies by each similar user, predict the second rating value of the target similar movie by the current user based on the second ratings, and then compare the second rating value with a preset rating threshold. The target similar movies whose second ratings are not less than the preset rating threshold are retained to obtain a second target similar movie set, and the target similar movies whose second ratings are less than the preset rating threshold are discarded.
[0094] Step S36: Filter the target similar movies rated by the similar users in the similar movie set to obtain a filtered similar movie set.
[0095] It can be understood that in the aforementioned steps S34 to S35, the target similar movies rated by each similar user in the similar movie set have been screened to obtain the second target similar movie set, so the target similar movies rated by each similar user in the similar movie set can be filtered to obtain a filtered similar movie set. Among them, the filtered similar movie set contains similar movies that have not been rated by similar users, and this part of movies can be recommended to the current user to avoid missing movies that the current user may like.
[0096] Step S37: Filter the movies in the target unwatched movie set that are the same as the similar movies to obtain a filtered target unwatched movie set.
[0097] It is understandable that there may be the same movies in the target unwatched movie set as in the similar movie set, but the similar movies in the similar movie set have been screened in the aforementioned steps, leaving the filtered similar movie set and the second target similar movie set, so the movies in the target unwatched movie set that are the same as the similar movies can be filtered to obtain the filtered target unwatched movie set, avoiding recommending the target similar movie in the similar movie set whose second rating value is less than the preset rating threshold to the current user, so as to improve the accuracy of the recommendation.
[0098] Step S38: recommend the to-be-recommended movies in the filtered similar movie set, the second target similar movie set, and the filtered target unwatched movie set to the current user.
[0099] In this embodiment, the to-be-recommended movies in the filtered similar movie set, the second target similar movie set and the filtered target unwatched movie set are recommended to the current user, thereby improving the accuracy, coverage and user experience of the recommendation.
[0100] For the specific contents of the above steps S31 to S33, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be elaborated here.
[0101] It can be seen that in the embodiment of the present invention, the similarity of movies and the similarity of users are combined to obtain similar movies of a specific movie through a content filtering algorithm, and at the same time, a score prediction is performed on the obtained target similar movies according to the preferences of similar users through a collaborative filtering algorithm, so that target similar movies with high predicted scores are recommended to users, and movies in the filtered similar movie set and the filtered target unwatched movie set are recommended to the current user, thereby providing users with personalized movie recommendations, improving user experience, and meeting user needs.
[0102] In one embodiment, if Figure 4 As shown, based on the above-mentioned movie recommendation method, the present invention also provides a movie recommendation system, including:
[0103] A similar movie determination module 11 is used to receive a movie of interest input by a current user, and determine similar movies to the movie of interest to obtain a corresponding similar movie set;
[0104] A similar user determination module 12 is used to determine similar users with similar movie preferences to the current user to obtain a corresponding similar user group;
[0105] A rating value prediction module 13 is used to predict the first rating value of the current user for the unwatched movie according to the first rating of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating value;
[0106] The movie recommendation module 14 is used to recommend the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user.
[0107] For example, a user system is implemented by building a front-end and back-end to present a movie recommendation function, wherein the user system includes the aforementioned movie recommendation system that can realize personalized movie recommendation, and the user system has functions such as user registration, login, and personal information management. In the user system, users can find movies of interest by searching, filtering, etc., and then rate the movies after watching them, so that the movie recommendation system can continuously optimize the recommendations based on user feedback information and provide more personalized recommendation results. When users search for movies, the movie recommendation system can recommend more movies that users may be interested in, so that users can obtain personalized related movie recommendations for the movie.
[0108] Figure 5 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal may include:
[0109] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .
[0110] When the processor 502 executes the program, the movie recommendation method provided in the above embodiment is implemented.
[0111] Furthermore, the terminal further includes:
[0112] The communication interface 503 is used for communication between the memory 501 and the processor 502 .
[0113] The memory 501 is used to store computer programs that can be executed on the processor 502 .
[0114] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0115] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0116] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.
[0117] The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0118] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned movie recommendation method is implemented.
[0119] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this application. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the claims.
[0120] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can read instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0122] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA, Programmable Gate Array), a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.
[0123] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A movie recommendation method, characterized in that: The method comprises: Receive a movie of interest input by a current user, and determine similar movies to the movie of interest to obtain a corresponding similar movie set; Determine similar users with similar movie preferences to the current user to obtain corresponding similar user groups; Predicting a first rating value of an unwatched movie by the current user according to the first ratings of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values; The to-be-recommended movies in the similar movie set and the target unwatched movie set are recommended to the current user.
2. The movie recommendation method according to claim 1, characterized in that: The determining similar movies to the movie of interest to obtain a corresponding similar movie set includes: Determine candidate similar movies, and obtain similarity evaluation indicators corresponding to the candidate similar movies and the movie of interest respectively; The similarity evaluation index is vectorized using a TF-IDF word vectorization tool to obtain a vectorized similarity evaluation index; Calculating the movie similarity between the candidate similar movie and the movie of interest based on the vectorized similarity evaluation index using cosine similarity; Based on the movie similarity, it is determined whether the candidate similar movie is a similar movie to the movie of interest to obtain a corresponding similar movie set.
3. The movie recommendation method according to claim 1, characterized in that: After determining similar movies to the movie of interest to obtain a corresponding similar movie set, the method further includes: calculating a recommendation value of each of the similar movies in the similar movie set to generate a first target similar movie set based on the recommendation value of each of the similar movies; The step of recommending the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user includes: The to-be-recommended movies in the first target similar movie set and the target unwatched movie set are recommended to the current user.
4. The movie recommendation method according to claim 3, characterized in that: The calculating the recommendation value of each of the similar movies in the similar movie set to generate a first target similar movie set based on the recommendation value of each of the similar movies comprises: Determine a first average rating value and a number of ratings of each of the similar movies in the similar movie set and a second average rating value of the similar movie set; Calculating a recommendation value of each of the similar movies in the similar movie set according to the first average rating value and the number of ratings of each of the similar movies and the second average rating value of the similar movie set; The similar movies in the similar movie set are filtered based on the recommendation value to obtain a first target similar movie set.
5. The movie recommendation method according to claim 1, characterized in that: Determining similar users with similar movie preferences to the current user to obtain corresponding similar user groups includes: Determine candidate similar users, and obtain movie rating data corresponding to the candidate similar users and the current user respectively; Calculating the user similarity between the candidate similar user and the current user based on the movie rating data using cosine similarity; Based on the user similarity, it is determined whether the candidate similar users are similar users of the current user, and a corresponding similar user group is obtained.
6. The movie recommendation method according to claim 1, characterized in that: The predicting the first rating value of the current user for the unwatched movie according to the first rating of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating value, comprises: Determine the movies watched by each of the similar users in the similar user group to obtain a watched movie set, and determine the unwatched movies of the current user from the watched movie set to obtain an unwatched movie set; Obtaining first ratings of the unwatched movies by the similar users; Predicting a first rating value of the current user for the unwatched movie based on the first ratings of the unwatched movie by each of the similar users; The unwatched movies in the unwatched movie set are filtered based on the first rating value to obtain a target unwatched movie set.
7. The movie recommendation method according to any one of claims 1 to 6, characterized in that: Before recommending the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user, the method further includes: Filtering target similar movies rated by each of the similar users in the similar user group from the similar movie set, and obtaining second ratings of the target similar movies by each of the similar users; Predicting a second rating value of the current user for the target similar movie according to the second rating situation, so as to generate a second target similar movie set based on the second rating value; The step of recommending the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user includes: Filtering the target similar movies rated by the similar users in the similar movie set to obtain a filtered similar movie set; Filter the movies in the target unwatched movie set that are the same as the similar movies to obtain a filtered target unwatched movie set; The to-be-recommended movies in the filtered similar movie set, the second target similar movie set, and the filtered target unwatched movie set are recommended to the current user.
8. A movie recommendation system, characterized in that: The system comprises: A similar movie determination module is used to receive a movie of interest input by a current user, and determine similar movies to the movie of interest to obtain a corresponding similar movie set; A similar user determination module is used to determine similar users with similar movie preferences to the current user to obtain a corresponding similar user group; a rating value prediction module, configured to predict a first rating value of an unwatched movie by a current user according to the first ratings of the movie by each of the similar users in the similar user group, so as to generate a target unwatched movie set based on the first rating values; The movie recommendation module is used to recommend the to-be-recommended movies in the similar movie set and the target unwatched movie set to the current user.
9. A terminal, characterized in that: include: A memory, a processor, and a movie recommendation program stored in the memory and executable on the processor, wherein the movie recommendation program, when executed by the processor, implements the steps of the movie recommendation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be executed to implement the steps of the movie recommendation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Application recommendation method and application recommendation system
CN103198418A
TV program pushing method and device
CN106534984A
Article recommendation method and device
CN113269602A
Hybrid recommendation method and system based on clustering and collaborative filtering
CN114912031A
Resource recommendation method and training method and device of resource recommendation model
CN115994263A