A training method for an item recommendation model, an item recommendation method and an apparatus

By using the user memory network in the recommendation system to extract multiple types of interactive information and combining the two-layer attention mechanism, the problem that the existing recommendation system fails to effectively utilize dynamic information is solved, and the effect of the recommendation model is improved.

CN113888282BActive Publication Date: 2025-08-08SUN YAT SEN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111217365.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-08-08
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

The existing recommendation system fails to effectively consider dynamic information when utilizing heterogeneous information networks, resulting in unsatisfactory recommendation results.

Method used

By constructing an item recommendation model, the user memory network is used to extract multiple types of interaction information of users, including user's inherent preference characteristics and dynamic preference characteristics, and combined with the dual-layer attention mechanism to perform feature fusion and model training, obtain user potential characteristics and item potential characteristics, and optimize the recommendation model.

Benefits of technology

It improves the effect of the recommendation model, can better learn users' dynamic and static information, enhances the preference modeling of different interaction types, and improves the recommendation effect of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113888282B_ABST
    Figure CN113888282B_ABST
Patent Text Reader

Abstract

The present application discloses a training method, an item recommendation method and an apparatus for an item recommendation model, wherein training samples are constructed based on historical behavior records of users with respect to different items, wherein the historical behavior records include various types of interaction information of users with respect to items; a user memory network extracts item potential features and user potential features from the training samples, wherein the user potential features include user inherent preference features and user dynamic preference features, wherein the user inherent preference features are obtained by extracting user preference information from the training samples through the user memory network, and the user dynamic preference features are extracted based on a memory matrix and a double-layer attention mechanism; the user memory network calculates the prediction score of the training samples through the user potential features and the item potential features, and updates the network parameters through the loss value obtained by the prediction score of the training samples and the label calculation, thereby obtaining an item recommendation model, thereby improving the technical problem of unsatisfactory recommendation effect in the existing recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of personalized recommendation technology, and in particular to a training method for an item recommendation model, an item recommendation method, and an item recommendation device. Background Art

[0002] With the rapid development of the internet, the amount of data is increasing rapidly. Valuable information is gradually being buried in this ocean of data, significantly increasing the time and difficulty of obtaining effective information. Information overload has gradually become a new opportunity and challenge. To address this issue, recommendation systems have emerged as automated tools for filtering and extracting valuable information. They can identify content of interest within a vast amount of information based on user preferences, helping users quickly access the information they need. With its ability to efficiently and effectively filter and recommend personalized content from massive amounts of data, recommendation technology has rapidly developed and is widely used in areas such as product recommendations, information recommendations, and media recommendations. The development of recommendation technology is a future trend in the new information age, but opportunities often come with challenges.

[0003] Dynamic recommendation refers to the process by which recommendation systems utilize dynamic information (e.g., information that changes over time) to make recommendations. Sequential recommendation, a common application scenario in recommendation systems, analyzes user behavior preferences based on their regular purchase history to make recommendations. Traditional recommendation systems often utilize only one type of interactive information (e.g., user purchase history), but other types of nodes or links are effective for modeling user interests. This information can be learned using heterogeneous information networks. However, current heterogeneous information networks employ static recommendations without considering dynamic information, resulting in suboptimal recommendation results. Summary of the Invention

[0004] The present application provides a training method for an item recommendation model, an item recommendation method and a device for improving the technical problem of unsatisfactory recommendation effects in existing recommendation systems.

[0005] In view of this, the first aspect of the present application provides a method for training an item recommendation model, comprising:

[0006] Constructing training samples based on the user's historical behavior records for different items, wherein the historical behavior records include various types of user interaction information for the items;

[0007] Extracting item latent features and user latent features from the training samples through a user memory network, wherein the user latent features include user inherent preference features and user dynamic preference features, and the user inherent preference features are obtained by extracting user preference information from the training samples through the user memory network;

[0008] Calculating a prediction score of the training sample based on the user potential features and the item potential features;

[0009] Updating the network parameters of the user memory network according to the loss value calculated based on the predicted score and label of the training sample until the user memory network converges to obtain an item recommendation model;

[0010] The process of extracting user potential features from the user memory network is as follows:

[0011] The user memory network performs a read operation on the current user memory matrix based on the item potential feature to obtain a first user memory feature;

[0012] The user memory network performs a double-layer attention process on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain a second user memory feature;

[0013] The user memory network fuses the first user memory feature and the second user memory feature to obtain a user dynamic preference feature;

[0014] The user memory network fuses the user's inherent preference features and the user's dynamic preference features to obtain user latent features.

[0015] Optionally, the initialization process of the item potential features is:

