CN114169968A - Multi-granularity session recommendation method fusing user interest states - Google Patents

Multi-granularity session recommendation method fusing user interest states Download PDF

Info

Publication number
CN114169968A
CN114169968A CN202111498604.XA CN202111498604A CN114169968A CN 114169968 A CN114169968 A CN 114169968A CN 202111498604 A CN202111498604 A CN 202111498604A CN 114169968 A CN114169968 A CN 114169968A
Authority
CN
China
Prior art keywords
interest
graph
item
matrix
article
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111498604.XA
Other languages
Chinese (zh)
Inventor
袁友伟
郑超
彭瀚
周威炜
鄢腊梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202111498604.XA priority Critical patent/CN114169968A/en
Publication of CN114169968A publication Critical patent/CN114169968A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention discloses a multi-granularity session recommendation method fusing user interest states. The invention obtains the conversation data with time sequence information to form a conversation data set; constructing a directed graph and an article category relation undirected graph; and constructing a session recommendation model based on the user interest, and training by using a training set. According to the invention, the directed graph and the undirected graph are respectively established and the characteristics of the articles and the article types are fused so as to capture the dynamic interest and the static interest of the user, the interactive characteristics of the session and the interest state of the user are fully considered, different weights are added to different interest characteristics, and the user interest can be more accurately captured. The user interest embedded vector is modeled through an attention mechanism, and the accuracy of the recommendation model is greatly improved. The invention overcomes the problem that the relation of the items which are clicked by the user and are ignored is not considered by the time attribute of the conversation sequence in the traditional method, and is more excellent in the conversation recommendation containing the time attribute.

Description

