An item recommendation algorithm based on latent features and ratings

By introducing activity penalty factors, time factors and item popularity weight factors into the item recommendation algorithm, combined with collaborative filtering and Pearson similarity, the problem of insufficient recommendation accuracy and personalization in the prior art is solved, and more efficient item recommendation is achieved.

CN114491242BActive Publication Date: 2025-04-18NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210003318.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2025-04-18
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

The existing collaborative filtration technology has problems such as poor accuracy, lack of personalization and low recommendation coverage in item recommendations, especially ignoring the influence of active users, time factors and item popularity.

Method used

The item recommendation algorithm based on hidden features and ratings is adopted, and by introducing activity penalty factors, time factors and item popularity weight factors, combined with the collaborative filtering algorithm and Pearson similarity, the final similarity between items is calculated and sorted to construct a similar item collection.

Benefits of technology

It improves the accuracy and personalization of recommendations, enhances the diversity and novelty of recommendations, meets users' personalized needs and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491242B_ABST
    Figure CN114491242B_ABST
Patent Text Reader

Abstract

The present invention discloses an item recommendation algorithm based on latent features and ratings, including: processing input data, extracting user rating data, and constructing a user-item rating matrix; introducing an activity penalty factor to calculate the similarity of a collaborative filtering algorithm; introducing a time factor and a penalty factor to penalize active users, and calculating the Pearson similarity based on time weight; based on an introduced item popularity weight factor, using an exponential function to replace the popularity difference between two items and integrating it into the Pearson similarity calculation; using the weighted sum of the two similarities as the final similarity, and sorting from large to small, obtaining the first k items that are most similar to the item to form a similar item set; introducing a time weight function, calculating the user's predicted interest in unrated items and sorting them, and recommending the first N items to the user. The present invention can realize personalized recommendations, improve the accuracy of recommendations and the user's experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an item recommendation algorithm based on latent features and scores, belonging to the technical field of information recommendation. Background Art

[0002] With the advent of the Internet era, the rapid development of computer technology has brought people into an era of information explosion. Faced with a huge amount of information, users often spend a lot of time and energy to find items of interest to them, which leads to the problem of information overload, that is, the actual information is far greater than what users need. In response to this problem, personalized recommendation systems were born, which learn users' behaviors and interests by collecting and analyzing user behavior information and historical behavior data, so as to achieve the purpose of active recommendation.

[0003] In recent years, collaborative filtering technology has been more widely used in the field of item recommendation, but there are still problems such as poor accuracy, unclear personalization, and low recommendation coverage. Traditional collaborative filtering algorithms make the recommendation results affected by the preferences of active users, which directly leads to inaccurate recommended content. Secondly, traditional collaborative filtering algorithms assume that the attractiveness of items will not change, ignoring the influence of time factors, but items will have their own characteristics of the times. Finally, since collaborative filtering algorithms only recommend items based on user ratings, many of the recommended results are popular items with high scores and high popularity, thus ignoring the personalized and unpopular recommendations for users, making the recommended content unable to meet user needs. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide an item recommendation algorithm based on latent features and scores. The three latent features of active users, time factors and item popularity are considered, and the latent features and scores of the items in the recommendation list are cross-featured. A new recommendation algorithm based on latent feature combination and scores is proposed to cater to the user's personalization and improve the accuracy of recommendations, thereby improving the user experience.

[0005] The present invention specifically adopts the following technical solutions to solve the above technical problems:

[0006] An item recommendation algorithm based on latent features and ratings includes the following steps:

[0007] (1) Process the input data, extract user rating data, and construct a user-item rating matrix;

[0008] (2) Introduce an activity penalty factor to calculate the similarity of the collaborative filtering algorithm after penalizing active users;

[0009] (3) Based on the constructed user-item rating matrix, the time factor and penalty factor are introduced to penalize active users, and the Pearson similarity based on time weight is calculated;

[0010] (4) Based on the introduction of an item popularity weight factor, an exponential function is used to replace the popularity difference between two items and is integrated into the Pearson similarity calculation based on time weight and item popularity;

[0011] (5) Using the weighted sum of the collaborative filtering algorithm similarity calculated in step (2) and the Pearson similarity calculated in step (4) as the final similarity between the item and all other items; and sorting the calculated final similarities from large to small to obtain the top k items that are most similar to the item to form a similar item set;

