A movie recommendation method and device based on curious user collaborative filtering
By constructing a collection of curious users and a comprehensive similarity matrix, we recommend movies that match the user's interests and are in different categories. This solves the problem of user boredom in the recommendation system in the existing technology and achieves higher accuracy and novelty.
Patent Information
- Application Number
- CN202211383976.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-07
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-11-07
AI Technical Summary
Existing user-based collaborative filtering algorithms in recommendation systems tend to recommend items similar to items previously selected by users, which makes users feel bored and difficult to arouse their curiosity. This fails to broaden users' horizons and affects the exposure and sales of other merchants' items.
By calculating the comprehensive similarity between users, building a set of curious users, and combining movie category information, we predict the relevance of the target user to the target movie, and recommend movies that match the user's interests but are in different categories, introducing curious users to replace similar users.
It improves the accuracy and novelty of recommendations and can recommend movies that are different from the movies users have previously selected, stimulate users' curiosity, and increase the exposure and sales of other merchants' products.
Smart Images

Figure CN115687769B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a movie recommendation method and device based on curious user collaborative filtering. Background Art
[0002] The internet has developed rapidly in recent years, and the amount of data on it has exploded. For individual users, this increased volume of information makes it increasingly difficult to find useful information. Recommender systems are one effective way to address information overload. They record and learn from user behavior (browsing, purchasing, adding to favorites, etc.) on online platforms to proactively recommend items of interest. Due to their effectiveness, recommendation systems have been applied in a variety of fields, including e-commerce, entertainment, travel, and social networking.
[0003] Collaborative filtering is one of the most widely used methods in recommender systems. It can be categorized into item-based and user-based methods. User-based filtering finds k nearest neighbor users for a target user based on the similarity between their ratings on commonly selected items and those of other users. The target user's rating for the target item is predicted using the similarity between these k nearest neighbor users and their ratings of the target item. The resulting list of recommended items is then sorted from highest to lowest by predicted rating. User-based collaborative filtering algorithms are widely used due to their simplicity, ease of implementation, and high recommendation accuracy.
[0004] Although user-based collaborative filtering algorithms are very popular, they tend to recommend items that are very similar to items previously selected by the target user. These items may not be known to the target user through recommendation, so they may easily make the target user feel bored.
[0005] From a psychological perspective, users feel bored because these recommendations fail to stimulate their curiosity. Social curiosity states that everyone is curious about the lives, behaviors, and thoughts of others. User-based collaborative filtering algorithms generate recommendation lists based on the items selected by similar, nearby users, which aligns with the assumption of social curiosity. However, because user-based collaborative filtering algorithms tend to recommend items similar to those previously selected by the target user, they are less likely to arouse the target user's curiosity.
[0006] At the same time, recommending items that are similar to those previously selected by the target user does not broaden the target user's horizons, nor does it help merchants increase the exposure and sales of other items. Summary of the Invention
[0007] In view of this, an embodiment of the present invention provides a movie recommendation method and device based on curious user collaborative filtering with high accuracy and novelty.
[0008] An aspect of an embodiment of the present invention provides a movie recommendation method based on curious user collaborative filtering, comprising:
[0009] Obtain user rating records for movies and establish a user rating matrix;
[0010] Calculate the similarity between any two users and establish a user similarity matrix;
[0011] Calculate the average popularity of each movie;
[0012] Construct a movie category matrix based on movie category information;
[0013] According to the category of the movie selected by each user, construct a category selection frequency matrix of each movie by the user, and calculate the variance of the category selection frequency vector of each user according to the category selection frequency matrix;
[0014] Calculating the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determining a curious user set for each user based on the comprehensive similarity;
[0015] Predicting the relevance of the target user to the target movie based on the scores given to the target movie by the target user's curious user set;
[0016] Calculating the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, and constructing a movie-user category distance matrix;
[0017] According to the relevance of the target user to the target movie and the movie-user category distance matrix, a comprehensive relevance of the target user to the target movie is calculated, and movies are recommended to the target user according to the comprehensive relevance.
[0018] Optionally, in the step of calculating the similarity between any two users and establishing a user similarity matrix, the similarity calculation formula is:
[0019]
[0020] Among them, sim(u t ,u c ) represents user u t and u c User similarity of R t,j R represents the rating of user i on movie j; c,j represents the rating of user c on movie j; is the average score of the movie given by user i; is the average score of user c on the movie; I(u t ,uc ) is the set of movies selected by users i and c.
[0021] Optionally, in the step of calculating the average popularity of each movie, the calculation formula of the average popularity is:
[0022]
[0023] Among them, Pop uc represents the average popularity; |U(I j )| is the number of users who selected movie j; |U| is the number of all users, I(u c ) is user u c A collection of movies that have been selected.
[0024] Optionally, in the step of calculating the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, the calculation formula of the comprehensive similarity is:
[0025]
[0026] Among them, score(u t ,u c ) represents user u t and u c The comprehensive similarity of sim(u t ,u c ) represents user u t and u c Pop uc Represents the average popularity; Div(g uc ) represents the variance of the category selection frequency vector.
[0027] Optionally, in the step of predicting the target user's relevance to the target movie based on the scores given to the target movie by the target user's curious user set, the calculation formula for the target user's relevance to the target movie is:
[0028]
[0029] Among them, rel(u t ,j) represents the target user u t The relevance of the target movie j; score(u k ,u t ) represents user u k and u t The comprehensive similarity of K(u t ) represents the target user u t The first k curious users; represents the rating of movie j by the kth curious user.
[0030] Optionally, in the step of calculating the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, the frequency distance between each movie category and the movie category selected by the user is calculated using the following formula:
[0031]
[0032] Among them, diff(u t ,j) represents the category of each movie j and user u t Frequency distance of the selected movie category; g ut is user u t The frequency vector of the selected movie category; I j is the category vector of movie j.
[0033] Another aspect of the present invention provides a movie recommendation device based on curious user collaborative filtering, comprising:
[0034] The first module is used to obtain users' rating records of movies and establish a user rating matrix;
[0035] The second module is used to calculate the similarity between any two users and establish a user similarity matrix;
[0036] The third module is used to calculate the average popularity of each movie;
[0037] The fourth module is used to construct a movie category matrix based on movie category information;
[0038] A fifth module is configured to construct a user's category selection frequency matrix for each movie based on the category of the movie selected by each user, and calculate the variance of each user's category selection frequency vector based on the category selection frequency matrix;
[0039] a sixth module, configured to calculate a comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determine a curious user set for each user based on the comprehensive similarity;
[0040] The seventh module is used to predict the relevance of the target user to the target movie based on the scores given to the target movie by the curious user set of the target user;
[0041] An eighth module is configured to calculate the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, and construct a movie-user category distance matrix;
[0042] The ninth module is used to calculate the comprehensive relevance of the target user to the target movie based on the relevance of the target user to the target movie and the movie-user category distance matrix, and recommend movies to the target user based on the comprehensive relevance.
[0043] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0044] The memory is used to store programs;
[0045] The processor executes the program to implement the method described above.
[0046] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0047] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0048] The embodiment of the present invention obtains user rating records of movies and establishes a user rating matrix; calculates the similarity between any two users and establishes a user similarity matrix; calculates the average popularity of each movie; constructs a movie category matrix based on movie category information; constructs a user category selection frequency matrix for each movie based on the category of each user's selected movie, and calculates the variance of each user's category selection frequency vector based on the category selection frequency matrix; calculates the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determines the curious user set of each user based on the comprehensive similarity; predicts the target user's relevance to the target movie based on the ratings of the target user's curious user set to the target movie; calculates the frequency distance between each movie category and the user's selected movie category based on the movie category matrix and the variance, and constructs a movie-user category distance matrix; calculates the target user's comprehensive relevance to the target movie based on the target user's relevance to the target movie and the movie-user category distance matrix, and recommends movies to the target user based on the comprehensive relevance. The present invention has high accuracy and high novelty. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 The following is a flowchart of the overall steps provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0052] In order to address the problems existing in the prior art, an embodiment of the present invention provides a movie recommendation method based on curious user collaborative filtering, comprising:
[0053] Obtain user rating records for movies and establish a user rating matrix;
[0054] Calculate the similarity between any two users and establish a user similarity matrix;
[0055] Calculate the average popularity of each movie;
[0056] Construct a movie category matrix based on movie category information;
[0057] According to the category of the movie selected by each user, construct a category selection frequency matrix of each movie by the user, and calculate the variance of the category selection frequency vector of each user according to the category selection frequency matrix;
[0058] Calculating the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determining a curious user set for each user based on the comprehensive similarity;
[0059] Predicting the relevance of the target user to the target movie based on the scores given to the target movie by the target user's curious user set;
[0060] Calculating the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, and constructing a movie-user category distance matrix;
[0061] According to the relevance of the target user to the target movie and the movie-user category distance matrix, a comprehensive relevance of the target user to the target movie is calculated, and movies are recommended to the target user according to the comprehensive relevance.
[0062] Optionally, in the step of calculating the similarity between any two users and establishing a user similarity matrix, the similarity calculation formula is:
[0063]
[0064] Among them, sim(u t ,u c ) represents user u t and u c User similarity of R t,j R represents the rating of movie j by user i; c,j represents the rating of user c on movie j; is the average score of the movie given by user i; is the average score of user c on the movie; I(u t ,u c ) is the set of movies selected by users i and c.
[0065] Optionally, in the step of calculating the average popularity of each movie, the calculation formula of the average popularity is:
[0066]
[0067] Among them, Pop uc represents the average popularity; |U(I j )| is the number of users who selected movie j; |U| is the number of all users, I(u c ) is user u c A collection of movies that have been selected.
[0068] Optionally, in the step of calculating the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, the calculation formula of the comprehensive similarity is:
[0069]
[0070] Among them, score(u t ,u c ) represents user u t and u c The comprehensive similarity of sim(u t ,u c ) represents user u t and u c Pop uc Represents the average popularity; Div(g uc ) represents the variance of the category selection frequency vector.
[0071] Optionally, in the step of predicting the target user's relevance to the target movie based on the scores given to the target movie by the target user's curious user set, the calculation formula for the target user's relevance to the target movie is:
[0072]
[0073] Among them, rel(u t ,j) represents the target user u t The relevance of the target movie j; score(u k ,u t ) represents user u k and u t The comprehensive similarity of K(u t ) represents the target user u t The first k curious users; represents the rating of movie j by the kth curious user.
[0074] Optionally, in the step of calculating the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, the frequency distance between each movie category and the movie category selected by the user is calculated using the following formula:
[0075]
[0076] Among them, diff(u t ,j) represents the category of each movie j and user u t Frequency distance of the selected movie category; g ut is user u t The frequency vector of the selected movie category; I j is the category vector of movie j.
[0077] Another aspect of the present invention provides a movie recommendation device based on curious user collaborative filtering, comprising:
[0078] The first module is used to obtain users' rating records of movies and establish a user rating matrix;
[0079] The second module is used to calculate the similarity between any two users and establish a user similarity matrix;
[0080] The third module is used to calculate the average popularity of each movie;
[0081] The fourth module is used to construct a movie category matrix based on movie category information;
[0082] A fifth module is configured to construct a user's category selection frequency matrix for each movie based on the category of the movie selected by each user, and calculate the variance of each user's category selection frequency vector based on the category selection frequency matrix;
[0083] a sixth module, configured to calculate a comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determine a curious user set for each user based on the comprehensive similarity;
[0084] The seventh module is used to predict the relevance of the target user to the target movie based on the scores given to the target movie by the curious user set of the target user;
[0085] An eighth module is configured to calculate the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, and construct a movie-user category distance matrix;
[0086] The ninth module is used to calculate the comprehensive relevance of the target user to the target movie based on the relevance of the target user to the target movie and the movie-user category distance matrix, and recommend movies to the target user based on the comprehensive relevance.
[0087] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0088] The memory is used to store programs;
[0089] The processor executes the program to implement the method described above.
[0090] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0091] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0092] The specific implementation process of the present invention is described in detail below with reference to the accompanying drawings:
[0093] In view of the limitations of the classic user-based collaborative filtering algorithm mentioned above, the present invention provides an improved collaborative filtering algorithm based on curious users. Figure 1As shown, the present invention first finds k nearest curious users of the target user, and generates a recommendation list based on the comprehensive ratings of the curious users on the target item and the difference between the target item and the items previously selected by the target user. The steps are as follows:
[0094] Step (1) Create a user rating matrix based on the user's movie rating records.
[0095] Step (2) uses the Pearson metric to calculate the similarity between each pair of users, establishes a user similarity matrix, and calculates the user similarity method:
[0096]
[0097] Among them, R t,j / R c,j represents the ratings of users t and c on movie j, is the average score of users t and c, I(u t ,u c ) is the set of movies selected by users t and c.
[0098] The user similarity matrix can be expressed as:
[0099] Where n is the number of users
[0100] Step (3) calculates the popularity of each movie and the average popularity of the movies selected by the user. The formula for calculating the average popularity of the movies selected by the user is as follows:
[0101]
[0102] In the formula, |U(I j )| is the number of users who selected movie j, |U| is the number of all users, I(u c ) is user u c A collection of movies that have been selected. uc The higher the value, the higher the user u c The more popular the movie, the easier it is for the system to find and recommend it. uc The lower the value, the higher the user u c Willing to try films that are not easily discovered.
[0103] Step (4) Construct a movie category matrix based on the movie category information. Each movie category vector I j =(I 1,j ,I 2,j ,I i,j ,...) means, I i,jIt is 1 if movie j belongs to category i, otherwise it is 0. The movie category matrix is [I1; I2; ...], and the specific example is shown in Table 1 below:
[0104] Table 1
[0105]
[0106] Among them, I m is the mth movie category vector.
[0107] In step (5), the user's frequency vector for the selected movie category is g u =(g 1,u ,g 2,u ,g i,u ,...), g i,u is the frequency of user u selecting category i, and the user’s selection frequency matrix for each movie category is [g 1,u ,g 2,u ,g i,u ,...]. The calculation formula of the user category selection frequency vector variance is as follows:
[0108] Div(u c )=var(g u ).
[0109] A specific example of the user selection frequency matrix for each movie category is shown in Table 2 below:
[0110] Table 2
[0111]
[0112]
[0113] Div(u c ) reflects the user u c Diversity of selected film categories, Div(u c ) is larger, indicating that users choose movies in certain categories. c ) is smaller, which means that users select movies from more categories.
[0114] Step (6) combines steps (2), (3), and (5) to calculate the comprehensive similarity between users and find the top k users for each user. These k users are called target users u. t The formula for calculating the comprehensive similarity between users is as follows:
[0115]
[0116] In general, and the target user u tOther users who have more similar interests, are willing to try more types of movies, and are willing to look for non-popular movies are more likely to become curious users of the target user. c .
[0117] Step (7) predicts the relevance of the target user to the target movie based on the scores of k curious users on the target movie. The calculation method is as follows:
[0118]
[0119] Where, K(u t ) is the target user u t Top k curious users. is the rating of movie j by the kth curious user.
[0120] Step (8) combines steps (4) and (5) to calculate the frequency distance between each movie category and the movie category selected by the user, and construct the movie-user category distance matrix. The formula for calculating the frequency distance between each movie category and the movie category selected by the user is as follows:
[0121]
[0122] g ut is user u t The frequency vector of the movie category selected by the user, I j is the category vector of movie j. The specific example of the movie-user category distance matrix is shown in Table 3 below:
[0123] Table 3
[0124]
[0125] diff(u t ,j) is larger, indicating that movie j is closely related to user u t The more different the movie categories selected previously are, the easier it is to bring freshness to users and arouse their curiosity.
[0126] Step (9) integrates steps (7) and (8) to calculate the comprehensive relevance of the target user to the target movie, and sorts the movies from high to low according to the comprehensive relevance, and recommends the top n movies to the target user. The comprehensive relevance calculation formula is as follows:
[0127] prob(u t ,j)=rel′(u t ,j)+diff(u t ,j),
[0128] Among them, rel′(u t ,j) is the normalized rel(u t ,j).
[0129] In general, if a movie meets the target user u t interests, and the category is different from the target user u t previously selected movie category, then the movie has a greater probability of being recommended to the target user u t .
[0130] At this point, the overall implementation process of the movie recommendation method according to the embodiment of the present invention is completed.
[0131] The experimental process and results of the present invention are described below.
[0132] The experiment was conducted on the ml-100k dataset of Movielens. The user-movie rating data were sorted from early to late by time, and the first 80% were selected as the training set and the other 20% as the test set.
[0133] The comparison methods include the user-based collaborative filtering algorithm (UserCF), the item-based collaborative filtering algorithm (ItemCF), and the method described in this paper, CuriCF. The accuracy of recommendations is measured using precision, recall, and f1-score. Accuracy reflects the degree of overlap between the movies in the recommended list and the movies in the user's test set. The greater the overlap, the higher the recommendation accuracy of the method.
[0134] In addition to the three accuracy metrics, the indicator diff@N, which measures whether the recommended movie is different from the user's previous movies, is also taken into consideration. The calculation formula is as follows:
[0135]
[0136] Where, diff(u t ,RS(u t ,N)) is calculated as follows:
[0137]
[0138] diff(u t ,RS(u t ,N)) measures each target user u t With the recommendation list RS(u t ,N), the average category distance of each movie n in the recommended list.,diff@N,measures the average distance between all users and the movie categories in the,corresponding recommendation list.,A higher diff@N, the greater the distance between the movie recommended by,this method and the movie category selected by the user, which is more likely to arouse user,curiosity and improve the novelty of the recommendation.
[0139] The accuracy experimental results are shown in Tables 4 and 5. Table 4 shows the accuracy of N for different values when the number of nearest neighbors k = 5, and Table 5 shows the accuracy of N for different values when the number of nearest neighbors k = 10:
[0140] Table 4
[0141]
[0142]
[0143] Table 5
[0144] UserCF ItemCF CuriCF k=10 Prec@5 0.0632 0.0324 0.0817 Prec@10 0.053 0.0308 0.0775 Prec@15 0.0468 0.0316 0.066 Prec@20 0.0422 0.0313 0.0624
[0145] The recall rate experimental results are shown in Tables 6 and 7. Table 6 shows the recall rate when the number of nearest neighbors k = 5 and N takes different values; Table 7 shows the recall rate when the number of nearest neighbors k = 10 and N takes different values.
[0146] Table 6
[0147] UserCF ItemCF CuriCF k=5 Re c all@5 0.0169 0.01 0.0216 Re c all@10 0.0277 0.0179 0.0355 Re c all@15 0.0368 0.0275 0.0487 Re c all@20 0.043 0.035 0.0602
[0148] Table 7
[0149] UserCF ItemCF CuriCF k=10 Re c all@5 0.0196 0.0086 0.0225 Re c all@10 0.0305 0.0133 0.0425 Re c all@15 0.0409 0.0186 0.0519 Re c all@20 0.0491 0.0256 0.0639
[0150] The experimental results of the f1-score are shown in Tables 8 and 9. Table 8 shows the f1-scores when N takes different values when the number of neighbors k = 5, and Table 9 shows the f1-scores when N takes different values when the number of neighbors k = 10.
[0151] Table 8
[0152]
[0153]
[0154] Table 9
[0155] UserCF ItemCF CuriCF k=10 F1@5 0.03 0.0136 0.0353 F1@10 0.0387 0.0185 0.0549 F1@15 0.0437 0.0234 0.0581 F1@20 0.0454 0.0282 0.0632
[0156] Specifically, the precision results in Tables 4 and 5 show that CuriCF has the highest accuracy, indicating that compared to other methods, CuriCF can predict more movies actually selected by users among the top N recommended movies. Recall measures the ratio of the number of movies actually selected by users in the recommendation list to the number of movies in the test set. A higher recall indicates that the method is more likely to find movies that match the user's interests. The results in Tables 6 and 7 show that CuriCF has a higher recall than both UserCF and ItemCF. The f1-score is a metric that combines precision and recall. A high f1-score is achieved only when both precision and recall are high. The results in Tables 8 and 9 show that CuriCF has a significantly higher f1-score than both UserCF and ItemCF.
[0157] The diff@N experimental results are shown in Tables 10 and 11. Table 10 shows the diff@N with different values of N when the number of neighbors k = 5, and Table 11 shows the diff@N with different values of N when the number of neighbors k = 10.
[0158] Table 10
[0159] UserCF(ws) ItemCF(aws) CuriCF k=5 diff@5 0.4363 0.2907 0.6596 diff@10 0.4361 0.4003 0.667 diff@15 0.4357 0.4126 0.6571 diff@20 0.4363 0.4245 0.6455
[0160] Table 11
[0161]
[0162]
[0163] diff@N measures the distance between the movies in the recommended list and the user's previously selected movie categories. A larger diff@N indicates that the method is more likely to recommend movies that are different from the user's previous choices, increasing the novelty of the recommendations while also providing a sense of freshness. If the method focuses solely on recommending movies that differ from the user's previous choices, it is likely to deviate from the user's interests. Recommending movies similar to the user's previous choices may improve accuracy, but it may also cause the user to feel bored. The experimental results in Tables 4-11 show that CuriCF achieves a good balance between accuracy and freshness. CuriCF achieves high accuracy while also recommending movies that are different from the user's previous choices.
[0164] In summary, the present invention provides a movie recommendation method and device based on curious user collaborative filtering. First, the present invention introduces curious users to replace similar users. Like similar users, curious users share similar interests and hobbies with the target user. However, curious users are more likely to try new and less popular items, and therefore are more likely to recommend unique items than similar users.
[0165] Secondly, the present invention not only focuses on finding items that match the target user's interests, but also items that are different from the categories of items previously selected by the target user. Experimental results show that compared with the classic user-based collaborative filtering algorithm, the proposed algorithm not only improves the accuracy, but also improves the novelty of the recommendation.
[0166] Understandably, the classic collaborative filtering algorithm, based on user similarity, tends to recommend items similar to those previously purchased by the user, which can easily lead to users feeling overwhelmed by the recommendations. Curious users are keen to try new items and actively experiment with different types of items. Therefore, a collaborative filtering algorithm based on curious users can recommend items that are different from the user's previous choices and that the user enjoys. Experiments have shown that this algorithm not only improves accuracy but also increases the diversity of recommendations.
[0167] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0168] Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art using ordinary skill will be able to implement the present invention set forth in the claims without undue experimentation. It will also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0169] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0170] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0171] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0172] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0173] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0174] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
[0175] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A movie recommendation method based on curious user collaborative filtering, characterized in that: include: Obtain user rating records for movies and establish a user rating matrix; Calculate the similarity between any two users and establish a user similarity matrix; Calculate the average popularity of each movie; Construct a movie category matrix based on movie category information; According to the category of the movie selected by each user, construct a category selection frequency matrix of each movie by the user, and calculate the variance of the category selection frequency vector of each user according to the category selection frequency matrix; Calculating the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determining a curious user set for each user based on the comprehensive similarity; Predicting the relevance of the target user to the target movie based on the scores given to the target movie by the target user's curious user set; Calculating the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, and constructing a movie-user category distance matrix; Calculating the comprehensive relevance of the target user to the target movie based on the relevance of the target user to the target movie and the movie-user category distance matrix, and recommending movies to the target user based on the comprehensive relevance; In the step of calculating the average popularity of each movie, the calculation formula of the average popularity is: Among them, Pop uc represents the average popularity; |U(I j )| is the number of users who selected movie j; |U| is the number of all users, I(u c ) is user u c A collection of movies that have been selected; In the step of calculating the comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, the calculation formula of the comprehensive similarity is: Among them, score(u t ,u c ) represents user u t and u c The comprehensive similarity of sim(u t ,u c ) represents user u t and u c Pop uc Represents the average popularity; Div(g uc ) represents the variance of the category selection frequency vector; In the step of calculating the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, the calculation formula for the frequency distance between each movie category and the movie category selected by the user is: Among them, diff(u t ,j) represents the category of each movie j and user u t Frequency distance of the selected movie category; g ut is user u t The frequency vector of the selected movie category; I j is the category vector of movie j.
2. The movie recommendation method based on curious user collaborative filtering according to claim 1, characterized in that: In the step of calculating the similarity between any two users and establishing a user similarity matrix, the similarity calculation formula is: Among them, sim(u t ,u c ) represents user u t and u c User similarity of R t,j R represents the rating of user i on movie j; c,j represents the rating of user c on movie j; is the average score of the movie given by user i; is the average score of user c on the movie; I(u t ,u c ) is the set of movies selected by users i and c.
3. The movie recommendation method based on curious user collaborative filtering according to claim 1, characterized in that: In the step of predicting the target user's relevance to the target movie based on the target user's curious user set's score for the target movie, the calculation formula for the target user's relevance to the target movie is: Among them, rel(u t ,j) represents the target user u t The relevance of the target movie j; score(u k ,u t ) represents user u k and u t The comprehensive similarity of K(u t ) represents the target user u t The first k curious users; represents the rating of movie j by the kth curious user.
4. A device for implementing the movie recommendation method based on curious user collaborative filtering as described in any one of claims 1 to 3, characterized in that: include: The first module is used to obtain users' rating records of movies and establish a user rating matrix; The second module is used to calculate the similarity between any two users and establish a user similarity matrix; The third module is used to calculate the average popularity of each movie; The fourth module is used to construct a movie category matrix based on movie category information; A fifth module is configured to construct a user's category selection frequency matrix for each movie based on the category of the movie selected by each user, and calculate the variance of each user's category selection frequency vector based on the category selection frequency matrix; a sixth module, configured to calculate a comprehensive similarity between users based on the user similarity matrix, the average popularity, and the variance of the category selection frequency vector, and determine a curious user set for each user based on the comprehensive similarity; The seventh module is used to predict the relevance of the target user to the target movie based on the scores given to the target movie by the curious user set of the target user; An eighth module is configured to calculate the frequency distance between each movie category and the movie category selected by the user based on the movie category matrix and the variance, and construct a movie-user category distance matrix; The ninth module is used to calculate the comprehensive relevance of the target user to the target movie based on the relevance of the target user to the target movie and the movie-user category distance matrix, and recommend movies to the target user based on the comprehensive relevance.
5. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 3.
7. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Matrix decomposition and collaborative filter algorithm combined movie recommendation method
CN108804683A
A research method based on POI similarity and translation machine matching recommendation algorithm
CN109190130A