[0016] Initializing the item information and static attribute information in the training sample to obtain static attribute embedding initial values and item embedding initial values;

[0017] Performing multi-layer graph convolution processing on the static attribute embedding initial value and the item embedding initial value to obtain item embeddings of each layer, wherein the item embedding initial value is the item embedding of the initial layer;

[0018] The initial item potential features are obtained based on the item embedding in each layer.

[0019] Optionally, the acquiring of initial item potential features based on the item embeddings at each layer includes:

[0020] The last layer of item embeddings in each layer of the item embeddings is used as the initial item latent features, or the item embeddings in each layer are concatenated or averaged to obtain the initial item latent features.

[0021] Optionally, the method further includes:

[0022] The user memory matrix is written to the user memory network according to the item potential features of the current item to update the user memory matrix.

[0023] Optionally, the user memory network performs a double-layer attention process on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain a second user memory feature, including:

[0024] The user memory network processes the user's inherent preference features and the user interaction type feature vector using a scoring function to obtain a first attention score, and processes the first attention score using a softmax function to obtain a first-layer attention weight, where the user interaction type feature vector is obtained through the training sample;

[0025] The user memory network processes the item potential features and the memory features in the user memory matrix using the scoring function to obtain a second attention score, and processes the second attention score using the softmax function to obtain a second-layer attention weight;

[0026] The user memory network processes the memory features in the user memory matrix based on the first layer attention weights and the second layer attention weights to obtain second user memory features.

[0027] Optionally, the fusion method of the user inherent preference features and the user dynamic preference features is minimum pooling processing, maximum pooling processing, average pooling processing or linear weighted processing.

[0028] A second aspect of the present application provides an item recommendation method, comprising:

[0029] Obtain several candidate items from the user;

[0030] Predicting the user's preference score for each candidate item using an item recommendation model, wherein the item recommendation model is trained using the item recommendation model training method according to any one of the first aspects;

[0031] Item recommendations are made based on the preference scores of the candidate items.

[0032] A third aspect of the present application provides a training device for an item recommendation model, comprising:

[0033] A construction unit, configured to construct training samples based on historical records of user behavior towards different items, wherein the historical records include various types of interaction information between the user and the items;

[0034] a learning unit, configured to extract item latent features and user latent features from the training samples through a user memory network, wherein the user latent features include user inherent preference features and user dynamic preference features, and the user inherent preference features are obtained by extracting user preference information from the training samples through the user memory network;

[0035] a calculation unit, configured to calculate a prediction score of the training sample based on the user potential features and the item potential features;

[0036] an updating unit, configured to update network parameters of the user memory network according to the loss value calculated by the prediction score and label of the training sample until the user memory network converges to obtain an item recommendation model;

[0037] The process of extracting user potential features from the user memory network is as follows:

[0038] The user memory network performs a read operation on the current user memory matrix based on the item potential feature to obtain a first user memory feature;

[0039] The user memory network performs a double-layer attention process on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain a second user memory feature;

[0040] The user memory network fuses the first user memory feature and the second user memory feature to obtain a user dynamic preference feature;

[0041] The user memory network fuses the user's inherent preference features and the user's dynamic preference features to obtain user latent features.

[0042] Optionally, the system further includes an initialization unit configured to:

[0043] Initializing the item information and static attribute information in the training sample to obtain static attribute embedding initial values and item embedding initial values;

[0044] Performing multi-layer graph convolution processing on the static attribute embedding initial value and the item embedding initial value to obtain item embeddings of each layer, wherein the item embedding initial value is the item embedding of the initial layer;

[0045] The initial item potential features are obtained based on the item embedding in each layer.

[0046] A fourth aspect of the present application provides an item recommendation device, comprising:

[0047] An acquisition unit, configured to acquire a number of candidate items from a user;

[0048] a prediction unit, configured to predict a user's preference score for each candidate item using an item recommendation model, wherein the item recommendation model is trained using the item recommendation model training method according to any one of the first aspects;

[0049] The recommendation unit is used to recommend items based on the preference scores of the candidate items.

[0050] It can be seen from the above technical solutions that this application has the following advantages:

[0051] The present application provides a training method for an item recommendation model, comprising: constructing training samples based on historical behavior records of users for different items, the historical behavior records including various types of interaction information between users and items; extracting item potential features and user potential features from the training samples through a user memory network, the user potential features including user inherent preference features and user dynamic preference features, the user inherent preference features being obtained by extracting user preference information from the training samples through the user memory network; calculating a prediction score for the training samples based on the user potential features and the item potential features; updating network parameters of the user memory network based on the prediction scores of the training samples and the loss values calculated from the labels until the user memory network converges to obtain an item recommendation model; wherein the process of extracting the user potential features by the user memory network is as follows: the user memory network performs a read operation on the current user memory matrix based on the item potential features to obtain a first user memory feature; the user memory network performs a double-layer attention processing on the memory features in the user memory matrix based on the user inherent preference features and the item potential features to obtain a second user memory feature; the user memory network fuses the first user memory feature and the second user memory feature to obtain a user dynamic preference feature; and the user memory network fuses the user inherent preference features and the user dynamic preference features to obtain a user potential feature.

