Cold start recommendation method and device and storage medium

By adopting a meta-learning framework in the recommendation system and using technologies such as feature embedding and attention mechanism, the problem of scarcity of data in cold-start recommendations is solved, and the recommendation effect and efficiency are improved.

CN119991256AActive Publication Date: 2025-05-13SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510099143.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-13
Estimated Expiration
2045-01-22

AI Technical Summary

Technical Problem

When facing new users or new items, the existing recommendation system is difficult to effectively recommend due to data scarcity, resulting in poor recommendation results.

Method used

Using the meta-learning framework, the data is divided into training sets and test sets by obtaining the attribute characteristics and scoring data of users and items. The data is divided into training sets and test sets, and the vanilla attention mechanism and other technologies are used to generate deep-level preference feature embeddings of users, and aggregating the embedding information of similar users to improve the effectiveness of the recommendation system.

Benefits of technology

It effectively solves the problem of scarcity of data in cold start recommendations, improves the recommendation effect of the recommendation system, reduces the complexity of the algorithm, improves efficiency, and captures more fine-grained user and item characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991256A_ABST
    Figure CN119991256A_ABST
Patent Text Reader

Abstract

The invention discloses a cold start recommendation method and device and a storage medium, and the method comprises the steps: obtaining a total data set generated when a user uses an application, and dividing the total data set into a training set and a test set; the training set is sent to a meta-learning framework for training, and a trained meta-learning framework is obtained; and sending the test set into the trained meta-learning framework for score prediction to obtain a score result, and generating a recommendation list according to the score result. According to the meta-learning framework, the problem of lack of sample data in cold start recommendation can be solved, so that cold start recommendation can be realized. The method can be widely applied to the technical field of cold start recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning technology, and in particular to a cold start recommendation method, device and storage medium. Background Art

[0002] Cold start recommendation refers to the recommendation problem for new users or new items in the recommendation system. As an information filtering technology, the recommendation system has achieved great success in recent years. However, since model training requires a large amount of data, the problem of data scarcity is particularly prominent when facing new users or new items. This is the so-called user cold start problem. User cold start recommendation has always been a long-term challenge faced by recommendation systems. In the cold start situation when new users visit online platforms or new items appear, the problem of data scarcity is prevalent. Because the interaction between cold start users and items is usually limited, traditional collaborative filtering methods or deep learning methods require a large amount of training data and are difficult to work well. Summary of the invention

