An E-commerce Conversation Recommendation Method, System, Device and Medium Based on Multi-Behavior Feature Fusion

By integrating multiple behavioral characteristics and higher-order characteristics, and using multi-level gated recurrent unit network and graph neural network, the problem of incomplete product feature learning in the existing model is solved, and the accuracy and robustness of e-commerce session recommendations are improved.

CN115659277BActive Publication Date: 2025-07-22NANJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211299136.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2025-07-22
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

The existing e-commerce session recommendation model fails to fully consider other behaviors other than the user's click behavior when learning feature, such as collection, purchase and adding to the shopping cart, resulting in incomplete product feature learning and affecting recommendation performance.

Method used

The multi-level gated recurrent unit network is used to integrate behavioral feature vectors such as clicking, collecting, purchasing and adding to shopping carts, and the high-level features of the product are extracted in combination with the gated graph neural network, and the global interest and current interest feature vectors are fused through the gated recurrent unit network to update the conversation feature learning method.

Benefits of technology

It enriches product feature representation, improves the accuracy and robustness of session recommendations, and improves the performance of recommendation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115659277B_ABST
    Figure CN115659277B_ABST
Patent Text Reader

Abstract

The present invention discloses an e-commerce session recommendation method and system based on multi-behavior feature fusion. The method includes the following steps: obtaining four types of session behavior data of users' clicks, collections, purchases, and adding to the shopping cart on goods in the e-commerce database; constructing an e-commerce session recommendation model based on multi-behavior feature fusion, which model includes a behavior feature extraction module, a product feature extraction module, a product high-order feature extraction module, a session feature extraction module, and a product recommendation module; training the e-commerce session recommendation model using the four types of session behavior data in the e-commerce database; using the trained e-commerce session recommendation model to recommend goods to the users in the session and outputting the recommendation results. The present invention utilizes the e-commerce session recommendation model to fuse multi-behavior features in the session, which can effectively improve the recommendation performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data mining, and particularly to an e-commerce session recommendation method, system, device and medium based on multi-behavior feature fusion. Background Art

[0002] E-commerce session recommendation refers to, in the e-commerce application scenario, using the anonymous session information of users, that is, the products that users have interacted with in a short session, to predict the products that users will interact with soon. It is an important branch and sub-topic of the recommendation system. Especially now that people are increasingly concerned about personal privacy, session recommendation does not use users' privacy information and has great advantages in the recommendation system.

[0003] The initial session recommendation widely adopted the method of Markov chain, and usually used the previous interaction item to predict the next possible interaction item. Rendle et al. combined Markov chain and matrix factorization for predicting the next interaction item; Le et al. constructed a Markovian payment model by adding context information to improve the recommendation performance; however, this method was carried out under the assumption of strong independence, which would limit the prediction accuracy. In recent years, with the development of deep learning, recurrent neural networks have been widely used in session recommendation. Hidasi et al. proposed the GRU4Rec model, which was the first to use recurrent neural networks for session recommendation; Tan et al. upgraded the GRU4Rec model, improving the recommendation performance and alleviating the overfitting problem; Liu et al. used multi-layer perceptrons and attention networks to improve the recommendation performance. However, recurrent neural networks are based on the dependence assumption, assuming that any adjacent interactions must contain an order relationship. Under the dependence assumption, this method can only capture pointwise dependence and cannot capture collective dependence. Graph neural networks can capture complex dependence relationships between nodes by virtue of their powerful graph structure advantages and have been widely used in recent session recommendation research. The SR-GNN model proposed by Wu et al. first applied graph networks to session recommendation and enhanced session representation by adding an attention mechanism; the GC-SAN proposed by Xu et al. used a multi-layer self-attention network to learn more accurate session representation. The powerful node learning ability of graph neural networks has greatly improved the performance of session recommendation.

[0004] Although the application of graph neural networks has greatly improved the performance of session recommendation, feature learning based on click behavior cannot comprehensively reflect product features and session features. In fact, in addition to clicking on products, users will also perform other actions such as collecting, purchasing, and adding products to the shopping cart, and these actions will also affect feature learning. Existing models rarely consider other behaviors besides click behavior, resulting in incomplete product feature learning and a decline in recommendation performance. Summary of the Invention

[0005] Objective of the Invention: Aiming at the deficiencies of the prior art, the objective of the present invention is to provide an e-commerce session recommendation method and system based on multi-behavior feature fusion. By using a multi-level gated recurrent unit network to fuse the feature vectors of the main behavior (click behavior) and the feature vectors of three secondary behaviors (favorite, purchase, and add to cart behaviors), a commodity feature vector with multiple features is learned, and an L-layer gated graph neural network is used to learn the high-order feature vector of the commodity, so as to solve the problem that the commodity feature learning of the existing method is not comprehensive. At the same time, when learning the session feature vector, a gated recurrent unit network is used to fuse the global interest feature vector and the current interest feature vector to update the session feature learning method, which can effectively improve the recommendation performance.

[0006] Technical Solution: To achieve the above objective of the invention, the present invention proposes an e-commerce session recommendation method based on multi-behavior feature fusion, and the method includes the following steps:

