A self-supervised sequence recommendation method based on users' long-term and short-term interests

By constructing a self-supervised sequence recommendation model, combined with GRU layer and hypergraph convolution, it captures the relationship between users' long-term and short-term interests, solves the problem of mutual constraints and sequential information not being considered in the existing technology, and significantly improves the accuracy of recommendations.

CN114528490BActive Publication Date: 2024-10-29HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210151706.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-18
Publication Date
2024-10-29
Estimated Expiration
2042-02-18

AI Technical Summary

Technical Problem

The existing technology fails to fully consider the mutual constraints between the user's long-term interests and short-term interests, and ignores sequential information, resulting in poor recommendation results.

Method used

By building a self-supervised sequence recommendation model based on the user's long-term and short-term interests, the GRU layer is used to capture long-term interests, the hypergraph convolution and the soft attention layer are used to capture short-term interests, and the two are combined through the self-supervised learning layer to calculate the final user representation to improve Recommended accuracy.

Benefits of technology

Make full use of the constraint relationship between the user's long-term interests and short-term interests, and consider the sequential relationship within the short-term session, which significantly improves the accuracy and effect of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114528490B_ABST
    Figure CN114528490B_ABST
Patent Text Reader

Abstract

The present invention discloses a self-supervised sequence recommendation method based on user's long-term and short-term interests. Step 1: obtain a sequence data set of user information, project information and user behavior, pre-process the data set and divide it into a training set and a test set; Step 2: construct a self-supervised sequence recommendation model based on user's long-term and short-term interests; Step 3: use the training set to train the self-supervised sequence recommendation model based on user's long-term and short-term interests described in step 2; Step 4: input the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on user's long-term and short-term interests trained in step 3, calculate the recommendation score of the recommended item relative to the user, and recommend the item to the user according to the recommendation score. The present invention is used to solve the problem of the mutual constraint relationship between the long-term and short-term interests of users in the prior art, and realize more accurate recommendation of users' long-term interests and short-term interests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of sequence recommendation, and in particular relates to a self-supervised sequence recommendation method based on user's long-term and short-term interests. Background Art

[0002] People's behavioral data on the Internet can indicate important information, such as users' preferences and behavior patterns, which recommendation systems can use to provide personalized services to users and enhance their experience.

[0003] Traditional sequential recommendation systems can be summarized into two main ways to model the interaction between users and items. The first method is to obtain user preferences based on collaborative filtering (CF) based on matrix decomposition, focusing on mining static associations from the interaction between users and items, which are represented by traditional collaborative filtering models. However, these works only consider the specific relationship between users and items from a static view, ignoring the evolution of user preferences implicit in serialized interactions, and not considering the impact of the evolution of user preferences on future purchases. The second method is to mine the relationship between users and items based on sequence patterns to make personalized recommendations. Among them, the user's stable long-term interests are preferences caused by long-term personal habits; short-term interests are preferences determined by the items purchased by the user recently. This type of work includes: modeling the interaction sequence between users and items based on the Markov chain model. Both the user's long-term interests and short-term interests have a very important impact on the user's choice of items, so combining the two to recommend to users can effectively improve accuracy.

[0004] Deep neural networks have a natural advantage in building and capturing comprehensive relationships between different entities in a sequence (e.g., users, items, interactions). More and more people are using deep neural networks to construct sequential recommendation systems.

[0005] For sequence recommendation systems, recurrent neural networks were first proposed and valued by researchers because they have structural advantages in modeling sequence data, but they also have the defect of being unable to model high-order complex relationships. Subsequently, convolutional neural networks and graph neural networks were also applied to sequence recommendation systems to model complex interactive relationships, in order to make up for the shortcomings of recurrent neural networks.

[0006] In recent years, people have paid more and more attention to improving the performance of sequential recommendation by capturing users' long-term and short-term interests. However, existing technologies only consider the complementary relationship between users' long-term and short-term interests, but do not consider the mutual constraints between them. In addition, existing recommendation technologies using hypergraphs can better learn high-order contextual information, thereby better modeling users' short-term interests, but do not fully consider the sequential information of users' interactive items, especially the use of such sequential information when constructing hypergraphs.