Multi-granularity session recommendation method fusing user interest states
Technical Field
The invention belongs to the technical field of session recommendation, and particularly relates to a multi-granularity session recommendation method fusing user interest states.
Background
With the rapid growth of the amount of internet information, recommendation systems become more and more important, which can help users select information of interest in various Web application fields, such as music, video, and e-commerce websites. The session-based recommendation system is used for researching interactive information generated by a user in a consuming or browsing process and mining general preference of the user so as to recommend a suitable product for the user.
The traditional recommendation method based on the conversation mainly comprises a proof decomposition method, a domain recommendation method based on articles, a Markov decision process and the like. However, as the number of goods increases, the time spent in recommending products by conventional methods such as witness decomposition increases dramatically. Furthermore, these methods tend to easily ignore the dynamic interests of the user. For example, the interest generated by the user is not constant during the consumption process, and it may change along with the interaction process of the user.
The conversation recommendation method based on deep learning mainly adopts a Recurrent Neural Network (RNN) or a recurrent neural network-based method. However, this method only considers information of respective commodities and ignores the connection between various commodities. The problem is effectively solved by a Graph Neural Network (GNN), wherein the GNN is a connection-oriented model and is used for transmitting information through the relationship between nodes in a graph, so that the connection among various commodities is greatly enhanced, however, the method does not take the types of clicked items and different interest states of users into consideration, and therefore, the invention provides a multi-granularity conversation recommendation method fusing the interest states of the users aiming at the problem, and overcomes the defects in the prior art.
Disclosure of Invention
The invention aims to overcome the defects of the two types of session recommendation methods: most of the traditional recommendation methods based on the conversation do not consider the time sequence relation of the user click sequences; most of deep learning methods based on the conversation do not consider the categories of articles and different interest states of users, and a multi-granularity conversation recommendation method fusing the interest states of the users is provided, so that the requirements of the users on the recommendation accuracy and the recommendation efficiency of various products are met.
A conversation recommendation method based on user interests comprises the following steps:
step (1): obtaining conversation data s with time sequence informationkForming a session data set S ═ S1,s2...sk};
Step (2): dividing a training set and a test set;
selecting the session data of the latest d days from the acquired session data set as a test set, and the rest are training sets;
and (3): and (4) characterizing the session sequence diagram.
And (4): building a session recommendation model fusing user interest states, and training by using a training set;
the method comprises the steps of fusing a user interest state session recommendation model, specifically comprising an input layer, an embedding layer, an interest representation layer, an attention layer and a prediction layer;
1. the input layer is used for receiving an article directed graph relation matrix P formed by each sessionvArticle undirected graph relationship matrix QvAnd an item category directed graph relationship matrix Pc, article class undirected graph relationship matrix Qc
2. Embedding layer: article directed graph relationship matrix P for input layers using GNN graph neural networkvArticle undirected graph relationship matrix QvSpecies class directed graph relationship matrix PcSpecies class undirected graph relationship matrix QcAnalyzing to obtain the embedding vector of the directed graph article
Figure BDA0003401867610000021
Embedding vectors into directed graph item classes
Figure BDA0003401867610000022
Undirected graph object embedding vectors
Figure BDA0003401867610000023
Undirected graph item class embedding vectors
Figure BDA0003401867610000024
The learning and updating process of the GNN graph neural network generating the embedded vector is as follows:
Figure BDA0003401867610000025
Figure BDA0003401867610000026
wherein
Figure BDA0003401867610000027
Representing the contextual representation of node i (which may be an item or item type) in a directed graph and an undirected graph respectively at time t,
Figure BDA0003401867610000028
Figure BDA0003401867610000029
representing the d-dimensional vector formed by the node n at the time t-1, the initial state of which
Figure BDA00034018676100000210
onIs a node in a current directed graph or undirected graph, and can be vnOr cn;PiThe ith row element represented in the relationship matrix P,
Figure BDA00034018676100000211
P=Pvor Pc;QiThe ith row element represented in the relationship matrix Q,
Figure BDA00034018676100000212
Q=Qvor Qc
Figure BDA00034018676100000213
HpRepresents PiTo
Figure BDA00034018676100000214
A weight matrix of (a); hqRepresents QiTo
Figure BDA00034018676100000215
A weight matrix of (a); bpRepresents PiTo
Figure BDA00034018676100000216
Offset value of bqRepresents QiTo
Figure BDA00034018676100000217
A bias value of (d);
Figure BDA00034018676100000218
Figure BDA0003401867610000031
Figure BDA0003401867610000032
Figure BDA0003401867610000033
wherein the content of the first and second substances,
Figure BDA0003401867610000034
representing an update gate and a reset gate, respectively controlling the discarding and generating of the node vector;
Figure BDA0003401867610000035
context representation for node i at time tHerein, the term "refers broadly to
Figure BDA0003401867610000036
Namely, it is
Figure BDA0003401867610000037
Or
Figure BDA0003401867610000038
WzIs represented by
Figure BDA0003401867610000039
To
Figure BDA00034018676100000310
Parameter matrix of GzIs represented by
Figure BDA00034018676100000311
To
Figure BDA00034018676100000312
A parameter matrix of (2); wrIs represented by
Figure BDA00034018676100000313
To
Figure BDA00034018676100000314
Parameter matrix of GrIs represented by
Figure BDA00034018676100000315
To
Figure BDA00034018676100000316
Parameter matrix of, WeIs represented by
Figure BDA00034018676100000317
To
Figure BDA00034018676100000318
Parameter matrix of GeIs represented by
Figure BDA00034018676100000319
To
Figure BDA00034018676100000320
A parameter matrix of (2);
Figure BDA00034018676100000321
indicating newly generated information about node i at time t,
Figure BDA00034018676100000322
and represents a d-dimensional vector formed by the node i at the time t, and according to the type of the directed graph or the undirected graph and the type of the node,
Figure BDA00034018676100000323
a corresponding embedded vector of a directed graph or undirected graph, expressed as an item and as an item type, can be computed
Figure BDA00034018676100000324
Wherein
Figure BDA00034018676100000325
An embedding vector representing an article and an article type corresponding to the directed graph,
Figure BDA00034018676100000326
embedding vectors respectively representing the articles and the article types corresponding to the undirected graph;
3. interest characterization layer: for the output embedded vector in the embedded layer
Figure BDA00034018676100000327
Fusing to obtain a final embedded vector representing the interest of the user;
a) embedding vector according to article and article type output in embedding layer
Figure BDA00034018676100000328
Performing vector fusion according to a formula (10-11) to generate a dynamic interest vector of the item i
Figure BDA00034018676100000329
And static interest vector of item i
Figure BDA00034018676100000330
Figure BDA00034018676100000331
Figure BDA00034018676100000332
Wherein WdShow that
Figure BDA00034018676100000333
Compression to d-dimensional vectors
Figure BDA00034018676100000334
Parameter matrix of, WsShow that
Figure BDA00034018676100000335
Compression to d-dimensional vectors
Figure BDA00034018676100000336
A parameter matrix of (2);
b) to pair
Figure BDA00034018676100000337
Figure BDA00034018676100000338
Adding different weight proportions to generate a user interest embedded vector;
Figure BDA00034018676100000339
wherein λ represents a weight, TiEmbedding a vector representing the interest of a user in an item i;
4. attention layer: adding different attention weights to the embedded vectors of the user interests output by the interest characterization layer by using an attention mechanism; integrating the interest embedding vectors of the user to each article to generate an interest embedding vector z of an integration attention mechanism;
αi=wTsigmod(W1Ti+W2Tn+δ) (13)
Figure BDA0003401867610000041
wherein W1Is represented by TiTo alphaiParameter matrix, W2Is represented by TnTo alphaiParameter matrix, w represents a weight vector, δ represents a bias value, αiRepresents TiAn attention weight score of (a);
5. an output layer: the output layer calculates the score of the item clicked by the user next time by utilizing the softmax function
Figure BDA0003401867610000042
Selecting k articles with the largest score as a final output result of the session recommendation model, wherein the corresponding articles are the articles recommended by the session recommendation model;
Figure BDA0003401867610000043
Figure BDA0003401867610000044
wherein
Figure BDA0003401867610000045
The embedded vector representing the final prediction,
Figure BDA0003401867610000046
representing a vector
Figure BDA0003401867610000047
The ith position element;
preferably, the loss function during training is as follows:
Figure BDA0003401867610000048
where m represents the number of items in the training process,
Figure BDA0003401867610000049
represents the predicted score, y, of item i(i)A one-hot code representing item i; delta denotes the regularization coefficient (delta)>0) W represents all training parameters in the model;
and (5): and testing the trained session recommendation method for the converged user interest state by using a test set, and then realizing session recommendation by using the tested session recommendation method for the converged user interest state.
Compared with the prior art, the invention has the following advantages:
(1) the accuracy is high: compared with the traditional conversation recommendation method, the dynamic interest and the static interest of the user are captured by respectively establishing the directed graph and the undirected graph, the interactive characteristics of the conversation and the interest state of the user are fully considered, different weights are added to different interest characteristics, and the user interest can be captured more accurately. The user interest embedded vector is modeled through an attention mechanism, and the accuracy of the recommendation model is greatly improved. The invention overcomes the problem that the relation among the objects clicked by the user is ignored due to the fact that the time attribute of the conversation sequence is not considered in the traditional method, and has better performance in the conversation recommendation method containing the time attribute.
(2) The recommendation efficiency is high: the commodity conversation data is stored by constructing the directed graph and the undirected graph, and the embedded vector of the commodity and the commodity category of each conversation is generated by using the GNN neural network, so that the problem of slow calculation of the traditional matrix decomposition method under large-scale commodity data is solved, and the commodity recommendation efficiency is greatly improved.
(3) The robustness is strong: the method integrates the commodity category characteristics when constructing the user interest characteristics, can efficiently and stably extract the user interest characteristics, reduces the interference of noise data in a session recommendation system, and greatly improves the robustness of a recommendation model.
Drawings
FIG. 1 is a frame diagram of a session recommendation model that merges user interest states;
FIG. 2 is a flow chart of a multi-granularity session recommendation method fusing user interest states;
FIG. 3 is a directed graph G (V, E)1) Generating a schematic diagram of the node relation matrix;
FIG. 4 is an undirected graph
Figure BDA0003401867610000051
Generating a schematic diagram of the node relation matrix;
FIG. 5 is a diagram of the present invention recommendation method compared to the other methods precision @ 20;
FIG. 6 is a graph comparing the recommended method of the present invention with other methods MRR @ 20.
Detailed Description
The following further describes the implementation steps of the present invention with reference to the attached drawings.
FIG. 1 is a diagram illustrating a multi-granular conversation recommendation model framework based on user interests. Firstly, session data generated when a user browses commodities are obtained, and a test set and a training set are generated by dividing a session data set. And then, enabling the training set data set to enter a session sequence diagram representation module, respectively establishing a directed graph and an undirected graph of each item and item type in each session, generating a corresponding relation matrix, generating a user interest vector by constructing a deep learning network, and adding corresponding weight to the user interest vector to represent the user interest. An attention mechanism is added to the user's interest through the attention network and a score is calculated for the corresponding item using the softmax function. And finally, training the model of the invention and returning the recommended commodities to the user.
Referring to fig. 2, a flowchart of a multi-granularity session recommendation method fusing user interest states provided by the present invention is shown, which specifically includes the following steps:
step (1): obtaining conversation data s with time sequence informationkForming a session data set S ═ S1,s2...sk}。
The session data skContaining a set of session occurrence times T, a set of clicked items V and a set of categories C of corresponding items. Where the set of session occurrence times T ═ T1,t2...tn},tnRepresenting a conversation skThe time at which the nth click in (1) occurs; clicked item set V ═ V1,v2...vn},vnRepresenting a conversation skThe item number of the nth click; class set C ═ C for items1,c2...cn},cnRepresenting a conversation skThe kind of item clicked by the nth interaction.
A session refers to the process of a terminal user communicating with an interactive system, and records some interactive information of the user.
Step (2): dividing a training set and a test set; and selecting the session data of the latest d days from the acquired session data set as a test set, and the rest are training sets.
And (3): session sequence diagram characterization
Step (3.1) of constructing a directed graph G (V, E)1),G(C,E2)
For each session data S of the session data set SkAccording to the session occurrence time tmRespectively constructing an object click sequence directed graph G (V, E)1) And item Category click sequence directed graph G (C, E)2) (ii) a Wherein V and C respectively represent directed graphs G (V and E)1)、G(C,E2) Node of (5), E1Shows a directed graph G (V, E)1) Edges connecting nodes of the article in, E2Shows a directed graph G (C, E)2) Edges connecting the article type nodes;
step (3.2), generating a directed graph node relation matrix
FIG. 3 is a directed graph G (V, E)1) And generating a schematic diagram of the node relation matrix.
According to the directed graph G (V, E)1)、G(C,E2) Respectively generating node relation matrixes P corresponding to the graphsv,Pc
Figure BDA0003401867610000061
Wherein
Figure BDA0003401867610000062
Shown as item click sequence directed graph G (V, E)1) And item Category click sequence directed graph G (C, E)2) Each element in the in-degree matrix is expressed as the in-degree of the corresponding node after normalization processing;
Figure BDA0003401867610000063
shown as item click sequence directed graph G (V, E)1) And item Category click sequence directed graph G (C, E)2) Each element in the output matrix represents the output of the corresponding node after normalization processing;
the normalization processing formula is as follows:
Figure BDA0003401867610000064
wherein a isk,rRepresenting the value of the row k and column r to be normalized,
Figure BDA0003401867610000065
representing the normalized kth row and the r column element values;
step (3.3) of constructing an article relation undirected graph
Figure BDA0003401867610000071
Undirected graph of article category relationship
Figure BDA0003401867610000072
: direct graph G (V, E) of item click sequence1) And item Category click sequence directed graph G (C, E)2) The directed edge in the system is changed into an undirected edge to form an undirected object relationshipDrawing (A)
Figure BDA0003401867610000073
Undirected graph of relationship with item categories
Figure BDA0003401867610000074
The above-mentioned techniques are conventional techniques, and therefore are not explained in detail;
and (3.4) generating an undirected graph node relation matrix.
Refer to FIG. 4 for an undirected graph
Figure BDA0003401867610000075
And generating a schematic diagram of the node relation matrix.
Undirected graph according to object relationships
Figure BDA0003401867610000076
Undirected graph of relationship with item categories
Figure BDA0003401867610000077
Respectively generating article relation matrixes Q corresponding to undirected graphsvAnd item class relationship matrix Qc(ii) a Wherein Qv,QcValue of element (1)
Figure BDA0003401867610000078
The following relationship is satisfied:
Figure BDA0003401867610000079
Figure BDA00034018676100000710
wherein
Figure BDA00034018676100000711
And respectively representing corresponding element values in the item click sequence, the in-degree matrix and the out-degree matrix of the item type click sequence.
Step (3.5) is according toEquation (1) pair relationship matrix Qv,QcValue of element (1)
Figure BDA00034018676100000712
And (6) carrying out normalization processing.
And (4): establishing a session recommendation method fusing user interest states, and training by using a training set;
fig. 1 is a frame diagram of a session recommendation method fusing user interest states, which specifically includes an input layer, an embedding layer, an interest characterization layer, an attention layer, and a prediction layer;
1. the input layer is used for receiving an article directed graph relation matrix P formed by each sessionvArticle undirected graph relationship matrix QvAnd an item category directed graph relationship matrix Pc, article class undirected graph relationship matrix Qc
2. Embedding layer: article directed graph relationship matrix P for input layers using GNN graph neural networkvArticle undirected graph relationship matrix QvSpecies class directed graph relationship matrix PcSpecies class undirected graph relationship matrix QcAnalyzing to obtain the embedding vector of the directed graph article
Figure BDA0003401867610000081
Embedding vectors into directed graph item classes
Figure BDA0003401867610000082
Undirected graph object embedding vectors
Figure BDA0003401867610000083
Undirected graph item class embedding vectors
Figure BDA0003401867610000084
The learning and updating process of the GNN graph neural network generating the embedded vector is as follows:
Figure BDA0003401867610000085
Figure BDA0003401867610000086
wherein
Figure BDA0003401867610000087
Representing the contextual representation of node i (which may be an item or item type) in a directed graph and an undirected graph respectively at time t,
Figure BDA0003401867610000088
i∈[1,n];
Figure BDA0003401867610000089
representing the d-dimensional vector formed by the node n at the time t-1, the initial state of which
Figure BDA00034018676100000810
onIs a node in a current directed graph or undirected graph, and can be vnOr cn;PiThe ith row element represented in the relationship matrix P,
Figure BDA00034018676100000811
P=Pvor Pc;QiThe ith row element represented in the relationship matrix Q,
Figure BDA00034018676100000812
Q=Qvor Qc
Figure BDA00034018676100000813
HpRepresents PiTo
Figure BDA00034018676100000814
A weight matrix of (a); hqRepresents QiTo
Figure BDA00034018676100000815
A weight matrix of (a); bpRepresents PiTo
Figure BDA00034018676100000816
Offset value of bqRepresents QiTo
Figure BDA00034018676100000817
A bias value of (d);
Figure BDA00034018676100000818
Figure BDA00034018676100000819
Figure BDA00034018676100000820
Figure BDA00034018676100000821
wherein the content of the first and second substances,
Figure BDA00034018676100000822
representing an update gate and a reset gate, respectively controlling the discarding and generating of the node vector;
Figure BDA00034018676100000823
representing the context representation of node i at time t, here generally referred to
Figure BDA00034018676100000824
I.e. by
Figure BDA00034018676100000825
Or
Figure BDA00034018676100000826
WzIs represented by
Figure BDA00034018676100000827
To
Figure BDA00034018676100000828
Parameter matrix of GzIs represented by
Figure BDA00034018676100000829
To
Figure BDA00034018676100000830
A parameter matrix of (2); wrIs represented by
Figure BDA00034018676100000831
To
Figure BDA00034018676100000832
Parameter matrix of GrIs represented by
Figure BDA00034018676100000833
To
Figure BDA00034018676100000834
Parameter matrix of, WeIs represented by
Figure BDA00034018676100000835
To
Figure BDA00034018676100000836
Parameter matrix of GeIs represented by
Figure BDA00034018676100000837
To
Figure BDA00034018676100000838
A parameter matrix of (2);
Figure BDA00034018676100000839
indicating newly generated information about node i at time t,
Figure BDA00034018676100000840
and represents a d-dimensional vector formed by the node i at the time t, and according to the type of the directed graph or the undirected graph and the type of the node,
Figure BDA00034018676100000841
a corresponding embedded vector of a directed graph or undirected graph, expressed as an item and as an item type, can be computed
Figure BDA00034018676100000842
(ii) a Wherein
Figure BDA00034018676100000843
Figure BDA00034018676100000844
An embedding vector representing an article and an article type corresponding to the directed graph,
Figure BDA0003401867610000091
embedding vectors respectively representing the articles and the article types corresponding to the undirected graph;
3. interest characterization layer: for the output embedded vector in the embedded layer
Figure BDA0003401867610000092
Fusing to obtain a final embedded vector representing the interest of the user;
a) embedding vector according to article and article type output in embedding layer
Figure BDA0003401867610000093
Performing vector fusion according to the formula (10-11) to generate a dynamic interest vector of the item i
Figure BDA0003401867610000094
And static interest vector of item i
Figure BDA0003401867610000095
Figure BDA0003401867610000096
Figure BDA0003401867610000097
Wherein WdShow that
Figure BDA0003401867610000098
Compression to d-dimensional vectors
Figure BDA0003401867610000099
Parameter matrix of, WsShow that
Figure BDA00034018676100000910
Compression to d-dimensional vectors
Figure BDA00034018676100000911
A parameter matrix of (2);
b) to pair
Figure BDA00034018676100000912
Figure BDA00034018676100000913
Adding different weight proportions to generate a user interest embedded vector;
Figure BDA00034018676100000914
wherein λ represents a weight, TiEmbedding a vector representing the interest of a user in an item i;
4. attention layer: adding different attention weights to the embedded vectors of the user interests output by the interest characterization layer by using an attention mechanism; integrating the interest embedding vectors of the user to each article to generate an interest embedding vector z of an integration attention mechanism;
αi=wTsigmod(W1Ti+W2Tn+δ) (13)
Figure BDA00034018676100000915
wherein W1Is represented by TiTo alphaiParameter matrix, W2Is represented by TnTo alphaiParameter matrix, w represents a weight vector, δ represents a bias value, αiRepresents TiAn attention weight score of (a);
5. an output layer: the output layer calculates the score of the item clicked by the user next time by utilizing the softmax function
Figure BDA00034018676100000916
Selecting k articles with the largest score as a final output result of the session recommendation model, wherein the corresponding articles are the articles recommended by the session recommendation model;
Figure BDA0003401867610000101
Figure BDA0003401867610000102
wherein
Figure BDA0003401867610000103
The embedded vector representing the final prediction,
Figure BDA0003401867610000104
representing a vector
Figure BDA0003401867610000105
The ith position element;
the loss function during training is as follows:
Figure BDA0003401867610000106
wherein m represents a training in-process objectThe number of the products is determined by the number of the products,
Figure BDA0003401867610000107
represents the predicted score, y, of item i(i)A one-hot code representing item i; delta denotes the regularization coefficient (delta)>0) W represents all training parameters in the model;
the multi-granularity conversation recommendation method fusing the user interest states is trained by adopting an adaptive momentum estimation algorithm (Adam) so as to minimize a loss function and obtain the optimal model parameters.
The Adam optimization algorithm comprises the following steps:
a) adam optimizer parameter settings.
The Adam optimizer parameters include exponential decay rates u, v set to 0.9 and 0.999; a learning rate θ set to 0.0001; small constant ζ set to 10-8
b) Computing biased first moment estimates and second moment estimates
Figure BDA0003401867610000108
Figure BDA0003401867610000109
Wherein m is(r),n(r)Representing the first order moment estimation and the second order moment estimation of the No. r iteration, and the initial
Figure BDA00034018676100001010
Representing the gradient of the cost function sought.
c) Update iteration omega
Figure BDA00034018676100001011
Wherein
Figure BDA00034018676100001012
Is shown asr rounds of iteratively modified biased first order moment estimates and second order moment estimates,
Figure BDA00034018676100001013
and (5): and testing the trained session recommendation method for the converged user interest state by using a test set, and then realizing session recommendation by using the tested session recommendation method for the converged user interest state.
The following compares the multi-granularity session recommendation method based on user interest with the traditional session recommendation method:
the evaluation of the present invention was evaluated using Baseline method, and the experimental configuration was Intel core i7-8700K3.7GHz processor, 16GB 3000mhz RAM, Nvidia GeForce RTX3060 display card and 64 bit Windows10 operating system. The data sets used for the training samples were the public Yoochoose data set and Diginetica data set. For the Yoochoose data set, selecting the session data of the latest 1 day as a test set; for the digenetica data set, the session data of the last 7 days was chosen as the test set. In addition, because the data volume of the Yoochoose data set is large, in order to facilitate model training, in the experiment, the Yoochoose data set is segmented into two data sets of Yoochoose1/64 and Yoochoose1/4 for training, wherein the Yoochoose1/64 indicates that 1/64 latest session data appear in the Yoochoose data set; yoochoose1/4 indicates that the most recent 1/4 session data occurred in the Yoochoose dataset.
In the model evaluation, the accuracy rate @ K and the MRR @ K of the Ge recommendation method are compared in the experiment. The accuracy rate @ K is used for measuring the accuracy of the recommendation method and represents the proportion of correctly recommended articles in the first K articles in the recommendation list; MRR @ K represents average reciprocal rank, the index adds the influence of the position of the commodity in the recommendation list on the basis of the accuracy @ K, and the value of the MRR @ K is larger the position of the commodity in the recommendation list is higher, and the value of the MRR @ K is smaller the position of the commodity in the recommendation list is lower the position of the commodity in the recommendation list is higher, otherwise, the MRR @ K is smaller.
In experimental evaluation, the recommended methods for comparison of the present invention include Item-KNN, GRU4Rec, NARM. FIG. 5 is a graph comparing the accuracy @20 of the proposed method of the present invention with other methods. Analyze FIG. 5 canIn order to discover, the invention generates dynamic interest vectors by establishing a directed graph and an undirected graph to capture the dynamic interest and the static interest of a user
Figure BDA0003401867610000112
And static interest vectors
Figure BDA0003401867610000113
Fully takes the interactive characteristics of the session and the interest state of the user into consideration
Figure BDA0003401867610000114
Figure BDA0003401867610000111
Different weight proportions are added to generate a user interest embedding vector, so that the user interest can be captured more accurately, an attention mechanism is added to model the user interest embedding vector, the problem that the traditional method does not consider the relation among the items clicked by the user neglecting due to the time attribute of the conversation sequence is solved, and compared with the Item-KNN, GRU4Rec and NARM conversation recommendation method, the accuracy rate @20 values of the method are obviously improved on the data sets of Yoochoose1/64, Yoochoose1/4 and Digineica, and reach 71.28%, 71.56% and 52.75% respectively, and the probability of accurate recommendation is obviously improved in the 20 recommended items generated by the recommendation list. In addition, the invention also obtains a relatively remarkable effect on the MRR @20 index. FIG. 6 is a graph comparing the recommended method of the present invention with other methods MRR @ 20. According to the graph 6, compared with an Item-KNN, GRU4Rec and NARM conversation recommendation method, the method provided by the invention has the advantages that MRR @20 on a Yoochoose and Digimetia data set is also obviously improved, and MRR @20 on a Yoochoose1/64 data set is improved by about 2.74% and reaches 31.37% compared with a NARM method; the improvement on the Yoochoose1/4 data set is about 2.95 percent and reaches 32.18 percent; about 2.36% of improvement is also obtained on the Digimetia data set, and the improvement reaches 18.53%, and further the accuracy of the recommended commodities is effectively improved.
In conclusion, the above experimental results all show that the multi-granularity conversation recommendation method fusing the user interest states captures the user interest states by establishing a directed graph and an undirected graph. The GNN graph neural network is established to generate the embedded vectors of the articles and the article types, and an attention mechanism is combined, so that the model can achieve an ideal effect when recommending the articles to the user, can meet the interest requirements of the user, and has high accuracy and recommendation efficiency.
The above description of the embodiments is only intended to facilitate the understanding of the method of the invention and its core idea. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A multi-granularity conversation recommendation method fusing user interest states is characterized by comprising the following steps:
step (1): obtaining conversation data s with time sequence informationkForming a session data set S ═ S1,s2...sk};
The session data skThe method comprises the steps of including a conversation occurrence time set T, a clicked item set V and a category set C of corresponding items; where the set of session occurrence times T ═ T1,t2...tn},tnRepresenting a conversation skThe time at which the nth click in (1) occurs; clicked item set V ═ V1,v2...vn},vnRepresenting a conversation skThe nth timeThe item number clicked; class set C ═ C for items1,c2...cn},cnRepresenting a conversation skThe type of the item clicked by the nth interaction;
step (2): dividing a training set and a test set;
selecting the session data of the latest d days from the acquired session data set as a test set, and the rest are training sets;
and (3): session sequence diagram characterization
Step (3.1), construct the directed graph G (V, E)1),G(C,E2)
For each session data S of the session data set SkAccording to the session occurrence time tmRespectively constructing an object click sequence directed graph G (V, E)1) And item Category click sequence directed graph G (C, E)2) (ii) a Wherein V and C respectively represent directed graphs G (V and E)1)、G(C,E2) Node of (5), E1Shows a directed graph G (V, E)1) Edges connecting nodes of the article in, E2Shows a directed graph G (C, E)2) Edges connecting the article type nodes;
step (3.2), generating a directed graph node relation matrix
According to the directed graph G (V, E)1)、G(C,E2) Respectively generating node relation matrixes P corresponding to the graphsv,Pc;Pv=[Pv in;Pv out],Pc=[Pc in;Pc out]In which P isv in,Pc inShown as item click sequence directed graph G (V, E)1) And item Category click sequence directed graph G (C, E)2) Each element in the in-degree matrix is expressed as the in-degree of the corresponding node after normalization processing; pv out,Pc outShown as item click sequence directed graph G (V, E)1) And item Category click sequence directed graph G (C, E)2) Each element in the output matrix represents the output of the corresponding node after normalization processing;
step (3.3), building article relationsUndirected graph
Figure FDA0003401867600000011
Article category relationship undirected graph
Figure FDA0003401867600000012
Direct graph G (V, E) of item click sequence1) And item Category click sequence directed graph G (C, E)2) The directed edge in the graph is changed into an undirected edge to form an undirected graph of the relation of the objects
Figure FDA0003401867600000021
Undirected graph of relationship with item categories
Figure FDA0003401867600000022
And (3.4) generating an undirected graph node relation matrix:
undirected graph according to object relationships
Figure FDA0003401867600000023
Undirected graph of relationship with item categories
Figure FDA0003401867600000024
Respectively generating article relation matrixes Q corresponding to undirected graphsvAnd item class relationship matrix Qc(ii) a Wherein Qv,QcValue Q of element (A) in (B)v (i,j),
Figure FDA0003401867600000025
The following relationship is satisfied:
Figure FDA0003401867600000026
Figure FDA0003401867600000027
wherein
Figure FDA0003401867600000028
Respectively representing corresponding element values in an in-degree matrix and an out-degree matrix of the item click sequence and the item category click sequence;
step (3.5), the relation matrix Q is matchedv,QcValue Q of element (A) in (B)v (i,j),
Figure FDA0003401867600000029
Carrying out normalization processing;
and (4): establishing a session recommendation model fusing user interest states, and training by using a training set;
the conversation recommendation model fusing the user interest states comprises an input layer, an embedding layer, an interest representation layer, an attention layer and a prediction layer;
and (5): and testing the trained session recommendation model fusing the interest states of the users by using a test set, and then realizing session recommendation by using the tested session recommendation model fusing the interest states of the users.
2. The method for multi-granular conversation recommendation fusing user interest status according to claim 1, wherein the normalization processing formula of step (3.2) and step (3.5) is as follows:
Figure FDA00034018676000000210
wherein a isk,rRepresenting the value of the row k and column r to be normalized,
Figure FDA00034018676000000211
representing the normalized kth row and the r column element values.
3. The converged user of claim 1The multi-granularity conversation recommendation method of the interest state is characterized in that an input layer in a conversation recommendation model fusing the interest states of the users is used for receiving an article directed graph relation matrix P formed by each conversationvArticle undirected graph relationship matrix QvAnd an item category directed graph relationship matrix Pc, article class undirected graph relationship matrix Qc
4. The method according to claim 3, wherein the embedded layer uses the GNN graph neural network to perform the object oriented graph relationship matrix P on the input layer in the session recommendation model for fusing the user interest statesvArticle undirected graph relationship matrix QvSpecies class directed graph relationship matrix PcSpecies class undirected graph relationship matrix QcAnalyzing to obtain the embedding vector of the directed graph article
Figure FDA0003401867600000031
Directed graph item class embedding vector
Figure FDA0003401867600000032
Undirected graph article embedding vectors
Figure FDA0003401867600000033
Undirected graph item class embedding vector
Figure FDA0003401867600000034
5. The method of claim 4, wherein the learning and updating process of the GNN neural network to generate the embedded vector comprises:
Figure FDA0003401867600000035
Figure FDA0003401867600000036
wherein
Figure FDA0003401867600000037
Representing the contextual representation of node i in the directed graph and undirected graph respectively at time t,
Figure FDA0003401867600000038
Figure FDA0003401867600000039
representing the d-dimensional vector formed by the node n at the time t-1, the initial state of which
Figure FDA00034018676000000310
onIs a node in the current directed graph or undirected graph, namely vnOr cn;PiThe ith row element represented in the relationship matrix P,
Figure FDA00034018676000000311
P=Pvor Pc;QiThe ith row element represented in the relationship matrix Q,
Figure FDA00034018676000000312
Q=Qvor Qc;Hp,
Figure FDA00034018676000000313
HpRepresents PiTo
Figure FDA00034018676000000314
A weight matrix of (a); hqRepresents QiTo
Figure FDA00034018676000000315
A weight matrix of (a); bpRepresents PiTo
Figure FDA00034018676000000316
Offset value of bqRepresents QiTo
Figure FDA00034018676000000317
A bias value of (d);
Figure FDA00034018676000000318
Figure FDA00034018676000000319
Figure FDA00034018676000000320
Figure FDA00034018676000000321
wherein the content of the first and second substances,
Figure FDA00034018676000000322
representing an update gate and a reset gate, respectively controlling the discarding and generating of the node vector;
Figure FDA00034018676000000323
representing the context of node i at time t, i.e.
Figure FDA00034018676000000324
Or
Figure FDA00034018676000000325
WzIs represented by
Figure FDA00034018676000000326
To
Figure FDA00034018676000000327
Parameter matrix of GzIs represented by
Figure FDA00034018676000000328
To
Figure FDA00034018676000000329
A parameter matrix of (2); wrIs represented by
Figure FDA00034018676000000330
To
Figure FDA00034018676000000331
Parameter matrix of GrIs represented by
Figure FDA00034018676000000332
To
Figure FDA00034018676000000333
Parameter matrix of, WeIs represented by
Figure FDA00034018676000000334
To
Figure FDA00034018676000000335
Parameter matrix of GeIs represented by
Figure FDA00034018676000000336
To
Figure FDA00034018676000000337
A parameter matrix of (2);
Figure FDA00034018676000000338
indicating newly generated information about node i at time t,
Figure FDA0003401867600000041
and represents a d-dimensional vector formed by the node i at the time t, and according to the type of the directed graph or the undirected graph and the type of the node,
Figure FDA0003401867600000042
vector for embedding directed graph or undirected graph corresponding to article and article type
Figure FDA0003401867600000043
Wherein
Figure FDA0003401867600000044
An embedding vector representing an article and an article type corresponding to the directed graph,
Figure FDA0003401867600000045
the embedded vectors respectively represent the article and the article type corresponding to the undirected graph.
6. The method according to claim 4 or 5, wherein the interest characterization layer in the user interest state-fused session recommendation model is used for embedding the embedded vector outputted from the embedding layer
Figure FDA0003401867600000046
And fusing to obtain a final embedded vector representing the interest of the user.
7. The multi-granularity conversation recommendation method fusing the user interest states according to claim 6, wherein the interest characterization layer is specifically:
a) embedding vector according to article and article type output in embedding layer
Figure FDA0003401867600000047
Performing vector fusion according to a formula (10-11) to generate a dynamic interest vector of the item i
Figure FDA0003401867600000048
And static interest vector of item i
Figure FDA0003401867600000049
Figure FDA00034018676000000410
Figure FDA00034018676000000411
Wherein WdShow that
Figure FDA00034018676000000412
Compression to d-dimensional vectors
Figure FDA00034018676000000413
Parameter matrix of, WsShow that
Figure FDA00034018676000000414
Compression to d-dimensional vectors
Figure FDA00034018676000000415
A parameter matrix of (2);
b) to pair
Figure FDA00034018676000000416
Adding different weight proportions to generate a user interest embedded vector;
Figure FDA00034018676000000417
wherein λ represents a weight, TiAn embedded vector representing the user's interest in item i.
8. The multi-granularity conversation recommendation method fusing the user interest states according to claim 1, characterized in that the attention layer in the conversation recommendation model fusing the user interest states uses an attention mechanism to add different attention weights to the embedded vectors of the user interest output by the interest characterization layer; integrating the interest embedding vectors of the user to each article to generate an interest embedding vector z of an integration attention mechanism;
αi=wTsigmod(W1Ti+W2Tn+δ) (13)
Figure FDA00034018676000000418
wherein W1Is represented by TiTo alphaiParameter matrix, W2Is represented by TnTo alphaiParameter matrix, w represents a weight vector, δ represents a bias value, αiRepresents TiAttention weight score of (1).
9. The method according to claim 1, wherein the output layer of the session recommendation model for fusing the user interest states calculates the score of the item clicked next by the user by using softmax function
Figure FDA0003401867600000051
Selecting k articles with the largest score as a final output result of the session recommendation model, wherein the corresponding articles are the articles recommended by the session recommendation model;
Figure FDA0003401867600000052
Figure FDA0003401867600000053
wherein
Figure FDA0003401867600000054
The embedded vector representing the final prediction,
Figure FDA0003401867600000055
representing a vector
Figure FDA0003401867600000056
The ith position element.
10. The multi-granularity conversation recommendation method fusing the user interest states according to claim 1, characterized in that the loss function in the training process in the conversation recommendation model fusing the user interest states is as follows:
Figure FDA0003401867600000057
where m represents the number of items in the training process,
Figure FDA0003401867600000058
represents the predicted score, y, of item i(i)A one-hot code representing item i; delta denotes the regularization coefficient (delta)>0) And W represents a model parameter.
CN202111498604.XA 2021-12-09 2021-12-09 Multi-granularity session recommendation method fusing user interest states Pending CN114169968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111498604.XA CN114169968A (en) 2021-12-09 2021-12-09 Multi-granularity session recommendation method fusing user interest states

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111498604.XA CN114169968A (en) 2021-12-09 2021-12-09 Multi-granularity session recommendation method fusing user interest states

