Curiosity-Based Personalized Recommendation Method, System, Computer Device, and Storage Medium
Through the dual-branch network, the relationship between individual preferences and social consensus is explicitly modeled, and the curiosity curve is designed, which solves the problem of users passively accepting relevant information in traditional recommendation systems, and realizes diverse recommendations based on user curiosity and stimulates user interest.
Patent Information
- Application Number
- CN202210838987.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-07-18
AI Technical Summary
Traditional recommendation systems focus too much on accurate recommendations, causing users to fall into the ‘information cocoon’, unable to stimulate users’ interest in clicking and purchasing, and neglecting users’ tendency to explore external information.
A dual-branch network based on multi-layer perceptron (MLP) and attention mechanism is used to explicitly model the relationship between user individual preferences and social consensus, design a curiosity curve, and deeply integrate curiosity with the recommendation system through Re-weighting to explore the curiosity characteristics in user implicit feedback.
It effectively alleviates the problem of ‘information island’, realizes diverse recommendations based on user curiosity exploration, activates users’ desire to explore items, and provides a more diverse and personalized recommendation list.
Smart Images

Figure CN115329191B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of personalized recommendation, and in particular, relates to a curiosity-based personalized recommendation method, system, computer device and storage medium. Background Art
[0002] In today's society, with the rapid development of information technology, the volume of Internet data has increased rapidly, and "information explosion" has become a key term in the information age. How to "filter" the complex and massive information and select items that can meet user needs in the vast amount of data has become a difficult problem faced by the industry. As a result, the recommendation system came into being. As a system that can mine user preferences based on user historical access records, the recommendation system can help users quickly find information of interest in the complex information, greatly saving users' time. On the other hand, the recommendation system can accurately recommend highly relevant items to users, increase users' stickiness to Internet service platforms, help the Internet service industry create revenue, and achieve a win-win situation for users and platforms.
[0003] However, traditional recommendation systems focus too much on precision recommendations, trapping users in an "information cocoon" or "information island" situation, where they can only obtain information that is highly relevant to their historical visit records, while ignoring the user's tendency to explore external information. Over time, traditional precision-oriented recommendations will make users feel bored and dull with recommendation lists that are highly relevant to their visit records, and fail to stimulate users' interest in clicking and purchasing. Summary of the invention
[0004] In order to address the deficiencies of the above-mentioned prior art, the present invention provides a curiosity-based personalized recommendation method, system, computer device and storage medium. The method captures the implicit features of users and items through a dual-branch network based on a multi-layer perceptron (MLP) and an attention mechanism, and explicitly models the user's individual preferences and social consensus relationships to explore the curiosity traits hidden in the user's implicit feedback; following the Wundt curve in psychology, a novel curiosity curve composed of a reward curve and a penalty curve is designed to model the user's curiosity traits, and curiosity is deeply integrated with the recommendation system through Re-weighting, thereby realizing diverse recommendations based on user curiosity exploration, which has good practical application value.
[0005] The first object of the present invention is to provide a curiosity-based personalized recommendation method.
[0006] The second object of the present invention is to provide a curiosity-based personalized recommendation system.
[0007] A third object of the present invention is to provide a computer device.
[0008] The fourth object of the present invention is to provide a storage medium.
[0009] The first object of the present invention can be achieved by adopting the following technical solutions:
[0010] A personalized recommendation method based on curiosity, the method comprising:
[0011] Obtain a data set, and construct a user-item interaction matrix according to the data set; the data set includes Movielens-1M and LastFM-2K;
[0012] Input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain individual preference scores;
[0013] Input the user and item numbers in the user-item interaction matrix into the social consensus module in the curiosity model to obtain social consensus scores;
[0014] Input the individual preference scores and social consensus scores into the curiosity mining module in the curiosity model to generate a curiosity curve;
[0015] Use the user-item interaction matrix to train the individual preference module and the social consensus module respectively, construct a curiosity curve according to the individual preference scores and social consensus scores output by the preliminarily trained individual preference module and social consensus module, calculate the curiosity scores according to the curiosity curve, and use them as guiding weights to continue training the individual preference module and the social consensus module;
[0016] Use the individual preference module and the social consensus module in the trained curiosity model to predict the user-item interaction data in the real scenario, and sort the prediction scores to obtain the final recommendation list.
[0017] Further, the obtaining the data set and constructing the user-item interaction matrix according to the data set includes:
[0018] Process the data set to obtain a processed data set;
[0019] Construct a user-item interaction matrix according to the processed data set;
[0020] Wherein:
[0021] The processing the data set to obtain a processed data set includes:
[0022] Filter the invalid information in the data set, and continuously number the filtered users and items respectively;
[0023] Convert the explicit rating information in the Movielens-1M dataset into implicit feedback data;
[0024] Construct a user-item interaction matrix based on the processed dataset, including:
[0025] Construct a user-item interaction matrix using the user and item numbers and implicit feedback data in the processed dataset. For each item A ∈ R in the user-item interaction matrix, which represents whether there is an interaction between the user and the item, it is defined as follows: m×n For each item in it, representing whether there is an interaction between the user and the item, is defined as follows:
[0026]
[0027] where Hit indicates that there is an interaction between the user and the item, and there is implicit feedback. A p,q represents the q-th item of user p in the interaction matrix, and m and n respectively represent the number of users and items in the processed dataset.
[0028] Furthermore, the individual preference module is an individual preference module based on matrix factorization, and its non-linear expression ability is enhanced through a multi-layer perceptron;
[0029] Input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain the individual preference score, including:
[0030] According to the user and item numbers in the user-item interaction matrix, use two learnable embedding matrices and to obtain the implicit feature expressions of users and items in the individual preference module; where d represents the dimension of the implicit features of users and items;
[0031] Input the implicit feature expressions of users and items into a multi-layer perceptron to increase its non-linearity, and obtain the final implicit feature expressions of users and items;
[0032] Use the vector inner product of the final implicit feature expressions of users and items to obtain the individual preference score.
[0033] Furthermore, the social consensus module is a social consensus module based on the attention mechanism;
[0034] Input the user and item numbers in the user-item interaction matrix into the social consensus module in the curiosity model to obtain the social consensus score, including:
[0035] According to the user and item numbers in the user-item interaction matrix, use two learnable embedding matrices and Obtain the implicit feature representations of users and items in the social consensus module; based on the implicit feature representations of users and items, explicitly model the social consensus relationship based on the attention mechanism to obtain the social consensus relationship vector; where d represents the dimension of the implicit features of users and items;
[0036] According to the social consensus relationship vector, describe the social consensus relationship graph between different users and items in the form of a triple <head node, relationship, tail node>;
[0037] According to the social consensus relationship graph, aggregate the user and its corresponding social consensus relationship vector to obtain the user's implicit feature based on social consensus, and obtain the social consensus score through the vector inner product with the implicit feature representation of the item.
[0038] Further, the explicitly modeling the social consensus relationship based on the attention mechanism according to the implicit feature representations of users and items to obtain the social consensus relationship vector includes:
[0039] For the set of users U i ={u1, u2, u3,...} who have accessed item i, regard each user in the set of users U i as a value vector, regard item i as a query vector, and use the attention mechanism to aggregate the information of all users who have accessed item i to obtain the weighted aggregated social consensus relationship vector r i , which is expressed as follows:
[0040]
[0041] att i,u = sigmoid(V i T W a V u )
[0042] where W a ∈R d×d denotes the learnable weight, att i,u represents the attention score of item i for user u, and V u and V i represent the implicit feature representations of users and items in the social consensus module respectively;
[0043] After completing the relationship modeling of different social consensuses through the attention mechanism, obtain the set of social consensus relationship vectors R J ={r1, r2,..., r n} applicable to the entire dataset.
[0044] Further, the inputting the individual preference score and the social consensus score into the curiosity mining module in the curiosity model to generate the curiosity curve includes:
[0045] Calculate the conflictive stimulus value sti based on the individual preference score and the social consensus score;
[0046] Model the reward curve and the punishment curve based on the frequency distribution of the conflictive stimulus value, and then combine the reward curve and the punishment curve to construct the curiosity inverted U-shaped curve, specifically including:
[0047]
[0048]
[0049]
[0050] Among them, Reward(sti) and Punish(sti) represent the reward curve and the punishment curve respectively, sloper and slope p represent the slopes of the reward curve and the punishment curve respectively, offset represents the receptive field of the curiosity curve, pivot represents the stimulus value at the highest point of the curiosity curve, and sti u,i represents the conflictive stimulus value obtained by the user u and the corresponding item i through the individual preference module and the social consensus module;
[0051] For the slopes slope r and slope p , they are defined by the position of pivot:
[0052] slope r = e -δ(pivot)
[0053] slope p = e -δ(1-pivot)
[0054] Among them, δ is an adjustable hyperparameter used to control the variation difference of the slope to make it conform to the inverted U-shaped feature;
[0055] Based on the fact that there are differences in the curiosity perception levels of different users, use the standard deviation of the stimulus value distribution and pivot to measure the curiosity receptive fields of different users, and the formula is as follows:
[0056] offset = 0.5 - std(sti, pivot)
[0057]
[0058] Among them, N represents the number of sti;
[0059] Construct the curiosity curve according to the reward curve and the punishment curve, and the formula is as follows:
[0060] Cur(sti) = Reward(sti) + Punish(sti).
[0061] Further, let the positive samples be the items corresponding to A = 1 in the user-item interaction matrix, and the negative samples be the items corresponding to A = 0; p,q p,q
[0062] The training of the individual preference module and the social consensus module using the user-item interaction matrix includes:
[0063] Training the individual preference module using the user-item interaction matrix, specifically including:
[0064] Inputting the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain individual preference scores;
[0065] Denote the individual preference scores obtained by the user and the positive sample numbers as Denote the individual preference scores obtained by the user and the negative sample numbers as
[0066] According to and Use the Bayesian personalized ranking loss to calculate the error value:
[0067]
[0068] According to the calculated Loss P value, adjust the parameters in the embedding matrix and the multi-layer perceptron in the individual preference module through gradient backpropagation;
[0069] Training the social consensus module using the user-item interaction matrix, specifically including:
[0070] Inputting the user and item numbers in the user-item interaction matrix into the social consensus module based on the attention mechanism to obtain social consensus scores;
[0071] Denote the social consensus scores obtained by the user and the positive sample numbers as Denote the social consensus scores obtained by the user and the negative sample numbers as
[0072] According to and Use the Bayesian personalized ranking loss to calculate the error value:
[0073]
[0074] According to the calculated Loss S value, update the parameters of the social consensus module through gradient backpropagation.
[0075] Further, using the curiosity score as a guiding weight, the individual preference module and the social consensus module are further trained as follows:
[0076] Taking the curiosity score as the weight of the Bayesian personalized ranking loss, the individual preference module and the social consensus module in the curiosity model are respectively retrained.
[0077] The second objective of the present invention can be achieved by adopting the following technical solutions:
[0078] A curiosity-based personalized recommendation system, the system comprising:
[0079] A dataset acquisition module, configured to acquire a dataset and construct a user-item interaction matrix according to the dataset; the dataset includes Movielens-1M and LastFM-2K;
[0080] An individual preference module, configured to input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain an individual preference score;
[0081] A social consensus module, configured to input the user and item numbers in the user-item interaction matrix into the social consensus module in the curiosity model to obtain a social consensus score;
[0082] A curiosity mining module, configured to input the individual preference score and the social consensus score into the curiosity mining module in the curiosity model to generate a curiosity curve;
[0083] A training module, configured to respectively train the individual preference module and the social consensus module by using the user-item interaction matrix, construct a curiosity curve according to the individual preference score and the social consensus score output by the preliminarily trained individual preference module and social consensus module, calculate a curiosity score according to the curiosity curve, and use it as a guiding weight to further train the individual preference module and the social consensus module;
[0084] A score prediction module, configured to use the individual preference module and the social consensus module in the trained curiosity model to predict the user-item interaction data in the real scenario, and rank the predicted scores to obtain a final recommendation list.
[0085] The third objective of the present invention can be achieved by adopting the following technical solutions:
[0086] A computer device, comprising a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the above-mentioned personalized recommendation method is implemented.
[0087] The fourth object of the present invention can be achieved by adopting the following technical solutions:
[0088] A storage medium stores a program which, when executed by a processor, implements the above-mentioned personalized recommendation method.
[0089] The present invention has the following beneficial effects compared with the prior art:
[0090] 1. The method provided by the present invention captures individual preferences and social consensus factors under user selection based on a dual-branch network, and uses their conflictive stimuli to model the user's curiosity curve. Finally, the curiosity score is used as a guiding weight to retrain the model, effectively alleviating the "information island" problem in the traditional recommendation system scenario, realizing diverse recommendations based on the exploration of user curiosity, and having good practical application value.
[0091] 2. Through the method provided by the present invention, it is possible to reasonably mine the potential curiosity characteristics under user selection. Under the guidance of curiosity theory, it activates the user's exploration desire for items, alleviates the "information cocoon" problem of the traditional accuracy-oriented recommendation system, and helps to recommend more diverse and personalized items for users.
[0092] 3. The method provided by the present invention is different from the traditional curiosity recommendation method, which models the curiosity stimulus value using external information. The present invention proposes a novel method for modeling the social consensus relationship graph based on the attention mechanism, captures the social consensus factors under user selection, and jointly models the user's curiosity curve based on this and the individual preference features captured by the individual preference network. Finally, a more personalized and diverse recommendation list is realized, which is more in line with the user's tendency in the real world and provides a better interaction experience for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0094] Figure 1 It is a flowchart of the curiosity-based personalized recommendation method according to Embodiment 1 of the present invention.
[0095] Figure 2 It is a schematic diagram of the principle of the curiosity model according to Embodiment 1 of the present invention.
[0096] Figure 3 It is a flowchart of training the curiosity model according to Embodiment 1 of the present invention.
[0097] Figure 4 Schematic diagram of the individual preference module based on matrix factorization in Embodiment 1 of the present invention.
[0098] Figure 5 Schematic diagram for generating the relationship graph of the social consensus module based on the attention mechanism in Embodiment 1 of the present invention.
[0099] Figure 6 Schematic diagram of the combined modeling process of the curiosity curve in Embodiment 1 of the present invention.
[0100] Figure 7 Flowchart of model training in Embodiment 1 of the present invention.
[0101] Figure 8 Schematic diagram for generating the prediction score based on the curiosity model in Embodiment 1 of the present invention.
[0102] Figure 9 Block diagram of the personalized recommendation system based on curiosity in Embodiment 2 of the present invention.
[0103] Figure 10 Block diagram of the computer device in Embodiment 3 of the present invention. Detailed implementation manners
[0104] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention. It should be understood that the described specific embodiments are only used to explain the present application and are not used to limit the present application.
[0105] Embodiment 1:
[0106] The present invention combines curiosity in psychology with the recommendation system, and proposes a personalized recommendation method based on curiosity. By mining the user's potential curiosity traits, it helps the user get out of the "information cocoon", and finally provides the user with a personalized candidate recommendation list that matches his or her curiosity level. Different from previous works that rely on external information to calculate the user's curiosity stimulus value, the present invention proposes a dual-branch module based on a multi-layer perceptron (MLP) and an attention mechanism to capture the implicit features of users and items, and explicitly model the user's individual preferences and social consensus relationships to mine the curiosity traits hidden in the user's implicit feedback. Finally, following the Wundt curve in psychology, the present invention designs a novel curiosity curve composed of a reward curve and a penalty curve to model the user's curiosity traits, and deeply integrates curiosity with the recommendation system through a re-weighting method.
[0107] like Figure 1 As shown, the curiosity-based personalized recommendation method provided in this embodiment includes the following steps:
[0108] S101. Obtain public data set data and construct a user-item interaction matrix based on the data set.
[0109] Furthermore, step S101 includes:
[0110] (1) Obtain the public datasets Movielens-1M and LastFM-2K and process them.
[0111] In this embodiment, the public data sets Movielens-1M and LastFM-2K data sets are collected for training of the present invention.
[0112] First, invalid information in the collected public datasets Movielens-1M and LastFM-2K is filtered out to remove users or items with no interaction records.
[0113] Next, the filtered users and items are numbered respectively to obtain continuous user and item IDs for subsequent interaction matrix generation and model input.
[0114] Finally, for the Movielens-1M dataset, since there is explicit rating data for the items, it is necessary to process it first and convert the explicit rating information into implicit feedback data, that is, for the item data with ratings, the label is set to 1, otherwise the label is set to 0. Among them, explicit ratings refer to feedback with clear evaluation information, such as movie star ratings; implicit ratings (implicit feedback) refer to 0 / 1 data indicating whether there is interaction between users and items.
[0115] (2) Construct a user-item interaction matrix based on the processed dataset.
[0116] After completing data processing, construct a user-item interaction matrix using the obtained user and item IDs and implicit feedback data. For each item in the user-item interaction matrix \(A\in\mathbb{R}\) m×n , which represents whether there is an interaction between the user and the item, is defined as follows:
[0117]
[0118] where Hit indicates that there is an interaction between the user and the item and there is implicit feedback, and \(A\) p,q represents the item \(q\) corresponding to user \(p\) in the interaction matrix. \(m\) and \(n\) represent the number of users and items in the dataset respectively. This matrix will be used for the training and testing of the subsequent model.
[0119] S102. Construct a curiosity model and train the curiosity model using the user-item interaction matrix.
[0120] As Figure 2 shown, the curiosity model includes an individual preference module based on matrix factorization, a social consensus module, and a curiosity mining module.
[0121] Furthermore, as Figure 3 shown, step S102 includes:
[0122] S1021. Input the user and item numbers in the user-item interaction matrix into the individual preference module based on matrix factorization to obtain individual preference scores; calculate the error value according to the individual preference scores between the user and the item.
[0123] The individual preference module in this embodiment is an embedding matrix and a multi-layer perceptron (MLP).
[0124] Furthermore, as Figure 4 shown, step S1021 includes:
[0125] (1) According to the user-item interaction matrix, obtain the implicit feature representations of the user and the item and
[0126] Perform embedding representation on the user and item numbers in the user-item interaction matrix \(A\) p,q , and use two learnable weight matrices and to obtain the implicit feature representations of the user and the item, specifically as follows:
[0127]
[0128]
[0129] Among them, u and i respectively represent the numbers of the user and the item, d represents the dimension of the implicit feature (the expression of the implicit feature is a vector, and d represents the length of the vector, that is, the dimension), and respectively represent the implicit feature expressions of the user and the item, and at the same time serve as the inputs of the initial layer of the multi-layer perceptron (MLP).
[0130] (2) For the initial implicit feature expressions of the user and the item and Increase their non-linearity through the multi-layer perceptron to obtain the final implicit feature expressions of the user and the item. The formula is as follows:
[0131]
[0132]
[0133] Among them, t represents the number of layers of the multi-layer perceptron, and correspond to the weight parameter and bias parameter of the user's t-th layer neural network, and correspond to the input and output of the user's t-th layer neural network; similarly, and correspond to the weight parameter and bias parameter of the item's t-th layer neural network, and correspond to the input and output of the item's t-th layer neural network. It can be seen from the formula that the output of the previous layer of the multi-layer perceptron is the input of the next layer, and Tanh is a non-linear activation function. The formula is expressed as follows:
[0134]
[0135] In this embodiment, t is an integer greater than or equal to 3.
[0136] The final implicit feature expressions of the user and the item are the implicit feature expressions of each user and each item output by the multi-layer perceptron. For simplicity, the superscript of the output of the last layer of the individual preference module is omitted and expressed as P u and P i .
[0137] (3) Use the vector inner product of the user and item implicit feature expressions to obtain the individual preference score, and calculate the error value according to the predicted score between the user and the item.
[0138] Use the vector inner product of the user and item implicit feature expressions to obtain the individual preference score, and use the Bayesian personalized ranking loss to calculate the error value:
[0139]
[0140]
[0141]
[0142] Among them, Score P represents the individual preference score, while and respectively represent the predicted scores between the user and the positive / negative sample items, and the formulas are the same as Score P . Among them, the positive sample refers to the item where A p,q = 1 in the user-item interaction matrix, and the negative sample refers to the item where A p,q = 0.
[0143] S1022. Input the user and item numbers in the user-item interaction matrix into the social consensus module based on the attention mechanism to obtain the social consensus score; calculate the error value according to the social consensus score between the user and the item.
[0144] Furthermore, as Figure 5 shown, step S1022 includes:
[0145] (1) According to the user and item numbers in the user-item interaction matrix, obtain the implicit feature representation in the same way as step (1) of S102, and perform explicit modeling of the social consensus relationship on it based on the attention mechanism to obtain the social consensus relationship vector.
[0146] Among them, the implicit feature representations V u and V i of the user and the item are obtained in the same way as step (1) of S102, and explicit modeling of the social consensus relationship is performed on them based on the attention mechanism. For the set of users U i = {u1, u2, u3,...} who have accessed item i, each user in the set of users U i is regarded as a value vector, item i is regarded as a query vector, and the information of all users who have accessed item i is aggregated using the attention mechanism to finally obtain the weighted aggregated social consensus relationship vector r i , which is expressed as follows:
[0147]
[0148] att i,u = sigmoid(V i T W a V u )
[0149] Among them, W a ∈R d×dDenote it as learnable weights, d represents the dimension of the user and item feature vectors, and att i,u represents the attention score of item i for user u.
[0150] After completing the relationship modeling of different social consensus through the attention mechanism, a set of social consensus relationship vectors R I ={r1, r2,..., r n} applicable to the entire dataset is obtained.
[0151] (2) According to the social consensus relationship vectors, describe the social consensus relationship graph between different users and items in the form of triples <head node, relationship, tail node>.
[0152] Inspired by the knowledge graph, in this embodiment, the social consensus relationship graph between different users and items is described in the form of triples <head node, relationship, tail node>. For item i, all users in the set U i who have accessed item i share the same social consensus relationship r i .
[0153] (3) According to the social consensus relationship graph, obtain the social consensus score; calculate the error value according to the prediction score between the user and the item.
[0154] Add the user and their corresponding social consensus relationship to obtain the implicit feature expression of the user based on social consensus, and then perform an inner product calculation with the implicit feature expression of the item to obtain the social consensus score Score S , and calculate the error value using the Bayesian personalized ranking loss, and update the parameters of the model through gradient backpropagation. The formula is as follows:
[0155]
[0156]
[0157]
[0158] Among them, and have the same calculation formula, and respectively represent the prediction scores between the user and the positive sample item / negative sample item.
[0159] S1023. Input the individual preference score and the social consensus score into the curiosity mining module to generate a curiosity curve.
[0160] Furthermore, as Figure 6 shown, step S1023 includes:
[0161] (1) Calculate the conflicting stimulus value according to the individual preference score and the social consensus score.
[0162] Calculate the conflictive stimulus value based on the individual preference score calculated by the individual preference module and the social consensus score calculated by the social consensus module. The formula is as follows:
[0163] Sti = |Score S - Score P |
[0164] Where Sti represents the conflictive stimulus value, Score P and Score S represent the output results of the individual preference module and the social consensus module respectively.
[0165] (2) Model the reward curve and the punishment curve based on the frequency distribution of the conflictive stimulus value, and then combine the reward curve and the punishment curve to construct the curiosity inverted U-shaped curve.
[0166] (2-1) Model the reward curve and the punishment curve based on the frequency distribution of the conflictive stimulus value.
[0167] The formulas for the reward curve, the punishment curve, and the curiosity curve are as follows:
[0168]
[0169]
[0170] Where slope r and slope p represent the slopes of the reward curve and the punishment curve respectively, offset represents the receptive field of the curiosity curve, that is, the sensitivity of the user to the stimulus value; pivot represents the stimulus value at the highest point of the curiosity curve, and the expression is:
[0171]
[0172] Where sti u,i represents the conflictive stimulus value of the user u and the corresponding item i obtained by the individual preference module and the social consensus module.
[0173] Based on the slopes slope r and slope p indicating the degree of change of the curiosity curve, following the guidance of the psychological curiosity drive theory, when the user frequently feels a certain intensity of stimulus, the degree of stimulation of curiosity will also decrease accordingly, which can be understood as an increase in the tolerance to the stimulus and it is difficult to arouse curiosity. Therefore, for the slopes of the reward curve and the punishment curve, in this embodiment, they are defined by the position of pivot:
[0174] slope r = e-δ(pivot)
[0175] slope p = e -δ(1-pivot)
[0176] where δ is an adjustable hyperparameter used to control the variation difference of the slope to conform to the inverted U-shaped characteristic. Through experimental observation, δ = 1.3 is more reasonable.
[0177] Based on the differences in the curiosity perception levels of different users, the standard deviation can reflect the dispersion degree of the stimulus value distribution from the pivot, so it can be used to measure the curiosity receptive field of users. In this embodiment, the standard deviation of the stimulus value distribution is used to measure the curiosity receptive field of different users, and the formula is as follows:
[0178] offset = 0.5 - std(sti, pivot)
[0179]
[0180] where N represents the number of sti.
[0181] (2 - 2) Construct a curiosity curve based on the reward curve and the punishment curve.
[0182] According to the following formula, the curiosity curve is obtained:
[0183] Cur(sti) = Reward(sti) + Punish(sti)
[0184] Based on the above steps, the modeling of the curiosity Wundt curve is finally achieved, and the curiosity scores at different stimulus levels are obtained accordingly.
[0185] S1024. Use the user-item interaction matrix to train the individual preference module and the social consensus module respectively, and use the results output by the preliminarily trained individual preference module and social consensus module to model the curiosity curve; calculate the curiosity score according to the curiosity curve and use it as the guiding weight to continue training the individual preference module and the social consensus module in the curiosity model to obtain the trained curiosity model.
[0186] Further, as Figure 7 shown, step S1024 includes three stages, which are respectively:
[0187] (1) Use the user-item interaction matrix to train the individual preference module and the social consensus module respectively to obtain the preliminarily trained individual preference module and social consensus module respectively.
[0188] Use the implicit feedback data to train the individual preference module, that is, according to the calculated Loss pAdjust the values of the embedding matrix and the parameters in the multi-layer perceptron, including the weight parameters of each layer in the multi-layer perceptron Through the preliminary training of the individual preference module, user-item implicit features with better expressive ability are obtained. Based on the pre-trained user-item implicit features, the individual preference scores of users for items are obtained by means of inner product; and the social consensus module is trained using implicit feedback data, that is, according to the calculated Loss S value, the parameter update of the module is realized through gradient backpropagation; the social consensus score is obtained according to the trained social consensus module
[0189] (2) Input the numbers of users and items in the user-item interaction matrix into the above two trained modules respectively, and obtain the individual preference score and the social consensus score respectively. Calculate the curiosity score through the curiosity curve modeled by the curiosity mining module
[0190] (3) Based on the curiosity score Cur obtained in step (2), use the curiosity score as the weight of the Bayesian personalized ranking loss, and retrain the individual preference module and the social consensus module in the model respectively under the guidance of the curiosity level. The formula is as follows
[0191]
[0192] Considering that the calculation processes of the loss functions used in the individual preference module and the social consensus module are the same, for the sake of simplicity, only the general Loss formula under the guidance of curiosity is clarified here
[0193] Suppose the model is trained 100 times in total in this embodiment, where 80 times are used for the first-stage training, that is, the individual preference module and the social consensus module are trained 80 times respectively; the latter 20 times are used for the third stage, that is, the parameters in the individual preference module and the social consensus module are further adjusted through the Loss calculated in steps (2) and (3), so as to obtain the trained model
[0194] S103. Use the individual preference module and the social consensus module in the trained curiosity model to predict the user-item interaction data in the real scenario, and rank the prediction scores to obtain the final recommendation list
[0195] As Figure 8 shown, input the implicit feedback data in the user-item interaction in the real scenario into the trained individual preference module and social consensus module, obtain the individual preference score and the social consensus score, and adjust the contribution ratio of the individual preference module and the social consensus module to the final prediction result through the hyperparameter α to obtain the prediction score, that is
[0196] Pred = αScore P +(1 - α)ScoreS
[0197] Those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium.
[0198] It should be noted that although the method operations of the above embodiments are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the described steps can be changed in the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0199] Embodiment 2:
[0200] As Figure 9 shown, this embodiment provides a personalized recommendation system based on curiosity. The system includes a dataset acquisition module 901, an individual preference module 902, a social consensus module 903, a curiosity mining module 904, a training module 905, and a score prediction module 906, where:
[0201] The dataset acquisition module 901 is used to acquire a dataset and construct a user-item interaction matrix according to the dataset; the dataset includes Movielens-1M and LastFM-2K;
[0202] The individual preference module 902 is used to input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain an individual preference score;
[0203] The social consensus module 903 is used to input the user and item numbers in the user-item interaction matrix into the social consensus module in the curiosity model to obtain a social consensus score;
[0204] The curiosity mining module 904 is used to input the individual preference score and the social consensus score into the curiosity mining module in the curiosity model to generate a curiosity curve;
[0205] The training module 905 is used to train the individual preference module and the social consensus module respectively using the user-item interaction matrix, construct a curiosity curve according to the individual preference scores and social consensus scores output by the preliminarily trained individual preference module and social consensus module, calculate a curiosity score according to the curiosity curve, and use it as a guiding weight to continue training the individual preference module and the social consensus module;
[0206] A score prediction module 906 is configured to use the individual preference module and the social consensus module in the trained curiosity model to predict the user-item interaction data in the real scenario, sort the predicted scores, and obtain a final recommendation list.
[0207] For the specific implementation of each module in this embodiment, reference may be made to Embodiment 1 above, which will not be elaborated here one by one. It should be noted that the system provided in this embodiment is only illustrated by the above division of each functional module. In actual applications, the above functions may be allocated to different functional modules as needed, that is, the internal structure is divided into different functional modules to complete all or part of the functions described above.
[0208] Embodiment 3:
[0209] This embodiment provides a computer device, which can be a computer. As Figure 10 shown, it includes a processor 1002, a memory, an input device 1003, a display 1004, and a network interface 1005 connected through a system bus 1001. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium 1006 and an internal memory 1007. The non-volatile storage medium 1006 stores an operating system, a computer program, and a database. The internal memory 1007 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the processor 1002 executes the computer program stored in the memory, the personalized recommendation method of Embodiment 1 above is implemented as follows:
[0210] Obtain a data set, and construct a user-item interaction matrix according to the data set; the data set includes Movielens-1M and LastFM-2K;
[0211] Input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain individual preference scores;
[0212] Input the user and item numbers in the user-item interaction matrix into the social consensus module in the curiosity model to obtain social consensus scores;
[0213] Input the individual preference scores and social consensus scores into the curiosity mining module in the curiosity model to generate a curiosity curve;
[0214] Use the user-item interaction matrix to train the individual preference module and the social consensus module respectively. Construct a curiosity curve according to the individual preference scores and social consensus scores output by the initially trained individual preference module and social consensus module. Calculate the curiosity scores according to the curiosity curve and use them as guiding weights to continue training the individual preference module and the social consensus module;
[0215] Using the individual preference module and the social consensus module in the trained curiosity model, predict the user-item interaction data in the real scenario, sort the prediction scores, and obtain the final recommendation list.
[0216] Example 4:
[0217] This embodiment provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the personalized recommendation method of the above-mentioned Embodiment 1 is implemented as follows:
[0218] Obtain a data set, and construct a user-item interaction matrix according to the data set; the data set includes Movielens-1M and LastFM-2K;
[0219] Input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain individual preference scores;
[0220] Input the user and item numbers in the user-item interaction matrix into the social consensus module in the curiosity model to obtain social consensus scores;
[0221] Input the individual preference scores and social consensus scores into the curiosity mining module in the curiosity model to generate a curiosity curve;
[0222] Use the user-item interaction matrix to train the individual preference module and the social consensus module respectively. Construct a curiosity curve according to the individual preference scores and social consensus scores output by the preliminarily trained individual preference module and social consensus module. Calculate the curiosity scores according to the curiosity curve and use them as guiding weights to continue training the individual preference module and the social consensus module;
[0223] Using the individual preference module and the social consensus module in the trained curiosity model, predict the user-item interaction data in the real scenario, sort the prediction scores, and obtain the final recommendation list.
[0224] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0225] In summary, the method provided by the present invention includes: collecting data from a public dataset and constructing a user-item interaction matrix; constructing an individual preference network based on matrix factorization, including implicit feature extraction based on matrix factorization and non-linear relationship modeling based on a multi-layer perceptron; constructing a social consensus network based on an attention mechanism, including constructing an attention-based social consensus relationship graph and a metric learning method based on the <head node, relationship, tail node> triple; constructing a conflicting stimulus based on individual preference and social consensus, including calculating a conflicting stimulus value using the outputs of the individual preference and social consensus networks; constructing a curiosity inverted U-shaped curve, including modeling a reward curve and a penalty curve based on the frequency distribution of the conflicting stimulus value and combining the reward curve and the penalty curve to model the curiosity inverted U-shaped curve; inputting implicit feedback data into the model for preliminary training, using the results of the preliminary training to model the curiosity curve, and using the curiosity score as a guiding weight to continue training the model; using the trained model to predict user-item interaction data in a real scenario, sorting the prediction scores, and obtaining a final recommendation list. The method described in the present invention uses a dual-branch network to separately capture individual preference and social consensus factors under user selection, and uses their conflicting stimuli to model the user's curiosity curve. Finally, the curiosity score is used as a guiding weight to retrain the model, effectively alleviating the "information island" problem in the traditional recommendation system scenario, achieving diverse recommendations based on user curiosity exploration, and having good practical application value.
[0226] The above is only a preferred embodiment of the present invention for patents, but the protection scope of the present invention for patents is not limited thereto. Any person skilled in the art within the scope disclosed by the present invention for patents, according to the technical solution and inventive concept of the present invention for patents, makes equivalent substitutions or changes, and all belong to the protection scope of the present invention for patents.
Claims
1. A personalized recommendation method based on curiosity, characterized in that, The method includes: Obtain a dataset and construct a user-item interaction matrix based on the dataset; the dataset includes Movielens-1M and LastFM-2K; Input the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain individual preference scores; Input the user and item numbers in the user-item interaction matrix into the social consensus module based on the attention mechanism in the curiosity model to obtain social consensus scores; Input the individual preference scores and social consensus scores into the curiosity mining module in the curiosity model to generate a curiosity curve; Use the user-item interaction matrix to train the individual preference module and the social consensus module respectively, construct a curiosity curve based on the individual preference scores and social consensus scores output by the preliminarily trained individual preference module and social consensus module, calculate the curiosity scores according to the curiosity curve, and use them as guiding weights to continue training the individual preference module and the social consensus module; Use the individual preference module and the social consensus module in the trained curiosity model to predict the user-item interaction data in the real scenario, and sort the prediction scores to obtain the final recommendation list; Among them, the step of inputting the user and item numbers in the user-item interaction matrix into the social consensus module based on the attention mechanism in the curiosity model to obtain social consensus scores includes: According to the user and item numbers in the user-item interaction matrix, two learnable embedding matrices and are used to obtain the implicit feature representations of users and items in the social consensus module; based on the implicit feature representations of users and items, explicit modeling of social consensus relationships is performed based on the attention mechanism to obtain social consensus relationship vectors; where m and n respectively represent the numbers of users and items, and d represents the dimension of the implicit features of users and items; According to the social consensus relationship vector, describe the social consensus relationship graph between different users and items in the form of a triple of <head node, relationship, tail node>; According to the social consensus relationship graph, aggregate the user and its corresponding social consensus relationship vector to obtain the implicit user feature based on social consensus, and obtain the social consensus score through the vector inner product with the implicit feature expression of the item; The step of explicitly modeling the social consensus relationship based on the attention mechanism according to the implicit feature expressions of the user and the item to obtain the social consensus relationship vector includes: For the set of users \(U\) who have accessed item \(i\) i =\(\{u_1, u_2, u_3, \ldots\}\), consider each user in the set of users \(U\) i as a value vector, consider item \(i\) as a query vector, and use the attention mechanism to aggregate the information of all users who have accessed item \(i\) to obtain the weighted aggregated social consensus relationship vector \(r\) i , which is expressed as follows: att i,u = sigmoid(V i T W a V u ) Among them, W a ∈R d×d refers to the learnable weight, att i,u represents the attention score of item i for user u, V u and V i respectively represent the implicit feature expressions of users and items in the social consensus module; After completing the relationship modeling of different social consensuses through the attention mechanism, obtain a set of social consensus relationship vectors applicable to the entire dataset.
2. The personalized recommendation method according to claim 1, wherein The step of obtaining a dataset and constructing a user-item interaction matrix based on the dataset includes: Process the dataset to obtain a processed dataset; Construct a user-item interaction matrix according to the processed dataset; Wherein: The step of processing the dataset to obtain a processed dataset includes: Filter the invalid information in the dataset, and continuously number the filtered users and items respectively; Convert the explicit rating information in the Movielens-1M dataset into implicit feedback data; The step of constructing a user-item interaction matrix according to the processed dataset includes: Construct a user-item interaction matrix using the user and item numbers in the processed dataset and the implicit feedback data. For each item in A ∈ R m×n in the user-item interaction matrix, which represents whether there is an interaction between the user and the item, it is defined as follows: Among them, Hit indicates that there is an interaction between the user and the item, and there is implicit feedback. A p,q represents the q item corresponding to user p in the interaction matrix.
3. The personalized recommendation method according to claim 2, wherein The individual preference module is an individual preference module based on matrix factorization, and the module's non-linear expression ability is increased through a multi-layer perceptron; The step of inputting the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain individual preference scores includes: According to the user and item numbers in the user-item interaction matrix, two learnable embedding matrices and are used to obtain the implicit feature representations of users and items in the individual preference module; Input the implicit feature expressions of the user and the item into the multi-layer perceptron to increase its non-linearity to obtain the final implicit feature expressions of the user and the item; Using the inner product of vectors representing the final implicit features of users and items, an individual preference score is obtained.
4. The personalized recommendation method according to claim 1, wherein Inputting the individual preference score and the social consensus score into the curiosity mining module in the curiosity model to generate a curiosity curve, including: Calculating the conflictive stimulus value sti according to the individual preference score and the social consensus score; Modeling the reward curve and the punishment curve based on the frequency distribution of the conflictive stimulus value, and then combining the reward curve and the punishment curve to construct the curiosity inverted U-shaped curve, specifically including: Among them, Reward(sti) and Punish(sti) represent the reward curve and the punishment curve respectively, slope r and slope p represent the slopes of the reward curve and the punishment curve respectively, offset represents the receptive field of the curiosity curve, pivot represents the stimulus value at the highest point of the curiosity curve, and sti u,i represents the conflicting stimulus value obtained by user u and the corresponding item i through the individual preference module and the social consensus module; For the slopes of the reward curve and the penalty curve r and slope p , defined by the position of the pivot: slope r = e -δ(pivot) slope p =e -δ(1-pivot) where δ is an adjustable hyperparameter used to control the change difference of the slope to conform to the inverted U-shaped feature; Based on the fact that there are differences in the curiosity perception levels of different users, using the standard deviation of the stimulus value distribution and the pivot to measure the curiosity receptive fields of different users, the formula is as follows: offset = 0.5 - std(sti, pivot) where N represents the number of sti; Constructing the curiosity curve according to the reward curve and the punishment curve, the formula is as follows: Cur(sti) = Reward(sti) + Punish(sti).
5. The personalized recommendation method according to claim 2, wherein Let the positive samples be the items corresponding to A = 1 in the user-item interaction matrix, and the negative samples be the items corresponding to A = 0; p,q p,q Training the individual preference module and the social consensus module respectively using the user-item interaction matrix, including: Training the individual preference module using the user-item interaction matrix, specifically including: Inputting the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain the individual preference score; The individual preference score obtained by matching the user with the positive sample is denoted as The individual preference score obtained by matching the user with the negative sample is denoted as According to and calculate the error value using the Bayesian personalized ranking loss: According to the calculated Loss P value, adjust the parameters in the embedding matrix and the multi-layer perceptron in the individual preference module through gradient backpropagation; Training the social consensus module using the user-item interaction matrix, specifically including: Inputting the user and item numbers in the user-item interaction matrix into the social consensus module based on the attention mechanism in the curiosity model to obtain the social consensus score; The social consensus score obtained by numbering the user with the positive sample is denoted as The social consensus score obtained by numbering the user with the negative sample is denoted as According to and calculate the error value using Bayesian personalized ranking loss: Based on the calculated Loss S value, the parameter update of the social consensus module is realized through gradient backpropagation.
6. The personalized recommendation method according to claim 5, wherein Using the curiosity score as the guiding weight to continue training the individual preference module and the social consensus module, specifically: Using the curiosity score as the weight of the Bayesian personalized ranking loss, and then respectively retraining the individual preference module and the social consensus module in the curiosity model.
7. A curiosity-based personalized recommendation system, characterized in that, The system includes: A dataset acquisition module for acquiring a dataset and constructing a user-item interaction matrix according to the dataset; the dataset includes Movielens-1M and LastFM-2K; An individual preference module for inputting the user and item numbers in the user-item interaction matrix into the individual preference module in the curiosity model to obtain the individual preference score; A social consensus module for inputting the user and item numbers in the user-item interaction matrix into the social consensus module based on the attention mechanism in the curiosity model to obtain the social consensus score; A curiosity mining module for inputting the individual preference score and the social consensus score into the curiosity mining module in the curiosity model to generate a curiosity curve; A training module for training the individual preference module and the social consensus module respectively using the user-item interaction matrix, constructing a curiosity curve according to the individual preference score and the social consensus score output by the preliminarily trained individual preference module and social consensus module, calculating the curiosity score according to the curiosity curve, and using it as the guiding weight to continue training the individual preference module and the social consensus module; A score prediction module, which is used to utilize the individual preference module and the social consensus module in the trained curiosity model to predict the user-item interaction data in the real scenario, sort the predicted scores, and obtain the final recommendation list; Among them, the social consensus module is specifically used for: According to the user and item numbers in the user-item interaction matrix, two learnable embedding matrices and are used to obtain the implicit feature representations of users and items in the social consensus module; based on the implicit feature representations of users and items, explicit modeling of social consensus relationships is carried out based on the attention mechanism to obtain social consensus relationship vectors; where m and n respectively represent the numbers of users and items, and d represents the dimension of the implicit features of users and items. According to the social consensus relationship vector, describe the social consensus relationship graph between different users and items in the form of a triple of <head node, relationship, tail node>; According to the social consensus relationship graph, aggregate the user and its corresponding social consensus relationship vector to obtain the user implicit feature based on social consensus, and obtain the social consensus score through the vector inner product with the implicit feature expression of the item; Based on the implicit feature expressions of the user and the item, perform explicit modeling of the social consensus relationship based on the attention mechanism to obtain the social consensus relationship vector, including: For the set of users \(U\) who have accessed item \(i\) i =\(\{u_1, u_2, u_3, \ldots\}\), consider each user in the set of users \(U\) i as a value vector, consider item \(i\) as a query vector, and use the attention mechanism to aggregate the information of all users who have accessed item \(i\) to obtain the weighted aggregated social consensus relationship vector \(r\) i , which is expressed as follows: att i,u = sigmoid(V i T W a V u ) Among them, W a ∈R d×d refers to the learnable weight, att i,u represents the attention score of item i for user u, V u and V i respectively represent the implicit feature expressions of users and items in the social consensus module; After completing the relationship modeling of different social consensuses through the attention mechanism, obtain the social consensus relationship vector set applicable to the entire data set.
8. A storage medium stores a program, characterized in that, When the program is executed by the processor, the personalized recommendation method described in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
A recommendation method integrated with a curiosity mechanism of a user
CN109783725A
User curiosity-based bayesian personalized ranking recommendation method
WO2021135192A1