[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to provide a cold start recommendation method, device and storage medium, which can improve the recommendation effect of the cold start recommendation system.

[0004] The technical solution adopted by the present invention is: In a first aspect, the present invention provides a cold start recommendation method, which includes: obtaining a total data set generated by a user when using an application, dividing the total data set into a training set and a test set, the data of the training set including old users and old items, and the data of the test set including three situations: cold start users and old items, cold start items and old users, and cold start users and cold start items; sending the training set into a meta-learning framework for training to obtain a trained meta-learning framework; sending the test set into the trained meta-learning framework for rating prediction to obtain a rating result, and generating a recommendation list based on the rating result, wherein the rating result includes three situations: the score of the cold start user evaluating the old item, or the score of the old user evaluating the cold start item, or the score of the cold start user evaluating the cold start item.

[0005] The training set is sent to the meta-learning framework for training, and the trained meta-learning framework includes the following steps: S121, obtaining the users and user attribute features, items and item attribute features, and the user's rating data for the items in the training set, and dividing the training set into a support set and a query set; S122, obtaining the initial vector representation of the user according to the user's attribute features, and using vanilla The attention mechanism assigns different weights to the attribute features of the item, and obtains the initial vector representation of the item by weighted summation; S123, according to the user attribute features, the user's ratings of different interactive items, and the user's initial vector representation, find multiple similar users who are highly similar to the target user through the similarity calculation formula; S124, obtain the interactive items of the current rating level of all the ratings of the target user, use the self-attention mechanism to obtain the interactive item feature representation of the interactive item, and then splice the target user initial vector representation and the interactive item feature representation to obtain the target user preference feature embedding of the current rating level, and then aggregate the target user preference feature embedding of each rating level through the attention mechanism to obtain the deep preference feature embedding of the target user; S125, use the same method as step S124 to obtain the deep preference feature embedding of each similar user. S126, the deep preference feature embedding of the target user and the aggregated deep preference feature embedding of the multiple similar users are merged to obtain a comprehensive preference vector representation of the target user; S127, on the support set, the method of step S121 to step S126 is used to obtain a comprehensive preference vector representation of the first target user, and the comprehensive preference representation of the first target user and the attribute characteristics of the first item to be predicted are predicted by a multi-layer perceptron to obtain user personalized parameters; on the query set, the method of step S121 to step S126 is used to obtain a comprehensive preference representation of the second target user, and based on the user personalized parameters, the comprehensive preference vector representation of the second target user and the attribute characteristics of the second item to be predicted are predicted by the multi-layer perceptron to obtain global parameters.

[0006] Among them, the test set is sent to the trained meta-learning framework to obtain the recommendation results, including the steps of: obtaining users and user attribute features, items and item attribute features, and user rating data of the items in the training set; adopting the method such as step S122 to step S126 to obtain the comprehensive preference vector representation of the cold start user or the old user, wherein finding multiple similar users is to find from the range of the total data set; inputting the cold start user and the old item attribute features, or the comprehensive preference vector representation of the old user and the cold start item attribute features, or the cold start user and the cold start item attribute features into the multi-layer perceptron to obtain the evaluation score, sorting from high to low according to the multiple evaluation scores, and giving a recommendation list.

[0007] In step S123, the similarity calculation formula is as follows: ;in, and For users and users The attribute characteristics, and Respectively represent users and users The score given to the lth interaction item, and Respectively represent users and users The initial vector representation of ; , and is a manually set constant that controls the effects of three factors on the user and users The influence of similarity between them.

[0008] The step S124 includes: dividing the historical interaction items of the target user according to the rating of the target user on the items, dividing the item attribute feature vectors obtained by the embedding layer of the items with a rating of r into a set ; Use the self-attention network to better obtain the global preference representation of the target user from the input: ; Since different layers can capture features of different spaces, a multi-layer self-attention module is used to obtain the first The complex feature interaction relationships are as follows: ; In the above formula, , is the output of the last layer of the multi-layer self-attention network. The feature table of items with a score of r obtained from the interaction term is shown in the following formula: ; Then the target user initial vector is represented by And the interactive item feature representation The target user preference feature embedding of the current rating level is obtained by splicing them together, and then the target user preference feature embedding of each rating level is aggregated through the attention mechanism to obtain the deep preference feature embedding of the target user. The target user can be obtained by the following formula The deep preference feature embedding representation of: ,in, Indicates the rating is The weight matrix under is the activation function ReLU, Represents a splicing operation, is the user's initial vector representation, is the characteristic representation of the item with rating level r, is the weight when the score is r, where .

[0009] Among them, in step S25, the deep preference feature embedding of each similar user is aggregated by the attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users, including: assuming that the calculated first K similar users With target users The similarity between ; Use the softmax function to normalize these similarities: ; Use the normalized similarity as the weight to perform weighted summation on the deep preference feature embedding of each similar user to generate the final aggregated deep preference feature embedding of multiple similar users: , Aggregate deep preference feature embedding for multiple similar users, Deep preference feature embedding for each similar user.

[0010] In a second aspect, the present invention provides a cold start recommendation device, which includes: a data acquisition module, used to acquire a total data set generated by a user when using an application, and divide the total data set into a training set and a test set, the data of the training set includes old users and old items, and the data of the test set includes three situations: cold start users and old items, cold start items and old users, and cold start users and cold start items; a meta-learning framework training module, used to send the training set into a meta-learning framework for training to obtain a trained meta-learning framework; a recommendation result generation module, used to send the test set into the trained meta-learning framework for rating prediction to obtain a rating result, and generate a recommendation list based on the rating result, wherein the rating result includes three situations: the score of the cold start user evaluating the old item, or the score of the old user evaluating the cold start item, or the score of the cold start user evaluating the cold start item.

[0011] The meta-learning framework training module includes: a training set data acquisition unit, which is used to acquire the users and user attribute features, items and item attribute features, and the user's item rating data in the training set, and divide the training set into a support set and a query set; a user initial vector representation and item initial vector representation acquisition unit, which is used to acquire the user's initial vector representation according to the user's attribute features, using vanilla The attention mechanism assigns different weights to the attribute features of the item, and obtains the initial vector representation of the item by weighted summation; multiple similar user acquisition units are used to find multiple similar users who are highly similar to the target user through a similarity calculation formula based on the user attribute features, the user's ratings of different interactive items, and the user's initial vector representation; a target user deep preference feature embedding acquisition unit is used to obtain the interactive items of the current rating level of all ratings of the target user, and use the self-attention mechanism to obtain the interactive item feature representation of the interactive item, and then concatenate the target user initial vector representation and the interactive item feature representation to obtain the target user preference feature embedding of the current rating level, and then aggregate the target user preference feature embedding of each rating level through the attention mechanism to obtain the deep preference feature embedding of the target user; a similar user aggregated deep preference feature embedding unit is used to use the deep preference feature embedding of the target user to obtain a single The method is the same as the meta-learning method, and the deep preference feature embedding of each similar user is obtained, and the deep preference feature embedding of each similar user is aggregated through the attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users; the target user comprehensive preference vector representation unit is used to merge the deep preference feature embedding of the target user and the aggregated deep preference feature embedding of the multiple similar users to obtain the comprehensive preference vector representation of the target user; the meta-learning framework parameter adjustment unit is used to use the above six units to obtain the comprehensive preference vector representation of the first target user on the support set, and use a multi-layer perceptron to predict the comprehensive preference representation of the first target user and the first attribute characteristics of the item to be predicted to obtain user personalized parameters; on the query set, the above six units are used to obtain the comprehensive preference representation of the second target user, and based on the user personalized parameters, the comprehensive preference vector representation of the second target user and the attribute characteristics of the second item to be predicted are predicted by the multi-layer perceptron to obtain global parameters.

[0012] Among them, the meta-learning framework training module includes: a test set data acquisition unit, which is used to obtain the users and user attribute features, items and item attribute features, and user rating data for items in the training set; a user comprehensive preference vector representation acquisition unit, which is used to obtain the comprehensive preference vector representation of the cold start user or the old user using the same method as the meta-learning framework training module, wherein multiple similar users are found from the range of the total data set; a recommendation list generation unit, which is used to input the cold start user and the old item attribute features, or the comprehensive preference vector representation of the old user and the cold start item attribute features, or the cold start user and the cold start item attribute features into the multi-layer perceptron to obtain the evaluation score, sort from high to low according to the multiple evaluation scores, and give a recommendation list. Further, In a third aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method as described above.

[0013] The beneficial effects of the present invention are: The meta-learning framework of the present invention can solve the problem of lack of sample data in cold-start recommendation, thereby enabling cold-start recommendation.

[0014] Furthermore, during training and testing, the meta-learning framework of the present invention aggregates the embedding information of similar users and merges it into the embedding representation of the target user, thereby enriching the feature embedding representation of the target user and improving the effect of the recommendation system.

[0015] In addition, the similarity calculation formula is used to find users who are highly similar to the target user, and then the preference representations of similar users are aggregated through the attention mechanism, which reduces the complexity of the algorithm and improves the efficiency of the algorithm.

[0016] In addition, more fine-grained user and item feature representations are extracted through the self-attention mechanism, capturing more fine-grained user preferences and greatly improving the recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flow chart of an embodiment of the cold start recommendation method of the present invention; Figure 2 yes Figure 1 A schematic flow chart of an embodiment of step S12; Figure 3 yes Figure 1 A schematic structural diagram of an embodiment of step S12; Figure 4 yes Figure 3 Schematic diagram of the structure of the feature fusion enhancement module; Figure 5 yes Figure 2 A schematic diagram of the structure of the self-attention mechanism network framework in step S124; Figure 6 yes Figure 1 A schematic flow chart of an embodiment of step S13; Figure 7 It is a structural schematic diagram of an embodiment of a cold start recommendation device of the present invention; Figure 8 yes Figure 7 A schematic diagram of the structure of an embodiment of a meta-learning framework training module 12; Fig. 9 yes Figure 7 A structural diagram of an embodiment of a recommendation result generating module 13. DETAILED DESCRIPTION

[0018] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application may be combined with each other. Embodiment 1

[0019] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of the cold start recommendation method of the present invention. Figure 1 As shown, the method comprises the following steps: S11: Obtain a total data set generated by users when using the application, and divide the total data set into a training set and a test set. The data in the training set includes old users and old items.

[0020] Here, cold start users refer to new users who have just registered in the application and have no usage history. Old users are relative to cold start users and refer to users who have used the application. Cold start items refer to new items that have just been released to the application. Old items are relative to cold start items and refer to items that have been purchased by users in the application.

[0021] The data of the total dataset is divided into four cases: (1) old users and old items; (2) cold-start users and old items; (3) cold-start items and old users; (4) cold-start users and cold-start items. The data of the first case is divided into the training set, and the data of the latter three cases are divided into the test set. That is, the data of the test set includes three cases: cold-start users and old items, cold-start items and old users, and cold-start users and cold-start items.

[0022] When verifying the present invention, an open source cold start recommendation dataset (such as DoubanBook, MovieLens) on the Internet can be used as the total dataset for verification.

[0023] S12: sending the training set to the meta-learning framework for training to obtain a trained meta-learning framework; Please also read Figures 2 to 4 , Figure 2 yes Figure 1 A flow chart of an embodiment of step S12. Figure 2 As shown, step S12 includes: S121: obtaining users and user attribute features, items and item attribute features, and user rating data for items in the training set, and dividing the training set into a support set and a query set; Let the user set be U, , contains m users. The interactive item set is denoted as I, the interactive item set , contains L interaction items.

[0024] Rating set R = {1,2,3,4,5}, that is, the rating value range is {1,2,3,4,5}; User u's rating of interactive item i , that is, user u interacts with item i and scores item i as .

[0025] All the data in the training set is allocated according to a certain ratio (for example, 8:2) and divided into a support set and a query set.

[0026] S122: Obtain an initial vector representation of the user based on the user's attribute features, use the vanilla attention mechanism to assign different weights to the attribute features of the item, and perform weighted summation to obtain the initial vector representation of the item.

[0027] For users, the corresponding feature embedding matrix is ​​used to extract the user's attribute feature set, and the vector representation corresponding to each attribute feature is concatenated to obtain the user's initial vector representation. The formula is as follows:

[0028] in, is the Nth feature embedding extracted from the feature embedding matrix.

[0029] For items, because the attributes of items are usually heterogeneous, it is difficult to know which feature determines the user's choice. First, based on the attribute characteristics of the item, the vanilla attention mechanism is used to help the feature-based self-attention network capture the user's different preferences for different attributes. Specifically, the vanilla attention mechanism is used to assign different weights to different attribute features, and the weighted sum is performed to obtain the vector representation of the attribute feature. .

[0030] Assume that item i has n attribute features, which are , and the corresponding attention weights are , where the attention weight calculation formula is: , yes matrix, is a dimensional vector. The feature vector after fusion of multiple features of item i can be expressed as:

[0031] yes matrix, is a dimensional vector, is an attribute feature of item i. The initial vector representation after fusion of multiple features of item i can be expressed as .

[0032] S123: Find multiple similar users who are highly similar to the target user through a similarity calculation formula according to the user attribute characteristics, the user's ratings of different interactive items, and the user's initial vector representation; By mining the preference characteristics of users similar to the target user and using this information to enrich the preference representation of the target user, the generalization ability of the meta-learning framework can be improved. In order to achieve the above goals, the strategy of selecting similar users is particularly important. First, if the user and users If two users give similar ratings to the same item, then we believe that their preferences are similar. However, some of these users may have completely opposite evaluations of their other interaction items, so simply giving the same rating to the same item is not enough to fully identify similar users. In order to identify similar users more accurately, we use the inherent attribute characteristics of the target user and the user embedding information that can represent deep implicit features on the basis of the above to select the top K similar users. The specific similarity calculation formula is as follows:

[0033] in, and For users and users The feature vector of . and Respectively represent users and users The rating given to the lth interaction item. and Respectively represent users and users feature embedding information. We use cosine similarity to calculate the similarity between two user attribute feature vectors and the similarity between feature embedding vectors. Cosine similarity mainly measures the cosine value of the angle between two vectors, so it focuses on the direction of the vector rather than its size. In practical applications of recommendation systems, user feature vectors and embedding vectors may be high-dimensional and sparse. Cosine similarity performs well in high-dimensional sparse space. It can effectively ignore the influence of zero values ​​and focus on the distribution and direction of non-zero values.

[0034] in, The cosine similarity is used to calculate the similarity between user i and user j at the feature vector level.

[0035] in, The cosine similarity is used to calculate the similarity between user i and user j at the feature embedding level.

[0036] In terms of user rating similarity, the Pearson correlation coefficient focuses on the linear correlation of ratings, that is, the similarity of rating patterns, rather than the absolute values ​​of ratings. This means that even if the specific values ​​of user ratings are different, as long as the trends of the ratings are similar, we consider the two users to be similar in their rating patterns. For example, if two users tend to give high or low ratings to the same item, the Pearson correlation coefficient will show a high similarity.

[0037] in, The Pearson correlation coefficient is used to calculate the similarity of the ratings between user i and user j.

[0038] in, , and is a manually set constant that controls the effects of three factors on the user and users The influence of similarity between them.

[0039] In other embodiments, the similarity calculation formula can be slightly modified. The similarity between features calculated using the Pearson correlation coefficient can be calculated using similarity such as Euclidean distance, Manhattan distance, Jaccard similarity, etc., and adjustments can be made according to specific scenarios to achieve better recommendation effects.

[0040] S124: Obtain the interactive items of the current rating level of all ratings of the target user, use the self-attention mechanism to obtain the interactive item feature representation of the interactive item, then concatenate the target user initial vector representation and the interactive item feature representation to obtain the target user preference feature embedding of the current rating level, and then aggregate the target user preference feature embedding of each rating level through the attention mechanism to obtain the deep preference feature embedding of the target user; In order to obtain more fine-grained user preferences, a self-attention mechanism module is established at the user's interactive item level to obtain a deeper user preference feature representation. Figure 5 Represents the self-attention mechanism network Schematic diagram of the framework. Generally speaking, the target user should have different preferences for items with different ratings. If all interactive items are processed in the same way, the interactive information cannot be fully utilized to express user preferences. We divide the target user's historical interactive items according to the target user's rating of the items, and divide the item attribute feature vectors obtained by the embedding layer for items with a rating of r into a set Finally, we first adopt a self-attention network to better obtain the user's global preference representation from the input.

[0041] ; Since different layers can capture features of different spaces, this paper adopts a multi-layer self-attention module to obtain the first The complex feature interaction relationships are as follows: ; In the above formula, , is the input of the first layer of the multi-layer self-attention network, is the output of the last layer of the multi-layer self-attention network. The feature representation of the item with a score of r obtained from the interaction term is shown as follows: ; Then the target user initial vector is represented as And the interactive item feature representation The target user preference feature embedding of the current rating level is obtained by splicing them together, and then the target user preference feature embedding of each rating level is aggregated through the attention mechanism to obtain the deep preference feature embedding of the target user. The target user can be obtained by the following formula The deep preference feature embedding representation of: in, Indicates the rating is The weight matrix under is the activation function ReLU, Represents a splicing operation, is the user's initial vector representation, is the characteristic representation of the item with rating level r, is the weight when the score is r, where .

[0042] In this embodiment, the self-attention network is used to extract more fine-grained feature representations of items to enrich user preferences. In other embodiments, graph neural networks, variational autoencoders, etc. can also be used to achieve this goal.

[0043] S125: Using the same method as step S124, the deep preference feature embedding of each similar user is obtained, and the deep preference feature embedding of each similar user is aggregated through the attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users.

[0044] The similarity calculation formula in step S123 is used to select the predecessors similar to the target user. The method of step S124 is used to obtain the deep preference feature embedding of each similar user. Assume that The embedding information set of similar users is , an attention mechanism is used to aggregate the embedded information of the multiple similar users. Using the similarity calculated in step S123 as the attention weight can ensure that users with high similarity account for a larger proportion in the aggregation process, thereby better reflecting the preferences of the target user. Assume that the first K similar users calculated are With target users The similarity between In order to use these similarities for attention weights, they need to be normalized. The similarities can be converted into probability distributions using the softmax function:

[0045] Using the normalized similarity as the weight, the deep preference feature embeddings of each similar user are weighted summed to generate the final aggregated deep preference feature embeddings of multiple similar users:

[0046] Represents the aggregated deep preference feature embedding of multiple similar users, Deep preference feature embedding for each similar user.

[0047] S126: merging the deep preference feature embedding of the target user and the aggregated deep preference feature embedding of the multiple similar users to obtain a comprehensive preference vector representation of the target user; The deep preference feature embedding of the target user calculated in step S124 and the aggregated deep preference features of the multiple similar users calculated in step S125 are embedded to obtain a comprehensive preference representation of the target user. :

[0048] in, is the corresponding weight matrix, is the bias vector, and Is to control user embed and aggregate similar user embeddings Comprehensive user preferences The above parameters can all be learned from the meta-learning framework.

[0049] In this step, the Figure 4 The feature fusion enhancement module shown merges the target user's deep preference feature embedding and the aggregated deep preference feature embedding of the multiple similar users, thereby enriching the target user's feature embedding representation and improving the effect of the recommendation system.

[0050] S127: On the support set, the method of steps S121 to S126 is used to obtain the comprehensive preference vector representation of the first target user, and the comprehensive preference representation of the first target user and the attribute characteristics of the first item to be predicted are predicted by a multi-layer perceptron to obtain user personalized parameters; on the query set, the method of steps S121 to S126 is used to obtain the comprehensive preference representation of the second target user, and based on the user personalized parameters, the comprehensive preference vector representation of the second target user and the attribute characteristics of the second item to be predicted are predicted by the multi-layer perceptron to obtain global parameters.

[0051] In order to distinguish the target users of the support set from the target users of the query set, the target users of the support set are defined as the first target users, and the target users of the query set are defined as the second target users.

[0052] On the support set, the comprehensive preference representation of the first target user is obtained and the first item attribute feature to be predicted After that, we can use the multi-layer perceptron to predict the ratings of the items in the support set:

[0053] The MLP provides a two-layer multilayer perceptron with a tanh activation function. To ensure the accuracy of the prediction results, the loss function is defined as follows:

[0054] in, are the parameters of the meta-learning framework, and For users For items The actual ratings and the predicted ratings.

[0055] For each task , by performing several gradient optimizations on the loss function generated on the support set, using As a learning rate for local updates to adjust parameters , to quickly adapt to user preferences:

[0056] in, is the learning rate for local updates.

[0057] On the query set, according to the user's personalized parameters And the comprehensive preference representation of the first target user and the second attribute feature of the item to be predicted , use a multi-layer perceptron to predict the items in the query set:

[0058] After obtaining the predicted value, the loss is calculated using the following function:

[0059] Sum the losses of all users on the query set and optimize the global parameters to update the global parameters :

[0060] in, is the learning rate for global update, The current task batch.

[0061] During the training process, steps S123 to S127 are continuously executed, and the above two update processes are continuously repeated to optimize the model parameters until convergence, so that the multi-layer perceptron model can efficiently adapt to small sample tasks. Global parameters Only a small amount of gradient updates are required to quickly adapt to different cold-start recommendation tasks.

[0062] S13: Send the test set into the trained meta-learning framework for rating prediction to obtain a rating result, and generate a recommendation list based on the rating result.

[0063] See also Figure 6 , Figure 6 yes Figure 1A flow chart of an embodiment of step S13. Figure 6 As shown, step S13 includes the following sub-steps: S131: Obtaining users and user attribute features, items and item attribute features, and user rating data for items in the test set; The method of obtaining the user and user attribute characteristics, the item and item attribute characteristics, and the user's rating data for the item in step S131 is the same as step S121.

[0064] S132: Obtaining a comprehensive preference vector representation of the cold start user or the old user by using the method of step S122 to step S126; This step is basically the same as the training step, except that the comprehensive preference vector representation of the target user needs to be obtained in training, and the comprehensive preference vector representation of the cold start user or the old user needs to be obtained in testing. In training, multiple similar users of the target user are found in the training set, while in this step, multiple similar users are found in the total data set.

[0065] This step is broken down into the following sub-steps: (1) Using the same method as step S122, the initial vector representation of the user is obtained according to the attribute characteristics of the user, and the vanilla attention mechanism is used to assign different weights to the attribute characteristics of the item, and the weighted sum is performed to obtain the initial vector representation of the item; (2) Using the same method as step S123, find multiple similar users that are highly similar to the cold start user or the old user; (3) Using the same method as step S124, a deep preference feature embedding of the cold start user or the old user is obtained; (4) Using the same method as step S125, the aggregated deep preference feature embedding of multiple similar users is obtained; (5) Using the same method as step S126, the deep preference feature embedding of the cold start user or the old user is merged with the aggregated deep preference feature embedding of the multiple similar users to obtain a comprehensive preference vector representation of the cold start user or the old user.

[0066] S137: Input the cold start user and the old item attribute features, or the comprehensive preference vector representation of the old user and the cold start item attribute features, or the cold start user and the cold start item attribute features into the multi-layer perceptron to obtain the evaluation score, sort the multiple evaluation scores from high to low, and provide a recommendation list.

[0067] The evaluation score ranges from 1 to 5.

[0068] When the data of the test set is cold start users and old items, for the cold start user, after obtaining the evaluation scores of multiple old items to be predicted corresponding to the cold start user, the multiple evaluation scores are sorted from high to low to obtain a recommendation list of multiple old items corresponding to the cold start user.

[0069] When the data of the test set is cold-start items and old users, for the cold-start item, after obtaining the evaluation scores of multiple old users to be predicted corresponding to the cold-start item, the multiple evaluation scores are sorted from high to low, so as to obtain a recommendation list of multiple old users corresponding to the cold-start item.

[0070] When the data of the test set is cold start users and cold start items, for the cold start user, after obtaining the evaluation scores of multiple cold start items to be predicted corresponding to the cold start user, the multiple evaluation scores are sorted from high to low, so as to obtain a recommendation list of multiple cold start items corresponding to the cold start user. For the cold start item, after obtaining the evaluation scores of multiple cold start users to be predicted corresponding to the cold start item, the multiple evaluation scores are sorted from high to low, so as to obtain a recommendation list of multiple cold start users corresponding to the cold start item. Embodiment 2

[0071] See also Figure 7 , Figure 7 FIG. 1 is a schematic diagram of the structure of an embodiment of the cold start recommendation device of the present invention. Figure 7 As shown, the device includes a data acquisition module 11, a meta-learning framework training module 12, and a recommendation result generation module 13.

[0072] The data acquisition module 11 is used to obtain the total data set generated by users when using the application, and divide the total data set into a training set and a test set. The data of the training set includes old users and old items, and the data of the test set includes three situations: cold start users and old items, cold start items and old users, and cold start users and cold start items.

[0073] The meta-learning framework training module 12 is used to send the training set into the meta-learning framework for training to obtain a trained meta-learning framework.

[0074] The recommendation result generation module 13 is used to send the test set into the trained meta-learning framework for rating prediction, obtain the rating result, and generate a recommendation list according to the rating result, wherein the rating result includes three situations: the score of the cold start user evaluating the old item, or the score of the old user evaluating the cold start item, or the score of the cold start user evaluating the cold start item.

[0075] See also Figure 8 , Figure 8 Schematic diagram of the structure of an embodiment of the meta-learning framework training module 12. Figure 8 As shown, the meta-learning framework training module 12 includes a training set data acquisition unit 121, a user initial vector representation and an item initial vector representation acquisition unit 122, a plurality of similar users acquisition unit 123, a target user deep preference feature embedding acquisition unit 124, a similar user aggregated deep preference feature embedding unit 125, a target user comprehensive preference vector representation unit 126, and a meta-learning framework parameter adjustment unit 127.

[0076] The training set data acquisition unit 121 is used to acquire users and user attribute features, items and item attribute features, and user rating data for items in the training set, and divide the training set into a support set and a query set.

[0077] The user initial vector representation and item initial vector representation acquisition unit 122 is used to acquire the user's initial vector representation according to the user's attribute characteristics, use the vanilla attention mechanism to assign different weights to the attribute characteristics of the item, and perform weighted summation to obtain the initial vector representation of the item.

[0078] The multiple similar user acquisition unit 123 is used to find multiple similar users who are highly similar to the target user through a similarity calculation formula according to user attribute characteristics, user ratings of different interactive items, and the user's initial vector representation.

[0079] The target user deep preference feature embedding acquisition unit 124 is used to obtain the interactive items of the current rating level of all the ratings of the target user, adopt the self-attention mechanism to obtain the interactive item feature representation of the interactive item, and then concatenate the target user initial vector representation and the interactive item feature representation to obtain the target user preference feature embedding of the current rating level, and then aggregate the target user preference feature embedding of each rating level through the attention mechanism to obtain the deep preference feature embedding of the target user.

[0080] The similar user aggregated deep preference feature embedding unit 125 is used to obtain the deep preference feature embedding of each similar user using the same method as the target user deep preference feature embedding acquisition unit, and aggregate the deep preference feature embedding of each similar user through the attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users.

[0081] The target user comprehensive preference vector representation unit 126 is used to merge the target user's deep preference feature embedding and the aggregated deep preference feature embedding of the multiple similar users to obtain a comprehensive preference vector representation of the target user.

[0082] The meta-learning framework parameter adjustment unit 127 is used to obtain the comprehensive preference vector representation of the first target user on the support set using the above six units, and predict the comprehensive preference representation of the first target user and the first attribute characteristics of the item to be predicted using a multi-layer perceptron to obtain user personalized parameters; on the query set, the above six units are used to obtain the comprehensive preference representation of the second target user, and based on the user personalized parameters, the comprehensive preference vector representation of the second target user and the attribute characteristics of the second item to be predicted are predicted using the multi-layer perceptron to obtain global parameters.

[0083] See also Fig. 9 , Fig. 9 yes Figure 7 A structural diagram of an embodiment of the recommendation result generation module 13. Fig. 9 As shown, the meta-learning framework training module includes a test set data acquisition unit 131, a user comprehensive preference vector representation acquisition unit 132 and a recommendation list generation unit 133.

[0084] The test set data acquisition unit 131 is used to acquire the users and user attribute features, items and item attribute features, and the user's rating data for the items in the training set.

[0085] The user comprehensive preference vector representation acquisition unit 132 is used to obtain the comprehensive preference vector representation of the cold start user or the old user by adopting the same method as the meta-learning framework training module, wherein multiple similar users are searched from the range of the total data set.

[0086] The recommendation list generating unit 133 is used to input the cold start user and the old item attribute characteristics, or the comprehensive preference vector representation of the old user and the cold start item attribute characteristics, or the cold start user and the cold start item attribute characteristics into the multi-layer perceptron to obtain the evaluation score, sort the multiple evaluation scores from high to low, and provide a recommendation list.

[0087] Specifically, the working methods of each module in this embodiment have been described in detail in the first embodiment and will not be repeated here. Embodiment 3

[0088] The present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method described in the first embodiment.

[0089] The above is a specific description of the preferred implementation of the present invention, but the 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 cold start recommendation method, characterized in that: include: Obtain a total data set generated by users using the application, and divide the total data set into a training set and a test set, wherein the data of the training set includes old users and old items, and the data of the test set includes three situations: cold start users and old items, cold start items and old users, and cold start users and cold start items; Sending the training set into a meta-learning framework for training to obtain a trained meta-learning framework; The test set is sent to the trained meta-learning framework for rating prediction to obtain a rating result, and a recommendation list is generated according to the rating result, wherein the rating result includes three situations: the score of the old item evaluated by the cold-start user, or the score of the cold-start item evaluated by the old user, or the score of the cold-start item evaluated by the cold-start user.

2. The method according to claim 1, characterized in that The step of sending the training set into the meta-learning framework for training to obtain a trained meta-learning framework comprises the following steps: S121, obtaining users and user attribute features, items and item attribute features, and user rating data for items in the training set, and dividing the training set into a support set and a query set; S122, obtaining an initial vector representation of the user according to the attribute characteristics of the user, using a vanilla attention mechanism to assign different weights to the attribute characteristics of the item, and performing weighted summation to obtain the initial vector representation of the item; S123, according to the user attribute characteristics, the user's ratings of different interactive items, and the user's initial vector representation, using a similarity calculation formula, find multiple similar users who are highly similar to the target user; S124, obtaining the interactive items of the current rating level of all ratings of the target user, using the self-attention mechanism to obtain the interactive item feature representation of the interactive item, and then concatenating the target user initial vector representation and the interactive item feature representation to obtain the target user preference feature embedding of the current rating level, and then aggregating the target user preference feature embedding of each rating level through the attention mechanism to obtain the deep preference feature embedding of the target user; S125, using the same method as step S124, obtaining the deep preference feature embedding of each similar user, and aggregating the deep preference feature embedding of each similar user through the attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users; S126, merging the target user's deep preference feature embedding and the aggregated deep preference feature embedding of the multiple similar users to obtain a comprehensive preference vector representation of the target user; S127. On the support set, the method of steps S121 to S126 is used to obtain the comprehensive preference vector representation of the first target user, and the comprehensive preference representation of the first target user and the attribute characteristics of the first item to be predicted are predicted by a multi-layer perceptron to obtain user personalized parameters; on the query set, the method of steps S121 to S126 is used to obtain the comprehensive preference representation of the second target user, and based on the user personalized parameters, the comprehensive preference vector representation of the second target user and the attribute characteristics of the second item to be predicted are predicted by the multi-layer perceptron to obtain global parameters.

3. The method according to claim 1, characterized in that The step of sending the test set into the trained meta-learning framework to obtain a recommendation result comprises the following steps: Obtaining users and user attribute features, items and item attribute features, and user rating data for items in the training set; The comprehensive preference vector representation of the cold start user or the old user is obtained by adopting the method of step S122 to step S126, wherein the multiple similar users are searched from the range of the total data set; The cold start user and the old item attribute features, or the comprehensive preference vector representation of the old user and the cold start item attribute features, or the cold start user and the cold start item attribute features are input into the multi-layer perceptron to obtain the evaluation score, and the evaluation scores are sorted from high to low to provide a recommendation list.

4. The method according to claim 1, characterized in that: In step S123, the similarity calculation formula is as follows: ; in, and For users and users The attribute characteristics, and Respectively represent users and users The score given to the lth interaction item, and Respectively represent users and users The initial vector representation of ; , and is a manually set constant that controls the effects of three factors on the user and users The influence of similarity between them.

5. The method according to claim 1, characterized in that The step S124 comprises: According to the target user's rating of the item, the historical interaction items of the target user are divided, and the item attribute feature vectors obtained by the embedding layer for the items with a rating of r are divided into a set ; A self-attention network is used to better obtain the global preference representation of the target user from the input: ; Since different layers can capture features in different spaces, a multi-layer self-attention module is used to obtain the The complex feature interaction relationships are as follows: ; In the above formula, , is the output of the last layer of the multi-layer self-attention network. The feature representation of the item with a score of r obtained from the interaction term is shown as follows: ; Then the target user initial vector is represented as And the interactive item feature representation The target user preference feature embedding of the current rating level is obtained by splicing them together, and then the target user preference feature embedding of each rating level is aggregated through the attention mechanism to obtain the deep preference feature embedding of the target user. The target user can be obtained by the following formula The deep preference feature embedding representation of: in, Indicates the rating is The weight matrix under is the activation function ReLU, Represents a splicing operation, is the user initial vector representation, is the characteristic representation of the item with rating level r, is the weight when the score is r, where .

6. The method according to claim 1, characterized in that In step S25, the deep preference feature embedding of each similar user is aggregated by the attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users, including: Assume that the calculated top K similar users With target users The similarity between ; Use the softmax function to normalize these similarities: ; Using the normalized similarity as the weight, the deep preference feature embeddings of each similar user are weighted summed to generate the final aggregated deep preference feature embeddings of multiple similar users: , Aggregate deep preference feature embedding for multiple similar users, Deep preference feature embedding for each similar user.

7. A cold start recommendation device, characterized in that: include: A data acquisition module is used to acquire a total data set generated by users when using the application, and divide the total data set into a training set and a test set, wherein the data of the training set includes old users and old items, and the data of the test set includes three situations: cold start users and old items, cold start items and old users, and cold start users and cold start items; A meta-learning framework training module, used for sending the training set into the meta-learning framework for training to obtain a trained meta-learning framework; A recommendation result generation module is used to send the test set into the trained meta-learning framework for rating prediction, obtain rating results, and generate a recommendation list according to the rating results, wherein the rating results include three situations: the score of the old item evaluated by the cold-start user, or the score of the cold-start item evaluated by the old user, or the score of the cold-start item evaluated by the cold-start user.

8. The method according to claim 1, characterized in that The meta-learning framework training module includes: A training set data acquisition unit, used to acquire users and user attribute features, items and item attribute features, and user rating data for items in the training set, and divide the training set into a support set and a query set; A user initial vector representation and an item initial vector representation acquisition unit, used to acquire the user's initial vector representation according to the user's attribute characteristics, use a vanilla attention mechanism to assign different weights to the item's attribute characteristics, and perform weighted summation to obtain the item's initial vector representation; Multiple similar user acquisition units, used to find multiple similar users who are highly similar to the target user through a similarity calculation formula according to user attribute characteristics, user ratings of different interactive items, and user initial vector representation; A target user deep preference feature embedding acquisition unit is used to acquire the interactive items of the current rating level of all the ratings of the target user, adopt a self-attention mechanism to acquire the interactive item feature representation of the interactive item, and then concatenate the target user initial vector representation and the interactive item feature representation to obtain the target user preference feature embedding of the current rating level, and then aggregate the target user preference feature embedding of each rating level through an attention mechanism to obtain the target user's deep preference feature embedding; A similar user aggregated deep preference feature embedding unit is used to obtain the deep preference feature embedding of each similar user by adopting the same method as the target user deep preference feature embedding acquisition unit, and to aggregate the deep preference feature embedding of each similar user through an attention mechanism to obtain the aggregated deep preference feature embedding of multiple similar users; A target user comprehensive preference vector representation unit, used to merge the target user's deep preference feature embedding and the aggregated deep preference feature embedding of the plurality of similar users to obtain a comprehensive preference vector representation of the target user; The meta-learning framework parameter adjustment unit is used to obtain the comprehensive preference vector representation of the first target user on the support set by using the above six units, and predict the comprehensive preference representation of the first target user and the attribute characteristics of the first item to be predicted by using a multi-layer perceptron to obtain user personalized parameters; on the query set, the above six units are used to obtain the comprehensive preference representation of the second target user, and based on the user personalized parameters, the comprehensive preference vector representation of the second target user and the attribute characteristics of the second item to be predicted are predicted by using the multi-layer perceptron to obtain global parameters.

9. The device according to claim 8, characterized in that The meta-learning framework training module includes: A test set data acquisition unit, used to acquire the users and user attribute features, items and item attribute features, and user rating data for items in the training set; A user comprehensive preference vector representation acquisition unit, configured to obtain a comprehensive preference vector representation of the cold start user or the old user by adopting the same method as the meta-learning framework training module, wherein multiple similar users are searched from the range of the total data set; A recommendation list generating unit is used to input the cold start user and the old item attribute features, or the comprehensive preference vector representation of the old user and the cold start item attribute features, or the cold start user and the cold start item attribute features into the multi-layer perceptron, obtain the evaluation score, sort from high to low according to multiple evaluation scores, and provide a recommendation list.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cold start recommendation method based on preference adaptive meta-learning

    CN113836393A

  • Knowledge crowdsourcing cold start task modeling and recommendation method

    CN114004667A