[0052] In the present application, a user memory network is trained based on training samples constructed based on historical behavioral records of various types of user interaction information for different items to analyze user behavioral preferences, which is more effective than the method of constructing a recommendation model using only one type of interaction information. Fusion modeling is performed based on dynamic information of user dynamic preference characteristics and static information of user inherent preference characteristics, thereby enriching the static information that can be learned by the user memory network and improving the effect of the recommendation model. Moreover, by adding a double-layer attention mechanism on the basis of the user memory network to better model users and items, the user memory network, in the process of learning dynamic information, simultaneously learns users' preferences for different interaction types and potential connections between deeper items, further improving the effect of the recommendation model and thus improving the technical problem of unsatisfactory recommendation effects in existing recommendation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0054] Figure 1 A flowchart of a method for training an item recommendation model provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of a process for extracting user potential features using a user memory network provided in an embodiment of the present application;

[0056] Figure 3 A structural diagram of a heterogeneous user memory network provided in an embodiment of the present application;

[0057] Figure 4 A schematic diagram of a specific sequence recommendation scenario provided in an embodiment of the present application;

[0058] Figure 5 A flowchart of an item recommendation method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0060] For easier understanding, see Figure 1 An embodiment of a method for training an item recommendation model provided in this application includes:

[0061] Step 101: Construct training samples based on the user's historical behavior records for different items. The historical behavior records include various types of interaction information between the user and the items.

[0062] Training samples can be constructed based on the user's historical behavior records for different items. The historical behavior records include various types of interaction information such as clicks, favorites, add-to-cart, and purchases of different items. User-item-interaction type pairs can be extracted from the historical behavior records to obtain behavior sequence triplets as training samples, which are recorded as<u,i,t> , where u∈U, i∈I, t∈T, U, I, and T are the user set, item set, and interaction category set, respectively, for example, <User A, Item A, Purchase>, <User B, Item B, Click>. These refined behavior sequence triplets can well represent historical behavior records and can be stored and updated to the user memory matrix through the user memory network. Each user's preference for each item can be scored based on the historical behavior records as a label for the training sample. The embodiment of the present application preferably adopts a method of joint training of positive and negative samples, where the label corresponding to the positive sample is 1 and the label corresponding to the negative sample is 0.

[0063] Step 102: Extract item latent features and user latent features from the training samples through the user memory network. The user latent features include user inherent preference features and user dynamic preference features. The user inherent preference features are obtained by extracting user preference information from the training samples through the user memory network.

[0064] The initial item potential features and the initial user inherent preference features can be obtained by randomly initializing the user memory network, and then updated through the back propagation of the user memory network to learn the item potential features and the user inherent preference features. However, the embodiment of the present application takes into account that in real-life scenarios, users or items usually have their own static attribute information, such as the user's age, gender, item category, price, etc. These static attributes often carry some important information, and using this information helps to learn better user or item representations. For example, an NBA-themed mobile phone case, its category attribute belongs to both NBA products and mobile phone case products, so it can be associated with items belonging to the same category to obtain some additional collaborative information. In order to utilize this information, the embodiment of the present application provides an optional initialization process, which mainly focuses on category attributes. Since item attributes are usually richer than user attributes, this helps to learn better item potential features. Therefore, the embodiment of the present application uses the learning of initial item potential features as an example for explanation.

[0065] Specifically, the initialization process of the item's potential features is:

[0066] Initialize the item information and static attribute information in the training sample to obtain the initial static attribute embedding value and the initial item embedding value;

[0067] Perform multi-layer graph convolution on the initial values of static attribute embeddings and item embeddings to obtain item embeddings at each layer, where the initial value of item embeddings is the item embedding of the initial layer;

[0068] The initial item latent features are obtained based on the item embeddings of each layer. Specifically, the last layer of item embeddings in each layer is used as the initial item latent features, or the item embeddings of each layer are concatenated or averaged to obtain the initial item latent features.

[0069] The main idea of initialization is to use the interaction between items and their static attributes to obtain item embeddings and their corresponding static attribute embeddings through graph convolution methods, and use this item embedding as the item embedding of subsequent frames. The specific process is as follows:

[0070] 1. Information Propagation Process: On the interactive bipartite graph between items and their static attributes, static attribute embeddings are continuously propagated iteratively to update the item embeddings, thereby enriching the information carried by the item embeddings. It should be noted that the process of obtaining the interactive bipartite graph is well-known and will not be further described here.

[0071] 1) First-order propagation and update:

[0072] Information dissemination: It is necessary to consider both static attribute information and the information of the item node itself, namely:

[0073]

[0074]

[0075] Where, Embed the initial value of the first-order static property, obtained by random initialization, is the initial value of the first-order item embedding, that is, the item embedding of the initial layer, obtained by random initialization; is the Laplace norm of the graph, N i 、N c are the first-order neighbors of item i and attribute c, respectively. is a trainable parameter, ⊙ is the element-wise product operator, They are the information propagated from the attribute node to the item node and the information propagated by the item node itself.

[0076] Update of item embedding: Aggregate and update the above two types of information to the item embedding of the next layer, namely:

[0077]

[0078] Where, is the item embedding of the next layer, and LeakyReLU(·) is the nonlinear activation function. Through the above processing, the static attribute information of the item is explicitly encoded into middle.

[0079] 2) High-level communication and updates:

[0080] Information dissemination: Expand the first-order situation above, namely:

[0081]

[0082]

[0083] Update of item embedding: Similarly, expand the first-order case above, that is:

[0084]

[0085] 2. Final Embedding

[0086] After getting the last layer of item embedding After that, the initial item potential features can be obtained by any of the following methods.

[0087] Only the items in the last layer can be selected as the initial item potential features q i ,Right now:

[0088]

[0089] You can also embed multiple layers of items and splice them together as the initial item potential feature q i ,Right now:

[0090]

[0091] You can also embed the multi-layer items and average them as the initial item potential feature q i ,Right now:

[0092]

[0093] Where mean(·) is the averaging function. It is understandable that other pooling operations (such as maximum pooling and minimum pooling) can be performed on the multi-layer item embedding to obtain the initial item potential features.

[0094] In an embodiment of the present application, the item information and static attribute information in the training sample can be initialized through a static initialization module, and then the initial item potential features can be obtained through multi-layer graph convolution processing. Compared with directly randomly initializing the item potential features, this method can enable the user memory network to better utilize the attribute information of the item itself, which helps to improve the recommendation model effect.

[0095] The user memory network updates the initial item potential features through back propagation to obtain the item potential features. The user memory network also extracts user potential features from the training samples. User potential features include user inherent preference features and user dynamic preference features. User inherent preference features are obtained by extracting user preference information from the training samples through the user memory network.

[0096] Please refer to Figure 2 ,The process of extracting user potential features by user memory network is:

[0097] S1. The user memory network performs a read operation on the user memory matrix generated by the user memory network based on the item potential feature to obtain the first user memory feature.

[0098] Since the initial user memory network only considers one type of interaction relationship, each user has only one memory matrix (the user memory matrix consists of many memory slots to simulate user memory), which is not applicable to heterogeneous information networks with multiple types of relationships. Therefore, in this embodiment of the application, the dimension of the user memory matrix is expanded so that each user has multiple user memory matrices, and each user memory matrix only cares about the interaction records of the corresponding type, such as Figure 3 shown.

[0099] In the embodiment of the present application, the user potential features p required for prediction are predicted. u Based on the user's inherent preference characteristics (i.e. the user's consistent preferences) and user dynamic preference characteristics (i.e., user preferences that change over time), user-specific preference characteristics Update and learn through back propagation of user memory network, and user dynamic preference features User memory matrix Calculated, where l is the number of elements in the interaction type set T, d is the dimension of the potential feature, and s is the number of memory slots (total number of columns). The user memory matrix under a certain interaction type can be recorded as It consists of many columns, each of which They all store certain dynamic memory features. When a first-in-first-out reading and writing mechanism is adopted, the potential features of the user items replace the oldest memory slot in the user memory matrix in each round of training. The embodiment of the present application found that this method is not ideal. The reason is that each user's memory of the sequence is short-term and limited, that is, the memory slots are limited. If the sequence length is greater than the number of memory slots, then the first-in-first-out method will inevitably cause the user memory matrix to be unable to record the entire sequence, resulting in the loss of some intrinsic connections of the sequence information. Therefore, in order to consider the global information of the sequence, the embodiment of the present application introduces a global feature matrix F = {f1, f2, ..., fk ,...,f s}, used to assist in controlling the read and write operations of the user memory matrix, and its dimension size is the same as that of the user memory matrix M of a single user. u Consistent, that is is the kth global eigenvector in the global feature matrix, where the initial value of the global feature matrix is obtained by random initialization.