[0007] S1: Obtain the four session behavior data of users' clicks, favorites, purchases, and adding to cart on commodities in the e-commerce database;

[0008] S2: Construct an e-commerce session recommendation model based on multi-behavior feature fusion, and the model includes a behavior feature extraction module, a commodity feature extraction module, a commodity high-order feature extraction module, a session feature extraction module, and a commodity recommendation module;

[0009] The described behavior feature extraction module is used to extract the feature vectors of the four behaviors of users' clicks, favorites, purchases, and adding to cart on commodities in the session; among them, the click behavior is the main behavior, and the three behaviors of favorite, purchase, and adding to cart are secondary behaviors based on the click behavior;

[0010] The commodity feature extraction module is composed of a hierarchical gated recurrent unit network, and is used to fuse the four extracted behavior feature vectors and output a commodity feature vector; among them, the hierarchical gated recurrent unit network is composed of three-level gated recurrent unit networks:

[0011] The first-level gated recurrent unit network takes the favorite behavior feature vector and the purchase behavior feature vector as inputs, adaptively learns the importance weights of the favorite behavior feature vector and the purchase behavior feature vector, and performs weighted summation on them to obtain a fused feature vector of the favorite and purchase behaviors;

[0012] The second-level gated recurrent unit network takes the fused feature vector of the favorite and purchase behaviors and the add-to-cart behavior feature vector as inputs, adaptively learns the importance weights of the two feature vectors, and performs weighted summation on them to obtain a fused feature vector of the secondary behaviors;

[0013] The third-level gated recurrent unit network takes the fused feature vector of secondary behaviors and the click behavior feature vector as inputs, adaptively learns the importance weights of the two feature vectors, and performs weighted summation on them to obtain the product feature vector;

[0014] The described product high-order feature extraction module is composed of a gated graph neural network, takes the adjacency matrix constructed by the click order relationship of products by users in the session and the product feature vector as inputs, and extracts the product high-order feature vector;

[0015] The described session feature extraction module is composed of an attention module and a gated recurrent unit network, adaptively fuses the current interest feature vector and the global interest feature vector, and outputs the session feature vector;

[0016] The described product recommendation module calculates the similarity between the session feature vector and the candidate product feature vector through vector dot product operation, sorts them from high to low according to the similarity, and recommends the top K products with the highest similarity to the user;

[0017] S3: Use four types of session behavior data in the e-commerce database to train the described e-commerce session recommendation model;

[0018] S4: Use the trained e-commerce session recommendation model to recommend products to the users in the session and output the recommendation results.

[0019] Preferably, for the behavior feature extraction module in the step S2, the specific steps for extracting the four behavior feature vectors of the user's click, favorite, purchase, and add to cart on products in the session are as follows:

[0020] S2.1.1: Perform one-hot encoding on n products {v1, v2,..., v n} in the e-commerce database and embed them into the d1-dimensional space respectively to obtain the d1-dimensional product representation vectors where i = 1, 2,..., n and d1 is a positive integer;

[0021] S2.1.2: Perform one-hot encoding on the three secondary behaviors of favorite, purchase, and add to cart, and embed them into the d2-dimensional space respectively to obtain the d2-dimensional favorite behavior feature vector purchase behavior feature vector add to cart behavior feature vector where d2 is a positive integer;

[0022] S2.1.3: For product v i , concatenate the product representation vector c i with the three secondary behavior feature vectors respectively to obtain the favorite behavior feature vector of product v i Purchase behavior feature vector Add to cart behavior feature vector

[0023] S2.1.4: For commodity v i , the commodity representation vector c i is padded with zeros to obtain the click behavior feature vector where 0 is a d2-dimensional zero vector.

[0024] Preferably, the specific steps for the commodity feature extraction module in step S2 to fuse the four extracted behavior feature vectors and output the commodity feature vector are as follows:

[0025] S2.2.1: The first-level gated recurrent unit network takes the favorite behavior feature vector and purchase behavior feature vector of commodity v i as inputs, adaptively learns the importance weights of the favorite behavior feature vector and purchase behavior feature vector, and performs weighted summation on them to obtain the fused feature vector of favorite and purchase behaviors, and its expression is:

[0026] g1 = σ(W1f i + W2b i )

[0027] m i = g1⊙f i +(1 - g1)⊙b i

[0028] where and are trainable weight matrices, is the weight vector used to regulate the contribution degrees of the favorite behavior feature vector and purchase behavior feature vector, σ(·) represents the sigmoid non-linear activation function, is a vector of all 1s, ⊙ represents the Hadamard product, is the fused feature vector of favorite and purchase behaviors;

[0029] S2.2.2: The second-level gated recurrent unit network takes the fused feature vector of favorite and purchase behaviors and the add to cart behavior feature vector as inputs, adaptively learns the importance weights of the two input feature vectors, and performs weighted summation on them to obtain the fused feature vector of secondary behaviors, and its expression is:

[0030] g2 = σ(W3m i + W4a i )

[0031] n i = g2⊙m i +(1 - g2)⊙a i

[0032] Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degrees of the fused feature vector of collection and purchase and the behavior feature vector of adding to the shopping cart, is the fused feature vector of secondary behaviors;