[0007] In summary, the current research work mainly aims to have a more accurate modeling method for users' long-term and short-term interests, and to make full use of the complementary and constrained relationships between users' long-term and short-term interests to achieve better recommendation effects. Summary of the invention

[0008] The present invention provides a self-supervised sequence recommendation method based on user's long-term and short-term interests, which is used to solve the problem of the mutual constraint relationship between the user's long-term and short-term interests in the prior art, and achieve more accurate recommendation of the user's long-term interests and short-term interests.

[0009] The present invention is achieved through the following technical solutions:

[0010] A self-supervised sequence recommendation method based on user long-term and short-term interests includes the following steps:

[0011] Step 1: Obtain a sequence data set of user information, project information, and user behavior, preprocess the data set, and divide it into a training set and a test set;

[0012] Step 2: Build a self-supervised sequence recommendation model based on users’ long-term and short-term interests;

[0013] Step 3: Use the training set to train the self-supervised sequence recommendation model based on the user's long-term and short-term interests described in step 2;

[0014] Step 4: Input the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on the user's long-term and short-term interests trained in step 3, calculate the recommendation score of the recommended item relative to the user, and recommend the item to the user based on the recommendation score.

[0015] Furthermore, the step 1 specifically includes the following steps:

[0016] Step 1.1: Divide the user interaction sequence into long-term sequence L and short-term sequence S;

[0017] Step 1.2: Construct a hypergraph G based on the short-term sequence S divided in step 1.1;

[0018] Let G = (V, E) represent a hypergraph, where V contains N vertices, each vertex represents an item, E contains M hyperedges, each hyperedge ε∈E represents a session and contains five vertices; let each hyperedge be assigned a positive weight W εε Represents the weight of each item in the hyperedge, and all weights are formed into a diagonal matrix W∈R M×M ; The hypergraph is represented by an incidence matrix H∈R N×M , if the hyperedge ε∈E contains the vertex v i ∈V then H iε=1, otherwise 0; for each vertex and hyperedge, their degree is defined as Definition D h and B are both diagonal matrices; in order to utilize the order relationship between item interactions in a conversation, a degree matrix D in the order sense is defined p ∈R N×N Through the contextual relationship of the interaction items in each session, it is considered that the former affects the latter;

[0019] Standardize for each project:

[0020]

[0021] Get the final vertex degree matrix:

[0022] D=2×(D h +D p )

[0023] Furthermore, the step 2 constructs a self-supervised sequence recommendation model based on the user's long-term and short-term interests, which specifically includes the following steps:

[0024] Step 2.1: Get the embedding representation of the item;

[0025] Step 2.2: Input the user long-term sequence L and the item embedding representation divided in step 1.1 into the GRU layer, and capture the user's long-term interest θ through the feedforward neural network layer l ;

[0026] Step 2.3: Convolve the hypergraph G constructed in step 1.2, and pass the convolution result and the user short-term interaction sequence S divided in step 1.1 through the soft attention layer to obtain the user's short-term interest representation θ s ;

[0027] Step 2.4: The user's long-term interest θ obtained in step 2.2 l and the short-term interest θ obtained in step 2.3 s The self-supervised learning layer obtains the self-supervised loss L S ;

[0028] Step 2.5: The user's long-term interest θ obtained in step 2.2 l and the short-term interest θ obtained in step 2.3 s The final user representation θ is obtained through the fusion layer;

[0029] Step 2.6: Calculate the score of each candidate item based on the user's final expression.

[0030] Furthermore, the step 2.2 is specifically to model the user's long-term preference according to the long-term sequence divided in step 1.1, use the GRU network to capture the evolution in the long-term sequence, and use the last hidden unit state as the user's long-term preference representation θ l .

[0031] Furthermore, the step 2.3 performs hypergraph convolution, and the hypergraph convolution update project represents:

[0032]

[0033] Hypergraph convolution regards the formula from right to left as a convolution process from item to hyperedge and then to item; Represents the aggregation of information from vertices to hyperedges, and then multiplying H on the left aggregates the information from hyperedges to vertices; after L layers of convolution, the average of the results of all layers is used as the representation of the final project