[0100] The reading operation of the user memory matrix adopts the soft attention mechanism, which calculates the correlation between the potential features of the current candidate item and the global features. The purpose is to focus on different features when reading the memory features, that is:

[0101]

[0102]

[0103] Where z ik is the soft attention weight, Memorize features for the first user.

[0104] The user memory matrix is written to the user memory network based on the item potential features of the current item to update the user memory matrix. For the write operation of the user memory matrix, the current interaction record is used.<u,i,t> , correspondingly update the user memory matrix M of user u regarding interaction type t u,t In order to allow the user memory matrix to have a certain forgetting ability, the influence of noise or irrelevant information can be weakened during the update, and the key preference information can be strengthened and retained. In the embodiment of the present application, the user memory matrix of the previous state is erased and then the new content is written through the user memory network, that is:

[0105] erase i =σ(q i );

[0106]

[0107] add i =tanh(q i );

[0108]

[0109] Where 1 is a column vector whose element values are all 1, σ(·) is the sigmoid function, and erase i is the potential feature q from the item i The first feature extracted, add i is the potential feature q from the item i The second feature extracted, The soft attention weights of type t calculated during the read operation are the elements of the user memory matrix if and only if the soft attention weights and erase i The corresponding values will be reset to zero only when all of them are 1, and will be completely retained if one of them is 0. The rest will be forgotten to a certain extent. After erasing the first two formulas above, the potential feature q of the current item i is i Extract some key features and write them into the user memory matrix. Through the above writing operation, the user memory matrix can be prompted to retain key features during the update process.

[0110] It should be noted that in addition to the read and write operations implemented in the above-mentioned manner, other existing methods can also be used to implement read and write operations. For example, the embodiment of the present application uses an erase-write mechanism for write operations, and can also use characteristics similar to a forget gate for write operations.

[0111] S2. The user memory network performs double-layer attention processing on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain the second user memory features.

[0112] The embodiment of the present application adds a two-layer attention mechanism to the user memory network. The first layer of the attention mechanism simulates user attention and is used to learn the user's attention weights for different types of interaction behaviors. For example, when forming the user's final memory feature, is purchasing behavior or browsing behavior more influential? Specifically, the user memory network uses a scoring function to process the user's inherent preference characteristics and the user interaction type feature vector to obtain a first attention score. The first attention score is then processed using a softmax function to obtain the first-layer attention weight. The user interaction type feature vector is obtained through training samples.

[0113] The scoring function is defined as: User interaction type feature vector x t After element-by-element multiplication, it passes through a fully connected layer (with bias term and activation function) and a mapping function For processing, the mapping function is also a fully connected layer (without bias and activation function), which is used to transform the input data into a dimension and finally obtain the first attention score, that is:

[0114]

[0115]

[0116] Where, is the first attention score, W1, b1, and ReLU(·) are the weight, bias, and activation function of the fully connected layer respectively. The user’s inherent preference features for all class features x can be calculated through the scoring function. t The first attention score of is processed by the softmax function to obtain the attention weight of user u for interaction type t, that is, the first-layer attention weight α(u,t).

[0117] The second-layer attention mechanism simulates the attention of items to items, that is, the potential correlation between items, and is used to learn the item potential feature q of the current item i and the item features M in the user's memory u Specifically, the user memory network uses a scoring function to process the item's potential features and the memory features in the user's memory matrix to obtain the second attention score, and then uses the softmax function to process the second attention score to obtain the second-layer attention weight. Since the first-layer attention weight is the user's attention weight for different interaction types t, the calculation of the second-layer attention weight should be calculated separately according to different interaction types t, that is, pay attention to q i With M u,t The degree of matching, that is:

[0118]

[0119]

[0120] Where, is the second attention score, is the mapping function, β t (i,k) is the second layer attention weight.

[0121] The memory features in the user memory matrix are processed by the user memory network based on the first layer attention weight and the second layer attention weight to obtain the second user memory feature. Specifically, firstly, the memory features in the user memory matrix are weighted summed based on the second layer attention weight to obtain the memory feature of user u under interaction type t and item i. Right now:

[0122]

[0123] Then the memory feature is processed by the first layer of attention weights Perform calculations to obtain the second user memory feature Right now:

[0124]