[0033] S2.2.3: The third-level gated recurrent unit network takes the fused feature vector of secondary behaviors and the click behavior feature vector as inputs, adaptively learns the importance weights of the two input feature vectors, and performs weighted summation on them to obtain the product feature vector. Its expression is:

[0034] g3 = σ(W5n i +W6r i )

[0035]

[0036] Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degrees of the click behavior feature vector and the fused feature vector of secondary behaviors, is the product feature vector.

[0037] Preferably, the product high-order feature extraction module in step S2 takes the adjacency matrix constructed based on the click order relationship of products by the user in the session and the product feature vector as inputs. The specific steps for extracting the product high-order feature vector are as follows:

[0038] S2.3.1: For different products v s,1 , v s,2 ,..., v s,l in session s, their product feature vectors are respectively expressed as According to the click order relationship v s,1 →v s,2 →…→v s,m of products by the user in the session, construct the adjacency matrix The element x ow in the adjacency matrix takes the value of 1 when o = w; when o ≠ w, if there is an order interaction relationship between product v s,o and product v s,w , that is, after clicking product v s,o , product v s,w is immediately clicked, then x ow = 1, otherwise x ow= 0; where, l represents the number of different products in session s, l is a positive integer, o = 1, 2,... l, w = 1, 2,... l, m ∈ {1, 2,..., l};

[0039] S2.3.2: For product v in session s s,j , input the product feature vector and the adjacency matrix A s in session s and the column vector s,j related to product v s,j into the L-layer gated graph neural network; after k-layer gated graph neural network learning, obtain the aggregated feature vector of product v

[0040]

[0041] where, and are learnable parameters. When k = 1, is which is the product feature vector. When k ∈ {2, 3,..., L}, is the product feature vector output by the (k - 1)-layer gated graph neural network, represents the column vector s in the adjacency matrix A s,j related to product v, represents the aggregated feature vector of product v s,j output by the k-layer gated graph neural network. L is a positive integer, j ∈ {1, 2,..., l}, k ∈ {1, 2, 3,..., L};

[0042] S2.3.3: Use the update gate of the gated network to adaptively learn the information s,j that needs to be updated from the product feature vector output by the (k - 1)-layer network for product v in the k-layer gated graph neural network. Its expression is:

[0043]

[0044] where, and are learnable parameters, is the weight vector output by the update gate in the gated network, which determines how much information in the product feature vector output by the (k - 1)-layer network is updated;

[0045] S2.3.4: Use the reset gate of the gated network to adaptively learn for product v in the k-layer gated graph neural network s,j the product feature vector The information to be discarded is used to calculate the candidate state vector of the k-th layer network, and its expression is:

[0046]

[0047] where, and are learnable parameters, is the output vector of the reset gate in the gating network, which determines how much information of the commodity feature vector output by the (k - 1)-th layer network is discarded, is the candidate state vector of the k-th layer network;

[0048] S2.3.5: Calculate the commodity feature vector output after the commodity v s,j passes through the k-th layer of the gated graph neural network, and its expression is:

[0049]

[0050] where, the commodity feature vector output after the commodity v s,j passes through the k-th layer of the gated graph neural network;

[0051] S2.3.6: When k = L, obtain the high-order commodity feature vector of v s,j and its expression is:

[0052]

[0053] where, is the high-order commodity feature vector of v s,j ; for the commodities v s,1 , v s,2 ,..., v s,l in the session s, their high-order feature vectors are all calculated by the above steps and are respectively denoted as

[0054] Preferably, the specific steps for the session feature extraction module in step S2 to adaptively fuse the current interest feature vector and the global interest feature vector to output the session feature vector are as follows:

[0055] S2.4.1: For the commodities v s,1 → v s,2 → … → v s,m clicked in sequence in the session s, regard the high-order feature vector s,m of the last clicked commodity v in the session as the current interest feature vector

[0056] S2.4.2: Calculate the weight coefficients between the high-order feature vectors of each product in the conversation and the current interest feature vector through the soft attention mechanism, and calculate the global interest feature vector based on the weight coefficients. The expression is as follows:

[0057]

[0058]

[0059] Among them, and are trainable weight matrices, is a learnable parameter, q T is the transpose of q, α j is the calculated weight coefficient, is the global interest feature vector;

[0060] S2.4.3: Use the gated recurrent unit network to adaptively fuse the obtained current interest feature vector and the global interest feature vector to obtain the conversation feature vector. The expression is as follows:

[0061] g4 = σ(W9s l +W 10 s g )

[0062] s h = g4⊙s l +(1 - g4)⊙s g

[0063] Among them, and are trainable weight matrices, is the weight vector used to regulate the contribution degrees of the current interest feature vector and the global interest feature vector, is the conversation feature vector.

[0064] Preferably, in the product recommendation module in step S2, calculate the similarity score vector between the conversation feature vector and the candidate product feature vector through the vector dot product operation. The candidate products are n products in the e-commerce database. The expression is as follows:

[0065]

[0066] Among them, is the transpose of s h ; use the softmax function to normalize the similarity score vector z i . The expression is as follows:

[0067] y i = softmax(z i )

[0068] Sort the products in descending order according to the normalized values of the similarity score vectors, and recommend the top K products to the user, where K is a positive integer.

