Session social recommendation model method based on gated graph neural network
By introducing gated graph neural network and graph attention mechanism in the recommendation system, combining user conversations and social information, the problems of sparse data and incomplete user interests in the existing recommendation system are solved, and more accurate and personalized recommendation effects are achieved.
Patent Information
- Application Number
- CN202510172977.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-06
AI Technical Summary
The existing session-based recommendation system and social recommendation system each have problems of sparse data and incomplete user interests, and fail to effectively combine user social information and conversation information.
A conversational social recommendation model based on gated graph neural network is proposed. By constructing user conversation graphs and social network graphs, using technologies such as GGNN and GAT, we can learn the complex transformation relationships and social impacts of user interests and obtain more accurate user interest representations.
It improves the accuracy of the recommendation system, can capture user interests more comprehensively, and combines conversations and social information to provide personalized recommendations.
Smart Images

Figure CN120104891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data recommendation based on conversational social networking, and solves recommendation-related problems through gated graph neural network technology. Background Art
[0002] With the rapid growth of information on the Internet, users are overwhelmed by the vast amount of information. Recommender systems are of great significance because they can make effective recommendations based on users' interests. In recent years, session-based recommender systems have received extensive attention. They extract rich information from user behaviors by collecting information about user-item interactions over a period of time. RNN has become a common method for capturing intra-session dependencies due to its excellent ability to process sequential data. GRU4Rec uses a variant of RNN, the gated recurrent unit (GRU) in session-based recommender systems, to learn long-term representations of sessions. The SR-GNN model first builds a session graph from the session sequence, then obtains session embeddings through a gated graph neural network (GGNN), and finally predicts special candidate items. Although session-based recommender systems have achieved great success due to the application of the above techniques, they ignore the fact that users' interests may be related not only to the items they interact with, but also to the friends they interact with. Session-based recommender systems do not consider users' social information, which may cause data sparsity problems for recommender systems.
[0003] Current social recommendation models generally use matrices to model user-item ratings and user preferences, and use matrix decomposition methods to learn user latent features and item latent features. These models further enrich user presentation by integrating trust relationships. Although existing social recommendation models have achieved certain results, there are still many problems: 1) Using matrices to model user preferences usually only considers the influence of the user's first-order neighbor information; 2) Users' explicit feedback information is usually used for recommendation, while ignoring the influence of users' implicit feedback, so accurate user representation cannot be obtained. Summary of the invention
[0004] A single session-based recommendation system or social recommendation system can only characterize one-sided user interests. If the two are combined, more accurate recommendation results can be obtained. In the field of session-based social recommendation systems, there has not been much progress. Modeling user sessions using RNN ignores the complex transformation of items. For longer sessions, it is easy to lose the item information in the front of the session, and the user's global interest session embedding is usually ignored when characterizing the user's interests. On this basis, the present invention proposes a novel session-based social recommendation model, which uses GGNN to process session sequences to better learn the complex transformation relationship of items, constructs a user session graph from user session sequences, uses GGNN to process the user session graph, and then mines the complex item interactions hidden in the graph structure to obtain more accurate information session embedding, and uses GAT to aggregate user social information in the social network graph to obtain a richer user interest representation, thereby improving the accuracy of recommendations.
[0005] A conversational social recommendation model method based on a gated graph neural network of the present invention comprises the following steps:
[0006] S1: Model preprocessing stage
[0007] S2: Session Embedding Layer
[0008] S3: Social Integration Layer
[0009] S4: Prediction layer
[0010] S5: Model training
[0011] Furthermore, the specific steps of S1 are:
[0012] S11. First, process the user's session information, and then aggregate the interests of the user and his friends on the social network to obtain their global interests, so as to make personalized recommendations for the target user. In order to better describe the problem, the following definition is given: Given a social network G = (U, E) and a set of items V, where U represents the user set and E represents the social connection between users. For each user u∈U, record his user-item interaction, and the interaction can be divided into multiple sessions sorted by time steps;
[0013]
[0014] in represents the user-item interaction of user u at timestamp T, session represents the Tth session sequence of user u, each session Both contain a series of user interaction items:
[0015]
[0016] in represents the Pth (1≤P≤N)th clicked item in the Tth session of user u, where N is the number of sessions The total number of items in , for each user, given a new session:
[0017]
[0018] The goal of the session-based social recommendation model is to Recommend the next item in V that the user is interested in, i.e. and the past conversation information of its social neighbors N(u), where N(u) is the friend set of user u;
[0019] S12. Specifically, for each user u∈U, first, his / her user-item interactions in a period of time are captured as a session, then a directed session graph is constructed from each session and input into the session embedding layer, and finally the session embedding S is obtained. h(u) ; Secondly, the session is embedded in S h(u) is fed to the social fusion layer as the initial representation of user u, i.e. Next, user u’s own features are aggregated through the graph attention network and L-layer neighbor features k∈N(u) to obtain the global embedding representation of the user Finally, the user's global representation The input is sent to the prediction layer, and then the similarity between the user’s global embedding and the item embedding is calculated, and the items are sorted according to the similarity, thereby completing personalized recommendations for users.
[0020] Furthermore, the specific method of S2 is:
[0021] S21. Previous recommendation models tend to use all the user's past historical interactions to obtain the user's long-term interests. However, user interaction information is not equally important for capturing the user's current interests, and user interests often change dynamically due to time migration. In order to better capture the user's dynamic interests, the user interaction information is modeled using the session sequence. Specifically, the current session sequence of each user u∈U is first captured. It is constructed as a graph, which is then input into the graph neural network. Finally, the current session representation is regarded as the user's own representation. The specific content of the session embedding layer is divided into three steps: constructing a session graph, generating item embedding, and generating session embedding.
[0022] S22. Each conversation sequence S can be modeled as a directed graph G s =(V s ,ε s) and the connection matrix A s , which corresponds to G s , where V s represents the itemset in session S, ε s Represents the set of edges S that connect items in a session. Each item in the session sequence is mapped to each node in the graph. Each edge in the graph (v s,i-1 ,v s,i )∈ε s Indicates that the user is in v s,i-1 Then click on the project v s,i i-1 in session S, matrix A s The connectivity matrix representing the session, which is the concatenation of two adjacency matrices - the out-degree matrix and the in-degree matrix To show the bidirectional transformation between the items in these two matrix sessions, matrix A s The i-th row of shows the interaction between node i and the rest of the nodes, and the values in the row represent the edge weights, where the matrix and The values in represent the weighted output edges and input edges of node i, the session graph and connection matrix of session S = {v1, v2, v3, v1, v4}, and the directed session graph G s It is composed of sessions S, which shows the complex in-and-out relationship connection matrix As between projects. s Constructed, connection matrix A s The structure of is not fixed, it varies according to the different strategies of constructing the conversation graph;
[0023] S23. The previous RNN model for processing conversation structure can only represent the one-way conversion pattern between items, and may lose complex item conversion information when there are repeated items and repeated edges in the conversation. Therefore, we consider using GGNN to learn the embedding μ∈R of each item v∈V after constructing the conversation graph. d (where d is the dimension), GGNN is a variant of GNN, which proposes a GRU-based gated update mechanism, applied to graph structures, which processes information in sequence models by iteratively updating node states by updating gates and resetting gates. Compared with the RNN model that easily loses information about the previous nodes in the sequence, it captures long-term memory and has the ability to process node information in long sequences, which can effectively alleviate the problems of gradient disappearance and gradient explosion. The gated graph neural network of the session embedding layer, where Represents all node features at time t-1 as the initial state of node i, Represent the features of node i at time t as hidden states, and then input them into the gated recurrent unit, after which the selection information is updated by gate z s and reset gate r s Keep, specifically, for the session graph Gs Each node v in s,i , and its update function is as follows:
[0024]
[0025] A s ∈R n×2n is by merging the out-degree matrix and the in-degree matrix The concatenation of the two adjacency matrices formed, A s,i ∈R 1×2n is a row in the concatenated matrix A s Corresponding to node v s,i , is a list of node vectors in session s, H∈R d×2d is the weight matrix, z s,i and r s,i are the update gate and reset gate respectively, ⊙ is the element-wise multiplication operator, μ i ∈R d is node v s,i The embedding vector of
[0026] For each session graph G s , the gated graph neural network processes all project node information simultaneously, The information representing the current status of item node i and its item neighbors (1) is used as the input of the t-layer graph neural network, and then the gate z is updated s,i and reset gate r s,i In the equation, (2) and (3) respectively determine which information is retained and discarded. In (4), from the previous state Current Status and reset gate r s,i Constructing candidate states Afterwards, update the gate z s,i Used to decide the retention candidate status and previous state The final item node embedding will be achieved after updating all nodes in the session graph until convergence.
[0027] S24. The classic session-based recommendation model always assumes that there is a potential representation of the user in each session, and directly uses the nodes involved in the session to represent the session embedding. Here, a fully connected layer called a dense layer is used to process the node embedding in the session. The dense layer processes the node embedding through dropout, and the session embedding is obtained after linear transformation:
[0028]
[0029] where W∈Rd*D is the weight matrix, d is the input dimension, D is the output dimension, b∈R D , X n It is the concatenation of the node vector list obtained from GGNN.
[0030]
[0031] Furthermore, the specific steps in S3 are:
[0032] S31. User interests are not only determined by the user's own interests, but also influenced by friends on social networks. Here, the social integration layer is used to aggregate information from social networks. First, the dynamic interests of the target user u are obtained. Short-term interests with friend k The session embedding layer then embeds the short-term interests of friend k With long-term interests (User static embedding vector representation) fusion to obtain friends' mixed interests Each node in the user social network graph represents a user node feature. The edges connecting the nodes indicate the social connections between users. The features of the user and his friends are aggregated through the graph attention mechanism to obtain the final embedding of the target user.
[0033] S32. In order to capture the dynamic interests of the target user u, GGNN is used to model the interaction information in the current session of user u. Specifically, the latest session of user u Feed it into the session embedding layer to obtain the latest embedding of session Suh, which is used as the target user h n The initial embedding f is Use the initial embedding h of user u n As the initial embedding of user u
[0034] S33. Since the dynamic interests of user u change over time, it is necessary to solicit the opinions of different friends according to different sessions, integrate the short-term and long-term interests of friends, and enrich the embedding of friends. For user u’s friend k∈N(u), its short-term interest is recorded as Its long-term interest is recorded as The method of obtaining friend k’s short-term interests is similar to the user’s dynamic interests. We use the conversation of friend k with timestamp T to obtain the short-term interests of the user. Feed the session embedding layer to get the session embedding As a short-term interest
[0035]
[0036] The long-term interests of friends reflect the average interests of friends, and the average interests are often insensitive to time changes. Therefore, a user single vector is used to represent the user long-term interests;
[0037]
[0038] The long-term and short-term interests of friends are connected through a nonlinear transformation to obtain the global interest of friend k:
[0039]
[0040] RELU() is a nonlinear activation function, W 1 is the transformation matrix, transforming friend k’s global interest s k As the initial embedding of friend k
[0041]
[0042] S34, above, we learned the embeddings of the target user u and his friend k, merged the user cluster into the social network graph, and combined the two embeddings through GAT, which improves the expressiveness of the model by assigning different importance to different nodes when dealing with neighbors of different numbers in the graph, thereby obtaining adaptive weight assignments for different neighbors;
[0043] Using graph attention mechanism to combine friends and user’s own embeddings, h u represents the initial embedding of the target user u. First, the user With Friends The similarity between:
[0044]
[0045] Afterwards, the weight coefficient Features of Aggregate Friends:
[0046]
[0047] The final representation of each node is obtained by stacking attention layers L times, and the embedding is composed of context-dependent friend features, using express.
[0048] Furthermore, the specific steps in S4 are:
[0049] S41. Since users’ interests depend on their own interests and social influence, the initial embedding h of the user is obtained through the fully connected layer. n and their social embeddedness Connect it up:
[0050]
[0051] Where W 2 is the linear transformation matrix is the final representation of user u’s current interest, and finally the softmax function is applied to obtain the probability of the next item y being clicked:
[0052]
[0053] Where Z y represents the embedding of item y, and |I| represents the total number of items.
[0054] Furthermore, the specific steps in S5 are:
[0055] S51. The recommendation task is similar to the classification task. Its purpose is to classify a given item, whether the target user u is interested in it or not. If true, it is recorded as 1, otherwise it is recorded as 0. Consider cross entropy as the loss function to train the model:
[0056]
[0057] The loss function is optimized using the gradient descent algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 Flowchart of this method
[0059] Figure 2 Embedding layer graph for session
[0060] Figure 3 Gated Graph Neural Network DETAILED DESCRIPTION
[0061] In order to facilitate those skilled in the art to understand and implement the present invention, the present invention is further described in detail below with reference to examples and drawings.
[0062] As attached Figure 1 As shown, a conversational social recommendation model method based on a gated graph neural network includes the following steps:
[0063] Step 1: Model preprocessing stage:
[0064] First, process the user's session information, and then aggregate the interests of the user and his friends on the social network to obtain their global interests, so as to make personalized recommendations for the target user. In order to better describe the problem, the following definition is given: Given a social network G = (U, E) and a set of items V, where U represents the user set and E represents the social connection between users. For each user u∈U, record his user-item interaction, and the interaction can be divided into multiple sessions sorted by time steps;
[0065]
[0066] in represents the user-item interaction of user u at timestamp T, session represents the Tth session sequence of user u, each session Both contain a series of user interaction items:
[0067]
[0068] in represents the Pth (1≤P≤N)th clicked item in the Tth session of user u, where N is the number of sessions The total number of items in , for each user, given a new session:
[0069]
[0070] The goal of the session-based social recommendation model is to Recommend the next item in V that the user is interested in, i.e. and the past conversation information of its social neighbors N(u), where N(u) is the friend set of user u;
[0071] Specifically, for each user u∈U, first, his / her user-item interactions in a period of time are captured as a session, then a directed session graph is constructed from each session and input into the session embedding layer, finally obtaining the session embedding S h(u) ; Secondly, the session is embedded in S h(u) is fed to the social fusion layer as the initial representation of user u, i.e. Next, user u’s own features are aggregated through the graph attention network and L-layer neighbor features k∈N(u) to obtain the global embedding representation of the user Finally, the user's global representation The input is sent to the prediction layer, and then the similarity between the user’s global embedding and the item embedding is calculated, and the items are sorted according to the similarity, thereby completing personalized recommendations for users.
[0072] Step 2, session embedding layer, the specific explanation is as follows:
[0073] Previous recommendation models tend to use all the user's past historical interactions to obtain the user's long-term interests. However, user interaction information is not equally important for capturing the user's current interests, and user interests often change dynamically due to time migration. In order to better capture the user's dynamic interests, the user interaction information is modeled using the session sequence. Specifically, the current session sequence of each user u∈U is first captured. It is constructed as a graph, which is then input into the graph neural network. Finally, the current session representation is regarded as the user's own representation. The specific content of the session embedding layer is divided into three steps: constructing a session graph, generating item embedding, and generating session embedding.
[0074] Each conversation sequence S can be modeled as a directed graph G s =(V s ,ε s ) and the connection matrix A s , which corresponds to G s , where V s represents the itemset in session S, ε s Represents the set of edges S that connect items in a session. Each item in the session sequence is mapped to each node in the graph. Each edge in the graph (v s,i-1 ,v s,i )∈ε s Indicates that the user is in v s,i-1 Then click on the project v s,i i-1 in session S, matrix A s The connectivity matrix representing the session, which is the concatenation of two adjacency matrices - the out-degree matrix and the in-degree matrix To show the bidirectional transformation between the items in these two matrix sessions, matrix A s The i-th row of shows the interaction between node i and the rest of the nodes, and the values in the row represent the edge weights, where the matrix and The values in represent the weighted output edges and input edges of node i, the session graph and connection matrix of session S = {v1, v2, v3, v1, v4}, and the directed session graph G s It is composed of sessions S, which shows the complex in-and-out relationship connection matrix As between projects. s Constructed, connection matrix A s The structure of is not fixed, it varies according to the different strategies of constructing the conversation graph;
[0075] The previous RNN model for processing conversational structures can only represent the one-way transition pattern between items, and may lose complex item transition information when there are repeated items and repeated edges in the conversation. Therefore, we consider using GGNN to learn the embedding μ∈R of each item v∈V after constructing the conversation graph. d (where d is the dimension), GGNN is a variant of GNN, which proposes a GRU-based gated update mechanism, applied to graph structures, which processes information in sequence models by iteratively updating node states by updating gates and resetting gates. Compared with the RNN model that easily loses information about the previous nodes in the sequence, it captures long-term memory and has the ability to process node information in long sequences, which can effectively alleviate the problems of gradient vanishing and gradient exploding. The gated graph neural network of the session embedding layer, where Represents all node features at time t-1 as the initial state of node i, Represent the features of node i at time t as hidden states, and then input them into the gated recurrent unit, after which the selection information is updated by gate z s and reset gate r s Keep, specifically, for the session graph G s Each node v in s,i , and its update function is as follows:
[0076]
[0077] A s ∈R n×2n is by merging the out-degree matrix and the in-degree matrix The concatenation of the two adjacency matrices formed;
[0078] A s,i ∈R 1×2n is a row in the concatenated matrix A s Corresponding to node v s,i , is a list of node vectors in session s, H∈R d×2d is the weight matrix, z s,i and r s,i are the update gate and reset gate respectively, ⊙ is the element-wise multiplication operator, μ i ∈R d is node v s,i The embedding vector of
[0079] For each session graph G s , the gated graph neural network processes all project node information simultaneously, The information representing the current status of item node i and its item neighbors (1) is used as the input of the t-layer graph neural network, and then the gate z is updated s,i and reset gate rs,i In the equation, (2) and (3) respectively determine which information is retained and discarded. In (4), from the previous state Current Status and reset gate r s,i Constructing candidate states Afterwards, update the gate z s,i Used to decide the retention candidate status and previous state The final item node embedding will be achieved after updating all nodes in the session graph until convergence.
[0080] S24. The classic session-based recommendation model always assumes that there is a potential representation of the user in each session, and directly uses the nodes involved in the session to represent the session embedding. Here, a fully connected layer called a dense layer is used to process the node embedding in the session. The dense layer processes the node embedding through dropout, and the session embedding is obtained after linear transformation:
[0081]
[0082] where W∈R d*D is the weight matrix, d is the input dimension, D is the output dimension, b∈R D , X n It is the concatenation of the node vector list obtained from GGNN.
[0083]
[0084] Step 3, social integration layer, the specific explanation is as follows:
[0085] The user's interests are not only determined by the user's own interests, but also influenced by friends on the social network. Here, the social fusion layer is used to aggregate information from the social network. First, the dynamic interests of the target user u are obtained. Short-term interests with friend k The session embedding layer then embeds the short-term interests of friend k With long-term interests (User static embedding vector representation) fusion to obtain friends' mixed interests Each node in the user social network graph represents a user node feature. The edges connecting the nodes indicate the social connections between users. The features of the user and his friends are aggregated through the graph attention mechanism to obtain the final embedding of the target user.
[0086] In order to capture the dynamic interests of the target user u, GGNN is used to model the interaction information in the current session of user u. Specifically, the latest session of user u Feed it into the session embedding layer to obtain the latest embedding of session Suh, which is used as the target user h n The initial embedding f is Use the initial embedding h of user u n As the initial embedding of user u
[0087] Since the dynamic interests of user u change over time, it is necessary to solicit the opinions of different friends according to different sessions, integrate the short-term and long-term interests of friends, and enrich the embedding of friends. For user u’s friend k∈N(u), its short-term interest is recorded as Its long-term interest is recorded as The method of obtaining friend k’s short-term interests is similar to the user’s dynamic interests. We use the conversation of friend k with timestamp T to obtain the short-term interests of the user. Feed the session embedding layer to get the session embedding As a short-term interest
[0088]
[0089] The long-term interests of friends reflect the average interests of friends, and the average interests are often insensitive to time changes. Therefore, a user single vector is used to represent the user long-term interests;
[0090]
[0091] The long-term and short-term interests of friends are connected through a nonlinear transformation to obtain the global interest of friend k:
[0092]
[0093] RELU() is a nonlinear activation function, W 1 is the transformation matrix, transforming friend k’s global interest s k As the initial embedding of friend k
[0094] S34, above, we learned the embeddings of the target user u and his friend k, merged the user cluster into the social network graph, and combined the two embeddings through GAT, which improves the expressiveness of the model by assigning different importance to different nodes when dealing with neighbors of different numbers in the graph, thereby obtaining adaptive weight assignments for different neighbors;
[0095] Using graph attention mechanism to combine friends and user’s own embeddings, h u represents the initial embedding of the target user u. First, the user With Friends The similarity between:
[0096]
[0097] Afterwards, the weight coefficient Features of Aggregate Friends:
[0098]
[0099] The final representation of each node is obtained by stacking attention layers L times, and the embedding is composed of context-dependent friend features, using express.
[0100] Step 4: The specific steps of the prediction layer are:
[0101] Since users’ interests depend on their own interests and social influence, the initial embedding h of the user is obtained through the fully connected layer n and their social embeddedness Connect it up:
[0102]
[0103] Where W 2 is the linear transformation matrix is the final representation of user u’s current interest, and finally the softmax function is applied to obtain the probability of the next item y being clicked:
[0104]
[0105] Where Z y represents the embedding of item y, and |I| represents the total number of items.
[0106] Step 5: The specific steps of model training are:
[0107] The recommendation task is similar to the classification task, and its purpose is to classify a given item, whether the target user u is interested in it or not. If true, it is recorded as 1, otherwise it is recorded as 0. Consider cross entropy as the loss function to train the model:
[0108]
[0109] The loss function is optimized using the gradient descent algorithm.
Claims
1. A conversational social recommendation model method based on a gated graph neural network, characterized in that The following steps are involved: S1: Model preprocessing stage S2: Session Embedding Layer S3: Social Integration Layer S4: Prediction layer S5: Model training.
2. According to claim 1, a conversational social recommendation model method based on a gated graph neural network is characterized in that In step S1: S11. First, process the user's session information, and then aggregate the interests of the user and his friends on the social network to obtain their global interests, so as to make personalized recommendations for the target user. In order to better describe the problem, the following definition is given: Given a social network G = (U, E) and a set of items V, where U represents the user set and E represents the social connection between users. For each user u∈U, record his user-item interaction, and the interaction can be divided into multiple sessions sorted by time steps; in represents the user-item interaction of user u at timestamp T, session represents the Tth session sequence of user u, each session Both contain a series of user interaction items: in represents the Pth (1≤P≤N)th clicked item in the Tth session of user u, where N is the number of sessions The total number of items in , for each user, given a new session: The goal of the session-based social recommendation model is to Recommend the next item in V that the user is interested in, i.e. and the past conversation information of its social neighbors N(u), where N(u) is the friend set of user u; S12. Specifically, for each user u∈U, first, his / her user-item interactions in a period of time are captured as a session, then a directed session graph is constructed from each session and input into the session embedding layer, and finally the session embedding S is obtained. h(u) ; Secondly, the session is embedded in S h(u) is fed to the social fusion layer as the initial representation of user u, i.e. Next, user u’s own features are aggregated through the graph attention network and L-layer neighbor features To obtain the global embedding representation of the user Finally, the user's global representation The input is sent to the prediction layer, and then the similarity between the user’s global embedding and the item embedding is calculated, and the items are sorted according to the similarity, thereby completing personalized recommendations for users.
3. According to claim 1, a conversational social recommendation model method based on a gated graph neural network is characterized in that The specific method of step S2 is: S21. Previous recommendation models tend to use all the user's past historical interactions to obtain the user's long-term interests. However, user interaction information is not equally important for capturing the user's current interests, and user interests often change dynamically due to time migration. In order to better capture the user's dynamic interests, the user interaction information is modeled using the session sequence. Specifically, the current session sequence of each user u∈U is first captured. It is constructed as a graph, which is then input into the graph neural network. Finally, the current session representation is regarded as the user's own representation. The specific content of the session embedding layer is divided into three steps: constructing a session graph, generating item embedding, and generating session embedding. S22. Each conversation sequence S can be modeled as a directed graph G s =(V s ,ε s ) and the connection matrix A s , which corresponds to G s , where V s represents the itemset in session S, ε s Represents the set of edges S that connect items in a session. Each item in the session sequence is mapped to each node in the graph. Each edge in the graph (v s,i-1 ,v s,i )∈ε s Indicates that the user is in v s,i-1 Then click on the project v s,i i-1 in session S, matrix A s The connectivity matrix representing the session, which is the concatenation of two adjacency matrices - the out-degree matrix and the in-degree matrix To show the bidirectional transformation between the items in these two matrix sessions, matrix A s The i-th row of shows the interaction between node i and the rest of the nodes, and the values in the row represent the edge weights, where the matrix and The values in represent the weighted output edges and input edges of node i, the session graph and connection matrix of session S = {v1, v2, v3, v1, v4}, and the directed session graph G s It is composed of sessions S, which shows the complex in-and-out relationship connection matrix As between projects. s Constructed, connection matrix A s The structure of is not fixed, it varies according to the different strategies of constructing the conversation graph; S23. The previous RNN model for processing conversation structure can only represent the one-way conversion pattern between items, and may lose complex item conversion information when there are repeated items and repeated edges in the conversation. Therefore, we consider using GGNN to learn the embedding μ∈R of each item v∈V after constructing the conversation graph. d (where d is the dimension), GGNN is a variant of GNN, which proposes a GRU-based gated update mechanism, applied to graph structures, which processes information in sequence models by iteratively updating node states by updating gates and resetting gates. Compared with the RNN model that easily loses information about the previous nodes in the sequence, it captures long-term memory and has the ability to process node information in long sequences, which can effectively alleviate the problems of gradient disappearance and gradient explosion. The gated graph neural network of the session embedding layer, where Represents all node features at time t-1 as the initial state of node i, Represent the features of node i at time t as hidden states, and then input them into the gated recurrent unit, after which the selection information is updated by gate z s and reset gate r s Keep, specifically, for the session graph G s Each node v in s,i , and its update function is as follows: A s ∈R n×2n is by merging the out-degree matrix and the in-degree matrix The concatenation of the two adjacency matrices formed, A s,i ∈R 1×2n is a row in the concatenated matrix A s Corresponding to node v s,i , is a list of node vectors in session s, H∈R d×2d is the weight matrix, z s,i and r s,i are the update gate and reset gate respectively, ⊙ is the element-wise multiplication operator, μ i ∈R d is node v s,i The embedding vector of For each session graph G s , the gated graph neural network processes all project node information simultaneously, The information representing the current status of item node i and its item neighbors (1) is used as the input of the t-layer graph neural network, and then the gate z is updated s,i and reset gate r s,i In the equation, (2) and (3) respectively determine which information is retained and discarded. In (4), from the previous state Current Status and reset gate r s,i Constructing candidate states Afterwards, update the gate z s,i Used to decide the retention candidate status and previous state The final item node embedding will be achieved after updating all nodes in the session graph until convergence. S24. The classic session-based recommendation model always assumes that there is a potential representation of the user in each session, and directly uses the nodes involved in the session to represent the session embedding. Here, a fully connected layer called a dense layer is used to process the node embedding in the session. The dense layer processes the node embedding through dropout, and the session embedding is obtained after linear transformation: where W∈R d*D is the weight matrix, d is the input dimension, D is the output dimension, b∈R D , X n It is the concatenation of the node vector list obtained from GGNN; 4. According to claim 1, a conversational social recommendation model method based on a gated graph neural network is characterized in that The specific method in step S3 is: S31. User interests are not only determined by the user's own interests, but also influenced by friends on social networks. Here, the social integration layer is used to aggregate information from social networks. First, the dynamic interests of the target user u are obtained. Short-term interests with friend k The session embedding layer then embeds the short-term interests of friend k With long-term interests (User static embedding vector representation) fusion to obtain friends' mixed interests Each node in the user social network graph represents a user node feature. The edges connecting the nodes indicate the social connections between users. The features of the user and his friends are aggregated through the graph attention mechanism to obtain the final embedding of the target user. S32. In order to capture the dynamic interests of the target user u, GGNN is used to model the interaction information in the current session of user u. Specifically, the latest session of user u Feed it into the session embedding layer to obtain the latest embedding of session Suh, which is used as the target user h n The initial embedding f is Use the initial embedding h of user u n As the initial embedding of user u S33. Since the dynamic interests of user u change over time, it is necessary to solicit the opinions of different friends according to different sessions, integrate the short-term and long-term interests of friends, and enrich the embedding of friends. For user u’s friend k∈N(u), its short-term interest is recorded as Its long-term interest is recorded as The method of obtaining friend k’s short-term interests is similar to the user’s dynamic interests. We use the conversation of friend k with timestamp T to obtain the short-term interests of the user. Feed the session embedding layer to get the session embedding As a short-term interest The long-term interests of friends reflect the average interests of friends, and the average interests are often insensitive to time changes. Therefore, a user single vector is used to represent the user long-term interests; The long-term and short-term interests of friends are connected through a nonlinear transformation to obtain the global interest of friend k: RELU() is a nonlinear activation function, W1 is a transformation matrix, and the global interest s of friend k is transformed. k As the initial embedding of friend k S34, above, we learned the embeddings of the target user u and his friend k, merged the user cluster into the social network graph, and combined the two embeddings through GAT, which improves the expressiveness of the model by assigning different importance to different nodes when dealing with neighbors of different numbers in the graph, thereby obtaining adaptive weight assignments for different neighbors; Using graph attention mechanism to combine friends and user’s own embeddings, h u represents the initial embedding of the target user u. First, the user With Friends The similarity between: Afterwards, the weight coefficient Features of Aggregate Friends: The final representation of each node is obtained by stacking attention layers L times, and the embedding is composed of context-dependent friend features, using express.
5. According to claim 1, a conversational social recommendation model method based on a gated graph neural network is characterized in that The specific steps in step S4 are: S41. Since users’ interests depend on their own interests and social influence, the initial embedding h of the user is obtained through the fully connected layer. n and their social embeddedness Connect it up: Where W2 is the linear transformation matrix is the final representation of user u’s current interest, and finally the softmax function is applied to obtain the probability of the next item y being clicked: Where Z y represents the embedding of item y, and |I| represents the total number of items.
6. According to claim 1, a conversational social recommendation model method based on a gated graph neural network is characterized in that The specific steps in step S5 are: S51. The recommendation task is similar to the classification task. Its purpose is to classify a given item, whether the target user u is interested in it or not. If true, it is recorded as 1, otherwise it is recorded as 0. Consider cross entropy as the loss function to train the model: The loss function is optimized using the gradient descent algorithm.