Publications (1)

Publication Number Publication Date
CN114169968A true CN114169968A (en) 2022-03-11

Family

ID=80484794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111498604.XA Pending CN114169968A (en) 2021-12-09 2021-12-09 Multi-granularity session recommendation method fusing user interest states

Country Status (1)

Country Link
CN (1) CN114169968A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880550A (en) * 2022-04-02 2022-08-09 哈尔滨工程大学 Sequence recommendation method, device and medium fusing multi-aspect time domain information
CN115858926A (en) * 2022-11-29 2023-03-28 杭州电子科技大学 User-based complex multi-mode interest extraction and modeling sequence recommendation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880550A (en) * 2022-04-02 2022-08-09 哈尔滨工程大学 Sequence recommendation method, device and medium fusing multi-aspect time domain information
CN115858926A (en) * 2022-11-29 2023-03-28 杭州电子科技大学 User-based complex multi-mode interest extraction and modeling sequence recommendation method
CN115858926B (en) * 2022-11-29 2023-09-01 杭州电子科技大学 Sequence recommendation method based on complex multi-mode interest extraction and modeling of user

Similar Documents

Publication Publication Date Title
CN111523047B (en) Multi-relation collaborative filtering algorithm based on graph neural network
CN107330115B (en) Information recommendation method and device
CN108648049B (en) Sequence recommendation method based on user behavior difference modeling
CN110910218B (en) Multi-behavior migration recommendation method based on deep learning
CN109087178B (en) Commodity recommendation method and device
CN112232925A (en) Method for carrying out personalized recommendation on commodities by fusing knowledge maps
CN106897404B (en) Recommendation method and system based on multi-GRU layer neural network
CN112364976B (en) User preference prediction method based on session recommendation system
Zhang et al. Robust collaborative filtering based on non-negative matrix factorization and R1-norm
CN107944035B (en) Image recommendation method integrating visual features and user scores
CN110245285B (en) Personalized recommendation method based on heterogeneous information network
CN111814921B (en) Object characteristic information acquisition method, object classification method, information push method and device
CN114169968A (en) Multi-granularity session recommendation method fusing user interest states
CN108470052B (en) Anti-trust attack recommendation algorithm based on matrix completion
CN112115377A (en) Graph neural network link prediction recommendation method based on social relationship
CN109446420B (en) Cross-domain collaborative filtering method and system
CN112765461A (en) Session recommendation method based on multi-interest capsule network
CN112101984A (en) Conversation recommendation model integrating user microscopic behaviors and knowledge graph
CN112396492A (en) Conversation recommendation method based on graph attention network and bidirectional long-short term memory network
CN114282077A (en) Session recommendation method and system based on session data
CN114065048A (en) Article recommendation method based on multi-different-pattern neural network
Kakad et al. Ontology construction from cross domain customer reviews using expectation maximization and semantic similarity
CN112819575B (en) Session recommendation method considering repeated purchasing behavior
Li et al. Session Recommendation Model Based on Context-Aware and Gated Graph Neural Networks
CN110851694A (en) Personalized recommendation system based on user memory network and tree structure depth model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination