A commodity recommendation method, device, system and storage medium
By constructing a target heterogeneous graph and updating user and product node vectors, and using attention mechanisms and gate graph neural networks for fusion computation, the accuracy problem of existing product recommendation methods is solved, and more accurate product recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2022-11-11
- Publication Date
- 2026-06-12
AI Technical Summary
Existing product recommendation methods are not accurate enough to provide users with precise recommendations.
By constructing a target heterogeneous graph, updating the vectors of user nodes and product item nodes, and using attention mechanisms and gate graph neural networks for fusion calculation, the system predicts and analyzes candidate product items and recommends products that match user interests.
It improves the accuracy and performance of recommendations, effectively filters node transformation relationships that are irrelevant to the current sequence transaction, and captures global collaborative features and social influences between friends.
Smart Images

Figure CN115713382B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of product recommendation technology, specifically to a product recommendation method, apparatus, system, and storage medium. Background Technology
[0002] Recommendation systems are tools that automatically connect users with items. With the development of the Internet, a large amount of data has emerged. Recommendation systems use deep learning to mine users' interests and preferences from massive amounts of data and automatically provide users with items they are interested in. However, existing methods still have the problem of insufficient accuracy in user recommendations, which is not enough to provide users with accurate product recommendations. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a product recommendation method, apparatus, system and storage medium to address the shortcomings of the prior art.
[0004] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: A product recommendation method, comprising the following steps:
[0005] Import user information and product information, and construct a target heterogeneous graph using the user information and product information. The target heterogeneous graph includes multiple user nodes, as well as user node data, product item nodes, and product item node data corresponding to each user node.
[0006] Update the user node vector for each user node and the user node data corresponding to each user node to obtain the updated user node vector for each user node.
[0007] Update the product item node vector for each user node and the product item node data to obtain the updated product item node vector for each product item node.
[0008] The target user node vector for each user node is obtained by fusion calculation based on the updated user node vector of each user node and the updated product item node vector of each product item node.
[0009] Import multiple candidate product items and candidate product item vectors corresponding to each candidate product item, and perform predictive analysis based on the target user node vector of each user node and the candidate product item vectors corresponding to each candidate product item to obtain the target predicted value of each user node, and use the candidate product items corresponding to the target predicted value of each user node as the recommended products of each user node.
[0010] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: A product recommendation device, comprising:
[0011] The heterogeneous graph construction module is used to import user information and product information, and construct a target heterogeneous graph through the user information and product information. The target heterogeneous graph includes multiple user nodes, as well as user node data, product item nodes and product item node data corresponding to each user node.
[0012] The user node vector update module is used to update the user node vector of each user node and the user node data corresponding to each user node, so as to obtain the updated user node vector of each user node.
[0013] The product item node vector update module is used to update the product item node vector of each user node and the product item node data, so as to obtain the updated product item node vector of each product item node.
[0014] The fusion calculation module is used to perform fusion calculation based on the updated user node vector of each user node and the updated product item node vector of each product item node to obtain the target user node vector of each user node.
[0015] The recommended product acquisition module is used to import multiple candidate product items and candidate product item vectors corresponding to each candidate product item, and perform predictive analysis based on the target user node vector of each user node and the candidate product item vectors corresponding to each candidate product item to obtain the target predicted value of each user node, and respectively use the candidate product items corresponding to the target predicted value of each user node as the recommended products of each user node.
[0016] Based on the above-mentioned product recommendation method, the present invention also provides a product recommendation system.
[0017] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a product recommendation system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the product recommendation method as described above.
[0018] Based on the above-described product recommendation method, the present invention also provides a computer-readable storage medium.
[0019] Another technical solution of the present invention to solve the above-mentioned technical problems is as follows: a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the product recommendation method as described above.
[0020] The beneficial effects of this invention are as follows: By constructing user nodes, user node data, product item nodes, and product item node data using user information and product information, updating the user node vectors of the user nodes and user node data to obtain updated user node vectors, updating the product item node vectors of the product item nodes and product item node data to obtain updated product item node vectors, calculating the target user node vector based on the fusion of the updated user node vectors and updated product item node vectors, obtaining the target predicted value based on the predictive analysis of the target user node vector and candidate product item vectors, and using the candidate product item corresponding to the target predicted value as the recommended product, it can capture global collaborative features and social influence between friends, effectively filtering node transformation relationships unrelated to the current sequence transaction, thereby further improving recommendation performance and accuracy. Attached Figure Description
[0021] Figure 1 A flowchart illustrating a product recommendation method provided in an embodiment of the present invention;
[0022] Figure 2 This is a module block diagram of a product recommendation device provided in an embodiment of the present invention. Detailed Implementation
[0023] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0024] Figure 1 This is a flowchart illustrating a product recommendation method provided in an embodiment of the present invention.
[0025] like Figure 1 As shown, a product recommendation method includes the following steps:
[0026] Import user information and product information, and construct a target heterogeneous graph using the user information and product information. The target heterogeneous graph includes multiple user nodes, as well as user node data, product item nodes, and product item node data corresponding to each user node.
[0027] Update the user node vector for each user node and the user node data corresponding to each user node to obtain the updated user node vector for each user node.
[0028] Update the product item node vector for each user node and the product item node data to obtain the updated product item node vector for each product item node.
[0029] The target user node vector for each user node is obtained by fusion calculation based on the updated user node vector of each user node and the updated product item node vector of each product item node.
[0030] Import multiple candidate product items and candidate product item vectors corresponding to each candidate product item, and perform predictive analysis based on the target user node vector of each user node and the candidate product item vectors corresponding to each candidate product item to obtain the target predicted value of each user node, and use the candidate product items corresponding to the target predicted value of each user node as the recommended products of each user node.
[0031] It should be understood that the information of goods and items (i.e., the user information and the product information) is preprocessed to construct a user-item heterogeneous graph (i.e., the target heterogeneous graph).
[0032] Specifically, attention mechanisms are used to iteratively learn multiple times from heterogeneous graphs to obtain user nodes (i.e., the updated user node vectors) that contain user-specific features and social influences between friends, and project nodes that contain user-global transaction relationships.
[0033] It should be understood that using gate graph neural networks to capture a user's consumption preferences in the current sequence further improves recommendation performance.
[0034] It should be understood that the features obtained by the attention mechanism (i.e., the updated user node vector) and the features obtained by the gate neural network (i.e., the updated product item node vector) are fused to obtain the global features (i.e., the target user node vector).
[0035] In the above embodiments, user nodes, user node data, product item nodes, and product item node data are constructed using user information and product information. The user node vectors of the user nodes and user node data are updated to obtain updated user node vectors. The product item nodes and product item node vectors of the product item node data are updated to obtain updated product item node vectors. The target user node vector is obtained by fusing the updated user node vectors and updated product item node vectors. The target predicted value is obtained by predictive analysis based on the target user node vector and candidate product item vectors. The candidate product item corresponding to the target predicted value is used as the recommended product. This can capture global collaborative features and social influence between friends, and can effectively filter node transformation relationships that are not related to the current sequence transaction, thereby further improving the recommendation performance and accuracy.
[0036] Optionally, as an embodiment of the present invention, the process of constructing the target heterogeneous graph using the user information and the product information includes:
[0037] An initial heterogeneous graph is constructed using the user information and the product information;
[0038] The initial heterogeneous graph is initialized to obtain the target heterogeneous graph.
[0039] Specifically, define U = (u1, u2, ..., u...) u Let I = (i1, i2, ..., i3) represent the set of users, and G = (U, E) represent the set of items. G is defined as the social network, where E represents the social network connections between nodes, and the edge (u1, u2) in E indicates a friend relationship between the two nodes. The sequence of all transactions for any user u is denoted as... T represents the total number of sequences. The edge type between nodes (u k ,u v This indicates a friend relationship between users, with a weight defined as 1. The conversion relationship between products (i...) p i q The interaction relationships between users and products are (u,i) and (i,u). The weights of these three types of edges are defined as a, b, and c, respectively, representing the number of such transformation relationships. A user-item heterogeneous graph (i.e., the initial heterogeneous graph) is constructed.
[0040] It should be understood that all user nodes and project nodes in the initial heterogeneous graph (i.e., the initial heterogeneous graph) are represented as follows: 0 indicates the initial state, i.e., the 0th layer heterogeneous graph network.
[0041] In the above embodiments, an initial heterogeneous graph is constructed using user information and product information. The initialization processing of the initial heterogeneous graph yields the target heterogeneous graph, providing a foundation for subsequent data processing. This effectively filters out node transformation relationships that are irrelevant to the current sequence of transactions, further improving recommendation performance and accuracy.
[0042] Optionally, as an embodiment of the present invention, the user node data includes user node vectors, user interaction node vectors, edge weights, and multiple source node vectors;
[0043] The process of updating the user node vectors of each user node and the corresponding user node data to obtain the updated user node vectors of each user node includes:
[0044] Based on the first formula, attention scores are calculated for each user node, the user node vector corresponding to each user node, the user interaction node vector, the edge weights, and the source node vectors, resulting in multiple attention scores for each user node. The first formula is:
[0045] a l eg (x,u)=(v l eg ) T σ[W l eg (h x l-1 ||h u l-1 )+eg l ],
[0046] Based on the second formula, weighting factors are calculated according to the attention scores of each user node to obtain multiple weighting factors for each user node. The second formula is:
[0047]
[0048] Based on the third equation, the neighbor node vectors of each user node are calculated according to multiple source node vectors and multiple weight factors of each user node, thereby obtaining the neighbor node vectors of each user node. The third equation is:
[0049]
[0050] Based on the fourth equation, the updated user node vectors are calculated according to the user node vectors corresponding to each user node and the neighbor node vectors of each user node, to obtain the updated user node vectors of each user node. The fourth equation is:
[0051]
[0052] in, For the updated user node vector, For a trainable parameter matrix, The neighbor node vector, Let L be the user node vector of layer (l-1). Here, is a trainable bias vector, ReLU is the ReLU activation function, and Att is... l eg (x,u) are weighting factors, h x l-1 Let be the vector of the x-th source node in the (l-1)-th layer, d be the number of weight factors, σ be the sigmoid activation function, and a be the vector of the x-th source node in the (l-1)-th layer. l eg (x,u) represents the attention score, v l eg Let l be the vector of user interaction nodes in the l-th layer, e.g. l Let be the edge weight of the l-th layer, u be the user node, || be the concatenation, and T be the transpose.
[0053] Specifically, let the target user (i.e., the user node) be u, and l be the number of learning iterations. and Let x and e represent the embedding representations of the target node in the heterogeneous graph at layers l-1 and l, respectively. Let x represent the source node connected to the target node, and let e represent the type of edge connected to user u, including (u... k ,u v ), (u,i), (i,u), eg l Let T denote the weights of different edges, and let T denote the transpose. Using formula (1), we can obtain the attention scores of the target user and the source node x connected to it.
[0054] a l eg (x,u)=(v l eg ) T σ(W l eg (h x l-1 ||h u l-1 )+eg l (1)
[0055] Formula (2) is used to obtain multiple weighting factors Att for the target user (i.e., the user node) and the source node x connected to it. l :
[0056]
[0057] It should be understood that the neighbor node representation H is obtained through attention gathering using formula (3). l u (i.e., the neighbor node vector):
[0058]
[0059] Finally, using formula (4), we obtain the final user node h by iteratively learning l times from the heterogeneous graph using the attention mechanism. u l (i.e., the updated user node vector):
[0060]
[0061] Among them W eg l v l eg and b l eg Let represent the trainable parameter matrix and , respectively, and let and represent the bias vector. || denotes concatenation, and ReLU denotes the ReLU activation function. The final representation h of the user node is obtained. u l (That is, the updated user node vector) includes the user's inherent characteristics and the social influence between friends.
[0062] In the above embodiments, updating the user node vector by updating each user node and the user node data to obtain the updated user node vector allows the result to include the user's inherent characteristics and the social influence between friends. It can capture global collaborative characteristics and the social influence between friends, and can effectively filter node transformation relationships that are not related to the current sequence transaction.
[0063] Optionally, as an embodiment of the present invention, the product item node data includes a product item node vector, the number of incoming and outgoing neighbors, and multiple neighbor node vectors;
[0064] The process of updating the product item nodes and product item node data corresponding to each user node to obtain the updated product item node vectors for each product item node includes:
[0065] Based on the fifth formula, the association feature information of each product item node is obtained by calculating the association feature information according to the product item node, product item node vector, number of incoming and outgoing neighbors, and multiple neighbor node vectors corresponding to each user node. The fifth formula is:
[0066]
[0067] Based on the sixth formula, the target product item node vector is calculated according to the product item node vector corresponding to each user node and the association feature information of each product item node, thus obtaining the target product item node vector of each product item node. The sixth formula is:
[0068]
[0069] Among them, H i =tanh[W H (inf i +V i )+b H ], r i =σ[W r (inf i +V i )+b i ], a i =σ[W r (inf i +V i )+b i ],
[0070] Based on the seventh formula, the updated product item node vectors are calculated according to the product item node vectors corresponding to each user node and the target product item node vectors of each product item node, to obtain the updated product item node vectors of each product item node. The seventh formula is:
[0071]
[0072] Among them, g i =σ[W g (V i ||V last )+b i ],
[0073] Where, h′ i Let h be the updated product item node vector for the i-th product item node. i Let g be the target product item node vector of the i-th product item node. i Let W be the sequence graph of the i-th product item node, σ be the sigmoid activation function, and W be the product item node. g W H W r W in He Jun W out V is a trainable parameter matrix. i Let V be the product item node vector of the i-th product item node. last b is the vector of the last product item node. i and b HAll of these are trainable bias vectors. For Hada code product, a i Let r be the first node vector of the i-th product item node. i H is the second node vector of the i-th product item node. i Let be the third node vector of the i-th product item node, tanh be the tanh activation function, and inf be the third node vector. i This refers to the associated feature information of the i-th product item node. and V represents the number of inbound and outbound neighbors of the i-th product item node. j Let w be the vector of the j-th neighbor node. j→i w represents the weight from the j-th neighbor node to the i-th product item node. i→j Let || be the weight from the i-th product item node to the j-th neighbor node, and || be the concatenation weight.
[0074] It should be understood that the current transaction sequence of user u is modeled on the sequence transaction graph g = (V, E), where node V represents the items the user has interacted with, and E represents the directed edges between nodes, such as (V... m →V n This indicates that the user interacts with m first, then n, and the weight of each edge is defined as the number of times this exchange occurs, W. m→n .
[0075] It should be understood that corresponding product embeddings are used in heterogeneous graphs. (i.e., the commodity item node vector) serves as the initial state V of each node in the sequence transaction graph. i .
[0076] Specifically, the number of inbound and outbound neighbors of any node i in the sequence graph g is defined as follows: The inf information of the ingress and egress neighbors is calculated using formula (5). i :
[0077]
[0078] Update the embedding of each node using formulas (6)-(9):
[0079] a i =σ(W r (inf i +V i )+b i (6)
[0080] r i =σ(W r (inf i +V i )+b i (7)
[0081] H i =tanh(W H (inf i +V i )+b H (8)
[0082]
[0083] Finally, through the selection mechanism in formulas (10) and (11), the node transformation relationship that conforms to the current sequence features is adaptively selected, and the final embedding representation h of each node is dynamically aggregated. i :
[0084] g i =σ(W g (V i ||V last )+b i (10)
[0085]
[0086] Where σ represents the sigmoid activation function, tanh represents the tanh activation function, W and b are the trainable parameter matrix and bias vector, respectively, and V last The node embedding represents the last transaction. This represents the Hada code product.
[0087] In the above embodiments, updating the product item node and product item node data by updating the product item node vector results in an updated product item node vector. This allows the product item node to include the user's global transaction relationship, capture global collaborative features and social influence between friends, and effectively filter node transformation relationships that are unrelated to the current sequence transaction.
[0088] Optionally, as an embodiment of the present invention, the process of fusing the updated user node vectors of each user node and the updated product item node vectors of each product item node to obtain the target user node vector of each user node includes:
[0089] Based on the eighth formula, the updated user node vectors of each user node and the updated product item node vectors of each product item node are fused together to obtain the target user node vector for each user node. The eighth formula is:
[0090]
[0091] Where, h′ u For the target user node vector, h′ is the updated user node vector. i This is the updated product item node vector, and || represents concatenation.
[0092] It should be understood that, through formula (12), (i.e., the updated user node vector) and h i The updated product item node vectors are fused together to obtain node h′ containing global collaborative features. u (i.e., the target user node vector):
[0093]
[0094] In the above embodiments, the target user node vector is obtained by fusing the updated user node vector and the updated product item node vector based on the eighth formula. This can effectively filter out node transformation relationships that are not related to the current sequence transaction, thereby further improving the recommendation performance and accuracy.
[0095] Optionally, as an embodiment of the present invention, the process of performing predictive analysis based on the target user node vector of each user node and the candidate product item vector corresponding to each candidate product item to obtain the target predicted value of each user node includes:
[0096] The target user node vector of each user node is multiplied by the candidate product vector corresponding to each candidate product item to obtain multiple initial prediction values for each user node.
[0097] The maximum value among the multiple initial predicted values of each user node is selected, and the maximum predicted value of each user node is obtained after selection. The maximum predicted value is then used as the target predicted value.
[0098] Specifically, the final node h′ containing global collaborative features will be... u (i.e., the target user node vector) and Z j (Z j The dot product of the embedded representation of candidate item j (i.e., the candidate item vector) is used to predict the rating and obtain its probability distribution function. The item with the highest probability is the recommended item. In this way, the extracted user node features include information about friends in the social network and the user's own consumption preferences, which can greatly improve the accuracy of the recommendation system.
[0099] In the above embodiments, the target predicted value is obtained by predictive analysis based on the target user node vector and the candidate product item vector. This allows the extracted user node features to include both information about friends in the social network and the user's own consumption preferences, and greatly improves the accuracy of the recommendation.
[0100] Optionally, as another embodiment of the present invention, the present invention preprocesses the information of goods and items to construct a user-item heterogeneous graph; uses an attention mechanism to iteratively learn multiple times from the heterogeneous graph to obtain user features containing inherent user characteristics and social influence between friends, and item features containing global transaction relationships of users; uses a gate graph neural network to capture the consumption preferences of users in the current sequence; and fuses the features obtained by the attention mechanism and the features obtained by the gate graph neural network to obtain global features.
[0101] Alternatively, as another embodiment of the present invention, the present invention can capture global collaborative features and social influences between friends, and can effectively filter node transformation relationships that are unrelated to the current sequence transaction, thereby further improving the recommendation performance of the recommendation system.
[0102] Figure 2 This is a module block diagram of a product recommendation device provided in an embodiment of the present invention.
[0103] Alternatively, as another embodiment of the present invention, such as Figure 2 As shown, a product recommendation device includes:
[0104] The heterogeneous graph construction module is used to import user information and product information, and construct a target heterogeneous graph through the user information and product information. The target heterogeneous graph includes multiple user nodes, as well as user node data, product item nodes and product item node data corresponding to each user node.
[0105] The user node vector update module is used to update the user node vector of each user node and the user node data corresponding to each user node, so as to obtain the updated user node vector of each user node.
[0106] The product item node vector update module is used to update the product item node vector of each user node and the product item node data, so as to obtain the updated product item node vector of each product item node.
[0107] The fusion calculation module is used to perform fusion calculation based on the updated user node vector of each user node and the updated product item node vector of each product item node to obtain the target user node vector of each user node.
[0108] The recommended product acquisition module is used to import multiple candidate product items and candidate product item vectors corresponding to each candidate product item, and perform predictive analysis based on the target user node vector of each user node and the candidate product item vectors corresponding to each candidate product item to obtain the target predicted value of each user node, and respectively use the candidate product items corresponding to the target predicted value of each user node as the recommended products of each user node.
[0109] Optionally, as an embodiment of the present invention, the heterogeneous graph construction module is specifically used for:
[0110] An initial heterogeneous graph is constructed using the user information and the product information;
[0111] The initial heterogeneous graph is initialized to obtain the target heterogeneous graph.
[0112] Optionally, another embodiment of the present invention provides a product recommendation system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the product recommendation method as described above. This system can be a computer or similar system.
[0113] Optionally, another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the product recommendation method as described above.
[0114] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0116] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0118] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A product recommendation method, characterized in that, Includes the following steps: Import user information and product information, and construct a target heterogeneous graph using the user information and product information. The target heterogeneous graph includes multiple user nodes, as well as user node data, product item nodes, and product item node data corresponding to each user node. Update the user node vector for each user node and the user node data corresponding to each user node to obtain the updated user node vector for each user node. Update the product item node vector for each user node and the product item node data to obtain the updated product item node vector for each product item node. The target user node vector for each user node is obtained by fusion calculation based on the updated user node vector of each user node and the updated product item node vector of each product item node. Import multiple candidate product items and candidate product item vectors that correspond one-to-one with each candidate product item, and perform predictive analysis based on the target user node vector of each user node and the candidate product item vectors corresponding to each candidate product item to obtain the target prediction value of each user node, and use the candidate product items corresponding to the target prediction values of each user node as the recommended products of each user node. The user node data includes user node vectors, user interaction node vectors, edge weights, and multiple source node vectors. The process of updating the user node vectors of each user node and the corresponding user node data to obtain the updated user node vectors of each user node includes: Based on the first formula, attention scores are calculated for each user node, the user node vector corresponding to each user node, the user interaction node vector, the edge weights, and the source node vectors, resulting in multiple attention scores for each user node. The first formula is: , Based on the second formula, weighting factors are calculated according to the attention scores of each user node to obtain multiple weighting factors for each user node. The second formula is: , Based on the third equation, the neighbor node vectors of each user node are calculated according to multiple source node vectors and multiple weight factors of each user node, thereby obtaining the neighbor node vectors of each user node. The third equation is: , Based on the fourth equation, the updated user node vectors are calculated according to the user node vectors corresponding to each user node and the neighbor node vectors of each user node, to obtain the updated user node vectors of each user node. The fourth equation is: , in, For the updated user node vector, For a trainable parameter matrix, The neighbor node vector, For the first User node vectors of the layer, is a trainable bias vector. For ReLU activation functions, As a weighting factor, For the first The first layer One source node vector, The number of weighting factors. The sigmoid activation function is used. For attention score, For the first User interaction node vectors of the layer, For the first Layer edge weights, For user nodes, For splicing, This is a transpose.
2. The product recommendation method according to claim 1, characterized in that, The process of constructing the target heterogeneous graph using the user information and the product information includes: An initial heterogeneous graph is constructed using the user information and the product information; The initial heterogeneous graph is initialized to obtain the target heterogeneous graph.
3. The product recommendation method according to claim 1, characterized in that, The product item node data includes the product item node vector, the number of incoming and outgoing neighbors, and multiple neighbor node vectors. The process of updating the product item nodes and product item node data corresponding to each user node to obtain the updated product item node vectors for each product item node includes: Based on the fifth formula, the association feature information of each product item node is obtained by calculating the association feature information according to the product item node, product item node vector, number of incoming and outgoing neighbors, and multiple neighbor node vectors corresponding to each user node. The fifth formula is: , Based on the sixth formula, the target product item node vector is calculated according to the product item node vector corresponding to each user node and the association feature information of each product item node, thus obtaining the target product item node vector of each product item node. The sixth formula is: , in, , , , Based on the seventh formula, the updated product item node vectors are calculated according to the product item node vectors corresponding to each user node and the target product item node vectors of each product item node, to obtain the updated product item node vectors of each product item node. The seventh formula is: , in, , in, For the first The updated product item node vector for each product item node. For the first The target product item node vector for each product item node. For the first A sequence diagram of individual product item nodes. The sigmoid activation function is used. , , , He Jun For a trainable parameter matrix, For the first The vector of each product item node. This is the vector of the last product item node. and All of these are trainable bias vectors. For Hada code product, For the first The first node vector of each product item node For the first The second node vector of each product item node. For the first The third node vector of each product item node, The tanh activation function is used. For the first The associated feature information of each product item node, and All are the first The number of inbound and outbound neighbors for each product item node. For the first neighbor node vectors, For the first The neighbor node to the first The weight of each product item node, For the first The product item node to the first The weights of each neighboring node, For splicing.
4. The product recommendation method according to claim 1, characterized in that, The process of fusing the updated user node vectors of each user node and the updated product item node vectors of each product item node to obtain the target user node vector for each user node includes: Based on the eighth formula, the updated user node vectors of each user node and the updated product item node vectors of each product item node are fused together to obtain the target user node vector for each user node. The eighth formula is: , in, For the target user node vector, For the updated user node vector, This is the updated product item node vector. For splicing.
5. The product recommendation method according to claim 1, characterized in that, The process of performing prediction analysis based on the target user node vector of each user node and the candidate product item vector corresponding to each candidate product item to obtain the target prediction value of each user node includes: The target user node vector of each user node is multiplied by the candidate product vector corresponding to each candidate product item to obtain multiple initial prediction values for each user node. The maximum value among the multiple initial predicted values of each user node is selected, and the maximum predicted value of each user node is obtained after selection. The maximum predicted value is then used as the target predicted value.
6. A product recommendation device, characterized in that, include: The heterogeneous graph construction module is used to import user information and product information, and construct a target heterogeneous graph through the user information and product information. The target heterogeneous graph includes multiple user nodes, as well as user node data, product item nodes and product item node data corresponding to each user node. The user node vector update module is used to update the user node vector of each user node and the user node data corresponding to each user node, so as to obtain the updated user node vector of each user node. The product item node vector update module is used to update the product item node vector of each user node and the product item node data, so as to obtain the updated product item node vector of each product item node. The fusion calculation module is used to perform fusion calculation based on the updated user node vector of each user node and the updated product item node vector of each product item node to obtain the target user node vector of each user node. The recommended product acquisition module is used to import multiple candidate product items and candidate product item vectors corresponding to each candidate product item, and perform predictive analysis based on the target user node vector of each user node and the candidate product item vectors corresponding to each candidate product item to obtain the target prediction value of each user node, and respectively use the candidate product items corresponding to the target prediction value of each user node as the recommended products of each user node. The user node data includes user node vectors, user interaction node vectors, edge weights, and multiple source node vectors. The user node vector update module is specifically used for: Based on the first formula, attention scores are calculated for each user node, the user node vector corresponding to each user node, the user interaction node vector, the edge weights, and the source node vectors, resulting in multiple attention scores for each user node. The first formula is: , Based on the second formula, weighting factors are calculated according to the attention scores of each user node to obtain multiple weighting factors for each user node. The second formula is: , Based on the third equation, the neighbor node vectors of each user node are calculated according to multiple source node vectors and multiple weight factors of each user node, thereby obtaining the neighbor node vectors of each user node. The third equation is: , Based on the fourth equation, the updated user node vectors are calculated according to the user node vectors corresponding to each user node and the neighbor node vectors of each user node, to obtain the updated user node vectors of each user node. The fourth equation is: , in, For the updated user node vector, For a trainable parameter matrix, The neighbor node vector, For the first User node vectors of the layer, is a trainable bias vector. For ReLU activation functions, As a weighting factor, For the first The first layer One source node vector, The number of weighting factors. The sigmoid activation function is used. For attention score, For the first User interaction node vectors of the layer, For the first Layer edge weights, For user nodes, For splicing, This is a transpose.
7. The product recommendation device according to claim 6, characterized in that, The heterogeneous graph construction module is specifically used for: An initial heterogeneous graph is constructed using the user information and the product information; The initial heterogeneous graph is initialized to obtain the target heterogeneous graph.
8. A product recommendation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the product recommendation method as described in any one of claims 1 to 5.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the product recommendation method as described in any one of claims 1 to 5.