An e-commerce network commodity recommendation method and system

By constructing an e-commerce product recommendation model using a graph attention network based on interest subgraphs, this approach solves the problem of capturing high-order collaborative filtering signals in existing technologies, enabling more accurate user interest mining and personalized recommendations, and improving the recommendation performance of e-commerce platforms.

CN115170227BActive Publication Date: 2026-05-22SHANXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANXI UNIV
Filing Date
2022-06-27
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing e-commerce product recommendation methods struggle to effectively capture high-level collaborative filtering signals between users and products, resulting in insufficient recommendation accuracy.

Method used

A graph attention network based on interest subgraphs is adopted to capture high-order collaborative filtering signals of users and products within the interest subgraph through multi-layer convolution operations. An e-commerce product recommendation model is constructed using the graph attention network, which includes a first-order information propagation module, a subgraph generation module, a high-order information propagation module, and a prediction module. The model is trained by minimizing the objective function.

Benefits of technology

It enables accurate discovery of users' potential interests, improves the precision and personalization of product recommendations, and enhances user satisfaction and merchant revenue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170227B_ABST
    Figure CN115170227B_ABST
Patent Text Reader

Abstract

The application belongs to the field of data mining, and discloses an e-commerce network commodity recommendation method and system.A kind of e-commerce network commodity recommendation method described in the application includes user-commodity bipartite graph construction and interaction matrix construction link, e-commerce network commodity recommendation model construction and training link, e-commerce network commodity recommendation result output link three main components.E-commerce network commodity recommendation method uses graph attention neural network to construct e-commerce network commodity recommendation model, aims at improving the accuracy of recommendation.The e-commerce network commodity recommendation system described in the application includes computer processor and memory, user-commodity bipartite graph construction and interaction matrix construction unit, e-commerce network commodity recommendation model training unit, e-commerce network commodity recommendation result output unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data mining, and in particular to a method and system for recommending online products in e-commerce. Background Technology

[0002] The emergence and widespread adoption of the internet have provided users with a wealth of information, satisfying their information needs. However, with the rapid development of the network and the dramatic increase in online information, users are unable to extract truly useful information from a vast amount of data, thus reducing the efficiency of information use—this is the so-called information overload problem. A highly promising solution to this problem is recommendation systems. Recommendation systems have become one of the most important technologies for various online platforms, such as product recommendations on Taobao and JD.com, video recommendations on Douyin, and question recommendations on Zhihu. With the continuous expansion of e-commerce and the rapid growth in the number and variety of goods, how to select the products users want to buy from a large pool of options has become an urgent problem to solve. E-commerce online product recommendation systems aim to mine users' interests and preferences through their historical purchase records and then recommend products that they may be interested in. Using e-commerce online product recommendation systems can not only provide personalized recommendations for users but also increase merchant revenue and create more economic value.

[0003] The core of recommendation is to analyze users' historical purchase records to study their interests and preferences, and then identify products that users may be interested in from a large number of items. Traditional recommendation methods mainly include user-based collaborative filtering, item-based collaborative filtering, matrix factorization, and neural collaborative filtering. However, these methods face the problem of data sparsity and cannot capture high-order collaborative filtering signals between users and products. Summary of the Invention

[0004] The technical problem this invention aims to solve is to provide an e-commerce online product recommendation method and system. This method is based on a graph attention network using interest subgraphs. Within the interest subgraph, the graph attention network performs multi-layer convolutional operations to capture high-order collaborative filtering signals between users and products. Since the subgraph consists of users with similar interests and their interactions, it avoids propagating negative information from dissimilar high-order neighbors into the feature vector. This invention can fully mine users' potential interests to provide accurate recommendations.

[0005] To achieve the above objectives, the present invention employs the following technical solutions:

[0006] This invention provides an e-commerce product recommendation method. First, it acquires user shopping data, including each user's ID, the IDs of the products purchased by the user, and the user's purchase history tags for each product. These tags indicate whether a user has purchased the product. Then, it constructs a user-product bipartite graph and an interaction matrix using the acquired data. Next, it designs an attention network recommendation model based on interest subgraphs, comprising four modules: a first-order information propagation module, a subgraph generation module, a higher-order information propagation module, and a prediction module. Finally, it trains the model using the shopping data to obtain the user feature vector for each user and the product feature vector for each product when the model reaches its optimal solution. For any given user, it obtains the user's predicted preference for all products based on the inner product of the user's feature vector and the feature vectors of each product, and then obtains the user's product recommendation list based on this predicted preference.

[0007] This method specifically includes the following four steps:

[0008] S10. Obtain and load user shopping data from e-commerce shopping platforms, and use the user shopping data to construct a user-product bipartite graph and a user-product interaction matrix;

[0009] S20. Based on the interaction matrix established in step S10, construct an e-commerce online product recommendation model using a graph attention network.

[0010] S30. For the e-commerce online product recommendation model constructed in step S20, design an objective function and train the model by minimizing the objective function;

[0011] S40. Using the e-commerce online product recommendation model constructed in step S20 and the optimal parameters of the model determined through iterative training in step S30, the predicted recommendation results are output.

[0012] Furthermore, the user shopping data in step S10 includes each user's ID, the ID of the product purchased by the user, and the user's purchase history tag for the product. The tag is used to indicate whether the user has purchased the product.

[0013] Furthermore, the user-product bipartite graph constructed using user shopping data is G = (U, I, E), where: U = {u1, u2, ..., u...} N} represents a set of N users, where N represents the number of users, u n Let I represent the nth user, where n = {1, 2, ..., N}; and I = {i1, i2, ..., i...}. M} represents a set of M items, where M represents the quantity of the items, and i m Let m represent the m-th item, where m = {1, 2, ..., M}; E = {e nm}n=1,2,...,N,m=1,2,...,M This represents a user's collection of purchases of different goods; if user u n Purchase goods i m Then user u n and product i m There is an interactive relationship; otherwise, there is no interactive relationship. nm Indicates user u n and product i m The interaction relationship, if user u n With product i m If there is interaction, then e nm =1, otherwise, e nm =0.

[0014] Furthermore, the construction of the user-product interaction matrix specifically involves:

[0015] Construct an M×N dimensional interaction matrix for the user-item bipartite graph G=(U,I,E), denoted as A. Let the value of each element in A represent the interaction relationship between users and items in the network G=(U,I,E), i.e., the element A in the i-th row and j-th column (1≤i≤M, 1≤j≤N). ij Represents the i-th user node u in the network i and the j-th product node i j The interaction between them, if u i and i j If there is interaction between them, then A ij =1, otherwise A ij =0.

[0016] Furthermore, the e-commerce product recommendation model in step S20 mainly includes four modules: a first-order information propagation module, a subgraph generation module, a higher-order information propagation module, and a prediction module. The first-order information propagation module aggregates users' direct interest preferences through a single-layer graph attention convolution operation; the subgraph generation module groups users with similar interests and their interactions into the same subgraph; the higher-order information propagation module obtains users' potential interest preferences through multi-layer graph attention convolution operations; and the prediction module calculates the similarity between users and products and recommends the top ten products to users.

[0017] Furthermore, step S20 includes the following specific steps:

[0018] S21. Using a graph attention network, the user-item bipartite graph G = (U, I, E) is encoded into a vector representation in a low-dimensional space, where user u and item i are each represented by a d-dimensional vector. First-order neighbors represent the direct interaction objects between users and items; user u's first-order neighbors are the items it directly purchases, and item i's first-order neighbors are the users who directly purchase it. Since the direct interaction between users and items provides the most important and reliable user interest information, all first-order neighbors participate in the graph attention convolution operation during first-order information propagation. Because users have different preferences for different items, different weights are assigned to directly purchased items; similarly, for a given item, different users have different preferences for it, so different weights are assigned to users who directly purchase that item. The formal representation of the first-order information propagation process is shown below:

[0019]

[0020]

[0021] in, and These are the first-order feature vectors of user u and product i, respectively, which are feature vectors that aggregate first-order neighbor information; It integrates information about products directly purchased by users and captures users' explicit interests and preferences; and These are the initial feature vectors of user u and item i, respectively; N u Let |N| represent the set of items purchased by user u. u | The number of items purchased for user u; N i Let |N| represent the set of users who purchased product i. i | represents the number of users who purchased product i; α ui The weight of item i among all items purchased by user u; α iu Let α be the weight of user u among all users who purchase item i; where α ui and α iu The definitions are shown in equations (3) and (4):

[0022]

[0023]

[0024] In the formula, LeakyReLU is a nonlinear activation function, defined by equation (5); a is the weight vector; W is the weight matrix; e u The feature vector representing user u; e i This represents the feature vector of product i; || is the join operation;

[0025]

[0026] In the formula, λ is the negative input slope, with a value of 0.01;

[0027] S22. Furthermore, users with similar interests are grouped into the same subgraph, which consists of users with similar interests and their interactions. This process can be viewed as a node classification task. The feature vector representation of the user is shown in Equation (6):

[0028]

[0029] Among them, F u It is the feature vector of user u, which is a fusion of the initial feature vector and the first-order feature vector; It is the initial feature vector of user u; is the first-order feature vector of user u; W1 and b1 are the encoding weights and biases, respectively; LeakyRelu(x) is the activation function as shown in equation (5), λ is the negative input slope, with a value of 0.01; the formal representation of the subgraph generation process is as follows:

[0030] U h =LeakyReLU(W2F u +b2) (7)

[0031] U0 = W3U h +b3 (8)

[0032] Among them, U h F represents the fused feature vector of user u; U0 represents the predicted vector, and the position of the largest value of U0 indicates the assigned subgraph; u is the feature vector of user u fused with the initial feature vector and the first-order feature vector; W2 and W3 are both encoding weights, and b2 and b3 are both biases; LeakyRelu(x) is the activation function, as shown in equation (5), and λ is the negative input slope, with a value of 0.01;

[0033] S23. Furthermore, to uncover users' latent interests and preferences, high-order collaborative filtering signals between users and items are captured through multi-layer graph attention convolution operations in each subgraph. This is achieved by mining the high-order connectivity between users and items to capture the latent interests of users with their high-order item neighbors. In subgraph G... s Internally, graph attention convolution operations are used to aggregate the feature information of neighbors. One layer of graph attention convolution operations aggregates the feature information of first-order neighbors, and k layers of graph attention convolution operations aggregate the features of k-order neighbors. Formalized as follows:

[0034]

[0035]

[0036] in, It is the feature vector of user u that aggregates information from its (k+1)th order neighbors; It is the feature vector of product i that aggregates information about its (k+1)th order neighbors within the subgraph s; It is the feature vector of user u that aggregates k-order neighbor information; The feature vector of item i that aggregates information from its k-th order neighbors within the subgraph s; N u Let |N| represent the set of items purchased by user u. u | The number of items purchased for user u; N i Let |N| represent the set of users who purchased product i. i | represents the number of users who purchased product i; α ui The weight of item i among all items purchased by user u; α iu Let α be the weight of user u among all users who purchase item i; where α ui and α iu The definitions are shown in equations (3) and (4); the feature vectors of users and products learned from each convolutional layer are fused by weighted summation, and the formal representation is shown below:

[0037]

[0038]

[0039] Among them, e u It is the final feature vector of user u; e i It is the final feature vector of product i; α k The weights of the k-th order eigenvectors are represented by , where k is the number of graph attention convolutional layers; Let k represent the k-th order feature vector of user u, which is the feature vector of user u after performing k-layer graph attention convolution operations; Let k represent the k-th order feature vector of product i. It is the feature vector of product i after performing k layers of graph attention convolution operations. The graph attention convolution operation is to aggregate information from neighbors and explore the user's potential interests.

[0040] S24. Furthermore, the inner product formula, as shown in equation (13), is used to predict user u's preference for item i:

[0041]

[0042] in, The inner product of the user feature vector and the product feature vector represents the user's predicted preference for the product; e u It is the final feature vector of user u; e i It is the final feature vector of product i.

[0043] Furthermore, step S30 includes the following specific steps:

[0044] S31. Train the first-order information propagation module, subgraph generation module, higher-order information propagation module and prediction module described in S20. The objective function is shown in equation (14):

[0045]

[0046] Among them, O={(u,i + i - )|(u,i + )∈R + ,(u,i - )∈R -} represents the training set, R + This indicates that users in the training set interact with products. - This indicates that there is no interaction between users and products in the training set; i + i represents the set of products that user u has interacted with. - This represents the set of products that have not been interacted with by user u. This indicates the predicted preferences of users and products that have interacted with the product. λ represents the predicted preferences of users and products without interaction behavior; λ and Θ represent the regularization parameter and model parameter of the model, respectively; the σ activation function is defined as in equation (15):

[0047]

[0048] Where e is a constant; x represents a function variable.

[0049] S32. Use gradient descent to perform backpropagation and update the connection weight matrix in the e-commerce online product recommendation model.

[0050] Furthermore, step S40 includes the following specific steps:

[0051] S41. Use formula (13) to calculate the predicted preferences of users and products. For a certain user, the predicted preferences of the user for all products are obtained by the inner product of the user feature vector and the feature vector of each product. Based on the predicted preferences of the user for all products, the top-ranked products are selected for recommendation.

[0052] S42. Output the results of e-commerce product recommendations to users and relevant e-commerce platform operation analysts. This allows them to recommend products that users are interested in, providing personalized recommendation services. Operation analysts can make accurate recommendations by analyzing user preferences, thereby improving user satisfaction and loyalty, increasing sales and creating more economic value.

[0053] This invention also provides an e-commerce online product recommendation system for implementing the above-mentioned e-commerce online product recommendation method, including a computer processor and memory, an e-commerce online user-product bipartite graph construction and interaction matrix construction unit, an e-commerce online product recommendation model training unit, and an e-commerce online product recommendation result output unit.

[0054] Furthermore, the e-commerce network user-product bipartite graph construction and interaction matrix construction unit constructs a user-product bipartite graph and interaction matrix based on user shopping data and loads them into computer memory; the e-commerce network product recommendation model training unit constructs an e-commerce network product recommendation model based on the constructed user-product bipartite graph and interaction matrix, and determines the optimal values ​​of the parameters in the model through iterative calculation, calculates the inner product based on the optimal values ​​of the parameters in the model, and obtains the recommendation result; the e-commerce network product recommendation result output unit is used to output the e-commerce network product recommendation result; the specific data processing and calculation work in all units is completed by the computer processor, and all units interact with the data in the computer memory.

[0055] Compared with the prior art, the present invention has the following advantages:

[0056] 1. The e-commerce online product recommendation method of the present invention utilizes graph attention networks to construct an e-commerce online product recommendation model, which can capture high-order collaborative filtering signals between users and products, fully explore the relationship between users and products, and obtain users' potential interests and preferences.

[0057] 2. The e-commerce product recommendation method of the present invention divides users with similar interests into the same subgraph. The subgraph consists of users with similar interests and their interaction items. Multi-layer graph attention convolution operation is performed in the subgraph, which can avoid the negative information of high-order neighbors with dissimilar interests from being propagated into the feature vector, so as to obtain more accurate feature vectors of users and products. User preferences are predicted by inner product, thereby obtaining a more accurate recommendation list. Attached Figure Description

[0058] Figure 1 This is a structural diagram of the e-commerce online product recommendation model in step S20 of the present invention;

[0059] Figure 2 This is a system structure diagram of an e-commerce online product recommendation system according to the present invention;

[0060] Figure 3 This is a flowchart of an e-commerce online product recommendation method according to the present invention. Detailed Implementation

[0061] To further illustrate the technical solution of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0062] Example 1

[0063] An e-commerce product recommendation method includes the following steps:

[0064] S10. Obtain and load user shopping data from e-commerce shopping platforms, and use the user shopping data to construct a user-product bipartite graph and a user-product interaction matrix;

[0065] S20. Based on the interaction matrix established in step S10, construct an e-commerce online product recommendation model using a graph attention network.

[0066] S30. For the e-commerce online product recommendation model constructed in step S20, design an objective function and train the model by minimizing the objective function;

[0067] S40. Using the e-commerce online product recommendation model constructed in step S20 and the optimal parameters of the model determined through iterative training in step S30, the predicted recommendation results are output.

[0068] Example 2

[0069] An e-commerce product recommendation method specifically includes the following steps:

[0070] S10. Obtain and load user shopping data from the e-commerce shopping platform, and construct a user-product bipartite graph and a user-product interaction matrix using the user shopping data; the user shopping data includes each user's ID, the ID of the product purchased by the user, and the user's purchase history tags for the product, the tags being used to characterize whether the user has purchased the product.

[0071] The user-product bipartite graph G = (U, I, E) is constructed using user shopping data, where U = {u1, u2, ..., u...} N} represents a set of N users, where N represents the number of users, u n Let I represent the nth user, where n = {1, 2, ..., N}; and I = {i1, i2, ..., i...}. M} represents a set of M items, where M represents the quantity of the items, and i m Let m represent the m-th item, where m = {1, 2, ..., M}; E = {e nm} n=1,2,...,N,m=1,2,...,M This represents a user's collection of purchases of different goods; if user u n Purchase goods i m Then user u n and product i m There is an interactive relationship; otherwise, there is no interactive relationship. nm Indicates user u n and product i m The interaction relationship, if user u nWith product i m If there is interaction, then e nm =1, otherwise, e nm =0.

[0072] The construction of the user-product interaction matrix specifically involves: constructing an M×N dimensional interaction matrix of the user-product bipartite graph G=(U,I,E), denoted as A. Let the value of each element in A represent the interaction relationship between users and products in G=(U,I,E), specifically the element A in the i-th row and j-th column (1≤i≤M, 1≤j≤N). ij Represents the i-th user node u in the network i and the j-th product node i j The interaction between them, if u i and i j If there is interaction between them, then A ij =1, otherwise A ij =0.

[0073] S20. Based on the interaction matrix established in step S10, an e-commerce product recommendation model is constructed using a graph attention network. The e-commerce product recommendation model includes four modules: a first-order information propagation module, a subgraph generation module, a higher-order information propagation module, and a prediction module. The first-order information propagation module aggregates users' direct interest preferences through a single-layer graph attention convolution operation. The subgraph generation module groups users with similar interests and their interactions into the same subgraph. The higher-order information propagation module obtains users' potential interest preferences through multi-layer graph attention convolution operations. The prediction module calculates the similarity between users and products and recommends the top ten products to users. Its overall structure is as follows: Figure 1 As shown. Specifically, it includes the following steps:

[0074] S21. Using a graph attention network, the user-item bipartite graph G = (U, I, E) is encoded into a vector representation in a low-dimensional space, where user u and item i are each represented by a d-dimensional vector. First-order neighbors represent the direct interaction objects between users and items; user u's first-order neighbors are the items it directly purchases, and item i's first-order neighbors are the users who directly purchase it. Since the direct interaction between users and items provides the most important and reliable user interest information, all first-order neighbors participate in the graph attention convolution operation during first-order information propagation. Because users have different preferences for different items, different weights are assigned to directly purchased items; similarly, for a given item, different users have different preferences for it, so different weights are assigned to users who directly purchase that item. The formal representation of the first-order information propagation process is shown below:

[0075]

[0076]

[0077] in, and These are the first-order feature vectors of user u and product i, respectively, which are feature vectors that aggregate first-order neighbor information; It integrates information about products directly purchased by users and captures users' explicit interests and preferences; and These are the initial feature vectors of user u and item i, respectively; N u Let |N| represent the set of items purchased by user u. u | The number of items purchased for user u; N i Let |N| represent the set of users who purchased product i. i | represents the number of users who purchased product i; α ui The weight of item i among all items purchased by user u; α iu Let α be the weight of user u among all users who purchase item i; where α ui and α iu The definitions are shown in equations (3) and (4):

[0078]

[0079]

[0080] In the formula, LeakyReLU is a nonlinear activation function, defined by equation (5); a is the weight vector; W is the weight matrix; e u The feature vector representing user u; e i This represents the feature vector of product i; || is the join operation;

[0081]

[0082] In the formula, λ is the negative input slope, with a value of 0.01;

[0083] S22. Furthermore, users with similar interests are grouped into the same subgraph, which consists of users with similar interests and their interactions. This process can be viewed as a node classification task. The feature vector representation of the user is shown in Equation (6):

[0084]

[0085] Among them, F u It is the feature vector of user u, which is a fusion of the initial feature vector and the first-order feature vector; It is the initial feature vector of user u; is the first-order feature vector of user u; W1 and b1 are the encoding weights and biases, respectively; LeakyRelu(x) is the activation function as shown in equation (5), λ is the negative input slope, with a value of 0.01; the formal representation of the subgraph generation process is as follows:

[0086] U h =LeakyReLU(W2F u +b2) (7)

[0087] U0 = W3U h +b3 (8)

[0088] Among them, U h F represents the fused feature vector of user u; U0 represents the predicted vector, and the position of the largest value of U0 indicates the assigned subgraph; u is the feature vector of user u fused with the initial feature vector and the first-order feature vector; W2 and W3 are both encoding weights, and b2 and b3 are both biases; LeakyRelu(x) is the activation function, as shown in equation (5), and λ is the negative input slope, with a value of 0.01;

[0089] S23. Furthermore, to uncover users' latent interests and preferences, multi-layer graph attention convolution operations are used in each subgraph to capture high-order collaborative filtering signals between users and items. By mining the high-order connectivity between users and items, the latent interests of users and their high-order item neighbors are captured in subgraph G. s Internally, graph attention convolution operations are used to aggregate the feature information of neighbors. One layer of graph attention convolution operations aggregates the feature information of first-order neighbors, and k layers of graph attention convolution operations aggregate the features of k-order neighbors. Formalized as follows:

[0090]

[0091]

[0092] in, It is the feature vector of user u that aggregates information from its (k+1)th order neighbors; It is the feature vector of product i that aggregates information about its (k+1)th order neighbors within the subgraph s; It is the feature vector of user u that aggregates k-order neighbor information; The feature vector of item i that aggregates information from its k-th order neighbors within the subgraph s; N u Let |N| represent the set of items purchased by user u. u | The number of items purchased for user u; N i Let |N| represent the set of users who purchased product i. i | represents the number of users who purchased product i; α ui The weight of item i among all items purchased by user u; αiu Let α be the weight of user u among all users who purchase item i; where α ui and α iu The definitions are shown in equations (3) and (4); the feature vectors of users and products learned from each convolutional layer are fused by weighted summation, and the formal representation is as follows:

[0093]

[0094]

[0095] Among them, e u It is the final feature vector of user u; e i It is the final feature vector of product i; α k The weights of the k-th order eigenvectors are represented by , where k is the number of graph attention convolutional layers; Let k represent the k-th order feature vector of user u, which is the feature vector of user u after performing k-layer graph attention convolution operations; Let k represent the k-th order feature vector of product i. It is the feature vector of product i after performing k-layer graph attention convolution operations. The graph attention convolution operation is to aggregate information from neighbors and explore the user's potential interests.

[0096] S24. Furthermore, the inner product formula, as shown in equation (13), is used to predict user u's preference for item i:

[0097]

[0098] in, The inner product of the user feature vector and the product feature vector represents the user's predicted preference for the product; e u It is the final feature vector of user u; e i It is the final feature vector of product i.

[0099] S30. For the e-commerce product recommendation model constructed in step S20, design an objective function and train the model by minimizing the objective function; specifically, this includes the following steps:

[0100] S31 trains the first-order information propagation module, subgraph generation module, higher-order information propagation module, and prediction module described in S20, with the objective function shown in equation (14):

[0101]

[0102] Among them, O={(u,i + i - )|(u,i + )∈R + ,(u,i- )∈R -} represents the training set, R + This indicates that users in the training set interact with products. - This indicates that there is no interaction between users and products in the training set; i + i represents the set of products that user u has interacted with. - This represents the set of products that have not been interacted with by user u. This indicates the predicted preferences of users and products that have interacted with the product. λ represents the predicted preferences of users and products without interaction behavior; λ and Θ represent the regularization parameter and model parameter of the model, respectively; the σ activation function is defined as in equation (15):

[0103]

[0104] Where e is a constant; x represents a function variable.

[0105] S32. Use gradient descent to perform backpropagation and update the connection weight matrix in the e-commerce online product recommendation model.

[0106] S40. Using the e-commerce online product recommendation model constructed in step S20, and the optimal parameters of the model determined through iterative training in step S30, the predicted recommendation results are output; specifically, this includes the following steps:

[0107] S41. Use formula (13) to calculate the predicted preferences of users and products. For a certain user, the predicted preferences of the user for all products are obtained by the inner product of the user feature vector and the feature vector of each product. Based on the predicted preferences of the user for all products, the top-ranked products are selected for recommendation.

[0108] S42. Output the results of e-commerce product recommendations to users and relevant e-commerce platform operation analysts. This allows them to recommend products that users are interested in, providing personalized recommendation services. Operation analysts can make accurate recommendations by analyzing user preferences, thereby improving user satisfaction and loyalty, increasing sales and creating more economic value.

[0109] Example 3

[0110] The e-commerce product recommendation method described in this invention is implemented through a computer program, and will be described below according to... Figure 3The process illustrated below, using user shopping data from the Taobao shopping platform as an example, describes the specific implementation of the technical solution proposed in this invention. A user shopping dataset is obtained from the Taobao shopping platform. This dataset contains all purchase behaviors of approximately 100,000 random users between November 25, 2020, and December 3, 2020. Each row of the dataset represents a user behavior. The dataset attributes include user ID, product ID, and purchase history, separated by commas. The number of users is 987,994, the number of products is 4,162,024, and the number of purchase history entries is 100,150,807. Through the technical solution of this invention, recommendations for Taobao shopping platform users are achieved using the user shopping dataset obtained from the Taobao shopping platform.

[0111] The implementation method mainly includes the following key aspects:

[0112] S10. Obtain and load user shopping data from the Taobao shopping platform, and use the user shopping data to construct a user-product bipartite graph and an interaction matrix; this includes the following specific steps:

[0113] S11. Obtain and load user shopping data from the Taobao shopping platform. The data includes each user's ID, the ID of the product purchased by the user, and the user's purchase history tags for the product. The tags are used to indicate whether the user has purchased the product. Construct a user-product bipartite graph G = (U, I, E) using the user shopping data, where U = {u1, u2, ..., u...}. N} represents a set of N users, where N represents the number of users, and u n Let I represent the nth user, where n = {1, 2, ..., N}; and I = {i1, i2, ..., i...}. M Let} represent a set of M items, where M represents the quantity of the items, and i m Let m represent the m-th item, where m = {1, 2, ..., M}; E = {e nm} n=1,2,...,N,m=1,2,...,M This represents a user's collection of purchases of different goods; if user u n Purchase goods i m Then user u n and product i m There is an interactive relationship; otherwise, there is no interactive relationship. nm Indicates user u n and product i m The interaction relationship, if user u n With product i m If there is interaction, then e nm =1, otherwise, e nm=0. Construct an M×N dimensional interaction matrix for the user-item bipartite graph G=(U,I,E), denoted as A. Let the value of each element in A represent the interaction relationship between users and items in the network G=(U,I,E), that is, the element A in the i-th row and j-th column (1≤i≤M,1≤j≤N). ij Represents the i-th user node u in the network i and the j-th product node i j The interaction between them, if u i and i j If there is interaction between them, then A ij =1, otherwise A ij =0.

[0114] S20. Based on the interaction matrix established in step S10, an e-commerce online product recommendation model is constructed using a graph attention network. This model consists of four parts: a first-order information propagation module, a subgraph generation module, a higher-order information propagation module, and a prediction module. Its overall structure is shown in the attached figure. Figure 1 As shown, the specific steps are as follows:

[0115] S21. Using a graph attention network, the user-item bipartite graph G = (U, I, E) is encoded into a vector representation in a low-dimensional space, where user u and item i are each represented by a d-dimensional vector. First-order neighbors represent the direct interaction objects between users and items; user u's first-order neighbors are the items it directly purchases, and item i's first-order neighbors are the users who directly purchase it. Since the direct interaction between users and items provides the most important and reliable user interest information, all first-order neighbors participate in the graph attention convolution operation during first-order information propagation. Because users have different preferences for different items, different weights are assigned to directly purchased items; similarly, for a given item, different users have different preferences for it, so different weights are assigned to users who directly purchase that item. The formal representation of the first-order information propagation process is shown below:

[0116]

[0117]

[0118] in, and These are the first-order feature vectors of user u and product i, respectively, which are feature vectors that aggregate first-order neighbor information; It integrates information about products directly purchased by users and captures users' explicit interests and preferences; and These are the initial feature vectors of user u and item i, respectively; N u Let |N| represent the set of items purchased by user u. u | The number of items purchased for user u; Ni Let |N| represent the set of users who purchased product i. i | represents the number of users who purchased product i; α ui The weight of item i among all items purchased by user u; α iu Let α be the weight of user u among all users who purchase item i; where α ui and α iu The definitions are shown in equations (3) and (4):

[0119]

[0120]

[0121] In the formula, LeakyReLU is a nonlinear activation function, defined by equation (5); a is the weight vector; W is the weight matrix; e u The feature vector representing user u; e i This represents the feature vector of product i; || is the join operation;

[0122]

[0123] In the formula, λ is the negative input slope, with a value of 0.01;

[0124] S22. Furthermore, users with similar interests are grouped into the same subgraph, which consists of users with similar interests and their interactions. This process can be viewed as a node classification task. The feature vector representation of the user is shown in Equation (6):

[0125]

[0126] Among them, F u It is the feature vector of user u, which is a fusion of the initial feature vector and the first-order feature vector; It is the initial feature vector of user u; is the user's first-order feature vector; W1 and b1 are the encoding weights and biases, respectively; LeakyRelu(x) is the activation function as shown in equation (5), λ is the negative input slope, with a value of 0.01; the formal representation of the subgraph generation process is as follows:

[0127] U h =LeakyReLU(W2F u +b2) (7)

[0128] U0 = W3U h +b3 (8)

[0129] Among them, U h F represents the fused feature vector of user u; U0 represents the predicted vector, and the position of the largest value of U0 indicates the assigned subgraph;u is the feature vector of user u fused with the initial feature vector and the first-order feature vector; W2 and W3 are both encoding weights, and b2 and b3 are both biases; LeakyRelu(x) is the activation function, as shown in equation (5), and λ is the negative input slope, with a value of 0.01;

[0130] S23. Furthermore, to uncover users' latent interests and preferences, high-order collaborative filtering signals between users and items are captured through multi-layer graph attention convolution operations in each subgraph. This is achieved by mining the high-order connectivity between users and items to capture the latent interests of users with their high-order item neighbors. In subgraph G... s Internally, graph attention convolution operations are used to aggregate the feature information of neighbors. One layer of graph attention convolution operations aggregates the feature information of first-order neighbors, and k layers of graph attention convolution operations aggregate the features of k-order neighbors. Formalized as follows:

[0131]

[0132]

[0133] in, It is the feature vector of user u that aggregates information from its (k+1)th order neighbors; It is the feature vector of product i that aggregates information about its (k+1)th order neighbors within the subgraph s; It is the feature vector of user u that aggregates k-order neighbor information; The feature vector of item i that aggregates k-order neighbor information within subgraph s; N u Let |N| represent the set of items purchased by user u. u | The number of items purchased for user u; N i Let |N| represent the set of users who purchased product i. i | represents the number of users who purchased product i; α ui The weight of item i among all items purchased by user u; α iu Let α be the weight of user u among all users who purchase item i; where α ui and α iu The definitions are shown in equations (3) and (4); the feature vectors of users and products learned from each convolutional layer are fused by weighted summation, and the formal representation is as follows:

[0134]

[0135]

[0136] Among them, e u It is the final feature vector of user u; e i It is the final feature vector of product i; α kThe weights of the k-th order eigenvectors are represented by , where k is the number of graph attention convolutional layers; Let k represent the k-th order feature vector of user u, which is the feature vector of user u after performing k-layer graph attention convolution operations; Let k represent the k-th order feature vector of product i. It is the feature vector of product i after performing k-layer graph attention convolution operations. The graph attention convolution operation is to aggregate information from neighbors and explore the user's potential interests.

[0137] S24. Furthermore, the inner product formula, as shown in equation (13), is used to predict user u's preference for item i:

[0138]

[0139] in, The inner product of the user feature vector and the product feature vector represents the user's predicted preference for the product; e u It is the final feature vector of user u; e i It is the final feature vector of product i.

[0140] S30. For the e-commerce online product recommendation model constructed in step S20, design an objective function and train the model by minimizing the objective function;

[0141] S31. Train the first-order information propagation module, subgraph generation module, higher-order information propagation module and prediction module described in S20. The objective function is shown in equation (16):

[0142]

[0143] Among them, O={(u,i + i - )|(u,i + )∈R + ,(u,i - )∈R -} represents the training set, R + This indicates that users in the training set interact with products. - This indicates that there is no interaction between users and products in the training set; i + i represents the set of products that user u has interacted with. - This represents the set of products that have not been interacted with by user u. This indicates the predicted preferences of users and products that have interacted with the product. λ represents the predicted preferences of users and products without interaction behavior; λ and Θ represent the regularization parameter and model parameter of the model, respectively; the σ activation function is defined as in equation (15):

[0144]

[0145] Where e is a constant; x represents a function variable.

[0146] S32. Use gradient descent to perform backpropagation and update the connection weight matrix in the e-commerce online product recommendation model.

[0147] S40. Using the e-commerce online product recommendation model constructed in step S20 and the optimal parameters of the model determined through iterative training in step S30, the predicted recommendation results are output.

[0148] S41. Use formula (13) to calculate the predicted preferences of users and products. For a certain user, the predicted preferences of the user for all products are obtained by the inner product of the user feature vector and the feature vector of each product. Based on the predicted preferences of the user for all products, the top 10 products are selected for recommendation.

[0149] S42. Output the results of e-commerce product recommendations to users and relevant e-commerce platform operation analysts. This allows them to recommend products that users are interested in, providing personalized recommendation services. Operation analysts can make accurate recommendations by analyzing user preferences, thereby improving user satisfaction and loyalty, increasing sales and creating more economic value.

[0150] Technical effect evaluation:

[0151] To verify the effectiveness and advancement of the technical solution proposed in this invention, it was compared with several classic recommended methods, including matrix factorization (MF), neural matrix factorization (NeuMF), and neural collaborative filtering (NGCF). The average accuracy and normalized mutual information from 20 experiments were used as evaluation indicators. The matching results were compared and analyzed, and the results are shown in Table 1.

[0152] Table 1 Comparison and Analysis of Results

[0153]

[0154] As can be seen from the results in the table, the technical solution of the present invention can achieve better recall rate and normalized loss cumulative gain when recommending products on e-commerce networks.

[0155] Example 4

[0156] An e-commerce online product recommendation system, such as Figure 2As shown, the system includes a computer processor and memory, a user-product bipartite graph construction and interaction matrix construction unit, an e-commerce product recommendation model training unit, and an e-commerce product recommendation result output unit. The user-product bipartite graph construction and interaction matrix construction unit constructs a user-product bipartite graph and interaction matrix based on user shopping data and loads them into the computer memory. The e-commerce product recommendation model training unit constructs an e-commerce product recommendation model based on the constructed user-product bipartite graph and interaction matrix, determines the optimal values ​​of the parameters in the model through iterative calculation, calculates the inner product based on the optimal values ​​of the parameters, and obtains the recommendation result. The e-commerce product recommendation result output unit outputs the e-commerce product recommendation results to users and relevant e-commerce platform operation analysts for product recommendation on various e-commerce platforms. The specific data processing and calculation work in all units is completed by the computer processor, and all units interact with the data in the computer memory.

[0157] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for recommending online products in e-commerce, characterized in that, Includes the following steps: S10. Obtain and load user shopping data from e-commerce shopping platforms, and use the user shopping data to construct a user-product bipartite graph and a user-product interaction matrix; S20. Based on the interaction matrix established in step S10, construct an e-commerce online product recommendation model using a graph attention network. S30. For the e-commerce online product recommendation model constructed in step S20, design an objective function and train the model by minimizing the objective function; S40. Using the e-commerce network product recommendation model constructed in step S20 and the optimal parameters of the model determined through iterative training in step S30, the predicted recommendation results are output. Step S20 includes the following steps: S21. Use a graph attention network to partition the user-item bipartite graph. Encoded as a vector representation in a low-dimensional space, the user and goods Use respectively 3D vector representation; first-order neighbors represent the direct interaction objects between users and products, users The first-order neighbors are the goods that it directly purchases. The first-order neighbors are the users who directly purchase the product. Since the direct interaction between users and products provides the most important and reliable information about user interests, all first-order neighbors participate in the graph attention convolution operation during first-order information propagation. Because users have different preferences for different products, different weights are assigned to products that are directly purchased. Similarly, for a given product, different users have different preferences for it, so different weights are assigned to users who directly purchase that product. The formal representation of the first-order information propagation process is shown below: (1) (2) in, and They are users and goods The first-order feature vector, that is, the feature vector that aggregates first-order neighbor information; It integrates information about products directly purchased by users and captures users' explicit interests and preferences; and They are users and goods The initial feature vector; Indicates user The collection of purchased goods, For users Quantity of goods purchased; Indicates purchase of goods The user set, To purchase goods The number of users; For users Of all the items purchased The weights; To purchase goods users among all users The weights; where and The definitions are shown in equations (3) and (4): (3) (4) In the formula, It is a non-linear activation function, defined by equation (5); a is the weight vector; W is the weight matrix; Indicates user eigenvectors; Indicates goods eigenvectors; It is a connection operation; (5) In the formula, It is a negative input slope, with a value of 0.01; S22. Furthermore, users with similar interests are grouped into the same subgraph. The subgraph consists of users with similar interests and their interaction items. This process can be regarded as a node classification task. The feature vector representation of the user is shown in Equation (6): (6) in, It is the feature vector of user u, which is a fusion of the initial feature vector and the first-order feature vector; It is the initial feature vector of user u; User The first-order eigenvectors; and These are the encoding weights and biases, respectively. The activation function is shown in equation (5). The input slope is negative, with a value of 0.01; the formal representation of the subgraph generation process is as follows: (7) (8) in, Indicates user fused feature vectors; Represents the prediction vector. The position with the largest value indicates the subgraph to which the assignment is made; It is the feature vector of user u, which is a fusion of the initial feature vector and the first-order feature vector; and All are encoding weights. and All are biased; The activation function is shown in equation (5). The negative input slope has a value of 0.

01. S23. Furthermore, to uncover users' latent interests and preferences, multi-layer graph attention convolution operations are used in each subgraph to capture high-order collaborative filtering signals between users and items. This is achieved by mining the high-order connectivity between users and items to capture the latent interests of users and their high-order item neighbors. Internally, graph attention convolution operations are used to aggregate the feature information of neighbors, and a single layer of graph attention convolution operations aggregates the feature information of first-order neighbors. Layer graph attention convolution operation aggregation order The characteristics of order neighbors can be formally represented as follows: (9) (10) in, It is an aggregation Users of neighborhood information eigenvectors; In the subgraph Inner Cohesion Products of neighborhood information eigenvectors; It is an aggregation Users of neighborhood information eigenvectors; In the subgraph Inner Cohesion Products of neighborhood information eigenvectors; Indicates user The collection of purchased goods, For users Quantity of goods purchased; Indicates purchase of goods The user set, To purchase goods The number of users; For users Of all the items purchased The weights; To purchase goods users among all users The weights; where and The definitions are shown in equations (3) and (4); the feature vectors of users and products learned by each convolutional layer are fused by weighted summation, and the formal representation is as follows: (11) (12) in, User The final feature vector; It is a commodity The final feature vector; The weights of the k-th order eigenvectors are represented by , where ; The number of graph attention convolutional layers; Represents user u The eigenvectors of order one are used for... After layer graph attention convolution operation, the user eigenvectors; Indicates goods of The eigenvectors of order one are used for... Product after layer graph attention convolution operation The feature vectors; the graph attention convolution operation is used to aggregate information from neighbors and uncover the user's potential interests; S24. Furthermore, the inner product formula, as shown in equation (13), is used to predict user... For goods Preferences: (13) in, This represents the inner product of the user feature vector and the product feature vector, which is the user's predicted preference for the product. User The final feature vector; It is a commodity The final feature vector.

2. The e-commerce online product recommendation method according to claim 1, characterized in that, The user shopping data in step S10 includes each user's ID, the ID of the product purchased by the user, and the user's purchase history tag for the product. The tag is used to indicate whether the user has purchased the product.

3. The e-commerce online product recommendation method according to claim 1, characterized in that, The method of constructing a user-product bipartite graph using user shopping data is as follows: ,in: express A set consisting of N users, where N represents the number of users. Indicates the first One user, ; express A set consisting of ... Indicates the first One product, ; This represents a user's collection of purchases of different products; if the user Purchase goods Then the user and goods There is an interactive relationship; otherwise, there is no interactive relationship. Indicates user and goods The interaction relationship, if the user With goods If there is interaction, then =1, otherwise, =0.

4. The e-commerce online product recommendation method according to claim 1, characterized in that, The construction of the user-product interaction matrix specifically involves: Construct a user-product bipartite graph of A dimensional interaction matrix, denoted as ,make The value of each element in the representation The interaction between users and products in China, i.e. The Middle Okay, number List elements Representing the network User nodes and the Product Nodes The interaction between them, if and If there is interaction, then =1, otherwise =0.

5. The e-commerce online product recommendation method according to claim 1, characterized in that, The e-commerce product recommendation model in step S20 includes four modules: a first-order information propagation module, a subgraph generation module, a higher-order information propagation module, and a prediction module. The first-order information propagation module aggregates users' direct interest preferences through a single-layer graph attention convolution operation. The subgraph generation module is used to group users with similar interests and their interactions into the same subgraph. The higher-order information propagation module obtains users' potential interest preferences through multi-layer graph attention convolution operations. The prediction module is used to calculate the similarity between users and products and recommend the top-ranked products to users.

6. The e-commerce online product recommendation method according to claim 5, characterized in that, Step S30 includes the following specific steps: S31. Train the first-order information propagation module, subgraph generation module, higher-order information propagation module and prediction module described in S20. The objective function is shown in equation (14): (14) in, Represents the training set, This indicates that users in the training set interact with products. This indicates that there is no interaction between users and products in the training set; This represents the set of products that user u has interacted with. This represents the set of products that have not been interacted with by user u. This indicates the predicted preferences of users and products that have interacted with the product. This indicates the predicted preferences of users and products who do not interact with the product. and These represent the regularization parameter and the model parameter, respectively. The activation function is defined as shown in equation (15): (15) Where e is a constant; x represents a function variable; S32. Use gradient descent to perform backpropagation and update the connection weight matrix in the e-commerce online product recommendation model.

7. The e-commerce online product recommendation method according to claim 1, characterized in that, Step S40 includes the following specific steps: S41. Use formula (13) to calculate the predicted preferences of users and products. For a certain user, the predicted preferences of the user for all products are obtained by the inner product of the user feature vector and the feature vector of each product. Based on the predicted preferences of the user for all products, the top-ranked products are selected for recommendation. S42. Output the results of e-commerce online product recommendations to users and relevant e-commerce platform operation analysts, so as to recommend products that users are interested in and provide users with personalized recommendation services; Operations analysts make accurate recommendations by analyzing user preferences, thereby improving user satisfaction and loyalty, increasing sales, and creating more economic value.

8. An e-commerce online product recommendation system, characterized in that: The method for implementing the e-commerce online product recommendation method according to any one of claims 1 to 7 includes a computer processor and memory, an e-commerce online user-product bipartite graph construction and interaction matrix construction unit, an e-commerce online product recommendation model training unit, and an e-commerce online product recommendation result output unit.

9. The e-commerce online product recommendation system according to claim 8, characterized in that: The e-commerce network user-product bipartite graph construction and interaction matrix construction unit constructs a user-product bipartite graph and interaction matrix based on user shopping data and loads them into computer memory. The e-commerce network product recommendation model training unit constructs an e-commerce network product recommendation model based on the constructed user-product bipartite graph and interaction matrix, and determines the optimal values ​​of the parameters in the model through iterative calculation. Based on the optimal values ​​of the parameters in the model, it calculates the inner product to obtain the recommendation result. The e-commerce network product recommendation result output unit is used to output the e-commerce network product recommendation results for various e-commerce platforms to recommend products. The specific data processing and calculation work in all units is completed by the computer processor, and all units interact with the data in the computer memory.