Long-tail recommendation algorithm based on scale constraint clustering calibration

Through the cluster calibration method based on scale constraints, adjusting and merging the number of items in the cluster, the problem of too many items in a cluster in the existing long-tail recommendation algorithm is solved, and the diversity and long-tail of the recommendation list are achieved. Effective recommendations for items.

CN119311964APending Publication Date: 2025-01-14LIAONING NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411356784.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing long-tail recommendation algorithm directly predicts and scores after obtaining the feature vectors of users and items, resulting in too many items in the recommendation list containing a certain cluster, affecting the diversity of the recommendation list and unable to effectively recommend long-tail items.

Method used

Using a cluster calibration method based on scale constraints, the user-item interaction matrix is ​​decomposed through BPR-M, combined with K-means clustering, the Euro-style distance and cluster center are calculated, the cluster scale threshold is set, cluster adjustment and merging are performed to ensure that The number of items in the cluster is balanced, thereby increasing the diversity of the recommendation list without using additional auxiliary information.

Benefits of technology

It effectively improves the diversity of items in the recommended list, ensures the recommendation coverage of long-tail items, and improves user satisfaction and platform revenue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311964A_ABST
    Figure CN119311964A_ABST
Patent Text Reader

Abstract

The invention discloses a scale constraint clustering calibration-based long-tail recommendation algorithm, which comprises the following steps of: obtaining a user-article interaction matrix according to interaction information of a user and an article, and decomposing the interaction matrix by utilizing BPR-M to obtain initial feature vectors of the user and the article; performing preliminary clustering on the articles by utilizing the feature vectors of the articles and combining K-means to obtain an initial clustering result; taking the scale of the cluster as a constraint condition, performing recursive adjustment on the initial cluster, and obtaining a clustering result that the number of articles in the cluster is balanced; performing inner product on the initial feature vectors of the users and the articles to obtain predicted scores of the users on the articles, and sorting the articles which are not interacted by the users from high to low according to the predicted scores; and extracting first N articles to form a recommendation list, balancing different categories of articles in the recommendation list by using a clustering result after scale constraint, obtaining the recommendation list with uniformly distributed categories, and recommending the recommendation list to a user. According to the method, the long-tail recommendation performance can be improved under the condition that extra auxiliary information is not utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recommendation technology, and in particular to a long-tail recommendation algorithm based on scale-constrained clustering calibration. Background Art

[0002] Recommendation systems have been widely used in many areas of daily life, such as online shopping, short video recommendations, and various search engines. The purpose of the long-tail recommendation algorithm is to solve the common "head effect" problem in traditional recommendation systems, that is, most of the recommendation resources are concentrated on a few popular items, while many less popular but potentially high-value long-tail items are ignored. With the diversification and personalization of user needs, recommending long-tail items has become particularly important. By using the semantic information in the knowledge graph to enhance the recommendation effect and accurately capturing user interests through the hybrid attention mechanism, the accuracy and coverage of recommendations for long-tail items can be improved, which not only helps to discover potential high-value items, but also improves user satisfaction and platform revenue. However, existing long-tail recommendation algorithms often require the help of external additional auxiliary information such as knowledge graphs or item attributes. After obtaining the feature vectors of users and items, they directly predict the score and obtain the recommendation list. The recommendation list will contain too many items in a certain cluster, affecting the diversity of items in the recommendation list. Summary of the invention

[0003] In order to solve the above problems existing in the existing recommendation algorithms, the present invention proposes a long-tail recommendation algorithm based on scale-constrained clustering calibration.

[0004] The technical solution of the present invention is: a long-tail recommendation algorithm based on scale-constrained cluster calibration, which is carried out in the following steps:

[0005] Step 1. Obtain the user-item interaction matrix based on the interaction information between users and items, and use BPR-M to decompose the interaction matrix to obtain the initial feature vectors of users and items.

[0006] Let U={u1,u2,…,u |U|} represents the user set, I={i1,i2,…,i |I|} represents a set of items, and the rating of user u∈U for item i∈I is r u,i ∈R, R is the set of user ratings of items. All items are sorted in descending order according to the number of interactions. The total number of interactions is accumulated starting from the item with the least number of interactions. The items in the set that account for 20% of the total number of interactions are defined as long-tail items.

[0007] The user-item interaction matrix is ​​obtained based on the interaction information between users and items. The user-item interaction matrix is ​​decomposed using BPR-MF to obtain the initial feature matrix of users and items. The i-th row M of the feature matrix M i . represents the initial feature vector of the i-th item, the j-th column M of the feature matrix M. u represents the initial feature vector of the u-th user;