[0069] In addition, the present invention proposes an e-commerce session recommendation system based on multi-behavior feature fusion, which is composed of a behavior feature extraction module, a product feature extraction module, a product high-order feature extraction module, a session feature extraction module, and a product recommendation module;

[0070] The described behavior feature extraction module is used to extract the feature vectors of four behaviors of the user's click, favorite, purchase, and add to cart on products in the session; among them, the click behavior is the main behavior, and the three behaviors of favorite, purchase, and add to cart are secondary behaviors based on the click behavior.

[0071] The described product feature extraction module is composed of a hierarchical gated recurrent unit network, which is used to fuse the four extracted behavior feature vectors and output a product feature vector; the hierarchical gated recurrent unit network is composed of three-level gated recurrent unit networks:

[0072] The first-level gated recurrent unit network takes the favorite behavior feature vector and the purchase behavior feature vector as inputs, adaptively learns the importance weights of the favorite behavior feature vector and the purchase behavior feature vector, and performs weighted summation on them to obtain a fused feature vector of the favorite and purchase behaviors;

[0073] The second-level gated recurrent unit network takes the fused feature vector of the favorite and purchase behaviors and the add to cart behavior feature vector as inputs, adaptively learns the importance weights of the two feature vectors, and performs weighted summation on them to obtain a fused feature vector of the secondary behaviors;

[0074] The third-level gated recurrent unit network takes the fused feature vector of the secondary behaviors and the click behavior feature vector as inputs, adaptively learns the importance weights of the two feature vectors, and performs weighted summation on them to obtain a product feature vector;

[0075] The described product high-order feature extraction module is composed of a gated graph neural network, which takes the adjacency matrix constructed by the click order relationship of the user on the products in the session and the product feature vector as inputs, and extracts the product high-order feature vector;

[0076] The described session feature extraction module is composed of an attention module and a gated recurrent unit network, which adaptively fuses the current interest feature vector and the global interest feature vector and outputs a session feature vector;

[0077] The described product recommendation module calculates the similarity between the session feature vector and the candidate product feature vectors through vector dot product operations, sorts them from high to low according to the similarity, and recommends the top K products with the highest similarity to the user.

[0078] In addition, the present invention proposes an e-commerce session recommendation device based on multi-behavior feature fusion, including at least one computing device. The computing device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements any one of the e-commerce session recommendation methods based on multi-behavior feature fusion.

[0079] In addition, the present invention proposes a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it implements any one of the e-commerce session recommendation methods based on multi-behavior feature fusion.

[0080] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:

[0081] 1. By fusing multi-behavior features, the representation of product features is enriched. In the subsequent feature learning process, it is possible to better grasp the session purpose of users and implement more targeted recommendations.

[0082] 2. Using a multi-level gated recurrent unit network to adaptively learn the relationships between various behaviors enables the model to have good trainability and improves the robustness and generalization of the session recommendation system.

[0083] 3. Using a gated recurrent unit network to fuse global interest features and current interest features to update the session feature learning method further improves the performance of the session recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 is an e-commerce session recommendation method based on multi-behavior feature fusion of the present invention;

[0085] Figure 2 is a structural diagram of the multi-level gated recurrent unit network used in the present invention;

[0086] Figure 3 is a schematic diagram of a gated graph neural network for learning high-order feature vectors of products in a session of the present invention;

[0087] Figure 4 is a structural diagram of a gated recurrent unit network for fusing global interest feature vectors and current interest feature vectors of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0088] The following further elaborates on the specific implementation manners of the present invention in conjunction with the accompanying drawings of the specification.

[0089] As Figure 1 shown, an e-commerce session recommendation method based on multi-behavior feature fusion provided by an embodiment of the present invention mainly includes the following steps:

[0090] Step S1: Obtain four types of session behavior data of users' clicks, collections, purchases, and adding to the shopping cart on goods in the e-commerce database. In this embodiment, the UserBehavior database is used, which is a Taobao user behavior database provided by Alibaba. This database contains all behaviors (behaviors include clicks, collections, purchases, and adding to the shopping cart) of approximately one million random users who had behaviors between September 11, 2017, and December 3, 2017. Each row of the data set represents a user behavior, which is composed of user ID, product ID, product category ID, behavior type, and timestamp, and is separated by commas. Preprocess the session data in the database. For a session with a length of w, the first w - 1 clicked products in the session are used as training samples in this embodiment, and the last clicked product in the session is used as the verification sample for this training sample. All sessions in the database are processed according to the above method.

[0091] Step S2: Construct an e-commerce session recommendation model based on multi-behavior feature fusion. This model includes a behavior feature extraction module, a product feature extraction module, a product high-order feature extraction module, a session feature extraction module, and a product recommendation module.

[0092] S2.1 Behavior feature extraction module: The specific steps for extracting the four behavior feature vectors of users' clicks, collections, purchases, and adding to the shopping cart on goods in the session are as follows:

[0093] S2.1.1: Perform embedding encoding on n products {v1, v2, …, v n} in the e-commerce database respectively to obtain product representation vectors with d1 dimensions where i = 1, 2, …, n. In this embodiment, n = 4162024 and d1 = 100;