[0125] The embodiments of the present application take into account that the existing technologies are all based on homogeneous information networks, and either only consider the user's purchase records, or treat all kinds of user behaviors as the same type, and do not make good use of heterogeneous information, resulting in unsatisfactory recommendation results. Therefore, the embodiments of the present application consider the user's various interactive behaviors and use a double-layer attention mechanism to optimize their weights, thereby improving the recommendation effect. For ease of understanding, for example, in a heterogeneous information network for actual product recommendation, there are three types of interactions between users and products: click, collect, and purchase. Figure 4 As shown. In this scenario, the user likes to watch NBA and often browses and buys NBA products on the platform. However, he bought a mobile phone by chance (it may be due to accidental reasons such as the mobile phone being broken or a new product being launched, which is not a regular demand). After buying a mobile phone, users usually have the need to buy some mobile phone by-products such as mobile phone cases, so the user then browsed some mobile phone cases, but has not yet decided which one to buy. Assuming that we only consider the user's four most recent behaviors, then: 1. For the method that only considers the user's purchase behavior, the user's four most recent behaviors are (NBA product-NBA product-mobile phone-NBA product) in order; 2. For the method that treats different types of behaviors as one behavior, the user's four most recent behaviors are (NBA product-mobile phone case-mobile phone case-mobile phone case); 3. For the method proposed in the embodiment of the present application, the user's four most recent behaviors are also (NBA product-mobile phone case-mobile phone case-mobile phone case). The difference is that the embodiment of the present application distinguishes the behavior types, which are (purchase-browse-browse-browse) in order. Based on the above data, the three methods tend to produce different recommendation results: 1. For the method that only considers purchase behavior, it tends to recommend NBA products and may also recommend some mobile phones; 2. For the method that treats all interaction types as one, it tends to recommend general mobile phone cases and may also recommend some NBA products; 3. For the embodiment of the present application, since different types of information are considered, it tends to give a recommendation result that integrates this information, such as recommending mobile phone cases with NBA themes and some NBA products. Obviously, the result of mobile phone cases with NBA themes will be more in line with user preferences and produce a better recommendation effect.

[0126] S3. The user memory network fuses the first user memory feature and the second user memory feature to obtain the user dynamic preference feature.

[0127] The first user memory feature and the second user memory feature can be fused in a linear weighted manner to obtain the user dynamic preference feature Right now:

[0128]

[0129] Where λ1 is the first weighting coefficient and MERGR(·) is the fusion function.

[0130] S4. The user memory network integrates the user's inherent preference features and the user's dynamic preference features to obtain the user's latent features.

[0131] User inherent preference characteristics and user dynamic preference characteristics The fusion method can be minimum pooling, maximum pooling, average pooling or linear weighting. The embodiment of the present application preferably adopts a linear weighting method to fuse the user's inherent preference features and the user's dynamic preference features to obtain the user's potential feature p u ,Right now:

[0132]

[0133] Where λ1 is the second weighting coefficient, which is used to control the user's dynamic preference characteristics The contribution degree to the user's potential features, MERGR′(·) is the fusion function.

[0134] Step 103: Calculate the prediction score of the training sample based on the user potential features and the item potential features.

[0135] The operation function PREDICT(·) can be used to perform prediction operations on user potential features and item potential features. There are multiple options for this operation function. In this embodiment of the application, the inner product operation is preferably used. The result of the inner product operation is then converted to the interval [0, 1] using the sigmoid function to optimize the target of combining 0-1 labels. Taking the inner product operation as an example, the final prediction score of the training sample is:

[0136]

[0137] Where, is the sigmoid function, is the predicted score, that is, the predicted preference score of user u for item i.

[0138] Step 104: Update the network parameters of the user memory network according to the loss value calculated based on the prediction score of the training sample and the label until the user memory network converges to obtain an item recommendation model.

[0139] Since the embodiment of the present application adopts a method of joint training of positive samples and negative samples, a binary cross entropy function can be used as a loss function to perform parameter optimization, namely:

[0140]

[0141] Where yui is the label value, They correspond to the positive sample set and negative sample set of user u respectively, It is a regularization term used to prevent the model from overfitting. The specific value can be set according to the actual situation and is not limited here.

[0142] In an embodiment of the present application, a user memory network is trained based on training samples constructed based on historical behavioral records of various types of user interaction information for different items to analyze user behavioral preferences, which is more effective than a method that only uses one type of interaction information to construct a recommendation model; dynamic information based on the user's dynamic preference characteristics and static information based on the user's inherent preference characteristics are fused and modeled, thereby enriching the static information that can be learned by the user memory network and improving the effect of the recommendation model; and, by adding a double-layer attention mechanism on the basis of the user memory network to better model users and items, the user memory network, in the process of learning dynamic information, simultaneously learns the user's preferences for different interaction types and the potential connections between deeper items, further improving the effect of the recommendation model, thereby improving the technical problem of unsatisfactory recommendation effects in existing recommendation systems.