[0012] (6) Based on the constructed user-item rating matrix, the calculated final similarity and an introduced time weight function, the predicted user interest in the unrated items is calculated according to the collaborative filtering algorithm; the calculated predicted user interest in the unrated items is sorted from large to small, and the top N unrated items after sorting are recommended to the user.

[0013] Furthermore, as a preferred technical solution of the present invention, the step (1) of constructing a user-item rating matrix includes:

[0014] The extracted user rating data is expressed as a matrix, and an m*n-order user-items rating matrix R=(r mn ), the scoring matrix is ​​as follows:

[0015]

[0016] Among them, m represents the total number of users, n represents the total number of items, and r mn Represents the rating of the mth user on the nth item.

[0017] Furthermore, as a preferred technical solution of the present invention, the activity penalty factor introduced in step (2) is Where N(u) represents the set of items liked by user u;

[0018] The similarity calculation formula of the collaborative filtering algorithm after punishing active users is:

[0019]

[0020] Among them, i and j represent items, N(i) represents the set of users who provide feedback on item i, and N(j) represents the set of users who provide feedback on item j.

[0021] Furthermore, as a preferred technical solution of the present invention, the step (3) specifically includes:

[0022] An exponential decay function is introduced as a time factor, and the exponential decay function is specifically:

[0023]

[0024] Where k is the decay rate, t i is the average rating time of item i, t j is the average rating time of item j;

[0025] Introducing a penalty factor Penalize active users, where I(u) represents the total number of user feedback item evaluations;

[0026] And, the time-weighted Pearson similarity is calculated using the formula:

[0027]

[0028] Among them, I i,j is the public rating set of items i, j, R i,u is the rating of item i by user u, R j,u is the rating of item j by user u, is the average score of item i, is the average score of item j.

[0029] Furthermore, as a preferred technical solution of the present invention, the step (4) specifically includes:

[0030] Introducing an item popularity weight factor Among them, item_w refers to the popularity of an item, and avg_w refers to the average popularity of all items;

[0031] An exponential function is used to replace the popularity difference γ between two items, as shown in the formula: Among them, θ i is the popularity of item i, θ j is the popularity of item j;

[0032] For any item i and item j, the popularity difference γ is incorporated into the time-weighted Pearson similarity calculation, which uses the formula:

[0033]

[0034] Among them, I i,j is the public rating set of items i, j, R i,u is the rating of item i by user u, Rj,u is the rating of item j by user u, is the average score of item i, is the average score of item j; f(t) is an exponential decay function.

[0035] Furthermore, as a preferred technical solution of the present invention, in step (5), the weighted sum of the similarity of the collaborative filtering algorithm calculated in step (2) and the Pearson similarity calculated in step (4) is used as the final similarity sim_m between the item and all other items, and the formula is:

[0036] sim_m=α·W ij +(1-α)·sim

[0037] Among them, the coefficient α∈[0,1]; W ij is the similarity of the collaborative filtering algorithm; sim is the Pearson similarity.

[0038] Furthermore, as a preferred technical solution of the present invention, a time weight function T introduced in step (6) interest for:

[0039]

[0040] Among them, time i Indicates the time interval between the time when the user first commented on the item and the time when he commented on the current item. tol It represents the time interval between the earliest time a user comments on an item and the time when the user comments on the item most recently, and τ is the set weight value;

[0041] And, the calculation of the user's predicted interest P for the unrated item z u,Z , using the formula:

[0042]

[0043] Among them, N(u) represents the set of items liked by user u, S(z,k) represents the set of k items most similar to the unrated item z, and sim_m zi represents the final similarity between the unrated item z and item i, r ui represents the rating of user u on item i.

[0044] The present invention adopts the above technical solution to produce the following technical effects:

[0045] The item recommendation algorithm based on latent features and ratings of the present invention processes the input item rating information to extract user rating data; calculates the similarity after penalizing active users; integrates time factors and item popularity; combines latent features with ratings; uses a rating matrix to calculate the similarity between an item and all other items; sorts the similarities from large to small to construct a set of similar items; calculates the user's predicted interest in unknown items; sorts the calculated predicted interest, and recommends the top-ranked items to the target user. The present invention uses the three indicators of user activity, rating time, and item popularity to comprehensively consider the advantages and disadvantages of cosine similarity and Pearson correlation coefficient, and uses weight addition to obtain a similarity calculation formula that can complement the two. Experiments have shown that while ensuring the accuracy of recommendations, the diversity and novelty of recommendations are also improved.