[0094] S2.1.2: Perform embedding encoding on the three secondary behaviors of collection, purchase, and adding to the shopping cart respectively to obtain a collection behavior feature vector with d2 dimensions purchase behavior feature vector adding to the shopping cart behavior feature vector In this embodiment, d2 = 1;

[0095] S2.1.3: For product v i , the product representation vector c iConcatenate with three secondary behavior feature vectors respectively to obtain the commodity v i 's collection behavior feature vector Purchase behavior feature vector Add to cart behavior feature vector

[0096] S2.1.4: For the commodity v i , perform zero-padding on the commodity representation vector c i to obtain the click behavior feature vector In this embodiment, 0 is a 1-dimensional constant.

[0097] S2.2 Commodity feature extraction: As Figure 2 shown, the specific steps for fusing the four extracted behavior feature vectors to output the commodity feature vector are as follows:

[0098] S2.2.1: The first-level gated recurrent unit network takes the collection behavior feature vector and purchase behavior feature vector of the commodity v i as inputs, adaptively learns the importance weights of the collection behavior feature vector and purchase behavior feature vector, and performs weighted summation on them to obtain the fused feature vector of the collection and purchase behaviors. Its expression is:

[0099] g1 = σ(W1f i + W2b i )

[0100] m i = g1⊙f i +(1 - g1)⊙b i

[0101] where and are trainable weight matrices, is the weight vector used to regulate the contribution degrees of the collection behavior feature vector and purchase behavior feature vector, σ(·) represents the sigmoid non-linear activation function, is the all-1 vector, ⊙ represents the Hadamard product, is the fused feature vector of the collection and purchase behaviors;

[0102] S2.2.2: The second-level gated recurrent unit network takes the fused feature vector of the collection and purchase behaviors and the add to cart behavior feature vector as inputs, adaptively learns the importance weights of the two input feature vectors, and performs weighted summation on them to obtain the fused feature vector of the secondary behaviors. Its expression is:

[0103] g2 = σ(W3m i + W4a i )

[0104] n i = g2⊙m i +(1 - g2)⊙a i

[0105] Wherein, and are trainable weight matrices, is a weight vector for regulating the contribution degrees of the fused feature vector of collection and purchase and the feature vector of the add - to - cart behavior, is the fused feature vector of the secondary behavior;

[0106] S2.2.3: The third - level gated recurrent unit network takes the fused feature vector of the secondary behavior and the click - behavior feature vector as inputs, adaptively learns the importance weights of the two input feature vectors, and performs weighted summation on them to obtain the product feature vector. Its expression is:

[0107] g3 = σ(W5n i + W6r i )

[0108]

[0109] Wherein, and are trainable weight matrices, is a weight vector for regulating the contribution degrees of the click - behavior feature vector and the fused feature vector of the secondary behavior, is the product feature vector.

[0110] The product feature extraction module is continuously iteratively trained through the error backpropagation algorithm until the model parameters reach the optimal. After that, the four behavior feature vectors can be input into the trained product feature extraction module to extract the product feature vector v i .

[0111] S2.3 Product high - order feature extraction module: As Figure 3 shown, taking the adjacency matrix constructed based on the click - order relationship of the products by the user in the session and the product feature vector as inputs, the specific steps for extracting the product high - order feature vector are as follows:

[0112] S2.3.1: Taking the training sample session s in the database as an example, its validation sample is v s,c ; For different products v s,1 , v s,2 ,..., v s,l in the training sample session s, in this embodiment, l = 6, the products v s,1 , v s,2 , v s,3 , v s,4 , vs,5 , v s,6 , the commodity feature vectors can be respectively expressed as According to the click order relationship of commodities by the user in the training sample session s: v s,1 →v s,2 →v s,3 →v s,4 →v s,3 →v s,5 →v s,1 →v s,6 →v s,3 , construct the adjacency matrix In this embodiment, Considering the influence of the commodity itself, we add a self-loop for each commodity. Therefore, the main diagonal elements of the adjacency matrix A s are all 1;

[0113] S2.3.2: Taking the commodity v s,3 in the training sample session s as an example, input the commodity feature vectors in the training sample session s and the column vectors in the adjacency matrix A s related to the commodity v s,3 into the L-layer gated graph neural network; after learning by the k-th layer gated graph neural network, obtain the aggregated feature vector of the commodity v s,3 , and its expression is:

[0114]

[0115] Among them, and are learnable parameters. When k = 1, is which is the commodity feature vector. When k ∈ {2, 3,..., L}, is the commodity feature vector output by the (k - 1)-th layer gated graph neural network, represents the column vector in the adjacency matrix A s related to the commodity v s,3 , represents the aggregated feature vector of the commodity v s,3 output by the k-th layer gated graph neural network. In this embodiment, L = 3, j ∈ {1, 2,..., l}, k ∈ {1, 2, 3,..., L};

[0116] S2.3.3: Using the update gate of the gated network, adaptively learn the information that needs to be updated for the commodity v s,3 in the k-th layer gated graph neural network, which is the commodity feature vector output by the (k - 1)-th layer network, and its expression is:

[0117] ​

[0118] Among them, and are learnable parameters, is the weight vector of the output of the update gate in the gated network, which determines the commodity feature vector output by the (k - 1)-th layer network how much information is updated;