[0034] For a session s=[i s,1 ,i s,2 ,...,i s,m ], aggregate the items in the session to get the representation of the end user’s short-term interests θ s :

[0035] α t =f T σ(W1x s +W2x t +b

[0036]

[0037] where x s Indicates that the current session is averaged by the items in the session, x t represents the tth interaction item in the session, and the short-term interest representation is obtained by the soft attention mechanism from the items in the session; f∈R d , W1∈R d×d and W2∈R d×d Both are attention parameters used to learn weights.

[0038] Furthermore, the step 2.4 is specifically as follows:

[0039] The contrastive learning method is used to give full play to the constraint relationship between the two, and the loss is calculated using the standard binary cross entropy loss function between positive and negative samples.

[0040]

[0041] in Yes The negative samples obtained by rearranging the rows and columns of D (·):R d×d →R is the discriminator function that takes two vectors as input and scores their consistency.

[0042] Furthermore, the step 2.5 is specifically that, since step 2.4 effectively promotes more accurate acquisition of each other's information, the final representation of the user is obtained by adding:

[0043] Furthermore, the step 2.6 calculates the score of each item by multiplying the final user representation obtained in step 2.5 by the item set. Calculate the probability of each item appearing through softmax

[0044] Furthermore, the step 3 specifically comprises the following steps:

[0045] Step 3.1: Input the data in the training set into the self-supervised sequence recommendation model based on the user's long-term and short-term interests described in step 2 to obtain the user's final representation vector;

[0046] Step 3.2: Input the user's final representation vector into the prediction module to obtain the recommendation score of the user relative to the item;

[0047] Step 3.3: Update the model parameters by calculating the error between the predicted rating value and the true rating value to optimize the recommendation loss function, combined with the self-supervised loss in step 2.4 to obtain the final loss Where β is the weight, which is set to 0.01; repeated training obtains the optimal self-supervised sequence recommendation model based on users’ long-term and short-term interests.

[0048] Furthermore, step 4: inputs the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on the user's long-term and short-term interests trained in step 3, calculates the recommendation score of the item to be recommended relative to the user, and recommends the item to the user according to the recommendation score.

[0049] The beneficial effects of the present invention are:

[0050] The present invention makes full use of the constraint relationship between the user's long-term interests and short-term interests and considers the sequential relationship within the short-term session when constructing the hypergraph to achieve a better recommendation effect.

[0051] The present invention gives full play to the constraint relationship between the user's long-term interests and short-term interests through self-supervised learning, and further improves the recommendation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic flow chart of the method of the present invention.

[0053] Figure 2 It is a user's long-term and short-term interest self-supervision recommendation model diagram of the present invention.

[0054] Figure 3 It is a schematic diagram of the short-term conversation hypergraph composition of the present invention. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Sequential recommendation systems based on three deep neural networks.

[0057] 1) Sequential recommendation system based on recurrent neural network. Given a historical sequence of user-item interactions, the sequential recommendation system based on recurrent neural network attempts to establish a sequential dependency relationship through the given interactions to predict the next possible interactions. The GRU4Rec model introduces the GRU network into sequential recommendation, models the user interaction sequence through the GRU network, learns the evolution of user interests, and recommends to users based on this. It uses the excellent performance of recurrent neural networks in sequence relationship modeling to achieve very good recommendation results, but it does not divide user interests into long-term interests and short-term interests for recommendation.