[0046] Therefore, based on the analysis of traditional collaborative filtering recommendation algorithms, the present invention combines the three implicit features of user activity, time factors and item popularity, combines these three points with the ratings, eliminates the influence of active users on the recommendation results, and at the same time increases the real-time nature and novelty of the recommendation results, thereby achieving truly personalized recommendations and improving the accuracy of recommendations and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 The figure is a flowchart of the item recommendation algorithm based on latent features and scores of the present invention. DETAILED DESCRIPTION

[0048] The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0049] like Figure 1 As shown, the present invention relates to an item recommendation algorithm based on latent features and scores, and the method specifically comprises the following steps:

[0050] (1) Process the input data, extract user rating data, and construct a user-item rating matrix, as follows:

[0051] The input data is processed, the extracted user rating data is expressed as a matrix, and an m*n-order user-items rating matrix R=(r mn ), the scoring matrix is ​​as follows:

[0052]

[0053] Among them, m represents the total number of users, n represents the total number of items, and r mn Represents the rating of the mth user on the nth item.

[0054] (2) Introduce the activity penalty factor and calculate the similarity of the collaborative filtering algorithm after penalizing active users. The details are as follows:

[0055] First, the similarity calculation formula of the traditional item-based collaborative filtering algorithm is:

[0056]

[0057] Where i and j represent items, N(i) represents the set of users who have provided feedback on item i, and N(j) represents the set of users who have provided feedback on item j.

[0058] An activity penalty factor is added to the above similarity calculation formula Where N(u) represents the set of items that user u likes. The activity penalty factor is integrated into the calculation formula of the collaborative filtering algorithm to penalize active users.

[0059] Therefore, the similarity calculation formula of the improved collaborative filtering algorithm is as follows:

[0060]

[0061] (3) Based on the constructed user-item rating matrix, the time factor and the penalty factor are introduced to penalize active users, and the Pearson similarity based on time weight is calculated as follows:

[0062] First, the Pearson correlation coefficient is introduced to introduce item ratings into the similarity calculation, as shown in the following formula:

[0063]

[0064] Among them I i,j is the public rating set of items i, j, R i,u is the rating of item i by user u, R j,u is the rating of item j by user u, is the average score of item i, is the average score of item j.

[0065] Then, an exponential decay function is introduced as the time factor, which is as follows:

[0066]

[0067] Where k is the decay rate, t i is the average rating time of item i, t j is the average rating time of item j.

[0068] When using the Pearson correlation coefficient calculation, we must also consider the impact of active users on the similarity calculation results. Therefore, a penalty factor is introduced to penalize active users. The penalty factor is as follows:

[0069]

[0070] Among them, I(u) represents the total number of evaluations of user feedback items.

[0071] In summary, the exponential decay function is integrated into the Pearson correlation coefficient, and the active users of the Pearson correlation coefficient are penalized again, and the Pearson similarity calculation based on time weight is obtained as shown in the following formula:

[0072]

[0073] (4) Based on the introduction of an item popularity weight factor, an exponential function is used to replace the popularity difference between two items and is integrated into the Pearson similarity calculation based on time weight and item popularity to weaken the popular items, as follows:

[0074] In order to make the recommendation results free from the influence of the popular list, fully tap the potential interests of users, and recommend the recommendation results that users find novel. In combination with the above analysis, the present invention adds an item popularity weight factor in the similarity calculation. Among them, item_w refers to the popularity of an item, and avg_w refers to the average popularity of all items. The popularity here actually refers to the number of times the item has been viewed.

[0075] The calculated range of the weight factor is [-1,1], so the weight added to the calculation formula should not be too large or negative. Therefore, when finally added to the similarity formula, the present invention makes an adjustment to the item popularity factor, using an exponential function to replace the popularity difference γ between two items, as shown in the following formula:

[0076]

[0077] Among them, θ i is the popularity of item i, θ j is the popularity of item j.

[0078] In summary, for any item i and item j, the present invention defines the calculation formula of their Pearson similarity as:

[0079]

[0080] (5) The weighted sum of the collaborative filtering algorithm similarity calculated in step (2) and the Pearson similarity based on time weight and item popularity calculated in step (4) is used as the final similarity between item j and all other items; and the calculated final similarities are sorted from large to small to obtain the top k items most similar to item j to form a similar item set, as follows:

[0081] In the above steps, the traditional similarity calculation formula is improved from two categories, namely, cosine similarity and Pearson correlation coefficient, and three subcategories, namely, penalizing active users, integrating time factors, and adding item popularity. The calculation of cosine similarity does not take into account the criterion of user rating, and the Pearson correlation coefficient is insensitive to the absolute value of the user and has deviations in nonlinear data. After considering these factors, the present invention uses the weighted sum sim_m of the two similarities as the final similarity sim_m between the item and all other items, as shown in the following formula:

[0082] sim_m=α·W ij +(1-α)·sim

[0083] The coefficient α∈[0,1] can adjust the proportion of the two weight values ​​by changing the value of α, thereby achieving complementary advantages and improving the performance of the algorithm.

[0084] Then, the calculated final similarities sim_m between item j and all other items are sorted from large to small to obtain a set S(j,k) of k items most similar to item j.

[0085] (6) Based on the constructed user-item rating matrix, the calculated final similarity and the introduced time weight function, the predicted interest of the user in the unrated items is calculated according to the collaborative filtering algorithm; the calculated predicted interest of the user in the unrated items is sorted from large to small, and the top N unrated items after sorting are recommended to the user, as follows:

[0086] First, since user interests change over time, recent comments are often more valuable than earlier comments. Therefore, the role of recent user data in recommendations should be emphasized. Therefore, a time weight function T is added when calculating user interest. interest , represents the user's recent relevance to item i, and the time interest weight function is as follows:

[0087]

[0088] Among them, time i Indicates the time interval between the time when the user first commented on the item and the time when he commented on the current item.tol It represents the time interval between the time when the user first commented on an item and the time when the user most recently commented on an item, and τ is the set weight value.

[0089] Secondly, the similarity of unrated items is calculated based on the principle of collaborative filtering algorithm. The collaborative filtering algorithm uses the nearest neighbor technology to calculate the similarity between users and the similarity between items using the user's historical preference information, and is used to calculate the similarity between two unrelated items. The specific steps are as follows: according to the similarity of the improved collaborative filtering algorithm obtained in step (2), the unrated item z is substituted for the item j to calculate the similarity of the collaborative filtering algorithm between the unrated item z and the item i; and according to the calculation formulas of steps (3) and (4), the Pearson similarity between the item i and the item j based on the time weight and the item popularity can be obtained. Based on the principle of the collaborative filtering algorithm, the present invention replaces the item j with the unrated item z. Even if the user has not rated the unrated item z, the Pearson similarity between the item i and the unrated item z based on the time weight and the item popularity can be obtained according to the user's rating of the item j and the calculated Pearson similarity based on the time weight and the item popularity; then, according to the calculation formula of the final similarity between the item i and the item j obtained in step (5), the weighted sum of the two similarities obtained by replacing the item j with the unrated item z is used as the final similarity sim_m between the unrated item z and the item i. zi , the final similarity sim_m calculated zi Sort them from large to small to obtain a set S(z,k) of k items that are most similar to the unrated item z, which is used in the calculation process of the user's predicted interest in the unrated item.

[0090] Then, based on the user-item rating matrix constructed above, the final similarity between item i and unrated item z, and the introduced time weight function, the interest P of user u in unrated item z is calculated. u,Z , the calculation formula is as follows:

[0091]

[0092] Among them, N(u) is the set of items liked by user u, S(z,k) is the set of k items most similar to the unrated item z, and sim_m zi is the final similarity between the unrated item z and item i, r ui is the rating of item i by user u.

[0093] According to the calculated user's interest in the unrated item z, P u,ZSort the items from largest to smallest, and push the first N unrated items in the sorting results to the user. The user selects the unrated items that he or she is most interested in based on the sorting results, thereby achieving personalized recommendations.

[0094] In summary, the method of the present invention improves the existing similarity calculation formula by using three indicators: user activity, rating time, and item popularity. It comprehensively considers the advantages and disadvantages of cosine similarity and Pearson correlation coefficient, and uses weighted addition to obtain a similarity calculation formula that can complement the two. Experiments have shown that while ensuring the accuracy of recommendations, the diversity and novelty of recommendations are also improved, which can effectively meet the user's personalization and improve the accuracy of recommendations, thereby improving the user's experience.

[0095] The above description is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a technician familiar with the technical field within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.

Claims