[0119] S2.3.4: Using the reset gate of the gated network, adaptively learn the information of the commodity v to be discarded in the k-th layer gated graph neural network, and calculate the candidate state vector of the k-th layer network, and its expression is: s,3 the commodity feature vector output by the (k - 1)-th layer network and calculate the candidate state vector of the k-th layer network, and its expression is:

[0120]

[0121] Among them, and are learnable parameters, is the output vector of the reset gate in the gated network, which determines how much information of the commodity feature vector output by the (k - 1)-th layer network is discarded, is the candidate state vector of the k-th layer network;

[0122] S2.3.5: Calculate the commodity feature vector of the commodity v output after passing through the k-th layer gated graph neural network, and its expression is: s,3 and calculate the commodity feature vector of the commodity v output after passing through the k-th layer gated graph neural network, and its expression is:

[0123]

[0124] Among them, the commodity v s,3 the commodity feature vector output after passing through the k-th layer gated graph neural network;

[0125] S2.3.6: When k = L, obtain the high-order commodity feature vector of v, and its expression is: s,3 and its expression is:

[0126]

[0127] Among them, is the high-order commodity feature vector of v; for other commodities v s,3 in the training sample session s, v s,1 , v s,2 , v s,4 , v s,5 , v s,6 , their high-order feature vectors can all be calculated by the above steps, and are respectively expressed as

[0128] Continuously iterate and train the commodity high-order feature extraction module through the error backpropagation algorithm until the model parameters reach the optimal state. After that, the commodity feature vector can be input into the trained commodity high-order feature extraction module to extract the corresponding commodity high-order feature vector.

[0129] S2.4 Session Feature Extraction Module: As Figure 4 shown, the specific steps for adaptively fusing the current interest feature vector and the global interest feature vector to output the session feature vector are as follows:

[0130] S2.4.1: Taking the training sample session s in the database as an example, for the commodities v s,1 →v s,2 →v s,3 →v s,4 →v s,3 →v s,5 →v s,1 →v s,6 →v s,3 clicked in sequence in the training sample session s, the high-order feature vector s,3 of the last clicked commodity v in the training sample session is regarded as the current interest feature vector

[0131] S2.4.2: Calculate the weight coefficients of the high-order feature vectors of each commodity in the session and the current interest feature vector through the soft attention mechanism, and calculate the global interest feature vector according to the weight coefficients. Its expression is:

[0132]

[0133] Among them, and are trainable weight matrices, is a learnable parameter, is the transpose of q, α j is the calculated weight coefficient, is the global interest feature vector. In this embodiment, j ∈ {1, 2, 3, 4, 5, 6};

[0134] S2.4.3: Use the gated recurrent unit network to adaptively fuse the obtained current interest feature vector and the global interest feature vector to obtain the session feature vector. Its expression is:

[0135] g4 = σ(W9s l +W 10 s g )

[0136] s h = g4 ⊙ s l +(1 - g4) ⊙ sg

[0137] Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degrees of the current interest feature vector and the global interest feature vector, is the session feature vector.

[0138] The session feature extraction module is continuously iteratively trained through the error backpropagation algorithm until the model parameters reach the optimal values. After that, the high-order commodity feature vector can be input into the trained session feature extraction module to extract the session feature vector.

[0139] S2.5 Commodity recommendation module: Calculate the similarity score vector between the session feature vector and the candidate commodity feature vectors through vector dot product operation. The candidate commodities are n commodities in the e-commerce database, and its expression is:

[0140]

[0141] Among them, is the transpose of s h ; Use the softmax function to normalize the similarity score vector z i , and its expression is:

[0142] y i = softmax(z i )

[0143] Sort according to the normalization values of the similarity score vector from high to low, and recommend the top K commodities to the user. In this embodiment, K = 5.

[0144] Compare the recommendation result with the validation sample v s,c of the training sample session s, calculate two metrics of recall rate and mean reciprocal rank, and continuously iteratively train through the error backpropagation algorithm until the two metrics of recall rate and mean reciprocal rank reach the optimal values.

[0145] Step S3 uses four types of session behavior data in the e-commerce database to train the e-commerce session recommendation model: In this embodiment, use the training samples in the UserBehavior database, adopt the backpropagation algorithm, and use the cross-entropy function as the loss function to iteratively train the e-commerce session recommendation model until all the parameters in the model reach the optimal values.

[0146] Step S4 uses the trained e-commerce session recommendation model to recommend commodities to the users in the session and output the recommendation results.

[0147] Those skilled in the art can understand that the steps in the embodiments can be adaptively changed and arranged in one or more systems different from the embodiments. The modules, units, or components in the embodiments can be combined into one module, unit, or component, and in addition, they can be divided into multiple sub-modules, sub-units, or sub-components.

Claims