[0058] 2) Sequential recommendation system based on convolutional neural network. Convolutional neural network (CNN) can be used to extract features from text, audio and pictures. Different from recurrent neural network, given a sequence of user-item interactions, convolutional neural network first embeds all interactions into a matrix, and then treats this matrix as a picture in time and latent space. Finally, convolutional neural network learns this sequence pattern as the local feature of this picture, and uses convolution filtering for subsequent recommendations. Caser model uses convolutional neural network to model the short-term interests of users, takes the most recent L items of user interaction as the short-term sequence of user interaction, performs horizontal convolution and vertical convolution on the embedding of the short-term sequence of users, and concatenates the convolution results. The concatenated embedding is the short-term interest of users. When fusing the long-term and short-term interests of users, the concatenation method is also used. The concatenated embedding is the final interest representation of users, so as to recommend items that meet the user's interests. It uses the characteristic of convolutional neural networks that can capture higher-dimensional information than recurrent neural networks, and compares it with the relatively good sequence recommendation model that used recurrent neural networks for recommendation at the time. The experimental results on many data sets are not inferior to other sequence recommendation models. However, it only considers the complementary relationship between users' long-term and short-term interests, but does not consider the constraint relationship. At the same time, the modeling of users' short-term interests is too simple.

[0059] 3) Sequential recommendation system based on graph neural network. With the rapid development of graph neural network, a sequential recommendation system based on graph neural network has been designed, which uses graph neural network to model and capture more complex user-item interaction transformations in the sequence. When each sequence is mapped to a path, a directed graph is first built on the sequence data, and each interaction is used as a node in the graph. Then, the embedding of users or items is learned on the graph to embed more complex relationships in the entire graph. The SRGNN model constructs the user's interaction sequence as a directed graph, and considers the order relationship in the user interaction sequence as the pointing relationship in the directed graph when constructing the graph. Using the constructed directed graph, it is clear which other items will affect the item representation in the graph, so that the item representation in the graph is updated through the graph neural network, and the updated item representation is used to obtain the user's interest representation through the attention mechanism, and the recommendation is made based on this interest representation. It applies graph neural network to model user interests in conversational recommendation, and compares it with the sequence recommendation model that performed well at the time. Compared with other models, it has better recommendation effects. It can be seen that the graph neural network has a strong ability to capture the complex relationship between items in the user interaction sequence, and it still has a lot of room for development. As researchers explore the use of graph neural networks in sequence recommendation, hypergraph neural networks have been applied to sequence recommendation in recent years. Hypergraph neural networks belong to graph neural networks, but unlike standard graph neural networks, hypergraph neural networks no longer construct the relationship between user interaction sequences as a standard graph structure, but as a hypergraph structure. Hypergraphs are different from standard graphs in that, while in standard graphs, there are two vertices on an edge, in hypergraphs, there can be more than two vertices on an edge. Such an edge is called a hyperedge. By using hypergraphs, we are no longer limited to the pairwise relationship between two points on a side, and can capture more complex relationships. The HyperRec model divides the user's complete interaction sequence into multiple short-term sequences, and constructs each short-term sequence into a hypergraph. It uses hypergraph convolution to capture the correlation of items in the short-term sequence, and models the user's interests in each short-term sequence by obtaining the dynamic representation of the items. Finally, the user's interests in all short-term sequences are obtained through the self-attention mechanism. The dynamic representation of the user's current interest is obtained, and the next item is recommended for the user, achieving very good recommendation results. However, the sequential information in the user's interaction sequence is not considered when constructing the hypergraph.

[0060] A self-supervised sequence recommendation method based on user long-term and short-term interests includes the following steps:

[0061] Step 1: Obtain a sequence data set of user information, project information, and user behavior, preprocess the data set and divide it into a training set and a test set; divide the data set into a training set and a test set in a ratio of 8:2

[0062] Step 1.1 divides the user's complete interaction sequence into sequences that can represent long-term preferences and sessions that can represent current short-term interests. Since the user's long-term preferences are modeled, the complete interaction sequence can more accurately represent the user's long-term preferences. Therefore, all interaction sequences are used here as sequences that capture the user's long-term preferences. For modeling the user's short-term interests, in order to prevent the sparsity problem of hypergraph session data from affecting the effect, nearly five item interactions are used as short-term session sequences for constructing the hypergraph.

[0063] Step 2: Build a self-supervised sequence recommendation model based on users’ long-term and short-term interests;

[0064] Step 3: Use the training set to train the self-supervised sequence recommendation model based on the user's long-term and short-term interests described in step 2;