[0143] The above is an embodiment of a training method for an item recommendation model provided by the present application, and the following is an embodiment of an item recommendation method provided by the present application.

[0144] Please refer to Figure 5 , an item recommendation method provided in an embodiment of the present application includes:

[0145] Step 201: Obtain several candidate items of the user.

[0146] Candidate items may be items in the item set that the user has not interacted with.

[0147] Step 202: Predict the user's preference score for each candidate item through the item recommendation model.

[0148] The user and the candidate items are input into the item recommendation model for scoring prediction to obtain the user's preference score for each candidate item, wherein the item recommendation model is trained by the item recommendation model training method in the aforementioned method embodiment.

[0149] Step 203: Recommend items based on the preference score of each candidate item.

[0150] According to the user's preference score for each candidate item, the candidate items are sorted in descending order, and the top several candidate items can be selected and recommended to the user.

[0151] The above is an embodiment of an item recommendation method provided by the present application. The following is an embodiment of a training device for an item recommendation model provided by the present application, which is characterized by comprising:

[0152] An embodiment of the present application provides a training device for an item recommendation model, comprising:

[0153] A construction unit, configured to construct training samples based on the user's historical behavior records for different items, where the historical behavior records include various types of interaction information between the user and the items;

[0154] A learning unit is used to extract item latent features and user latent features from training samples through a user memory network. User latent features include user inherent preference features and user dynamic preference features. User inherent preference features are obtained by extracting user preference information from training samples through the user memory network.

[0155] A calculation unit, configured to calculate a prediction score of a training sample based on user potential features and item potential features;

[0156] An updating unit is used to update the network parameters of the user memory network according to the loss value calculated by the prediction score and label of the training sample until the user memory network converges to obtain the item recommendation model;

[0157] The process of extracting user potential features from the user memory network is as follows:

[0158] The user memory network reads the current user memory matrix based on the item potential features to obtain the first user memory feature;

[0159] The user memory network performs double-layer attention processing on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain the second user memory features;

[0160] The user memory network fuses the first user memory feature and the second user memory feature to obtain the user's dynamic preference feature;

[0161] The user memory network integrates the user's inherent preference features and the user's dynamic preference features to obtain the user's latent features.

[0162] As a further improvement, the device further includes: an initialization unit, configured to:

[0163] Initialize the item information and static attribute information in the training sample to obtain the initial static attribute embedding value and the initial item embedding value;

[0164] Perform multi-layer graph convolution on the initial values of static attribute embeddings and item embeddings to obtain item embeddings at each layer, where the initial value of item embeddings is the item embedding of the initial layer;

[0165] The initial item potential features are obtained based on the item embedding of each layer.

[0166] As a further improvement, the device further comprises:

[0167] An updating unit is used to perform a write operation on the user memory matrix based on the item potential features of the current item through the user memory network to update the user memory matrix.

[0168] In an embodiment of the present application, a user memory network is trained based on training samples constructed based on historical behavioral records of various types of user interaction information for different items to analyze user behavioral preferences, which is more effective than a method that only uses one type of interaction information to construct a recommendation model; dynamic information based on the user's dynamic preference characteristics and static information based on the user's inherent preference characteristics are fused and modeled, thereby enriching the static information that can be learned by the user memory network and improving the effect of the recommendation model; and, by adding a double-layer attention mechanism on the basis of the user memory network to better model users and items, the user memory network, in the process of learning dynamic information, simultaneously learns the user's preferences for different interaction types and the potential connections between deeper items, further improving the effect of the recommendation model, thereby improving the technical problem of unsatisfactory recommendation effects in existing recommendation systems.

[0169] The present application also provides an item recommendation device, including:

[0170] An acquisition unit, configured to acquire a number of candidate items from a user;

[0171] a prediction unit, configured to predict the user's preference score for each candidate item using an item recommendation model, wherein the item recommendation model is trained using the item recommendation model training method of the aforementioned method embodiment;

[0172] The recommendation unit is used to recommend items based on the preference score of each candidate item.

[0173] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0174] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0175] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0176] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0177] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0178] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0179] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program code.

[0180] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for training an item recommendation model, characterized in that: include: Constructing training samples based on the user's historical behavior records for different items, wherein the historical behavior records include various types of user interaction information for the items; Extracting item latent features and user latent features from the training samples through a user memory network, wherein the user latent features include user inherent preference features and user dynamic preference features, and the user inherent preference features are obtained by extracting user preference information from the training samples through the user memory network; Calculating a prediction score of the training sample based on the user potential features and the item potential features; Updating the network parameters of the user memory network according to the loss value calculated based on the predicted score and label of the training sample until the user memory network converges to obtain an item recommendation model; The process of extracting user potential features from the user memory network is as follows: The user memory network performs a read operation on the current user memory matrix based on the item potential feature to obtain a first user memory feature; The user memory network performs a double-layer attention process on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain a second user memory feature; The user memory network fuses the first user memory feature and the second user memory feature to obtain a user dynamic preference feature; The user memory network fuses the user's inherent preference features and the user's dynamic preference features to obtain user potential features; the fusion method of the user's inherent preference features and the user's dynamic preference features is minimum pooling processing, maximum pooling processing, average pooling processing or linear weighted processing.