1. An item recommendation algorithm based on latent features and ratings, characterized in that: The following steps are involved: (1) Process the input data, extract user rating data, and construct a user-item rating matrix; (2) Introduce an activity penalty factor to calculate the similarity of the collaborative filtering algorithm after penalizing active users; (3) Based on the constructed user-item rating matrix, the time factor and penalty factor are introduced to penalize active users, and the Pearson similarity based on time weight is calculated; (4) Based on the introduction of an item popularity weight factor, an exponential function is used to replace the popularity difference between two items and is integrated into the Pearson similarity calculation based on time weight and item popularity; The above step (4) specifically includes: Introducing an item popularity weight factor Among them, item_w refers to the popularity of an item, and avg_w refers to the average popularity of all items; An exponential function is used to replace the popularity difference γ between two items, as shown in the formula: Among them, θ i is the popularity of item i, θ j is the popularity of item j; For any item i and item j, the popularity difference γ is incorporated into the time-weighted Pearson similarity calculation, which uses the formula: Among them, I i,j is the public rating set of items i, j, R i,u is the rating of item i by user u, R j,u is the rating of item j by user u, is the average score of item i, is the average score of item j; f(t) is the exponential decay function; δ is the penalty factor involved in step (3); (5) Calculate the final similarity between the current item and all other items using the weighted sum of the collaborative filtering algorithm similarity calculated in step (2) and the Pearson similarity calculated in step (4); sort the calculated final similarities from large to small, and obtain the top k items that are most similar to the item to form a similar item set; (6) Based on the constructed user-item rating matrix, the calculated final similarity and an introduced time weight function, the predicted user interest in the unrated items is calculated according to the collaborative filtering algorithm; the calculated predicted user interest in the unrated items is sorted from large to small, and the top N unrated items after sorting are recommended to the user.

2. The item recommendation algorithm based on latent features and ratings according to claim 1, characterized in that: The step (1) of constructing a user-item rating matrix includes: The extracted user rating data is expressed as a matrix, and an m*n-order user-items rating matrix R=(r mn ), the scoring matrix is ​​in the following form: Among them, m represents the total number of users, n represents the total number of items, and r mn Represents the rating of the mth user on the nth item.

3. The item recommendation algorithm based on latent features and ratings according to claim 1, characterized in that: The activity penalty factor introduced in step (2) is Where N(u) represents the set of items that user u likes; the similarity calculation formula of the collaborative filtering algorithm after penalizing active users is: Among them, i and j represent items, N(i) represents the set of users who provide feedback on item i, and N(j) represents the set of users who provide feedback on item j.

4. The item recommendation algorithm based on latent features and ratings according to claim 1, characterized in that: The step (3) specifically comprises: An exponential decay function is introduced as a time factor, and the exponential decay function is specifically: Where k is the decay rate, t i is the average rating time of item i, t j is the average rating time of item j; Introducing a penalty factor Penalize active users, where I(u) represents the total number of user feedback item evaluations; And, the time-weighted Pearson similarity is calculated using the formula: Among them, I i,j is the public rating set of items i, j, R i,u is the rating of item i by user u, R j,u is the rating of item j by user u, is the average score of item i, is the average score of item j.

5. The item recommendation algorithm based on latent features and ratings according to claim 1, characterized in that: In step (5), the weighted sum of the similarity of the collaborative filtering algorithm calculated in step (2) and the Pearson similarity calculated in step (4) is used as the final similarity sim_m between the item and all other items, and the formula is: sim_m=α·W ij +(1-α)·sim Among them, the coefficient α∈[0,1]; W ij is the similarity of the collaborative filtering algorithm; sim is the Pearson similarity.

6. The item recommendation algorithm based on latent features and ratings according to claim 1, characterized in that: A time weight function T introduced in step (6) interest for: Among them, time i Indicates the time interval between the time when the user first commented on the item and the time when he commented on the current item. tol It represents the time interval between the earliest time a user comments on an item and the time when the user comments on the item most recently, and τ is the set weight value; And, the calculation of the user's predicted interest P for the unrated item z u,z , using the formula: Among them, N(u) represents the set of items liked by user u, S(z,k) represents the set of k items most similar to the unrated item z, and sim_m zi represents the final similarity between the unrated item z and item i, r ui represents the rating of user u on item i.

Citation Information

Patent Citations

  • Collaborative filtering method for user interest harmony similarity

    CN110399549A

  • Interest recommendation method, computer device, and storage medium

    US20200320646A1