[0008] Step 2. Use the feature vector of the item and combine it with K-means to perform preliminary clustering on the items and obtain the initial clustering results.

[0009] Use formula (1) to calculate the Euclidean distance D between different items ij ;

[0010]

[0011] Among them, d represents the feature dimension, p represents the feature dimension index, and D ij represents the Euclidean distance between item i and item j, as shown in formula (2), and the initial cluster label L is generated using the K-means clustering algorithm;

[0012] L = K-means (D, t = k) (2)

[0013] Among them, the cluster label L is a vector of length |I|, and each element L i Indicates the cluster label to which the i-th item belongs, L i ∈{1,2,...,k}, k is the total number of clusters, and t=k means that the total number of clusters is specified as k;

[0014] Step 3. Using the size of the cluster as a constraint, recursively adjust the initial cluster to obtain a clustering result with a balanced number of items in the cluster.

[0015] Step 3.1 Calculate the size threshold of the items in the cluster based on the cluster center. For each cluster c, use formula (3) to calculate the center of cluster c:

[0016]

[0017] Among them, C c represents the center of cluster c, |L c | represents the number of items contained in cluster c;

[0018] Step 3.2: Set the cluster size threshold according to formulas (4), (5), and (6);

[0019]

[0020] T large =1.5×S avg (5)

[0021] T small =0.5×Savg (6)

[0022] Among them, S avg represents the average number of items contained in all clusters, T large and T small Indicates the upper and lower limits of the number of items in a cluster;

[0023] Step 3.3 Re-divide and merge the clusters obtained from the original clustering

[0024] For each cluster c, if the number of items contained is greater than the threshold T large , then extract the item set M of cluster c c , continue to use K-means to divide using formula (7):

[0025]

[0026] in, Indicates M c The item distance matrix in , t = T dis Limit the size of the segmentation sub-clusters;

[0027] For each cluster c, if the number of items contained is less than the threshold T small , first use formula (8) to calculate the center and size of all clusters:

[0028]

[0029] Then include the number of items less than the threshold T small Merge into the nearest cluster;

[0030] After multiple iterations of steps 3.1-3.3, a clustering result with a balanced number of items in the cluster is obtained;

[0031] Step 4. Obtain the predicted score of the user for the item by performing the inner product of the initial feature vectors of the user and the item, and sort the items that the user has not interacted with from high to low according to the predicted score.

[0032] According to the feature vector M of user u. u and the feature vector M of item i i ., use formula (9) to calculate the predicted score p of user u for item i ui :

[0033] p ui =M. u ·M i . (9)

[0034] Get the predicted scores of user u for all uninteracted items, and sort the items from high to low according to the predicted scores;

[0035] Step 5. Extract the first N items to form a recommendation list, use the clustering results after scale constraints to balance the different categories of items in the recommendation list, obtain a recommendation list with even category distribution, and recommend it to the user

[0036] For a recommendation list containing N items, a threshold x is set according to the clustering result with a balanced number of items in the cluster. If the number of items in the recommendation list belonging to a certain cluster exceeds x, the items with small predicted scores belonging to the cluster are removed from the recommendation list in the order of predicted scores, and the items not included in the recommendation list are added to the recommendation list according to the predicted score size, and finally the new recommendation list is recommended to the user.

[0037] The present invention is different from the existing long-tail recommendation algorithm which directly predicts scores and obtains recommendation lists after obtaining the feature vectors of users and items. Instead, the present invention proposes a scale-constrained clustering to further calibrate the recommendation lists generated by the existing long-tail recommendation algorithms, so as to prevent the recommendation lists from containing too many items in a certain cluster, so that the items in the recommendation lists can be evenly distributed in clusters of different categories, thereby effectively improving the diversity of items in the recommendation lists without using additional auxiliary information, and achieving the purpose of recommending as many long-tail items as possible to target users. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of an embodiment of the present invention.

[0039] Figure 2 It is a schematic diagram of the corresponding results of the AD index of the present invention and the prior art as the recommended quantity changes. DETAILED DESCRIPTION

[0040] The present invention is a long-tail recommendation algorithm based on scale-constrained clustering calibration. Figure 1 As shown, follow the steps below:

[0041] Step 1. Obtain the user-item interaction matrix based on the interaction information between users and items, and use BPR-M to decompose the interaction matrix to obtain the initial feature vectors of users and items.

[0042] Let U={u1,u2,…,u |U|} represents the user set, I={i1,i2,…,i |I|} represents a set of items, and the rating of user u∈U for item i∈I is r u,i ∈R, R is the set of user ratings of items. All items are sorted in descending order according to the number of interactions. The total number of interactions is accumulated starting from the item with the least number of interactions. The items in the set that account for 20% of the total number of interactions are defined as long-tail items.

[0043] Assume there are 10 users and 10 items. The user-item interaction matrix is ​​obtained based on the interaction information between users and items as shown in the table:

[0044] Table 1

[0045] u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 i1 1 0 0 1 0 1 0 0 0 1 i2 0 1 0 1 1 0 1 0 1 0 i3 1 0 1 0 0 1 0 1 0 0 i4 0 1 0 0 1 0 1 0 1 0 i5 0 0 1 1 0 0 0 1 0 1 i6 1 0 0 1 0 1 0 1 0 1 i7 0 1 0 0 1 0 1 0 1 0 i8 0 0 1 0 1 0 0 1 0 1 i9 1 0 0 1 0 1 0 0 1 0 i10 0 1 0 0 1 0 1 0 0 1

[0046] The Bayesian Personalized Ranking Matrix Factorization (BPR-MF) method is used to decompose the user-item interaction matrix to obtain the initial feature matrix of users and items. As shown in Table 2: The i-th row M of the feature matrix M i . represents the initial feature vector of the i-th item, the j-th column M of the feature matrix M. u represents the initial feature vector of the u-th user;

[0047] Table 2

[0048] u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 i1 0.26 0.38 0.50 0.62 0.74 0.86 0.98 1.10 1.22 1.34 i2 0.32 0.44 0.56 0.68 0.80 0.92 1.04 1.16 1.28 1.40 i3 0.38 0.50 0.62 0.74 0.86 0.98 1.10 1.22 1.34 1.46 i4 0.44 0.56 0.68 0.80 0.92 1.04 1.16 1.28 1.40 1.52 i5 0.50 0.62 0.74 0.86 0.98 1.10 1.22 1.34 1.46 1.58 i6 0.56 0.68 0.80 0.92 1.04 1.16 1.28 1.40 1.52 1.64 i7 0.62 0.74 0.86 0.98 1.10 1.22 1.34 1.46 1.58 1.70 i8 0.68 0.80 0.92 1.04 1.16 1.28 1.40 1.52 1.64 1.76 i9 0.74 0.86 0.98 1.10 1.22 1.34 1.46 1.58 1.70 1.82 i10 0.80 0.92 1.04 1.16 1.28 1.40 1.52 1.64 1.76 1.88

[0049] Step 2. Use the feature vector of the item and combine it with K-means to perform preliminary clustering on the items and obtain the initial clustering results.

[0050] Use formula (1) to calculate the Euclidean distance D between different items ij ;

[0051]

[0052] Among them, d represents the feature dimension, p represents the feature dimension index, and D ij Represents the Euclidean distance between item i and item j, as shown in Table 3:

[0053] Table 3

[0054] i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i1 0 0.17 0.34 0.51 0.68 0.85 1.02 1.19 1.36 1.53 i2 0.17 0 0.17 0.34 0.51 0.68 0.85 1.02 1.19 1.36 i3 0.34 0.17 0 0.17 0.34 0.51 0.68 0.85 1.02 1.19 i4 0.51 0.34 0.17 0 0.17 0.34 0.51 0.68 0.85 1.02 i5 0.68 0.51 0.34 0.17 0 0.17 0.34 0.51 0.68 0.85 i6 0.85 0.68 0.51 0.34 0.17 0 0.17 0.34 0.51 0.68 i7 1.02 0.85 0.68 0.51 0.34 0.17 0 0.17 0.34 0.51 i8 1.19 1.02 0.85 0.68 0.51 0.34 0.17 0 0.17 0.34 i9 1.36 1.19 1.02 0.85 0.68 0.51 0.34 0.17 0 0.17 i10 1.53 1.36 1.19 1.02 0.85 0.68 0.51 0.34 0.17 0

[0055] As shown in formula (2), the K-means clustering algorithm is used to generate the initial clustering label L;

[0056] L = K-means (D, t = k) (2)

[0057] Among them, the cluster label L is a vector of length |I|, and each element L i Indicates the cluster label to which the i-th item belongs, L i∈{1,2,...,k}, k is the total number of clusters, t=k means that the total number of clusters is specified as k; for example, if the number of clusters k=3, after clustering using K-means, the cluster labels L=[1,1,2,2,3,3,1,1,2,3] are obtained;

[0058] Step 3. Using the size of the cluster as a constraint, recursively adjust the initial cluster to obtain a clustering result with a balanced number of items in the cluster.

[0059] Step 3.1 Calculate the size threshold of the items in the cluster based on the cluster center. For each cluster c, use formula (3) to calculate the center of cluster c:

[0060]

[0061] Among them, C c represents the center of cluster c, |L c | represents the number of items contained in cluster c;

[0062] Then we get cluster 1 C1 = (0.5, 0.6, 0.7), cluster 2 C2 = (0.583, 0.683, 0.783), cluster 3 C3 = (0.75, 0.85, 0.95);

[0063] Step 3.2: Due to the uneven distribution of interaction data of different items in the recommendation system, the size distribution of clusters is extremely uneven in the clustering results obtained by using only K-means. In order to make the number of items in different clusters evenly distributed, the cluster size threshold is set according to formulas (4), (5), and (6):

[0064]

[0065] T large =1.5×S avg (5)

[0066] T small =0.5×S avg (6)

[0067] Among them, S avg represents the average number of items contained in all clusters, T large and T small Represents the upper and lower limits of the number of items in the cluster; S is calculated avg =3.33, T large =5, T small =1.67;

[0068] Step 3.3 Re-divide and merge the clusters obtained from the original clustering

[0069] For each cluster c, if the number of items contained is greater than the threshold Tlarge , then extract the item set M of cluster c c , continue to use K-means to divide using formula (7):

[0070]

[0071] in, Indicates M c The item distance matrix in , t = T dis The size of the sub-clusters is limited to ensure that the size of each sub-cluster does not exceed 1.5 times the average number of items in the sub-cluster;

[0072] For each cluster c, if the number of items contained is less than the threshold T small , first use formula (8) to calculate the center and size of all clusters:

[0073]

[0074] Then include the number of items less than the threshold T small Merge into the nearest cluster;

[0075] After multiple iterations of steps 3.1-3.3, a clustering result with a balanced number of items in the cluster is obtained to prevent too many or too few items in a cluster;

[0076] Since cluster 1 contains 4 items, cluster 2 contains 3 items, and cluster 2 contains 3 items, both are greater than T small and less than T large , so no adjustment is needed;

[0077] Step 4. Obtain the predicted score of the user for the item by performing the inner product of the initial feature vectors of the user and the item, and sort the items that the user has not interacted with from high to low according to the predicted score.

[0078] According to the feature vector M of user u. u and the feature vector M of item i i ., use formula (9) to calculate the predicted score p of user u for item i ui :

[0079] p ui =M. u ·M i . (9)

[0080] Get the predicted scores of user u for all uninteracted items, and sort the items from high to low according to the predicted scores;

[0081] Taking user u1 as the target user, the predicted score is obtained using formula (9) as shown in Table 4;

[0082] Table 4

[0083] Prediction Rating i1 0.26 i2 0.32 i3 0.38 i4 0.44 i5 0.50 i6 0.56 i7 0.62 i8 0.68 i9 0.74 i10 0.80

[0084] Sort the items that target user u1 has not interacted with to get: i 10 ,i8,i7,i5,i4,i2;

[0085] Step 5. Extract the first N items to form a recommendation list, use the clustering results after scale constraints to balance the different categories of items in the recommendation list, obtain a recommendation list with even category distribution, and recommend it to the user

[0086] Specifically, for a recommendation list containing N items, a threshold x is set according to the clustering result of the balanced number of items in the cluster. If the number of items in the recommendation list belonging to a certain cluster exceeds x, the items with small predicted scores belonging to the cluster are removed from the recommendation list in the order of predicted scores, and the items not included in the recommendation list are added to the recommendation list in order of predicted scores, and finally the new recommendation list is recommended to the user;

[0087] Set the length of the recommendation list N = 4, then the recommendation list is [i 10 ,i8,i7,i5];

[0088] According to the clustering results after scale constraint: Cluster 1 = {i1, i2, i7, i8}, Cluster 2 = {i3, i4, i9}, Cluster 3 = {i5, i6, i 10}; Set the threshold x = 2. Since the number of items in the recommendation list belonging to a certain cluster does not exceed 2, the final recommendation list for the target user u1 is [i 10 ,i8,i7,i5].

[0089] The method of the embodiment of the present invention is experimentally demonstrated, which specifically includes:

[0090] (1) Using public datasets

[0091] The dataset used in the present invention is Last-FM, which is a music listening dataset provided by the Last online music system, in which songs are identified as items; this dataset includes 3,034,796 pieces of interaction data from 23,566 users and 48,123 items.

[0092] (2) Evaluation indicators

[0093] The present invention uses Aggregate Diversity (AD) as the long-tail recommendation performance evaluation index of this experiment. AD shows the diversity of recommendation results, thereby reflecting the long-tail recommendation performance. The higher the value, the higher the long-tail recommendation performance. The calculation formula is as follows:

[0094] AD=|∪ u∈U {i∈Top u (N)}|

[0095] Among them, Top u (N) represents the N items finally recommended to user u.

[0096] Comparison and analysis of experimental results:

[0097] The proposed method is compared with the recommendation results obtained by directly using BPR-MF. The AD results are as follows: Figure 2 As shown in the figure. The experimental data show that as the number of recommendations increases, the AD result of the algorithm of the present invention is significantly higher than that of the BPR-MF algorithm. Since the larger the AD value, the higher the recommendation diversity and the higher the long-tail recommendation performance, the algorithm of the present invention can recommend more long-tail items than BPR-MF. In summary, the present invention can recommend more long-tail items to target users without using additional auxiliary information.

Claims

1. A long-tail recommendation algorithm based on scale-constrained clustering calibration, characterized by Follow the steps below: Step 1. Obtain the user-item interaction matrix based on the interaction information between users and items, and use BPR-M to decompose the interaction matrix to obtain the initial feature vectors of users and items. Let U={u1,u2,…,u |U| } represents the user set, I={i1,i2,…,i |I| } represents a set of items, and the rating of user u∈U for item i∈I is r u,i ∈R, R is the set of user ratings of items. All items are sorted in descending order according to the number of interactions. The total number of interactions is accumulated starting from the item with the least number of interactions. The items in the set that account for 20% of the total number of interactions are defined as long-tail items. The user-item interaction matrix is ​​obtained based on the interaction information between users and items. The user-item interaction matrix is ​​decomposed using BPR-MF to obtain the initial feature matrix of users and items. The i-th row M of the feature matrix M i . represents the initial feature vector of the i-th item, the feature matrix The j-th column M of M. u represents the initial feature vector of the u-th user; Step 2. Use the feature vector of the item and combine it with K-means to perform preliminary clustering on the items and obtain the initial clustering results. Use formula (1) to calculate the Euclidean distance D between different items ij ; Among them, d represents the feature dimension, p represents the feature dimension index, and D ij represents the Euclidean distance between item i and item j, as shown in formula (2), and the initial cluster label L is generated using the K-means clustering algorithm; L = K-means (D, t = k) (2) Among them, the cluster label L is a vector of length |I|, and each element L i Indicates the cluster label to which the i-th item belongs, L i ∈{1,2,...,k}, k is the total number of clusters, and t=k means that the total number of clusters is specified as k; Step 3. Using the size of the cluster as a constraint, recursively adjust the initial cluster to obtain a clustering result with a balanced number of items in the cluster. Step 3.1 Calculate the size threshold of the items in the cluster based on the cluster center. For each cluster c, use formula (3) to calculate the center of cluster c: Among them, C c represents the center of cluster c, |L c | represents the number of items contained in cluster c; Step 3.2: Set the cluster size threshold according to formulas (4), (5), and (6); T large =1.5×S avg (5) T small =0.5×S avg (6) Among them, S avg represents the average number of items contained in all clusters, T large and T small Indicates the upper and lower limits of the number of items in a cluster; Step 3.3 Re-divide and merge the clusters obtained from the original clustering For each cluster c, if the number of items contained is greater than the threshold T large , then extract the item set M of cluster c c , continue to use K-means to divide using formula (7): in, Indicates M c The item distance matrix in , t = T dis Limit the size of the segmentation sub-clusters; For each cluster c, if the number of items contained is less than the threshold T small , first use formula (8) to calculate the center and size of all clusters: Then include the number of items less than the threshold T small Merge into the nearest cluster; After multiple iterations of steps 3.1-3.3, a clustering result with a balanced number of items in the cluster is obtained; Step 4. Obtain the predicted score of the user for the item by performing the inner product of the initial feature vectors of the user and the item, and sort the items that the user has not interacted with from high to low according to the predicted score. According to the feature vector M of user u. u and the feature vector M of item i i ., use formula (9) to calculate the predicted score p of user u for item i ui : p ui =M. u ·M i . (9) Get the predicted scores of user u for all uninteracted items, and sort the items from high to low according to the predicted scores; Step 5. Extract the first N items to form a recommendation list, use the clustering results after scale constraints to balance the different categories of items in the recommendation list, obtain a recommendation list with even category distribution, and recommend it to the user For a recommendation list containing N items, a threshold x is set according to the clustering result with a balanced number of items in the cluster. If the number of items in the recommendation list belonging to a certain cluster exceeds x, the items with small predicted scores belonging to the cluster are removed from the recommendation list in the order of predicted scores, and the items not included in the recommendation list are added to the recommendation list according to the predicted score size, and finally the new recommendation list is recommended to the user.