[0065] Step 4: Input the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on the user's long-term and short-term interests trained in step 3, calculate the recommendation score of the recommended item relative to the user, and recommend the item to the user based on the recommendation score.

[0066] Furthermore, the step 1 specifically includes the following steps:

[0067] Step 1.1: Divide the user interaction sequence into long-term sequence L and short-term sequence S;

[0068] Step 1.2: Construct a hypergraph G based on the short-term sequence S divided in step 1.1;

[0069] like Figure 3 The hypergraph is constructed in the manner shown, using the short-term session part of the entire sequence to construct the hypergraph. This step considers the mutual influence of similar sessions on the items in their respective sessions and also considers the sequential relationship between the interacting items in the same session, that is, the last interacting item will have an impact on the current interacting item.

[0070] Let G = (V, E) represent a hypergraph, where V contains N vertices, each vertex represents an item, E contains M hyperedges, each hyperedge ε∈E represents a session and contains five vertices; let each hyperedge be assigned a positive weight W εε Represents the weight of each item in the hyperedge, and all weights are formed into a diagonal matrix W∈R M×M ; The hypergraph is represented by an incidence matrix H∈R N×M , if the hyperedge ε∈E contains the vertex v i ∈V then H iε =1, otherwise 0; for each vertex and hyperedge, their degree is defined as Definition D hand B are both diagonal matrices; in order to utilize the order relationship between item interactions in a conversation, a degree matrix D in the order sense is defined p ∈R N×N The preceding and following relationships of the interaction items in each session are considered to affect the latter; for example, in the interaction sequence of i1 and i2, if i1 is considered to affect i2, then Set to 1;

[0071] Standardize for each project:

[0072]

[0073] Get the final vertex degree matrix:

[0074] D=2×(D h +D p )

[0075] Furthermore, the step 2 constructs a self-supervised sequence recommendation model based on the user's long-term and short-term interests, which specifically includes the following steps:

[0076] Step 2.1: Obtain the embedding representation of the project; Generate the embedding representation of all projects through the embedding matrix;

[0077] Step 2.2: Input the user long-term sequence L and the item embedding representation divided in step 1.1 into the GRU layer, and capture the user's long-term interest θ through the feedforward neural network layer l ;

[0078] Step 2.3: Convolve the hypergraph G constructed in step 1.2, and pass the convolution result and the user short-term interaction sequence S divided in step 1.1 through the soft attention layer to obtain the user's short-term interest representation θ s ;

[0079] Step 2.4: The user's long-term interest θ obtained in step 2.2 l and the short-term interest θ obtained in step 2.3 s The self-supervised learning layer obtains the self-supervised loss L S ;

[0080] Step 2.5: The user's long-term interest θ obtained in step 2.2 l and the short-term interest θ obtained in step 2.3 s The final user representation θ is obtained through the fusion layer;

[0081] Step 2.6: Calculate the score of each candidate item based on the user's final expression.

[0082] Furthermore, the step 2.2 is specifically to model the user's long-term preference according to the long-term sequence divided in step 1.1, use the GRU network to capture the evolution in the long-term sequence, and use the last hidden unit state as the user's long-term preference representation θ l .

[0083] Furthermore, the step 2.3 performs hypergraph convolution, and the hypergraph convolution update project represents:

[0084]

[0085] Hypergraph convolution regards the formula from right to left as a convolution process from item to hyperedge and then to item; Represents the aggregation of information from vertices to hyperedges, and then multiplying H on the left aggregates the information from hyperedges to vertices; after L layers of convolution, the average of the results of all layers is used as the representation of the final project

[0086] For a session s=[i s,1 ,i s,2 ,...,i s,m ], aggregate the items in the session to get the representation of the end user’s short-term interests θ s :

[0087] α t =f T σ(W1x s +W2x t +b)

[0088]

[0089] where x s Indicates that the current session is averaged by the items in the session, x t represents the tth interaction item in the session, and the short-term interest representation is obtained by the soft attention mechanism from the items in the session; f∈R d , W1∈R d×d and W2∈R d×d Both are attention parameters used to learn weights.

[0090] Furthermore, the step 2.4 is specifically as follows:

[0091] The contrastive learning method is used to give full play to the constraint relationship between the two, and the loss is calculated using the standard binary cross entropy loss function between positive and negative samples.

[0092]

[0093] in Yes The negative samples obtained by rearranging the rows and columns of D (·):R d×d →R is a discriminator function that takes two vectors as input and scores their consistency. The present invention uses point multiplication to score consistency; the learning goal of this part can be said to be to maximize the mutual information between the user's long-term preferences and short-term interest embeddings modeled from different angles.

[0094] Furthermore, the step 2.5 is specifically as follows: since step 2.4 effectively promotes more accurate acquisition of each other's information, it is still necessary to give full play to the complementary relationship between the two; the final representation of the user is obtained by adding:

[0095] Furthermore, the step 2.6 calculates the score of each item by multiplying the final user representation obtained in step 2.5 by the item set. Calculate the probability of each item appearing through softmax

[0096] Furthermore, the step 3 specifically comprises the following steps:

[0097] Step 3.1: Input the data in the training set into the self-supervised sequence recommendation model based on the user's long-term and short-term interests described in step 2 to obtain the user's final representation vector;

[0098] Step 3.2: Input the user's final representation vector into the prediction module to obtain the recommendation score of the user relative to the item;

[0099] Step 3.3: Update the model parameters by calculating the error between the predicted rating value and the true rating value to optimize the recommendation loss function, combined with the self-supervised loss in step 2.4 to obtain the final loss Where β is the weight, which is set to 0.01; repeated training obtains the optimal self-supervised sequence recommendation model based on users’ long-term and short-term interests.

[0100] Preferably, the recommendation loss function described in step 3.3 is specifically calculated as follows:

[0101]

[0102] Furthermore, step 4 inputs the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on the user's long-term and short-term interests trained in step 3, calculates the recommendation score of the item to be recommended relative to the user, and recommends the item to the user according to the recommendation score.

[0103] The step 4 sorts the project recommendation scores and recommends the top k projects with the highest scores to the user.

Claims

1. A self-supervised sequence recommendation method based on user long-term and short-term interests, characterized in that: The following steps are involved: Step 1: Obtain a sequence data set of user information, project information, and user behavior, preprocess the data set, and divide it into a training set and a test set; Step 2: Build a self-supervised sequence recommendation model based on users’ long-term and short-term interests; Step 3: Use the training set to train the self-supervised sequence recommendation model based on the user's long-term and short-term interests described in step 2; Step 4: Input the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on the user's long-term and short-term interests trained in step 3, calculate the recommendation score of the recommended item relative to the user, and recommend the item to the user according to the recommendation score; The step 1 specifically comprises the following steps: Step 1.1: Divide the user interaction sequence into long-term sequence L and short-term sequence S; Step 1.2: Construct a hypergraph G based on the short-term sequence S divided in step 1.1; Let G = (V, E) represent a hypergraph, where V contains N vertices, each vertex represents an item, E contains M hyperedges, each hyperedge ε∈E represents a session and contains five vertices; let each hyperedge be assigned a positive weight W εε Represents the weight of each item in the hyperedge, and all weights are formed into a diagonal matrix W∈R M×M ; The hypergraph is represented by an incidence matrix H∈R N×M , if the hyperedge ε∈E contains the vertex v i ∈V then H iε =1, otherwise 0; for each vertex and hyperedge, their degree is defined as Definition D h and B are both diagonal matrices; in order to utilize the order relationship between item interactions in a conversation, a degree matrix D in the order sense is defined p ∈R N×N Through the contextual relationship of the interaction items in each session, it is considered that the former affects the latter; Standardize for each project: Get the final vertex degree matrix: D=2×(D h +D p ); The step 2 constructs a self-supervised sequence recommendation model based on the user's long-term and short-term interests, which specifically includes the following steps: Step 2.1: Get the embedding representation of the item; Step 2.2: Input the user long-term sequence L and the item embedding representation divided in step 1.1 into the GRU layer, and capture the user's long-term interest θ through the feedforward neural network layer l ; Step 2.3: Convolve the hypergraph G constructed in step 1.2, and pass the convolution result and the user short-term interaction sequence S divided in step 1.1 through the soft attention layer to obtain the user's short-term interest representation θ s ; Step 2.4: The user's long-term interest θ obtained in step 2.2 l and the short-term interest θ obtained in step 2.3 s The self-supervised learning layer obtains the self-supervised loss L S ; Step 2.5: The user's long-term interest θ obtained in step 2.2 l and the short-term interest θ obtained in step 2.3 s The final user representation θ is obtained through the fusion layer; Step 2.6: Calculate the score of each candidate item based on the user's final expression.

2. According to claim 1, a self-supervised sequence recommendation method based on user long-term and short-term interests is characterized in that: Specifically, step 2.2 is to model the user's long-term preference according to the long-term sequence divided in step 1.1, use the GRU network to capture the evolution in the long-term sequence, and use the last hidden unit state as the user's long-term preference representation θ l .

3. The self-supervised sequence recommendation method based on user long-term and short-term interests according to claim 2, characterized in that: The step 2.3 performs hypergraph convolution, and the hypergraph convolution update project is represented as follows: Hypergraph convolution regards the formula from right to left as a convolution process from item to hyperedge and then to item; Represents the aggregation of information from vertices to hyperedges, and then multiplying H on the left aggregates the information from hyperedges to vertices; after L layers of convolution, the average of the results of all layers is used as the representation of the final project For a session s=[i s,1 ,i s,2 ,...,i s,m ], aggregate the items in the session to get the representation of the end user’s short-term interests θ s : a t =f T σ(W1x s +W2x t +b) where x s Indicates that the current session is averaged by the items in the session, x t represents the tth interaction item in the session, and the short-term interest representation is obtained by the soft attention mechanism from the items in the session; f∈R d , W1∈R d×d and W2∈R d×d Both are attention parameters used to learn weights.

4. According to claim 2, a self-supervised sequence recommendation method based on user long-term and short-term interests is characterized in that: The step 2.4 is specifically as follows: The contrastive learning method is used to give full play to the constraint relationship between the two, and the loss is calculated using the standard binary cross entropy loss function between positive and negative samples. in Yes The negative samples obtained by rearranging the rows and columns of D (·):R d×d →R is the discriminator function that takes two vectors as input and scores their consistency.

5. The self-supervised sequence recommendation method based on user long-term and short-term interests according to claim 2, characterized in that: Specifically, step 2.5 is as follows: since step 2.4 effectively promotes more accurate acquisition of each other's information, the final representation of the user is obtained by adding:

6. The self-supervised sequence recommendation method based on user long-term and short-term interests according to claim 2, characterized in that: Step 2.6 calculates the score of each item by multiplying the final user representation obtained in step 2.5 by the item set. Calculate the probability of each item appearing through softmax 7. The self-supervised sequence recommendation method based on user long-term and short-term interests according to claim 2, characterized in that: The step 3 specifically comprises the following steps: Step 3.1: Input the data in the training set into the self-supervised sequence recommendation model based on the user's long-term and short-term interests described in step 2 to obtain the user's final representation vector; Step 3.2: Input the user's final representation vector into the prediction module to obtain the recommendation score of the user relative to the item; Step 3.3: Update the model parameters by calculating the error between the predicted rating value and the true rating value to optimize the recommendation loss function, combined with the self-supervised loss in step 2.4 to obtain the final loss Where β is the weight, which is set to 0.01; repeated training obtains the optimal self-supervised sequence recommendation model based on users’ long-term and short-term interests.

8. The self-supervised sequence recommendation method based on user long-term and short-term interests according to claim 2, characterized in that: The step 4 inputs the personal information and interaction sequence of the user to be recommended into the self-supervised sequence recommendation model based on the user's long-term and short-term interests trained in step 3, calculates the recommendation score of the recommended item relative to the user, and recommends the item to the user according to the recommendation score.

Citation Information

Patent Citations

  • Interest recommendation method and system based on user sequence click behavior

    CN110807156A

  • Commodity list recommendation method based on long-term and short-term interest preferences

    CN111932336A