2. The method for training an item recommendation model according to claim 1, wherein: The initialization process of the item's potential features is: Initializing the item information and static attribute information in the training sample to obtain static attribute embedding initial values and item embedding initial values; Performing multi-layer graph convolution processing on the static attribute embedding initial value and the item embedding initial value to obtain item embeddings of each layer, wherein the item embedding initial value is the item embedding of the initial layer; The initial item potential features are obtained based on the item embeddings in each layer.

3. The method for training an item recommendation model according to claim 2, wherein: The step of obtaining initial item potential features based on the item embedding at each layer includes: The last layer of item embeddings in each layer of the item embeddings is used as the initial item latent features, or the item embeddings in each layer are concatenated or averaged to obtain the initial item latent features.

4. The method for training an item recommendation model according to claim 1, wherein: The method further comprises: The user memory matrix is written to the user memory network according to the item potential feature of the current item to update the user memory matrix.

5. The method for training an item recommendation model according to claim 1, wherein: The user memory network performs a double-layer attention process on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain a second user memory feature, including: The user memory network processes the user's inherent preference features and the user interaction type feature vector using a scoring function to obtain a first attention score, and processes the first attention score using a softmax function to obtain a first-layer attention weight, where the user interaction type feature vector is obtained through the training sample; The user memory network processes the item potential features and the memory features in the user memory matrix using the scoring function to obtain a second attention score, and processes the second attention score using the softmax function to obtain a second-layer attention weight; The user memory network processes the memory features in the user memory matrix based on the first layer attention weights and the second layer attention weights to obtain second user memory features.

6. An item recommendation method, characterized in that: include: Obtain several candidate items from the user; Predicting the user's preference score for each candidate item using an item recommendation model, wherein the item recommendation model is trained using the item recommendation model training method according to any one of claims 1 to 5; Item recommendations are made based on the preference scores of the candidate items.

7. A training device for an item recommendation model, characterized in that: include: A construction unit, configured to construct training samples based on historical records of user behavior towards different items, wherein the historical records include various types of interaction information between the user and the items; a learning unit, configured to extract item latent features and user latent features from the training samples through a user memory network, wherein the user latent features include user inherent preference features and user dynamic preference features, and the user inherent preference features are obtained by extracting user preference information from the training samples through the user memory network; a calculation unit, configured to calculate a prediction score of the training sample based on the user potential features and the item potential features; an updating unit, configured to update network parameters of the user memory network according to the loss value calculated by the prediction score and label of the training sample until the user memory network converges to obtain an item recommendation model; The process of extracting user potential features from the user memory network is as follows: The user memory network performs a read operation on the current user memory matrix based on the item potential feature to obtain a first user memory feature; The user memory network performs a double-layer attention process on the memory features in the user memory matrix based on the user's inherent preference features and the item's potential features to obtain a second user memory feature; The user memory network fuses the first user memory feature and the second user memory feature to obtain a user dynamic preference feature; The user memory network fuses the user's inherent preference features and the user's dynamic preference features to obtain user potential features; the fusion method of the user's inherent preference features and the user's dynamic preference features is minimum pooling processing, maximum pooling processing, average pooling processing or linear weighted processing.

8. The training device for an item recommendation model according to claim 7, characterized in that: Also includes: Initialization unit, used to: Initializing the item information and static attribute information in the training sample to obtain static attribute embedding initial values and item embedding initial values; Performing multi-layer graph convolution processing on the static attribute embedding initial value and the item embedding initial value to obtain item embeddings of each layer, wherein the item embedding initial value is the item embedding of the initial layer; The initial item potential features are obtained based on the item embeddings in each layer.

9. An item recommendation device, characterized in that: include: An acquisition unit, configured to acquire a number of candidate items from a user; a prediction unit, configured to predict a user's preference score for each candidate item using an item recommendation model, wherein the item recommendation model is trained using the item recommendation model training method according to any one of claims 1 to 5; The recommendation unit is used to recommend items based on the preference scores of the candidate items.

Citation Information

Patent Citations

  • Article recommendation method and device and medium

    CN111598644A