Training method of recommendation model, recommendation method and related device
Patent Information
- Application Number
- CN202510794207.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-06-13
AI Technical Summary
冷启动问题源于新用户或新物品因交互数据稀疏而难以被准确推荐,系统往往依赖热门内容填充或映射,导致推荐结果同质化;而过滤气泡问题则因算法过度依赖用户历史行为,陷入重复推荐相似内容的循环,限制用户探索新兴趣的可能性
[0024]相对于相关技术,本发明提供的实施例中,通过多维惊喜因子,可以解决过滤气泡问题,避免冷启动项目被过滤,通过充分利用原始项目的信息和原始用户-项目评分,预测冷启动项目的评分,可以提高冷启动项目的推荐准确性,从而实现同时解决冷启动和过滤气泡问题,提高总体推荐准确性和惊喜性能。
Smart Images

Figure CN120806043B_ABST
Abstract
Description
[Technical Field]
[0001] This invention belongs to the field of recommendation, and specifically relates to a training method for a recommendation model, a recommendation method, and related apparatus. [Background Technology]
[0002] In today's information-saturated era, recommender systems have become crucial tools for helping users sift through massive amounts of information to find personalized needs. However, they often face the cold start and filter bubble problems. The cold start problem arises because new users or items are difficult to recommend accurately due to sparse interaction data; systems often rely on popular content for filling or mapping, leading to homogenized recommendations. The filter bubble problem, on the other hand, occurs because algorithms over-rely on users' historical behavior, getting stuck in a cycle of repeatedly recommending similar content and limiting users' potential to explore new interests. Most existing methods consider solving these two problems in isolation, neglecting their mutually reinforcing negative effects. Cold start recommendations exacerbate filter bubbles, which in turn further hinder users from discovering potential interests, creating a vicious cycle that ultimately reduces overall recommendation accuracy and surprise factor performance. [Summary of the Invention]
[0003] This invention provides a method, apparatus, and storage medium for recommending items, thereby improving the accuracy of cold start recommendations.
[0004] The first aspect of this invention provides a method for training a recommendation model, comprising:
[0005] Surprise items are determined based on multidimensional surprise factors, user interaction history data, and candidate items. The multidimensional surprise factors include unexpectedness, novelty, timeliness, and relevance.
[0006] Determine multidimensional surprise condition information based on the aforementioned surprise items;
[0007] The noise, the multidimensional surprise condition information, and the user interaction history data are input into the conditional generative adversarial network of the initial recommendation model to generate a cold start embedding vector.
[0008] Based on the cold start embedding vector, the original item embedding vector, and the original user-item rating, the rating of the cold start item is predicted to obtain a recommendation list;
[0009] The loss corresponding to the recommendation list is determined based on the recommendation list and the preset loss function, wherein the preset loss function includes a preset surprise factor function, and the loss includes surprise level loss.
[0010] The initial recommendation model is trained by optimizing the loss to obtain the target recommendation model.
[0011] A second aspect of this invention provides a training apparatus for a recommendation model, comprising:
[0012] The first determining unit is used to determine surprise items based on multidimensional surprise factors, user interaction history data, and candidate items. The multidimensional surprise factors include unexpectedness, novelty, timeliness, and relevance.
[0013] A conversion unit is used to determine multidimensional surprise condition information based on the surprise item;
[0014] The generation unit is used to input noise, the multidimensional surprise condition information, and the user interaction history data into the conditional generative adversarial network of the initial recommendation model to generate a cold start embedding vector.
[0015] The prediction unit is used to predict the rating of cold-start items based on the cold-start embedding vector, the original item embedding vector, and the original user-item rating, so as to obtain a recommendation list;
[0016] The second determining unit is used to determine the loss corresponding to the recommendation list based on the recommendation list and the preset loss function, wherein the preset loss function includes a preset surprise factor function and the loss includes surprise level loss.
[0017] A training unit is used to train the initial recommendation model by optimizing the loss to obtain the target recommendation model.
[0018] A third aspect of the present invention provides a recommended method, comprising:
[0019] Obtain user interaction history data;
[0020] The user interaction history data is input into the target recommendation model to output a recommendation list, wherein the target recommendation model is the target model obtained by using the method described in the first aspect of the above embodiments.
[0021] A fourth aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect above.
[0022] A fifth aspect of the present invention provides a computer program product, including instructions, characterized in that, when executed by a processor, the instructions implement the steps of the method described in the first aspect above.
[0023] A sixth aspect of the present invention provides a computer storage medium including instructions that, when executed on a computer, cause the computer to perform the steps of the method described in the first aspect.
[0024] Compared to related technologies, the embodiments provided by this invention can solve the bubble filtering problem by using a multi-dimensional surprise factor, thus avoiding the filtering of cold-start items. By making full use of the information of the original items and the original user-item ratings, the ratings of cold-start items can be predicted, thereby improving the recommendation accuracy of cold-start items. This achieves the simultaneous solution of the cold-start and bubble filtering problems, improving the overall recommendation accuracy and surprise performance. [Attached Image Description]
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0026] Figure 1 A flowchart illustrating the training method of the recommendation model provided in an embodiment of the present invention;
[0027] Figure 2 A schematic diagram illustrating the application of the training method for the recommendation model provided in this embodiment of the invention;
[0028] Figure 3 A schematic diagram of the virtual structure of the training device for the recommendation model provided in an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the hardware structure of a server provided in an embodiment of the present invention.
Detailed Implementation Methods
[0030] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0031] The following section explains the training methods for recommendation models from the perspective of the training equipment. Please refer to the relevant documentation. Figure 1 This is a flowchart illustrating the training method of the recommendation model provided in an embodiment of the present invention. The recommendation method of the recommendation model includes:
[0032] 101. Determine surprise items based on multidimensional surprise factors, user interaction history data, and candidate items. The multidimensional surprise factors specifically include unexpectedness, novelty, timeliness, and relevance.
[0033] In this embodiment, the recommendation model training device can determine whether candidate items surprise or delight users by using user interaction history data based on multiple dimensions such as unexpectedness, novelty, timeliness, and relevance. The user interaction history data includes user information, the original items interacted with by the user, the original user-item rating, etc., where the original user-item rating represents the user's rating of the original item.
[0034] The unexpectedness dimension is used to uncover high-value items across categories. Users' interests are often not limited to a few specific categories; in the same context, they may have potential interest in items across different categories. The introduction of the unexpectedness dimension allows recommendation systems to break through conventional recommendation scope, suggesting items with low interaction but high value to users, thereby increasing the surprise factor of the recommendations.
[0035] The novelty dimension measures the frequency with which users select similar items. Users often want to discover new and different items to satisfy their ever-changing needs and interests. The introduction of the novelty dimension allows recommendation systems to uncover niche or newly emerging items that users might be interested in, satisfying their curiosity.
[0036] The timeliness dimension reflects a user's recent interactive behavior. Actual user needs and interests are constantly changing; users don't always crave "surprises." Introducing the timeliness dimension allows recommendation systems to adjust based on users' real-time needs.
[0037] The relevance dimension measures the historical interaction between users and items. By analyzing past user interactions with items, such as purchases, browsing, and favorites, the degree of user interest in different items can be determined. The introduction of the relevance dimension allows recommendation systems to focus on items that users have clearly expressed interest in, thereby improving recommendation accuracy.
[0038] In some embodiments, surprise items include unexpected items, novel items, timely items, and relevant items. The determination of surprise items based on multidimensional surprise factors, user interaction history data, and candidate items may specifically include the following labeling steps:
[0039] If the number of interactions between a user and the category to which a candidate item belongs is less than or equal to the first preset threshold, and the rating of the candidate item is greater than or equal to the preset rating threshold, then the candidate item is marked as an unexpected item.
[0040] If the number of interactions between the user and the candidate project is less than or equal to the second preset threshold, and the category label of the candidate project belongs to the category set corresponding to the original project, then the candidate project is marked as a novel project.
[0041] If the interaction between a candidate item and the user is within the recent threshold number, the candidate item is marked as a timely item.
[0042] If the number of interactions between a candidate item and a user is greater than or equal to the third preset threshold, the candidate item is marked as a relevant item.
[0043] Understandably, by tagging candidate items and constructing multidimensional surprise information based on unexpectedness, novelty, timeliness, and relevance, invalid candidate items can be filtered out.
[0044] It should be noted that the training device for the recommendation model can use a matrix as the data carrier, employing a gating network to label the multidimensional surprise factor matrix. Candidate items that do not simultaneously satisfy all four surprise factors are filtered through the multidimensional surprise factor matrix. Surprise items are determined based on the multidimensional surprise factors, user interaction history data, and candidate items. Specifically, this also includes:
[0045] Construct a user-candidate item interaction matrix and a rating matrix based on user interaction history data and candidate items;
[0046] A multidimensional surprise factor matrix is constructed based on the multidimensional surprise factor, the user-candidate item interaction matrix, and the rating matrix. The multidimensional surprise factor matrix includes the unexpectedness matrix, the novelty matrix, the timeliness matrix, and the relevance matrix.
[0047] It is understandable that the sub-items of the unexpectedness matrix are unexpected items, the sub-items of the novelty matrix are novel items, the sub-items of the timeliness matrix are timeliness items, and the sub-items of the relevance matrix are relevance items. The specific execution process of constructing the multidimensional surprise factor matrix can adopt the above-mentioned marking steps.
[0048] For example, please refer to Figure 2 This is a schematic diagram illustrating the application of the training method for the recommendation model provided in this embodiment of the invention. User-candidate item interaction matrix R u,i and rating matrix X u,i With user u as the row and candidate item i as the column, the interaction matrix R u,i sub-item r u,i The rating matrix X represents the interaction behavior, with 1 indicating interaction and 0 indicating no interaction. u,i sub-item x u,i Mark rating, x u,i The value represents the score. From the original set of item features M i Obtain the project category C from the data, and extract the category using the C category extraction function. u,i =f(M i Extract tag data directly.
[0049] Specifically, the unexpectedness of candidate item i can be represented by the following formula, as a sub-item of the unexpectedness matrix:
[0050]
[0051] Where, δ sur Indicates the preset scoring threshold, β sur Indicates a low interaction threshold. C u Indicates the category of the original project, C u,i Represents the category of candidate items, selected through k-fold cross-validation, sum(C u,i ) represents the total number of interactions for the category to which the candidate item belongs.
[0052] It is understandable that this embodiment calculates the total number of interactions (sum(C)) of the category to which candidate item i belongs. u,i ), determine whether it is less than the set low interaction threshold β. sur This determines whether candidate item i belongs to the low-interaction category.
[0053] It is also understandable that in the user-candidate item interaction matrix R u,i In the diagram, 1 indicates interaction, and 0 indicates no interaction. The total number of interactions for the category to which candidate item i belongs is sum(C). u,i ), which is also the total number of candidate items i that have interacted with user u among all candidate items i in the category to which candidate item i belongs.
[0054] Therefore, by analyzing the frequency of user interaction with different items, their ratings, and the categories to which candidate items belong, it can be determined whether candidate item i meets the conditions of low interaction and high rating. Sur(u,i) = 1 indicates that the sub-item corresponding to candidate item i is marked as 1, indicating that candidate item i is an unexpected item; otherwise, it is marked as 0.
[0055] Specifically, the novelty of candidate item i can be represented by the following formula, as a sub-item of the novelty matrix:
[0056]
[0057] Understandably, by statistically analyzing the frequency of user u's selections of different categories of items, it can be determined whether the category to which candidate item i belongs is a low-frequency selection by user u. New(u,i) = 1 indicates that the sub-item corresponding to candidate item i is marked as 1, indicating that candidate item i is a novel item; otherwise, it is marked as 0.
[0058] Specifically, the timeliness of candidate item i can be represented by the following formula, as a sub-item of the timeliness matrix:
[0059]
[0060] Among them, S u This is the set of the most recent δ interactions. It can be understood that this is achieved by determining the interaction r between user u and candidate item i. (u,i)Whether the interaction is within the recent interaction threshold can determine whether the interaction is timely and can bring the desired "surprise" to user u at that time. Tim(u,i)=1 means that the sub-item corresponding to candidate item i is marked as 1, indicating that candidate item i is a timely item; otherwise, it is marked as 0.
[0061] It's also understandable that different users interact at different frequencies in reality, making it impossible to determine a general threshold for the number of interactions. High-frequency users interact more frequently and their interactions are more variable, while low- to medium-frequency users' interactions are less variable. Therefore, we first need to divide users into high, medium, and low-frequency interaction groups based on the average number of interactions, and then determine the timeliness threshold for interaction for each group. This allows us to construct a set of the most recent δ interactions based on the timeliness thresholds of different user groups.
[0062] Specifically, the relevance of candidate item i can be represented by the following formula, as a sub-item of the relevance matrix:
[0063]
[0064] Understandably, by analyzing whether user u interacts with candidate item i, we can determine whether the user is interested in candidate item i. Rel(u,i) = 1 indicates that the sub-item corresponding to candidate item i is marked as 1, indicating that candidate item i is a relevant item; otherwise, it is marked as 0.
[0065] It should be noted that for the candidate item i corresponding to the sub-item marked as 0 above, marking it as 0 can filter out the corresponding candidate item i. Furthermore, in real-world cold start scenarios, matrix R is very sparse, meaning there are many "?" in the matrix. Inputting the original sparse interaction matrix into the model would significantly reduce recommendation performance. Therefore, marking all values in all 0-1 matrices of Sur(u,i), New(u,i), Tim(u,i), and Rel(u,i) that are also "?" or 0 as 0 can filter out invalid candidate items, thereby enhancing the multidimensional surprise factor matrix.
[0066] 102. Determine the multi-dimensional surprise conditions based on the surprise items.
[0067] In this embodiment, the training device for the recommendation model can determine multi-dimensional surprise condition information based on surprise items, and input this information into the conditional generative adversarial network of the initial recommendation model to enrich the generated information. Specifically, determining multi-dimensional surprise condition information based on surprise items includes:
[0068] Transform surprise items into vectors of unexpectedness, novelty, timeliness, and relevance;
[0069] The surprise vector, novelty vector, timeliness vector, and relevance vector are merged and concatenated into surprise condition information.
[0070] The training mechanism of the recommendation model can transform unexpected items, novel items, timely items, and relevant items into unexpected vectors, novelty vectors, timely vectors, and relevant vectors through the embedding layer. Specifically, the unexpected vector, novelty vector, timely vector, and relevant vector can be obtained through the following formulas:
[0071]
[0072] Here, Embedding-Layer represents the embedding layer.
[0073] Specifically, the surprise condition information can be obtained using the following formula:
[0074]
[0075] Concat is the function for merging and concatenating elements.
[0076] 103. Input noise, multidimensional surprise condition information and user interaction history data into the conditional generative adversarial network of the initial recommendation model to generate cold start embedding vectors.
[0077] In this embodiment, the training device for the recommendation model can input noise, multidimensional surprise condition information, and user historical interaction data into the conditional generative adversarial network (GAN) of the initial recommendation model to generate a cold-start embedding vector. The noise can be of a standard distribution, such as Gaussian noise. The GAN can be a Conditional Generative Adversarial Network for Attribute Manipulation (CGAR), where the multidimensional surprise condition information guides the generator's generation process, and the discriminator uses the multidimensional surprise condition information to determine the authenticity of the data. Through adversarial interaction between the generator and the discriminator, the initial recommendation model generates a cold-start embedding vector that conforms to the multidimensional surprise condition information. Specifically, inputting noise, multidimensional surprise condition information, and user historical interaction data into the GAN of the initial recommendation model to generate the cold-start embedding vector can include:
[0078] Multidimensional surprise condition information is used to guide the sampling noise to generate virtual cold start data;
[0079] Generate real cold start data by sampling users' historical interaction data;
[0080] Determine whether virtual cold start data and real cold start data meet the surprise condition information to obtain the determination result;
[0081] Adversarial training is performed using the discrimination results and a preset objective function to obtain cold-start embedding vectors.
[0082] The preset objective function is:
[0083]
[0084] Where G represents the generator, R represents the discriminator, Y represents the set of multidimensional surprise information samples, y represents the real cold start data, Z represents the set of sampled noise, and z represents the sampled noise.
[0085] Understandable, V(G,R) represents the expected logarithmic output of the discriminator R on real cold-start data. The goal of the discriminator R is to maximize this V(G,R). Let V(G,R) represent the expected logarithmic output of the discriminator R on the virtual cold-start data, and let V(G,R) be the objective of the generator G. Through these two expected terms, the predefined objective function ensures that the generator and discriminator can compete and promote each other during training, thereby continuously improving the quality of the generated data and the discriminator's discriminative ability.
[0086] In some embodiments, the sampling noise can be randomly masked with a preset probability: This improves the robustness and generalization ability of the model training. The specific mask type, ratio, and position can be set according to actual needs, or a dynamic adjustment strategy can be adopted; there are no specific restrictions here.
[0087] 104. Based on the cold start embedding vector, the original item embedding vector, and the original user-item rating, predict the rating of the cold start items to obtain the recommendation list.
[0088] In this embodiment, the training device for the recommendation model, after generating a cold-start embedding vector that conforms to multidimensional surprise factor conditions through a conditional adversarial network, inputs a pre-trained original item embedding vector and obtains a recommendation list through a collaborative filtering recommendation method. Specifically, the recommendation list can be obtained by predicting the ratings of cold-start items based on the cold-start embedding vector, the original item embedding vector, and the original user-item ratings.
[0089] Calculate the similarity between the cold start embedding vector and the original project embedding vector;
[0090] Multiply the similarity score by the original user-item rating to predict the rating of cold-start projects;
[0091] The ratings of cold start projects are sorted to obtain a recommended list.
[0092] Understandably, the higher the similarity between the cold-start embedding vector and the original item embedding vector, the stronger the connection between the two items. Based on this similarity, the rating of the cold-start item can be predicted using the rating of the original item. Therefore, for cold-start items lacking user interaction data, the information from the original item can be fully utilized to predict the cold-start item's rating and accurately recommend new, user-interesting cold-start items.
[0093] In some embodiments, calculating the similarity between the cold-start embedding vector and the original item embedding vector specifically includes:
[0094]
[0095] Among them, G(cold) i ) represents the cold start embedding vector, e j This represents the original project embedding vector.
[0096] Multiplying the similarity score by the original user-item rating, the predicted rating for a cold-start project includes:
[0097]
[0098] Among them, M embed x represents the embedding vector of the project feature set. embed This represents the original user-item rating embedding vector.
[0099] The cold start projects are ranked by their scores to obtain a recommended list, which includes:
[0100] Rank the scores of the cold start projects;
[0101] Retrieve the top K cold start projects and generate a recommendation list.
[0102] It is understood that K is a positive integer, and the specific value can be set by those skilled in the art based on the actual situation, without being limited here.
[0103] 105. Determine the loss corresponding to the recommendation list based on the recommendation list and the preset loss function.
[0104] In this embodiment, the preset loss function includes a preset surprise factor function and a preset accuracy function. The loss includes surprise factor loss and accuracy loss. After the recommendation model's training device generates a recommendation list, the performance of the generated recommendation list in terms of surprise factor can be evaluated using the preset loss function. The loss corresponding to the recommendation list is determined based on the recommendation list and the preset loss function, specifically including:
[0105] Based on the multidimensional surprise factor and user interaction history data, determine the unexpectedness loss, novelty loss, timeliness loss, and relevance loss corresponding to the recommended items in the recommendation list;
[0106] We obtain the surprise loss by weighting and summing the unexpectedness loss, novelty loss, timeliness loss, and relevance loss.
[0107] Among these, the unexpectedness factor considers cross-category low-interaction items, and the unexpectedness loss can be calculated using the following unexpectedness loss function:
[0108]
[0109] Where K is the number of recommended items in the recommendation list List, and the value of Sur(u,i) indicates that if the recommended item is a low-interaction, high-rated item, it is marked as 1, otherwise it is marked as 0, which is used to calculate the hit rate of its unexpected items.
[0110] Novelty considerations include low-interaction items within the same category. The main goal is to recommend novel items of the same category, i.e., items with low historical interaction counts in the recommendation list. The novelty loss can be calculated using the following novelty loss function:
[0111]
[0112] The value of Sur(u,i) indicates whether the recommended item is a nodal item that the original user did not interact with and is of the same category. If it is marked as 1, it is marked as 0 otherwise. It is used to calculate the hit rate of novel items.
[0113] Timeliness is considered in the set S of the user's most recent δ interactions. u The prediction accuracy and timeliness loss of the recommended list can be calculated using the following timeliness loss function:
[0114]
[0115] Where, the value of Tim(u,i) indicates if the recommended item is in S u If it is not marked as 1, it is marked as 0, which is used to calculate the hit rate of its timeliness projects.
[0116] Relevance takes into account the accuracy of predictions made by users in interactive projects. The relevance loss can be calculated using the following relevance loss function:
[0117]
[0118] The value of Rel(u,i) indicates that the recommended item is marked as 1 if it is a user-interactive item, and 0 otherwise. It is used to calculate the hit rate of its relevant items.
[0119] The surprise factor loss is obtained by weighted summation of unexpectedness loss, novelty loss, timeliness loss, and relevance loss, and can be calculated using the following preset surprise factor loss function:
[0120] L Multi =w1·L Sur +w2·L New +w3·L Tim +w4·L Rel
[0121] Among them, w1, w2, w3, and w4 represent loss weights, which are used to adjust the weights of different sub-loss terms.
[0122] The training apparatus for the recommendation model evaluates the model's recommendation accuracy based on a preset accuracy function, and determines the loss corresponding to the recommendation list based on the recommendation list and a preset loss function. Specifically, it also includes:
[0123] The accuracy loss is calculated using the following preset loss function:
[0124] L Acc =V(G,R)+σ*Ω(G,R)
[0125] Where Ω(G,R) is the regularization loss and σ is the weight.
[0126] The loss is calculated using the following formula:
[0127] L All =L Acc +L Multi
[0128] 106. Train the initial recommendation model by optimizing the loss to obtain the target recommendation model.
[0129] In this embodiment, the training device for the recommendation model, guided by a preset surprise factor loss function and a preset accuracy loss function, optimizes the loss and updates the parameters of the initial model to obtain the trained target recommendation model. Through joint optimization using multiple surprise factor losses, users will obtain recommendation results with higher accuracy and appropriate surprise level, improving the user experience.
[0130] Compared to related technologies, the embodiments provided by this invention address the bubble filtering problem through a multi-dimensional surprise factor, preventing cold-start items from being filtered out. By fully utilizing information from the original items and original user-item ratings, the ratings of cold-start items are predicted, improving the recommendation accuracy of cold-start items. This simultaneously solves both the cold-start and bubble filtering problems, enhancing overall recommendation accuracy and surprise performance. Furthermore, a preset accuracy loss function further improves recommendation accuracy.
[0131] The present invention has been described above from the perspective of the training method of the recommendation model. The present invention will now be described from the perspective of the training device of the recommendation model.
[0132] Please see Figure 3 This is a virtual structural diagram of a training device for a recommendation model provided in an embodiment of the present invention. The training device 200 for the recommendation model includes:
[0133] The first determining unit 201 is used to determine surprise items based on multidimensional surprise factors, user interaction history data and candidate items. The multidimensional surprise factors include unexpectedness, novelty, timeliness and relevance.
[0134] The conversion unit 202 is used to determine multi-dimensional surprise condition information based on the surprise item;
[0135] The generation unit 203 is used to input noise, multidimensional surprise condition information and user interaction history data into the conditional generative adversarial network of the initial recommendation model to generate cold start embedding vectors.
[0136] Prediction unit 204 is used to predict the rating of cold start items based on the cold start embedding vector, the original item embedding vector and the original user-item rating to obtain a recommendation list;
[0137] The second determining unit 205 is used to determine the loss corresponding to the recommendation list based on the recommendation list and the preset loss function. The preset loss function includes a preset surprise factor function, and the loss includes surprise level loss.
[0138] Training unit 206 is used to train the initial recommendation model by optimizing the loss to obtain the target recommendation model.
[0139] In one possible design, surprise items include unexpected items, novel items, timely items, and relevant items, and the first determining unit 201 is specifically used for:
[0140] If the number of interactions between a user and the category to which a candidate item belongs is less than or equal to the first preset threshold, and the rating of the candidate item is greater than or equal to the preset rating threshold, then the candidate item is marked as an unexpected item.
[0141] If the number of interactions between the user and the candidate project is less than or equal to the second preset threshold, and the category label of the candidate project belongs to the category set corresponding to the original project, then the candidate project is marked as a novel project.
[0142] If the interaction between a candidate item and the user is within the recent threshold number, the candidate item is marked as a timely item.
[0143] If the number of interactions between a candidate item and a user is greater than or equal to the third preset threshold, the candidate item is marked as a relevant item.
[0144] In one possible design, the first determining unit 201 is further used for:
[0145] Construct a user-candidate item interaction matrix and a rating matrix based on user interaction history data and candidate items;
[0146] A multidimensional surprise factor matrix is constructed based on the multidimensional surprise factor, the user-candidate item interaction matrix, and the rating matrix. The multidimensional surprise factor matrix includes the unexpectedness matrix, the novelty matrix, the timeliness matrix, and the relevance matrix.
[0147] In one possible design, the conversion unit 202 is specifically used for:
[0148] Transform surprise items into vectors of unexpectedness, novelty, timeliness, and relevance;
[0149] The surprise vector, novelty vector, timeliness vector, and relevance vector are merged and concatenated into surprise condition information.
[0150] In one possible design, the generating unit 203 is specifically used for:
[0151] Multidimensional surprise condition information is used to guide the sampling noise to generate virtual cold start data;
[0152] Generate real cold start data by sampling users' historical interaction data;
[0153] Determine whether virtual cold start data and real cold start data meet the surprise condition information to obtain the determination result;
[0154] Adversarial training is performed using the discrimination results and a preset objective function to obtain cold-start embedding vectors.
[0155] The preset objective function is:
[0156]
[0157] Where G represents the generator, R represents the discriminator, Y represents the set of multidimensional surprise information samples, y represents the real cold start data, Z represents the set of sampled noise, and z represents the sampled noise.
[0158] In one possible design, the generation unit 203 can randomly mask the noise with a preset probability:
[0159] In one possible design, the prediction unit 204 is specifically used for:
[0160] Calculate the similarity between the cold start embedding vector and the original project embedding vector;
[0161] The similarity score is multiplied by the original project score to predict the score of the cold start project;
[0162] The ratings of cold start projects are sorted to obtain a recommended list.
[0163] In one possible design, prediction unit 204 calculates the similarity between the cold-start embedding vector and the original item embedding vector using the following formula:
[0164]
[0165] Among them, G(cold) i ) represents the cold start embedding vector, e j This represents the original project embedding vector.
[0166] In one possible design, prediction unit 204 predicts the score of the cold start project using the following formula:
[0167]
[0168] Among them, M embed x represents the embedding vector of the project feature set. embed This represents the original user-item rating embedding vector.
[0169] In one possible design, the prediction unit 204 is also specifically used for:
[0170] Rank the scores of the cold start projects;
[0171] Retrieve the top K cold start projects and generate a recommendation list.
[0172] In one possible design, the preset loss function includes a preset surprise factor function and a preset accuracy function, and the loss includes surprise loss and accuracy loss. The second determining unit 205 is specifically used for:
[0173] Based on the multidimensional surprise factor and user interaction history data, determine the unexpectedness loss, novelty loss, timeliness loss, and relevance loss corresponding to the recommended items in the recommendation list;
[0174] We obtain the surprise loss by weighting and summing the unexpectedness loss, novelty loss, timeliness loss, and relevance loss.
[0175] The second determining unit 205 is also specifically used for:
[0176] Accuracy loss is calculated based on the following formula:
[0177] L Acc =V(G,R)+σ*Ω(G,R)
[0178] Where Ω(G,R) is the regularization loss and σ is the weight.
[0179] The loss is calculated based on the following formula:
[0180] L All =L Acc +L Multi
[0181] This invention also provides a recommended method, comprising:
[0182] Obtain user interaction history data;
[0183] The user interaction history data is input into the target recommendation model to output a recommendation list, wherein the target recommendation model is a target model obtained using the training method provided in the above embodiments of the present invention.
[0184] Figure 4 This is a schematic diagram of the server structure of the present invention, as shown below. Figure 4 As shown, the server 300 in this embodiment includes at least one processor 301, at least one network interface 304 or other user interface 303, a memory 305, and at least one communication bus 302. The server 300 may optionally include the user interface 303, including a display, keyboard, or clicking device. The memory 305 may include high-speed RAM, or it may also include non-volatile memory, such as at least one disk storage device. The memory 305 stores execution instructions. When the server 300 is running, the processor 301 communicates with the memory 305, and the processor 301 calls the instructions stored in the memory 305 to execute the training method of the recommended model described above. The operating system 306 contains various programs for implementing various basic services and handling tasks based on the hardware.
[0185] The server provided in this application embodiment can execute the technical solution of the above-described embodiment of the training method for the recommendation model. Its implementation principle and technical effect are similar, and will not be repeated here.
[0186] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a computer, implements the method flow related to the training device for the recommendation model in any of the above method embodiments. Correspondingly, the computer can be the training device for the recommendation model.
[0187] This invention also provides a computer program or a computer program product including a computer program, which, when executed on a computer, causes the computer to implement the method flow related to the training device for the recommendation model in any of the above method embodiments. Correspondingly, the computer can be the training device for the recommendation model described above.
[0188] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for training a recommendation model, wherein the recommendation model is used to recommend items, characterized in that, include: Surprise items are determined based on multidimensional surprise factors, user interaction history data, and candidate items. The multidimensional surprise factors include unexpectedness, novelty, timeliness, and relevance. Determine multidimensional surprise condition information based on the aforementioned surprise items; The noise, the multidimensional surprise condition information, and the user interaction history data are input into the conditional generative adversarial network of the initial recommendation model to generate a cold start embedding vector. Based on the cold start embedding vector, the original item embedding vector, and the original user-item rating, the rating of the cold start item is predicted to obtain a recommendation list; The loss corresponding to the recommendation list is determined based on the recommendation list and the preset loss function. The preset loss function is the sum of the preset surprise factor function and the preset accuracy function. The loss includes surprise factor loss and accuracy loss. The initial recommendation model is trained by optimizing the loss function to obtain the target recommendation model. The surprise items include unexpected items, novel items, timely items, and relevant items. The process of determining surprise items based on multidimensional surprise factors, user interaction history data, and candidate items includes: If the number of interactions between the user and the category to which the candidate item belongs is less than or equal to a first preset threshold, and the rating of the candidate item is greater than or equal to a preset rating threshold, then the candidate item is marked as the unexpected item. If the number of interactions between the user and the candidate project is less than or equal to the second preset threshold, and the category label of the candidate project belongs to the category set corresponding to the original project, then the candidate project is marked as the novel project. If the interaction between the candidate item and the user is within a recent threshold number, then the candidate item is marked as the timely item; If the number of interactions between the candidate item and the user is greater than or equal to a third preset threshold, then the candidate item is marked as the relevant item. The step of determining the surprise level loss corresponding to the recommendation list based on the recommendation list and the preset surprise factor loss function includes: Based on the multidimensional surprise factor and user interaction history data, determine the unexpectedness loss, novelty loss, timeliness loss, and relevance loss corresponding to the recommended items in the recommendation list; The surprise factor loss is obtained by weighted summation of the unexpectedness loss, the novelty loss, the timeliness loss, and the relevance loss.
2. The method according to claim 1, characterized in that, The process of determining the multidimensional surprise condition information based on the surprise item includes: The surprise items are transformed into unexpectedness vectors, novelty vectors, timeliness vectors, and relevance vectors; The unexpectedness vector, the novelty vector, the timeliness vector, and the relevance vector are merged and concatenated to form the surprise condition information.
3. The method according to claim 1, characterized in that, The step of predicting the rating of cold-start items based on the cold-start embedding vector, the original item embedding vector, and the original user-item rating to obtain a recommendation list includes: Calculate the similarity between the cold start embedding vector and the original project embedding vector; Multiply the similarity score by the original user-item rating to predict the rating of the cold-start item; The ratings of the cold start projects are sorted to obtain the recommendation list.
4. The method according to claim 1, characterized in that, The step of inputting noise, the multidimensional surprise condition information, and the user interaction history data into the conditional generative adversarial network of the initial recommendation model to generate a cold-start embedding vector includes: The multidimensional surprise condition information is used to guide the sampling of the noise to generate virtual cold start data; The user interaction history data is sampled to generate real cold start data; Determine whether the virtual cold start data and the real cold start data meet the surprise condition information to obtain a determination result; Adversarial training is performed using the discrimination results and a preset objective function to obtain the cold start embedding vector.
5. A training apparatus for a recommendation model, the recommendation model being used to recommend items, characterized in that, include: The first determining unit is used to determine surprise items based on multidimensional surprise factors, user interaction history data, and candidate items. The multidimensional surprise factors include unexpectedness, novelty, timeliness, and relevance. A conversion unit is used to determine multidimensional surprise condition information based on the surprise item; The generation unit is used to input noise, the multidimensional surprise condition information, and the user interaction history data into the conditional generative adversarial network of the initial recommendation model to generate a cold start embedding vector. The prediction unit is used to predict the rating of cold-start items based on the cold-start embedding vector, the original item embedding vector, and the original user-item rating, so as to obtain a recommendation list; The second determining unit is used to determine the loss corresponding to the recommendation list based on the recommendation list and the preset loss function. The preset loss function is the sum of the preset surprise factor function and the preset accuracy function. The loss includes surprise loss and accuracy loss. The training unit is used to train the initial recommendation model by optimizing the loss to obtain the target recommendation model. The surprise items include unexpected items, novel items, timely items, and relevant items, and the first determining unit is specifically used for: If the number of interactions between the user and the category to which the candidate item belongs is less than or equal to a first preset threshold, and the rating of the candidate item is greater than or equal to a preset rating threshold, then the candidate item is marked as the unexpected item. If the number of interactions between the user and the candidate project is less than or equal to the second preset threshold, and the category label of the candidate project belongs to the category set corresponding to the original project, then the candidate project is marked as the novel project. If the interaction between the candidate item and the user is within a recent threshold number, then the candidate item is marked as the timely item; If the number of interactions between the candidate item and the user is greater than or equal to a third preset threshold, then the candidate item is marked as the relevant item. The second determining unit is specifically used for: Based on the multidimensional surprise factor and user interaction history data, determine the unexpectedness loss, novelty loss, timeliness loss, and relevance loss corresponding to the recommended items in the recommendation list; The surprise factor loss is obtained by weighted summation of the unexpectedness loss, the novelty loss, the timeliness loss, and the relevance loss.
6. A recommendation method, characterized in that, include: Obtain user interaction history data; The user interaction history data is input into the target recommendation model to output a recommendation list, wherein the target recommendation model is a target model obtained by the method described in any one of claims 1-4.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-4.
8. A computer program product, comprising instructions, characterized in that, When executed by the processor, this instruction implements the steps of the method described in any one of claims 1-4.
Citation Information
Patent Citations
Recommendation system recommendation method and device, recommendation system and storage medium
CN112069396A
Recommendation model based on improved auto-encoder and generative adversarial network
CN118886469A