1. An e-commerce conversation recommendation method based on multi-behavior feature fusion, characterized in that The method includes the following steps: S1: Obtain the four types of session behavior data of users' clicks, favorites, purchases, and adding to the shopping cart for products in the e-commerce database; S2: Construct an e-commerce session recommendation model based on the fusion of multi-behavior features. This model includes a behavior feature extraction module, a product feature extraction module, a product high-order feature extraction module, a session feature extraction module, and a product recommendation module; The described behavior feature extraction module is used to extract the feature vectors of the four behaviors of users' clicks, favorites, purchases, and adding to the shopping cart for products in the session. Among them, the click behavior is the main behavior, and the three behaviors of favorite, purchase, and adding to the shopping cart are secondary behaviors based on the click behavior; The described product feature extraction module is composed of a hierarchical gated recurrent unit network and is used to fuse the four extracted behavior feature vectors and output the product feature vector. Among them, the hierarchical gated recurrent unit network is composed of three-level gated recurrent unit networks: The first-level gated recurrent unit network takes the favorite behavior feature vector and the purchase behavior feature vector as inputs, adaptively learns the importance weights of the favorite behavior feature vector and the purchase behavior feature vector, and performs weighted summation on them to obtain the fused feature vector of the favorite and purchase behaviors; The second-level gated recurrent unit network takes the fused feature vector of the favorite and purchase behaviors and the adding-to-cart behavior feature vector as inputs, adaptively learns the importance weights of the two feature vectors, and performs weighted summation on them to obtain the fused feature vector of the secondary behaviors; The third-level gated recurrent unit network takes the fused feature vector of the secondary behaviors and the click behavior feature vector as inputs, adaptively learns the importance weights of the two feature vectors, and performs weighted summation on them to obtain the product feature vector; The described product high-order feature extraction module is composed of a gated graph neural network and takes the adjacency matrix constructed based on the click order relationship of products by users in the session and the product feature vector as inputs to extract the product high-order feature vector; The described session feature extraction module is composed of an attention module and a gated recurrent unit network, adaptively fuses the current interest feature vector and the global interest feature vector, and outputs the session feature vector; The described product recommendation module calculates the similarity between the session feature vector and the candidate product feature vectors through vector dot product operations, sorts them from high to low according to the similarity, and recommends the top K products with the highest similarity to the user; S3: Use the four types of session behavior data in the e-commerce database to train the e-commerce session recommendation model; S4: Use the trained e-commerce session recommendation model to recommend products to the users in the session and output the recommendation results; The specific steps for the product high-order feature extraction module in step S2 to extract the product high-order feature vector with the adjacency matrix constructed based on the click order relationship of products by users in the session and the product feature vector as inputs are as follows: S2.3.1: For different products v in session s s,1 , v s,2 ,..., v s,l , whose product feature vectors are respectively represented as According to the click order relationship v of the products by the user in the session s,1 →v s,2 →…→v s,m , construct an adjacency matrix Element x in the adjacency matrix ow , when o = w, the value is 1; when o ≠ w, if product v s,o and product v s,w have an order interaction relationship, that is, after clicking product v s,o , immediately click product v s,w , then x ow = 1, otherwise x ow = 0; where l represents the number of different products in session s, l is a positive integer, o = 1, 2,... l, w = 1, 2,... l, m ∈ {1, 2,..., l}; S2.3.2: For product v in session s s,j , the product feature vector and the adjacency matrix A s in session s, and the column vector s,j related to product v s,j are input into the L-layer gated graph neural network; after k-layer gated graph neural network learning, the aggregated feature vector of product v Among them, and are learnable parameters. When k = 1, is namely is the commodity feature vector. When k ∈ {2, 3,..., L}, is the commodity feature vector output by the (k - 1)-th layer gated graph neural network, represents the adjacency matrix A s the column vector related to the commodity v s,j in it, represents the aggregated feature vector of the commodity v s,j at the k-th layer gated graph neural network. L is a positive integer, j ∈ {1, 2,..., l}, k ∈ {1, 2, 3,..., L}; S2.3.3: Use the update gate of the gating network to adaptively learn the merchandise v in the k-th layer of the gated graph neural network s,j The merchandise feature vector output by the network in the (k-1)-th layer The information to be updated, and its expression is: Among them, and are learnable parameters, is the weight vector of the output of the update gate in the gating network, which determines how much information of the commodity feature vector output by the network of the (k - 1)-th layer is updated; S2.3.4: Using the reset gate of the gating network, adaptively learn the information that needs to be discarded from the commodity feature vector of commodity v output by the network at the (k - 1)-th layer in the k-th layer gated graph neural network, and calculate the candidate state vector of the k-th layer network. The expression is as follows: s,j The commodity feature vector output by the network at the (k - 1)-th layer and calculate the candidate state vector of the k-th layer network. The expression is as follows: Among them, and are learnable parameters, is the output vector of the reset gate in the gating network, which determines how much information of the commodity feature vector output by the network of the (k - 1)-th layer is discarded, and is the candidate state vector of the k-th layer network; S2.3.5: Calculate commodity v s,j The commodity feature vector output after passing through the k-th layer of gated graph neural network, and its expression is: Among them, Commodity v s,j The commodity feature vector output after passing through k layers of gated graph neural networks; S2.3.6: When k = L, the high-order feature vector of the commodity v s,j is obtained, and its expression is: Among them, is the high-order feature vector of commodity v s,j ; the high-order feature vectors of commodities v s,1 , v s,2 ,..., v s,l in session s, which are all calculated by the above steps and are respectively represented as 2. The e-commerce conversation recommendation method based on multi-behavior feature fusion according to claim 1, wherein The specific steps for the behavior feature extraction module in step S2 to extract the four behavior feature vectors of users' clicks, favorites, purchases, and adding to the shopping cart for products in the session are as follows: S2.1.1: Perform one-hot encoding on n commodities {v1, v2, …, v n} in the e-commerce database and embed them into a d1-dimensional space respectively to obtain d1-dimensional commodity representation vectors where i = 1, 2, …, n and d1 is a positive integer; S2.1.2: Perform one-hot encoding on the three secondary behaviors of collection, purchase, and adding to the shopping cart, and embed them into the d2-dimensional space respectively to obtain the d2-dimensional collection behavior feature vector Purchase behavior feature vector Adding to the shopping cart behavior feature vector Among them, d2 is a positive integer; S2.1.3: For commodity v i , splice the commodity representation vector c i with the three secondary behavior feature vectors respectively to obtain the collection behavior feature vector i of commodity v purchase behavior feature vector add-to-cart behavior feature vector S2.1.4: For commodity v i , perform zero-padding on the commodity representation vector c i to obtain the click behavior feature vector where 0 is a d2-dimensional zero vector.

