A multi-granularity conversation recommendation method integrating user interest status
Through the graph neural network and attention mechanism, combined with directed graphs and undirected graphs, user interest embedding vectors are generated, which solves the problem of traditional conversation recommendation methods failing to consider users' dynamic interests and item connections, and achieves efficient and accurate conversation recommendations. .
Patent Information
- Application Number
- CN202111498604.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-12-09
AI Technical Summary
Traditional conversational recommendation methods fail to effectively consider the connection between users' dynamic interests and items, and deep learning methods ignore item categories and user interest status, resulting in insufficient recommendation accuracy and efficiency.
A multi-granularity session recommendation method based on graph neural network is used to generate embedding vectors of items and item types by constructing directed and undirected graphs, and combines the attention mechanism with the user's interest status to improve the accuracy and efficiency of the recommendation model. .
It significantly improves the accuracy and efficiency of recommendations, can better capture user interests, reduce noise interference, enhance the robustness of the model, and overcomes the slow calculation problem of traditional methods under large-scale commodity data.
Smart Images

Figure CN114169968B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of session recommendation, and in particular relates to a multi-granularity session recommendation method integrating user interest states. Background Art
[0002] With the rapid growth of Internet information, recommendation systems are becoming more and more important. They can help users select information of interest in various Web application fields, such as music, video, and e-commerce websites. Session-based recommendation systems study the interactive information generated by users during consumption or browsing, and mine the general preferences of users to recommend suitable products to users.
[0003] Traditional session-based recommendation methods mainly include evidence decomposition, item-based domain recommendation methods, Markov decision process, etc. However, as the number of products increases, the time cost of recommending products by traditional methods such as evidence decomposition also increases dramatically. In addition, these methods tend to ignore the dynamic interests of users. For example, the interests generated by users during the consumption process are not static, but change with the user's interaction process.
[0004] The conversation recommendation method based on deep learning mainly adopts recurrent neural network (RNN) or methods based on recurrent neural network. However, this method only considers the information of each product and ignores the connection between various products. Graph neural network (GNN) effectively solves this problem. GNN is a connectionist model that transmits information through the relationship between nodes in the graph, greatly enhancing the connection between various products. However, this method does not take into account the type of clicked items and the different interest states of users. Therefore, the present invention proposes a multi-granularity conversation recommendation method that integrates user interest states to improve the deficiencies in the existing technical solutions. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above two types of conversational recommendation methods: most of the traditional conversation-based recommendation methods do not consider the temporal relationship of the user's click sequence; and most of the conversation-based deep learning methods do not consider the category of items and the different interest states of users. A multi-granularity conversational recommendation method that integrates user interest states is proposed to meet users' needs for accuracy and efficiency in recommending various products.
[0006] A conversation recommendation method based on user interests comprises the following steps:
[0007] Step (1): Get session data s with timing information k , forming a conversation data set S = {s1, s2...s k};
[0008] Step (2): Divide the training set and the test set;
[0009] In the acquired conversation data set, the conversation data of the last d days is selected as the test set, and the rest is the training set;
[0010] Step (3): Conversation sequence diagram representation.
[0011] Step (4): Build a conversational recommendation model that integrates user interest status and train it using the training set;
[0012] The user interest state fusion conversation recommendation model includes input layer, embedding layer, interest representation layer, attention layer, and prediction layer;
[0013] 1. The input layer is used to receive the item directed graph relationship matrix P formed by each session v , the item undirected graph relationship matrix Q v And the item category directed graph relationship matrix P c , item category undirected graph relationship matrix Q c ;
[0014] 2. Embedding layer: Use GNN graph neural network to embed the item directed graph relationship matrix P of the input layer v , the item undirected graph relationship matrix Q v , species category directed graph relationship matrix P c , species category undirected graph relationship matrix Q c Analyze and get the directed graph item embedding vector , the directed graph item category embedding vector , undirected graph item embedding vector , undirected graph item category embedding vector
[0015] The learning and updating process of the GNN graph neural network to generate embedded vectors is as follows:
[0016]
[0017]
[0018] in It represents the context representation of node i (which can be an item or item type) in the directed graph and undirected graph at time t. Represents the d-dimensional vector formed by node n at time t-1, and its initial state o n is a node in the current directed or undirected graph, which can be v n or c n ;P irepresents the i-th row element in the relationship matrix P, P=P v or P c ;Q i represents the i-th row element in the relationship matrix Q, Q=Q v or Q c ; H p Indicates P i arrive The weight matrix of q Indicates Q i arrive The weight matrix of p Indicates P i arrive The bias value, b q Indicates Q i arrive The bias value of
[0019]
[0020]
[0021]
[0022]
[0023] in, represents the update gate and reset gate, which control the discarding and generation of node vectors respectively; Represents the context representation of node i at time t, which generally refers to Right now or W z Indicated by arrive The parameter matrix, G z Indicated by arrive The parameter matrix of r Indicated by arrive The parameter matrix, G r Indicated by arrive The parameter matrix, W e Indicated by arrive The parameter matrix, G e Indicated by arrive The parameter matrix of represents the newly generated information about node i at time t, Represents the d-dimensional vector formed by node i at time t. Depending on the type of directed or undirected graph and the type of node, The corresponding embedding vectors of directed or undirected graphs represented as items and item types can be calculated in They represent the embedding vectors of the items and item types corresponding to the directed graph, Respectively represent the embedding vectors of the items and item types corresponding to the undirected graph;
[0024] 3. Interest representation layer: embedding vector output in the embedding layer Fusion is performed to obtain the final embedding vector representing user interests;
[0025] a) Embedding vectors of items and item types output in the embedding layer Perform vector fusion according to formula (10-11) to generate the dynamic interest vector of item i and the static interest vector of item i
[0026]
[0027]
[0028] Where W d Indicates that Compress to d-dimensional vector The parameter matrix, W s Indicates that Compress to d-dimensional vector The parameter matrix of
[0029] b) Yes Add different weight ratios to generate user interest embedding vectors;
[0030]
[0031] Where λ represents the weight, T i Represents the embedding vector of user’s interest in item i;
[0032] 4. Attention layer: Use the attention mechanism to add different attention weights to the embedding vector of user interest output by the interest representation layer; and fuse the embedding vectors of user interest in each item to generate the interest embedding vector z that fuses the attention mechanism;
[0033] α i =w T sigmod(W1T i +W2T n +δ) (13)
[0034]
[0035] Where W1 represents the i to α i The parameter matrix, W2, is represented by T n to α i Parameter matrix, w represents a weight vector, δ represents the bias value, α i Indicates T i The attention weight score of
[0036] 5. Output layer: The output layer uses the softmax function to calculate the score of the item that the user clicks next time , select the k items with the largest scores as the final output results of the conversation recommendation model, and the corresponding items are the items recommended by the conversation recommendation model;
[0037]
[0038]
[0039] in represents the final predicted embedding vector, Representation vector The i-th position element in;
[0040] As a preference, the loss function during training is as follows:
[0041]
[0042] Where m represents the number of items during training, represents the predicted score of item i, y (i) represents the one-hot encoding of item i; δ represents the regularization coefficient (δ>0), and W represents all training parameters in the model;
[0043] Step (5): Use the test set to test the above trained fusion user interest state conversation recommendation method, and then use the tested fusion user interest state conversation recommendation method to implement conversation recommendation.
[0044] Compared with the prior art, the present invention has the following advantages:
[0045] (1) High accuracy: Compared with traditional conversation recommendation methods, the present invention captures the user's dynamic interests and static interests by establishing directed graphs and undirected graphs respectively, fully considering the interactive characteristics of the conversation and the user's interest status, and adding different weights to different interest features, which can capture user interests more accurately. The user interest embedding vector is modeled through the attention mechanism, which greatly improves the accuracy of the recommendation model. The present invention overcomes the problem that traditional methods ignore the relationship between the items clicked by users due to the lack of consideration of the time attribute of the conversation sequence. In the conversation recommendation method with time attributes, the present invention has better performance.
[0046] (2) High recommendation efficiency: The present invention constructs directed and undirected graphs to store product session data, and uses a GNN neural network to generate embedding vectors for the products and product categories of each session. This overcomes the problem of slow calculation of traditional matrix decomposition methods under large-scale product data, and greatly improves the efficiency of product recommendations.
[0047] (3) Strong robustness: The present invention incorporates the category characteristics of commodities when constructing user interest features, which can efficiently and stably extract user interest features, reduce the interference of noise data in the conversational recommendation system, and greatly improve the robustness of the recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a framework diagram of a conversational recommendation model that integrates user interest status;
[0049] Figure 2 A flowchart of a multi-granularity conversation recommendation method integrating user interest status;
[0050] Figure 3 Generate a schematic diagram for the node relationship matrix of the directed graph G(V,E1);
[0051] Figure 4 is an undirected graph Schematic diagram of node relationship matrix generation;
[0052] Figure 5 This is a comparison chart of the precision@20 of the method recommended by the present invention and other methods;
[0053] Figure 6 This is a comparison chart of MRR@20 between the method recommended by the present invention and other methods. DETAILED DESCRIPTION
[0054] The implementation steps of the present invention are further described below in conjunction with the accompanying drawings.
[0055] Figure 1The figure shows the framework diagram of the multi-granularity conversational recommendation model based on user interests. First, the conversation data generated when the user browses the goods is obtained, and the test set and the training set are generated by dividing the conversation data set. Next, the training set data set enters the conversation sequence graph representation module, and the directed graph and undirected graph of the items and item types in each conversation are respectively established, and the corresponding relationship matrix is generated. The user interest vector is generated by constructing a deep learning network, and the corresponding weight is added to it to characterize the user interest. The attention mechanism is added to the user interest through the attention network, and the softmax function is used to calculate the score of the corresponding item. Finally, the model of the present invention is trained, and the recommended goods are returned to the user.
[0056] See also Figure 2 , which is a flow chart of a multi-granularity session recommendation method integrating user interest status proposed by the present invention, specifically comprising the following steps:
[0057] Step (1): Get session data s with timing information k , forming a conversation data set S = {s1, s2...s k}.
[0058] The session data k It contains the session occurrence time set T, the clicked item set V and the corresponding item category set C. The session occurrence time set T = {t1, t2...t n}, t n Indicates session k The time when the nth click occurs; the set of clicked items V = {v1,v2...v n},v n Indicates session k The item number of the nth click; the category set of items C = {c1, c2...c n},c n Indicates session k The type of item clicked in the nth interaction.
[0059] A session refers to the process of communication between an end user and an interactive system, and records some of the user's interaction information.
[0060] Step (2): Divide the data into training set and test set; select the conversation data of the most recent d days from the acquired conversation data set as the test set, and the rest as the training set.
[0061] Step (3): Conversation sequence diagram representation
[0062] Step (3.1) constructs the directed graph G(V,E1), G(C,E2)
[0063] For each session data s in the session data set Sk According to the session occurrence time t m The item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2) are constructed in the order of the order of the items clicked. V and C represent the nodes in the directed graphs G(V,E1) and G(C,E2) respectively. E1 represents the edge connecting the item nodes in the directed graph G(V,E1). E2 represents the edge connecting the item category nodes in the directed graph G(C,E2).
[0064] Step (3.2), directed graph node relationship matrix generation
[0065] See also Figure 3 Generate a schematic diagram for the node relationship matrix of the directed graph G(V,E1).
[0066] According to the directed graphs G(V,E1) and G(C,E2), the node relationship matrix P of the corresponding directed graphs is generated respectively v ,P c ; in It is represented as the in-degree matrix of the item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2). Each element in the in-degree matrix represents the in-degree of the corresponding node after normalization. It is represented as the out-degree matrix of the item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2). Each element in the out-degree matrix represents the out-degree of the corresponding node after normalization.
[0067] The normalization processing formula is as follows:
[0068]
[0069] where a k,r represents the value of the element in the kth row and rth column to be normalized, Represents the normalized value of the element in the kth row and the rth column;
[0070] Step (3.3) Construct an undirected graph of item relationships , undirected graph of item category relationships :Convert the directed edges in the item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2) into undirected edges to form an item relationship undirected graph Undirected graph of relationship between item categories The above technology is an existing conventional technology, so it is not explained in detail;
[0071] Step (3.4) Generate the undirected graph node relationship matrix.
[0072] See also Figure 4 is an undirected graph Schematic diagram of node relationship matrix generation.
[0073] Undirected graph based on item relationships Undirected graph of relationships between item categories , respectively generate the item relationship matrix Q corresponding to the undirected graph v And item category relationship matrix Q c ; where Q v ,Q c The element value in Satisfies the following relationship:
[0074]
[0075]
[0076] in They represent the corresponding element values in the in-degree matrix and out-degree matrix of the item click sequence and item category click sequence respectively.
[0077] Step (3.5) According to formula (1), the relationship matrix Q v ,Q c The element value in Perform normalization.
[0078] Step (4): Build a conversation recommendation method that integrates user interest status and use the training set for training;
[0079] Figure 1 The figure shows the framework diagram of the conversation recommendation method integrating user interest status, which specifically includes input layer, embedding layer, interest representation layer, attention layer, and prediction layer;
[0080] 1. The input layer is used to receive the item directed graph relationship matrix P formed by each session v , the item undirected graph relationship matrix Q v And the item category directed graph relationship matrix P c , item category undirected graph relationship matrix Q c ;
[0081] 2. Embedding layer: Use GNN graph neural network to embed the item directed graph relationship matrix P of the input layer v , the item undirected graph relationship matrix Q v , species category directed graph relationship matrix P c , species category undirected graph relationship matrix Q c Analyze and get the directed graph item embedding vector , the directed graph item category embedding vector , undirected graph item embedding vector , undirected graph item category embedding vector
[0082] The learning and updating process of the GNN graph neural network to generate embedded vectors is as follows:
[0083]
[0084]
[0085] in It represents the context representation of node i (which can be an item or item type) in the directed graph and undirected graph at time t. i∈[1,n]; Represents the d-dimensional vector formed by node n at time t-1, and its initial state o n is a node in the current directed or undirected graph, which can be v n or c n ;P i represents the i-th row element in the relationship matrix P, P=P v or P c ;Q i represents the i-th row element in the relationship matrix Q, Q=Q v or Q c ; H p Indicates P i arrive The weight matrix of q Indicates Q i arrive The weight matrix of p Indicates P i arrive The bias value, b q Indicates Q i arrive The bias value of
[0086]
[0087]
[0088]
[0089]
[0090] in, represents the update gate and reset gate, which control the discarding and generation of node vectors respectively; Represents the context representation of node i at time t, which generally refers to ,Right now or W z Indicated by arrive The parameter matrix, G z Indicated by arrive The parameter matrix of r Indicated by arrive The parameter matrix, G r Indicated by arrive The parameter matrix, W e Indicated by arrive The parameter matrix, G e Indicated by arrive The parameter matrix of represents the newly generated information about node i at time t, Represents the d-dimensional vector formed by node i at time t. Depending on the type of directed or undirected graph and the type of node, The corresponding embedding vectors of directed or undirected graphs represented as items and item types can be calculated ;in They represent the embedding vectors of the items and item types corresponding to the directed graph, Respectively represent the embedding vectors of the items and item types corresponding to the undirected graph;
[0091] 3. Interest representation layer: embedding vector output in the embedding layer Fusion is performed to obtain the final embedding vector representing user interests;
[0092] a) Embedding vectors of items and item types output in the embedding layer , perform vector fusion according to formula (10-11) to generate the dynamic interest vector of item i and the static interest vector of item i
[0093]
[0094]
[0095] Where W d Indicates that Compress to d-dimensional vector The parameter matrix, W s Indicates that Compress to d-dimensional vector The parameter matrix of
[0096] b) Yes Add different weight ratios to generate user interest embedding vectors;
[0097]
[0098] Where λ represents the weight, T i Represents the embedding vector of user’s interest in item i;
[0099] 4. Attention layer: Use the attention mechanism to add different attention weights to the embedding vector of user interest output by the interest representation layer; and fuse the embedding vectors of user interest in each item to generate the interest embedding vector z that fuses the attention mechanism;
[0100] α i =w T sigmod(W1T i +W2T n +δ) (13)
[0101]
[0102] Where W1 represents the i to α i The parameter matrix, W2, is represented by T n to α i Parameter matrix, w represents a weight vector, δ represents the bias value, α i Indicates T i The attention weight score of
[0103] 5. Output layer: The output layer uses the softmax function to calculate the score of the item that the user clicks next time , select the k items with the largest scores as the final output results of the conversation recommendation model, and the corresponding items are the items recommended by the conversation recommendation model;
[0104]
[0105]
[0106] in represents the final predicted embedding vector, Representation vector The i-th position element in;
[0107] The loss function during training is as follows:
[0108]
[0109] Where m represents the number of items during training, represents the predicted score of item i, y (i)represents the one-hot encoding of item i; δ represents the regularization coefficient (δ>0), and W represents all training parameters in the model;
[0110] An adaptive momentum estimation algorithm (Adam) is used to train a multi-granularity conversation recommendation method that integrates user interest states proposed in the present invention to minimize the loss function and obtain the optimal model parameters.
[0111] The steps of the Adam optimization algorithm are as follows:
[0112] a) Adam optimizer parameter setting.
[0113] The parameters of the Adam optimizer include exponential decay rates u, v, set to 0.9 and 0.999; learning rate θ, set to 0.0001; small constant ζ, set to 10 -8 .
[0114] b) Calculate biased first-order moment estimates and second-order moment estimates
[0115]
[0116]
[0117] Where m (r) ,n (r) Indicates that the rth iteration has biased first-order moment estimation and second-order moment estimation, and the initial Represents the gradient of the required cost function.
[0118] c) Update iteration ω
[0119]
[0120] in represents the biased first-order moment estimate and second-order moment estimate of the r-th round of iteration correction,
[0121] Step (5): Use the test set to test the above trained fusion user interest state conversation recommendation method, and then use the tested fusion user interest state conversation recommendation method to implement conversation recommendation.
[0122] The following is a comparison between the multi-granularity session recommendation method based on user interests and the traditional session recommendation method:
[0123] The evaluation of the present invention was conducted using the Baseline method, and the experimental configuration was an Intel Core i7-8700K 3.7GHz processor, 16GB 3000MHz RAM, Nvidia GeForce RTX3060 graphics card, and a 64-bit Windows 10 operating system. The datasets used for the training samples are the public Yoochoose dataset and the Diginetica dataset. For the Yoochoose dataset, the session data of the most recent day was selected as the test set; for the Diginetica dataset, the session data of the most recent 7 days was selected as the test set. In addition, since the Yoochoose dataset has a large amount of data, in order to facilitate model training, in this experiment, the Yoochoose dataset was divided into two datasets, Yoochoose1 / 64 and Yoochoose1 / 4, for training, where Yoochoose1 / 64 means the most recent 1 / 64 session data in the Yoochoose dataset; Yoochoose1 / 4 means the most recent 1 / 4 session data in the Yoochoose dataset.
[0124] In the model evaluation, this experiment compares the accuracy @K and MRR@K of the recommendation method. Accuracy @K is used to measure the accuracy of the recommendation method, indicating the proportion of correctly recommended items in the first K items in the recommendation list; MRR@K represents the average reciprocal ranking. This indicator adds the influence of the position of the product in the recommendation list based on accuracy @K. The higher the ranking of the product in the recommendation list, the larger the MRR@K value, and vice versa.
[0125] In the experimental evaluation, the recommendation methods compared by the present invention include Item-KNN, GRU4Rec, and NARM. Figure 5 This is a comparison chart of the accuracy rate @20 between the method recommended by the present invention and other methods. Figure 5 It can be found that since the present invention captures the user's dynamic interests and static interests by establishing directed graphs and undirected graphs, a dynamic interest vector is generated. and static interest vector The interactive characteristics of the session and the user's interest status are fully considered, and Adding different weight ratios to generate user interest embedding vectors can more accurately capture user interests, and adding attention mechanisms to model user interest embedding vectors overcomes the problem that traditional methods ignore the relationship between items clicked by users due to the lack of consideration of the time attributes of the session sequence. Compared with Item-KNN, GRU4Rec, and NARM session recommendation methods, the accuracy @20 values of the present invention on the three data sets of Yoochoose1 / 64, Yoochoose1 / 4, and Diginetica have been significantly improved, reaching 71.28%, 71.56%, and 52.75%, respectively, indicating that the probability of accurate recommendation has been significantly improved in the 20 recommended items generated in the recommendation list. In addition, the present invention has also achieved relatively significant results in the MRR@20 indicator. Figure 6 This is a comparison chart of MRR@20 between the method recommended by the present invention and other methods. Figure 6 It can be found that compared with Item-KNN, GRU4Rec, and NARM conversational recommendation methods, the MRR@20 of the method of the present invention on the Yoochoose and Diginetica datasets is also significantly improved. The MRR@20 of the present invention on the Yoochoose1 / 64 dataset is improved by about 2.74% compared with the NARM method, reaching 31.37%; it is improved by about 2.95% on the Yoochoose1 / 4 dataset, reaching 32.18%; it is also improved by about 2.36% on the Diginetica dataset, reaching 18.53%, further indicating that the accuracy of recommended products has been effectively improved.
[0126] In summary, the above experimental results all show that the multi-granularity conversation recommendation method of the present invention that integrates user interest status captures the user's interest status by establishing directed and undirected graphs. By establishing a GNN graph neural network to generate item and item category embedding vectors and combining it with an attention mechanism, the model can achieve ideal results when recommending items to users, can meet the user's interest needs, and has high accuracy and recommendation efficiency.
[0127] The above embodiments are only used to help understand the method and core idea of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
[0128] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.
Claims
1. A multi-granularity conversation recommendation method integrating user interest status, characterized in that The following steps are involved: Step (1): Get session data s with timing information k , forming a conversation data set S = {s1, s2...s k }; The session data k It contains the session occurrence time set T, the clicked item set V and the corresponding item category set C; where the session occurrence time set T = {t1, t2...t n }, t n Indicates session k The time when the nth click occurs; the set of clicked items V = {v1,v2...v n },v n Indicates session k The item number of the nth click; the category set of items C = {c1, c2...c n }, c n Indicates session k The type of item clicked in the nth interaction; Step (2): Divide the training set and the test set; In the acquired conversation data set, the conversation data of the last d days is selected as the test set, and the rest is the training set; Step (3): Conversation sequence diagram representation Step (3.1), construct directed graphs G(V,E1), G(C,E2) For each session data s in the session data set S k According to the session occurrence time t m The item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2) are constructed in the order of the order of the items clicked. V and C represent the nodes in the directed graphs G(V,E1) and G(C,E2) respectively. E1 represents the edge connecting the item nodes in the directed graph G(V,E1). E2 represents the edge connecting the item category nodes in the directed graph G(C,E2). Step (3.2), directed graph node relationship matrix generation According to the directed graphs G(V,E1) and G(C,E2), the node relationship matrix P of the corresponding directed graphs is generated respectively v ,P c ;P v =[P v in ;P v out ],P c =[P c in ; P c out ], where P v in ,P c in It is represented as the in-degree matrix of the item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2). Each element in the in-degree matrix represents the in-degree of the corresponding node after normalization. v out ,P c out It is represented as the out-degree matrix of the item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2). Each element in the out-degree matrix represents the out-degree of the corresponding node after normalization. Step (3.3): Construct an undirected graph of item relationships Undirected graph of item category relationships Convert the directed edges in the item click sequence directed graph G(V,E1) and the item category click sequence directed graph G(C,E2) into undirected edges to form an item relationship undirected graph Undirected graph of relationships between item categories Step (3.4), generate the undirected graph node relationship matrix: Undirected graph based on item relationships Undirected graph of relationships between item categories Generate the item relationship matrix Q corresponding to the undirected graph respectively v And item category relationship matrix Q c ; where Q v ,Q c The element value Q in v (i,j) , Satisfies the following relationship: in Respectively represent the corresponding element values in the in-degree matrix and out-degree matrix of the item click sequence and item category click sequence; Step (3.5), for the relationship matrix Q v ,Q c The element value Q in v (i,j) , Perform normalization processing; Step (4): Build a conversation recommendation model that integrates user interest status and train it using the training set; The conversation recommendation model integrating user interest status includes an input layer, an embedding layer, an interest representation layer, an attention layer, and a prediction layer; Step (5): Use the test set to test the conversation recommendation model that integrates user interest status after training, and then use the tested conversation recommendation model that integrates user interest status to implement conversation recommendation.
2. According to claim 1, a multi-granularity conversation recommendation method integrating user interest status is characterized in that The normalization formulas described in step (3.2) and step (3.5) are as follows: where a k,r represents the value of the element in the kth row and rth column to be normalized, Represents the normalized value of the element in the kth row and the rth column.
3. According to claim 1, a multi-granularity conversation recommendation method integrating user interest status is characterized in that The input layer of the conversation recommendation model integrating user interest status is used to receive the item directed graph relationship matrix P of each conversation. v , the item undirected graph relationship matrix Q v And the item category directed graph relationship matrix P c , item category undirected graph relationship matrix Q c .
4. The multi-granularity conversation recommendation method integrating user interest status according to claim 3 is characterized in that The embedding layer in the conversational recommendation model that integrates user interest states uses the GNN graph neural network to embed the item directed graph relationship matrix P of the input layer. v , the item undirected graph relationship matrix Q v , species category directed graph relationship matrix P c , species category undirected graph relationship matrix Q c Analyze and get the directed graph item embedding vector Directed graph item category embedding vector Undirected graph item embedding vector Undirected graph item category embedding vector 5. A multi-granularity conversation recommendation method integrating user interest status according to claim 4, characterized in that The learning and updating process of the GNN graph neural network to generate embedded vectors is as follows: in represents the context representation of node i in the directed graph and undirected graph at time t, Represents the d-dimensional vector formed by node n at time t-1, and its initial state o n is a node in the current directed or undirected graph, that is, v n or c n ;P i represents the i-th row element in the relationship matrix P, P=P v or P c ;Q i represents the i-th row element in the relationship matrix Q, Q=Q v or Q c ;H p , H p Indicates P i arrive The weight matrix of q Indicates Q i arrive The weight matrix of p Indicates P i arrive The bias value, b q Indicates Q i arrive The bias value of in, represents the update gate and reset gate, which control the discarding and generation of node vectors respectively; represents the context representation of node i at time t, that is, or W z Indicated by arrive The parameter matrix, G z Indicated by arrive The parameter matrix of r Indicated by arrive The parameter matrix, G r Indicated by arrive The parameter matrix, W e Indicated by arrive The parameter matrix, G e Indicated by arrive The parameter matrix of represents the newly generated information about node i at time t, Represents the d-dimensional vector formed by node i at time t. Depending on the type of directed or undirected graph and the type of node, Represented as a directed or undirected graph of items and item types corresponding to the embedding vector in They represent the embedding vectors of the items and item types corresponding to the directed graph, They represent the embedding vectors of the items and item types corresponding to the undirected graph respectively.
6. A multi-granularity conversation recommendation method integrating user interest status according to claim 4 or 5, characterized in that The interest representation layer in the conversation recommendation model integrating user interest status is used to embed the embedding vector output in the embedding layer. The fusion is performed to obtain the final embedding vector representing the user's interest.
7. A multi-granularity conversation recommendation method integrating user interest status according to claim 6, characterized in that The interest representation layer is specifically: a) Embedding vectors of items and item types output in the embedding layer Perform vector fusion according to formula (10-11) to generate the dynamic interest vector of item i and the static interest vector of item i Where W d Indicates that Compress to d-dimensional vector The parameter matrix, W s Indicates that Compress to d-dimensional vector The parameter matrix of b) Yes Add different weight ratios to generate user interest embedding vectors; Where λ represents the weight, T i Represents the embedding vector of user’s interest in item i.
8. The multi-granularity conversation recommendation method integrating user interest status according to claim 1 is characterized in that The attention layer in the conversational recommendation model integrating user interest states uses an attention mechanism to add different attention weights to the embedding vector of user interest output by the interest representation layer; And fuse the user's interest embedding vectors for each item to generate the interest embedding vector z of the fusion attention mechanism; α i =w T sigmod(W1T i +W2T n +δ) (13) Where W1 represents the i to α i The parameter matrix, W2, is represented by T n to α i Parameter matrix, w represents a weight vector, δ represents the bias value, α i Indicates T i The attention weight score.
9. The multi-granularity conversation recommendation method integrating user interest status according to claim 1 is characterized in that The output layer of the conversational recommendation model that integrates user interest states uses a softmax function to calculate the score of the item that the user clicks next time. Select the k items with the largest scores as the final output results of the conversation recommendation model, and the corresponding items are the items recommended by the conversation recommendation model; in represents the final predicted embedding vector, Representation vector The i-th element in .
10. The multi-granularity conversation recommendation method integrating user interest status according to claim 1 is characterized in that The loss function in the training process of the conversation recommendation model integrating user interest status is as follows: Where m represents the number of items during training, represents the predicted score of item i, y (i) represents the one-hot encoding of item i; δ represents the regularization coefficient (δ>0), and W represents the model parameters.