3. The e-commerce conversation recommendation method based on multi-behavior feature fusion according to claim 2, wherein The specific steps for the commodity feature extraction module in step S2 to fuse the four extracted behavioral feature vectors and output a commodity feature vector are as follows: S2.2.1: The first-level gated recurrent unit network takes the collection behavior feature vector and purchase behavior feature vector of commodity v i as input, adaptively learns the importance weights of the collection behavior feature vector and purchase behavior feature vector, and performs weighted summation on them to obtain the fused feature vector of collection and purchase behaviors. Its expression is: g1 = σ(W1f i + W2b i ) m i = g1 ⊙ f i + (1 - g1) ⊙ b i Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degrees of the collection behavior feature vector and the purchase behavior feature vector, σ(·) represents the sigmoid non-linear activation function, is a vector of all 1s, ⊙ represents the Hadamard product, is the fused feature vector of the collection and purchase behavior features; S2.2.2: The second-level gated recurrent unit network takes the fused feature vector of the collection and purchase behavioral features and the add-to-cart behavioral feature vector as inputs, adaptively learns the importance weights of the two input feature vectors, and performs weighted summation on them to obtain the fused feature vector of the secondary behavior. Its expression is: g2 = σ(W3m i + W4a i ) n i = g2 ⊙ m i + (1 - g2) ⊙ a i Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degrees of the fused feature vectors of collection and purchase and the feature vector of the add-to-cart behavior, is the fused feature vector of the secondary behavior; S2.2.3: The third-level gated recurrent unit network takes the fused feature vector of the secondary behavior and the click behavioral feature vector as inputs, adaptively learns the importance weights of the two input feature vectors, and performs weighted summation on them to obtain the commodity feature vector. Its expression is: g3 = σ(W5n i + W6r i ) Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degree of the fusion feature vector of the click behavior feature vector and the secondary behavior, is the commodity feature vector.

4. The e-commerce session recommendation method based on multi-behavior feature fusion according to claim 1, characterized in that The specific steps for the session feature extraction module in step S2 to adaptively fuse the current interest feature vector and the global interest feature vector and output a session feature vector are as follows: S2.4.1: For the products v clicked in sequence in session s s,1 →v s,2 →…→v s,m , the high-order feature vector of the last clicked product v in the session s,m is regarded as the current interest feature vector ​ S2.4.2: Calculate the weight coefficients of the high-order feature vectors of each commodity in the session and the current interest feature vector through a soft attention mechanism, and calculate the global interest feature vector according to the weight coefficients. Its expression is: Among them, and are trainable weight matrices, is a learnable parameter, q T is the transpose of q, α j is a calculated weight coefficient, is a global interest feature vector; S2.4.3: Use a gated recurrent unit network to adaptively fuse the obtained current interest feature vector and the global interest feature vector to obtain the session feature vector. Its expression is: g4 = σ(W9s l +W 10 s g ) s h = g4 ⊙ s l + (1 - g4) ⊙ s g Among them, and are trainable weight matrices, is a weight vector used to regulate the contribution degrees of the current interest feature vector and the global interest feature vector, is a session feature vector.

5. The e-commerce conversation recommendation method based on multi-behavior feature fusion according to claim 4, characterized in that, The commodity recommendation module in step S2 calculates the similarity score vector between the session feature vector and the candidate commodity feature vectors through vector dot product operations. The candidate commodities are n commodities in the e-commerce database. Its expression is: Among them, is the transpose of s h ; the similarity score vector z i is normalized using the softmax function, and its expression is: y i = softmax(z i ) Sort according to the normalization values of the similarity score vector from high to low, and recommend the top K commodities to the user, where K is a positive integer.

6. An e-commerce session recommendation device based on multi-behavior feature fusion, characterized in that It includes at least one computing device. The computing device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is loaded into the processor, it implements an e-commerce session recommendation method according to any one of claims 1-5.

7. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements an e-commerce session recommendation method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Graph neural network-based session recommendation method and system fused with self-attention mechanism

    CN114971784A