Smart retail recommendation method and system based on graph decoupling representation learning
By adopting graph decoupled representation learning method in the smart retail recommendation system, the hypergraph structure of user behavior and conducting representation learning is solved, and the problem that the system is difficult to capture complex user behavior changes is achieved, and efficient personalized recommendation is achieved.
Patent Information
- Application Number
- CN202411664750.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-21
AI Technical Summary
Smart retail recommendation systems are difficult to effectively capture consumers' complex purchasing decisions and behavior changes, resulting in poor personalized recommendations.
Using a method based on graph decoupled representation learning, an accurate smart retail recommendation model is established by constructing a hypergraph structure of user behavior, decomposing nodes and edges in the graph structure, extracting user intention characteristics, and characterizing and learning through Hypergraph Transformer.
It realizes accurate capture of user complex purchasing decisions and behavior changes, improves the personalized effect of recommendations, and improves user experience and merchant sales conversion rate.
Smart Images

Figure CN119671665A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart city recommendation, and specifically relates to a smart retail recommendation method and system based on graph decoupling representation learning. Background Art
[0002] Smart city is a new type of city that integrates various resources and services of the city, improves the efficiency of urban management and services, and thus improves the quality of life of citizens and promotes sustainable development. In smart cities, technologies such as the Internet of Things, big data, cloud computing, and artificial intelligence are widely used to achieve service innovation and optimization in multiple fields such as smart transportation, smart business, and smart medical care. As an important part of smart business in smart cities, smart retail has gradually emerged and developed. Its environment is complex and changeable, and is affected by multiple factors such as user behavior characteristics, product attributes, and market dynamics. Smart retail uses intelligent technology to improve the operational efficiency and consumer experience of the retail industry. Through data analysis, personalized recommendations, and intelligent management, it helps retailers stand out in the fierce market competition and promotes the transformation of traditional retail to digitalization and intelligence. Although smart retail has great development potential, in actual applications, due to the dynamic and diverse nature of user consumption preferences, many smart retail systems may not meet user needs when recommending products due to inaccurate algorithms, resulting in a decline in user experience. At the same time, users become bored with irrelevant or repeated recommendations, which affects their purchasing decisions. Therefore, it is crucial to achieve accurate smart retail recommendations.
[0003] In the smart retail environment, traditional recommendation methods such as collaborative filtering, content recommendation, and model-based algorithms perform poorly when processing high-dimensional and nonlinear data. These methods often rely on simple user behavior patterns and cannot effectively capture consumers' complex purchasing decisions and behavior changes, and it is difficult to meet personalized needs. For this reason, graph convolutional neural networks are introduced into smart retail recommendation tasks, which can effectively model the complex relationships between products and better mine the structural information of user behavior, thereby improving the results of recommendations. At the same time, graph decoupled representation learning, as an advanced method, can use graph structure data for feature extraction and representation learning. By decomposing the nodes and edges in the graph structure, the features of each node are extracted, and these features are fused to capture the user's true intentions. Summary of the invention
[0004] In view of the problem that the current smart retail recommendation system cannot effectively capture consumers' complex purchasing decisions and behavior changes and is difficult to meet personalized needs, the present invention provides a smart retail recommendation method and system based on graph decoupling representation learning. By distinguishing the multiple intentions behind user behaviors, capturing users' potential intentions, and analyzing users' behavioral choices and preferences, an accurate smart retail recommendation method and system are finally obtained.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A smart retail recommendation method and system based on graph decoupling representation learning, comprising the following steps:
[0007] Step 1: Build a hypergraph based on user session behavior data (such as browsing history, click behavior, purchase history, etc.), and on this basis, embed multiple user intentions as product nodes to construct intention hyperedges to form a complete user behavior hypergraph structure;
[0008] Step 2: Based on the user behavior hypergraph structure, we first perform micro-decoupling and macro-decoupling to analyze the various intentions behind user behavior, and then calculate the preference scores of each product for prediction, thereby establishing a smart retail recommendation model based on graph decoupling representation learning;
[0009] Step 3: For the smart retail recommendation model, design a joint optimization objective function and perform model training on the objective function;
[0010] Step 4: Use the trained smart retail recommendation model based on graph decoupling representation learning to make recommendations for smart retail, and provide the recommendation results to users and retail platform merchants for use.
[0011] Furthermore, the step 1, constructing a hypergraph based on user session behavior data (such as browsing history, click behavior, purchase history, etc.), on this basis, embedding multiple user intentions as commodity nodes to construct intention hyperedges, and forming a complete user behavior hypergraph structure specifically includes the following steps:
[0012] Step 1.1: Obtain the user session behavior dataset from the retail platform and construct a hypergraph of the user session behavior data. Where V = {i1,i2,...,i N} is a set of N commodity nodes, representing all commodities included in a certain user behavior; E is a set of hyperedges, representing the association between commodities, and each hyperedge connects all commodities in a single user session; each hyperedge is represented by ε = i s,1 ,i s,2 ,...,i s,m ∈E, and each hyperedge ε∈E has at least two commodity nodes, assigned weight W εε , a diagonal matrix Used to represent all weights;
[0013] Step 1.2, then analyze the relationship between products; for each product node i s ∈V, the product node embedding is initialized as in is i sThe embedding size of is i s Product node embedding on the kth intent dimension; the kth blocks of all product node embeddings are in the same k-subspace, which indicates a certain user intent; for the kth subspace, the intent prototype is constructed by clustering the kth blocks of all product node embeddings as the center of the corresponding subspace, expressed as For the kth intent, calculate the kth intent prototype and product node i s ∈V, expressed as Each intention is then considered as ki The hyperedge connecting the top-λn product nodes is the intention hyperedge, where n is the product node number and λ controls the sparsity of the hyperedge. Finally, the intention hyperedge is added to the hypergraph to form a complete user behavior hypergraph structure.
[0014] Furthermore, in step 2, based on the user behavior hypergraph structure, micro-decoupling and macro-decoupling are first performed to analyze the various intentions behind the user behavior, and then the preference scores of each product are calculated for prediction, thereby establishing a smart retail recommendation model based on graph decoupling representation learning;
[0015] Step 2.1: Based on the user behavior hypergraph structure constructed in step 1, treat the sub-hypergraph composed of each intent as a view for micro-decoupling, where each sub-hypergraph contains all the initial hyperedges, but only involves the intent hyperedges of a specific intent; process different user intents through parallel intent-aware encoders, and use Hypergraph Transformer to propagate and learn the specific blocks embedded in each product node independently under each view, where each encoder captures a specific intent, including the propagation from node to hyperedge (step 2.2), the propagation from hyperedge to node (step 2.3), and the iterative propagation process of hypergraph information (step 2.4);
[0016] Step 2.2, node-to-hyperedge propagation: Take the block vector embedded in each product node as the input of the Transformer. For each hyperedge, collect the block vectors embedded in all product nodes in this view, and input the collected block vectors as a sequence into a multi-head self-attention module; the self-attention module will be able to distinguish nodes with large information content from nodes with small information content, and aggregate the block information embedded in all product nodes through the multi-head attention mechanism, as shown below:
[0017]
[0018] in, represents the embedding of all hyperedges under the kth intention, which is obtained by connecting the hyperedge embeddings specific to the head of the hypergraph H to calculate; are the query, key, and value vectors in the attention mechanism. Multi-head query, key, and value vectors are calculated through linear transformation and slicing, as shown in formula (3):
[0019]
[0020] in, represents the embedding matrix of the hyperedge, Respectively represent the key and value conversion of all hypergraph H heads; a hierarchical hypergraph neural network (HHGN) is added on the commodity node side to mine the complex nonlinear feature interactions between hyperedges, and the final hyperedge embedding The calculation is as follows:
[0021] HHGN(X)=s(H×X+X) (4)
[0022]
[0023] in, represents the final and original hyperedge embedding; HHGN 2 (×) indicates applying the Hierarchical Hypergraph Neural Network (HHGN) twice; HHGN is configured with a learnable parameter matrix Characterize hyperedge relationships; introduce activation function s(×) for nonlinear relationship modeling;
[0024] Step 2.3, Hyperedge to Node Propagation: The final hyperedge embedding obtained from step 2.2 The information is propagated from the hyperedge to the commodity node through the reverse process as follows:
[0025]
[0026] in, Represents the product node i refined by the hypergraph neural network s The new embedding of Indicates that the hth attention head is i s Computed commodity node embedding; Represents product node i s and the query, key, and value vectors of the hyperedge; the attention calculation in this hyperedge-to-node propagation process shares most of the parameters with the node-to-hyperedge propagation mentioned above, applying the query in the node-to-hyperedge propagation parameters as the key, the key as the query, and the value calculation applies the same value transformation to the hyperedge embedding, as shown in Equation (8):
[0027]
[0028] Step 2.4, iterative propagation process: Based on the learning process of steps 2.2 to 2.3, multiple Hypergraph Transformer layers are stacked to further learn global relationships, and the dependency relationship between commodity nodes is represented by iterative hypergraph propagation, so that the embeddings of nodes and hyperedges promote each other, thereby achieving the purpose of optimization; the embedding in the (l-1)th iteration is used as input, and the hypergraph encoding (HyperTrans(×)) is applied, where the embeddings of a specific layer are combined by element-wise summation, as shown below:
[0029]
[0030] in, Represents the final product node embedding; each product node i is obtained through micro-decoupling s Intent specific blocks
[0031] In step 2.5, the intention-specific blocks of the commodity nodes obtained in step 2.4 are used for macro decoupling, and the mutual information metric is introduced. By minimizing the mutual information of the specific blocks of the commodity node embeddings learned between different views, the coupling relationship between different intentions is eliminated, and the commodity node embeddings learned under different intentions are kept independent of each other. Specifically, the contrast loss of conditional probability is used to estimate the mutual information, as shown in formula (11):
[0032]
[0033] Where K represents the number of views, and is the implicit embedding of the blocks under different views; q(z i,m |z i,n ) is the approximate conditional probability distribution under given conditions, q(z i,m ) is an estimate of the marginal probability distribution;
[0034] Step 2.6: Based on the intent-specific block of each product node embedding learned in steps 2.1 to 2.5, introduce reverse position embedding to learn the weight c of the product node embedding in each view. n k , as shown below:
[0035]
[0036] in, is the commodity node i s The embedding at the kth view, p m-n+1 Embedding for reverse position; and are all learnable parameters under the k-th view; then, the commodity node embeddings learned under the k-th view are aggregated to generate specific intent embeddings As shown in formula (15):
[0037]
[0038] Finally, the preference score of each product in each view is calculated, and the scores between all views are combined to obtain the final preference score, as shown in formula (16):
[0039]
[0040] For user session behavior data, is a score vector containing the prediction scores of all candidate products, and the final probability of each candidate product is expressed as
[0041] In step 2.7, the standard cross entropy loss function is used to measure the difference between the probability distribution of the predicted value and the probability distribution of the true label, so as to optimize the model so that it can make predictions more accurately, as shown in formula (17):
[0042]
[0043] Among them, y s Represents the true label (one-hot vector).
[0044] Furthermore, in step 3, for the smart retail recommendation model, a joint optimization objective function is designed, and model training is performed on the objective function;
[0045] Step 3.1: jointly train the three parts of microscopic decoupling, macroscopic decoupling and prediction described in step 2, and define a joint optimization objective function as shown in formula (18):
[0046]
[0047] in, and Represent the losses of the recommendation task and the mutual information minimization task respectively;
[0048] In step 3.2, the gradient descent method is used to perform error back propagation based on the joint optimization objective function, and the undetermined parameters in the smart retail recommendation model based on graph decoupling representation learning are updated to complete the model training.
[0049] Furthermore, in step 4, the trained smart retail recommendation model based on graph decoupling representation learning is used to implement recommendations for smart retail, and the recommendation results are provided to users and retail platform merchants for use;
[0050] Step 4.1: For a given user to be recommended, input it into the above-mentioned smart retail recommendation model based on graph decoupling representation learning for training. Finally, the recommended label t of the product node i is obtained by formula (19):
[0051] t=argmax{P si} (19)
[0052] Among them, P si is an element in the product recommendation matrix P, representing the recommendation status of product node i;
[0053] Step 4.2, provide the smart retail recommendation results to users and merchants on the retail platform; for users, personalized recommendations can help them quickly find products of interest, reduce the time cost of selection, improve shopping experience, and increase the convenience of purchase; for merchants, accurate recommendations can effectively increase the exposure of products, drive sales conversion rate, promote cross-selling and up-selling, and help merchants better understand consumer preferences and needs, thereby optimizing inventory and marketing strategies.
[0054] A smart retail recommendation system based on graph decoupling representation learning, including a computer processor and memory, a user behavior hypergraph structure construction unit, a smart retail recommendation model training unit, and a smart retail recommendation result output unit.
[0055] The user behavior hypergraph structure construction unit executes step 1, for the acquired user session behavior data set, represents the products as product nodes in the hypergraph, represents the association between the products as hyperedges between the product nodes, and embeds the user's multiple intentions as the product nodes, constructs the user behavior hypergraph structure and loads it into the computer memory;
[0056] The smart retail recommendation model training unit executes steps 2 to 3 according to the user behavior hypergraph structure constructed in step 1, constructs a smart retail recommendation model, and trains the model based on a defined objective function;
[0057] The smart retail recommendation result output unit executes step 4, classifies the products with high user interest in the smart retail platform into the recommendation column, and provides the smart retail recommendation results to users and merchants on the retail platform for use, so as to help users quickly find products of interest, improve shopping experience, and increase the convenience of purchase. At the same time, for merchants, accurate recommendations can effectively increase the exposure rate of products, help merchants better understand consumers' preferences and needs, thereby optimizing inventory and marketing strategies and achieving a win-win situation.
[0058] Compared with the prior art, the present invention has the following advantages:
[0059] The smart retail recommendation method of the present invention constructs a user behavior hypergraph structure, which can not only record the complex relationships between user behaviors, but also analyze the user's multiple intentions, which helps to obtain smart retail recommendation results with stronger robustness and interpretability.
[0060] The smart retail recommendation method of the present invention establishes a smart retail recommendation model by using a decoupled representation learning method based on a graph structure, so that the model has a certain generation capability, thereby making the smart retail recommendation process have a stronger generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a structural diagram of the smart retail recommendation model of the present invention;
[0062] Figure 2 This is a system structure diagram of the smart retail recommendation system of the present invention;
[0063] Figure 3 Flow chart of the smart retail recommendation method of the present invention. DETAILED DESCRIPTION
[0064] In order to gain a deeper understanding of the present invention, we will provide a comprehensive and detailed description of the present invention. However, the present invention has multiple implementations and is not limited to the specific examples listed herein. The presentation of these examples is intended to deepen the comprehensive understanding of the disclosure of the present invention.
[0065] The smart retail recommendation method based on graph decoupling representation learning described in the present invention is implemented by a computer program. Figure 3 The process shown in the figure details the specific implementation of the technical solution proposed by the present invention, and uses the technical solution of the present invention to perform smart retail recommendation on the Tmall dataset, which comes from the IJCAI-15 competition and contains shopping logs of anonymous users on the Tmall online shopping platform. These data are divided into training sets and test sets in a ratio of 7:1, and the dataset is expanded and labeled by splitting the original sequence, that is, generating sequences and corresponding labels for data enhancement.
[0066] Example 1
[0067] A smart retail recommendation method and system based on graph decoupling representation learning, comprising the following steps:
[0068] Step 1: construct a hypergraph based on user session behavior data (such as browsing history, click behavior, purchase history, etc.), and on this basis, embed multiple user intentions as commodity nodes to construct intention hyperedges to form a complete user behavior hypergraph structure; specifically, the following steps are included:
[0069] Step 1.1, obtain the user session behavior data set from the retail platform, first construct the user session behavior data into a hypergraph H = (V, E), where V = {i1, i2, ..., i N} is a set of N commodity nodes, representing all commodities included in a certain user behavior; E is a set of hyperedges, representing the association between commodities, and each hyperedge connects all commodities in a single user session; each hyperedge is represented by ε = i s,1 ,i s,2 ,...,i s,m ∈E, and each hyperedge ε∈E has at least two commodity nodes, assigned weight W εε , a diagonal matrix Used to represent all weights;
[0070] Step 1.2, then analyze the relationship between products; for each product node i s ∈V, the product node embedding is initialized as in is i s The embedding size of is i s Product node embedding on the kth intent dimension; the kth blocks of all product node embeddings are in the same k-subspace, which indicates a certain user intent; for the kth subspace, the intent prototype is constructed by clustering the kth blocks of all product node embeddings as the center of the corresponding subspace, expressed as For the kth intent, calculate the kth intent prototype and product node i s ∈V, expressed as Each intention is then considered as ki The hyperedge connecting the top-λn product nodes is the intention hyperedge, where n is the product node number and λ controls the sparsity of the hyperedge. Finally, the intention hyperedge is added to the hypergraph to form a complete user behavior hypergraph structure.
[0071] Step 2: Based on the user behavior hypergraph structure, first perform micro-decoupling and macro-decoupling to analyze the various intentions behind user behavior, then calculate the preference scores of each product for prediction, so as to establish a smart retail recommendation model based on graph decoupling representation learning; specifically, the following steps are included:
[0072] Step 2.1: Based on the user behavior hypergraph structure constructed in step 1, treat the sub-hypergraph composed of each intent as a view for micro-decoupling, where each sub-hypergraph contains all the initial hyperedges, but only involves the intent hyperedges of a specific intent; process different user intents through parallel intent-aware encoders, and use Hypergraph Transformer to propagate and learn the specific blocks embedded in each product node independently under each view, where each encoder captures a specific intent, including the propagation from node to hyperedge (step 2.2), the propagation from hyperedge to node (step 2.3), and the iterative propagation process of hypergraph information (step 2.4);
[0073] Step 2.2, node-to-hyperedge propagation: Take the block vector embedded in each product node as the input of the Transformer. For each hyperedge, collect the block vectors embedded in all product nodes in this view, and input the collected block vectors as a sequence into a multi-head self-attention module; the self-attention module will be able to distinguish nodes with large information content from nodes with small information content, and aggregate the block information embedded in all product nodes through the multi-head attention mechanism, as shown below:
[0074]
[0075] in, represents the embedding of all hyperedges under the kth intention, which is obtained by connecting the hyperedge embeddings specific to the head of the hypergraph H to calculate; are the query, key, and value vectors in the attention mechanism. Multi-head query, key, and value vectors are calculated through linear transformation and slicing, as shown in formula (3):
[0076]
[0077] in, represents the embedding matrix of the hyperedge, Respectively represent the key and value conversion of all hypergraph H heads; a hierarchical hypergraph neural network (HHGN) is added on the commodity node side to mine the complex nonlinear feature interactions between hyperedges, and the final hyperedge embedding The calculation is as follows:
[0078] HHGN(X)=s(H×X+X) (4)
[0079]
[0080] in, represents the final and original hyperedge embedding; HHGN 2 (×) indicates applying the Hierarchical Hypergraph Neural Network (HHGN) twice; HHGN is configured with a learnable parameter matrix Characterize hyperedge relationships; introduce activation function s(×) for nonlinear relationship modeling;
[0081] Step 2.3, Hyperedge to Node Propagation: The final hyperedge embedding obtained from step 2.2 The information is propagated from the hyperedge to the commodity node through the reverse process as follows:
[0082]
[0083]
[0084] in, Represents the product node i refined by the hypergraph neural network s The new embedding of Indicates that the hth attention head is i s Computed commodity node embedding; Represents product node i s and the query, key, and value vectors of the hyperedge; the attention calculation in this hyperedge-to-node propagation process shares most of the parameters with the node-to-hyperedge propagation mentioned above, applying the query in the node-to-hyperedge propagation parameters as the key, the key as the query, and the value calculation applies the same value transformation to the hyperedge embedding, as shown in Equation (8):
[0085]
[0086] Step 2.4, iterative propagation process: Based on the learning process of steps 2.2 to 2.3, multiple Hypergraph Transformer layers are stacked to further learn global relationships, and the dependency relationship between commodity nodes is represented by iterative hypergraph propagation, so that the embeddings of nodes and hyperedges promote each other, thereby achieving the purpose of optimization; the embedding in the (l-1)th iteration is used as input, and the hypergraph encoding (HyperTrans(×)) is applied, where the embeddings of a specific layer are combined by element-wise summation, as shown below:
[0087]
[0088] in, Represents the final product node embedding; each product node i is obtained through micro-decoupling s Intent specific blocks
[0089] In step 2.5, the intention-specific blocks of the commodity nodes obtained in step 2.4 are used for macro decoupling, and the mutual information metric is introduced. By minimizing the mutual information of the specific blocks of the commodity node embeddings learned between different views, the coupling relationship between different intentions is eliminated, and the commodity node embeddings learned under different intentions are kept independent of each other. Specifically, the contrast loss of conditional probability is used to estimate the mutual information, as shown in formula (11):
[0090]
[0091] Where K represents the number of views, and is the implicit embedding of the blocks under different views; q(z i,m |z i,n ) is the approximate conditional probability distribution under given conditions, q(z i,m ) is an estimate of the marginal probability distribution;
[0092] Step 2.6: Based on the intent-specific block of each product node embedding learned in steps 2.1 to 2.5, introduce reverse position embedding to learn the weight of the product node embedding in each view. As shown below:
[0093]
[0094] in, is the commodity node i s The embedding at the kth view, p m-n+1 Embedding for reverse position; and are all learnable parameters under the k-th view; then, the commodity node embeddings learned under the k-th view are aggregated to generate specific intent embeddings As shown in formula (15):
[0095]
[0096] Finally, the preference score of each product in each view is calculated, and the scores between all views are combined to obtain the final preference score, as shown in formula (16):
[0097]
[0098] For user session behavior data, is a score vector containing the prediction scores of all candidate products, and the final probability of each candidate product is expressed as
[0099] In step 2.7, the standard cross entropy loss function is used to measure the difference between the probability distribution of the predicted value and the probability distribution of the true label, so as to optimize the model so that it can make predictions more accurately, as shown in formula (17):
[0100]
[0101] Among them, y s Represents the true label (one-hot vector).
[0102] Step 3: For the smart retail recommendation model, a joint optimization objective function is designed. Model training for the objective function includes the following steps:
[0103] Step 3.1: jointly train the three parts of microscopic decoupling, macroscopic decoupling and prediction described in step 2, and define a joint optimization objective function as shown in formula (18):
[0104]
[0105] in, and Respectively represent the losses of the recommendation task and the mutual information minimization task;
[0106] In step 3.2, the gradient descent method is used to perform error back propagation based on the joint optimization objective function, and the undetermined parameters in the smart retail recommendation model based on graph decoupling representation learning are updated to complete the model training.
[0107] Step 4: Use the trained smart retail recommendation model based on graph decoupling representation learning to implement smart retail recommendations, and provide the recommendation results to users and retail platform merchants for use. The specific steps include:
[0108] Step 4.1: For a given user to be recommended, input it into the above-mentioned smart retail recommendation model based on graph decoupling representation learning for training. Finally, the recommended label t of the product node i is obtained by formula (19):
[0109] t=argmax{P si} (19)
[0110] Among them, P si is an element in the product recommendation matrix P, representing the recommendation status of product node i;
[0111] Step 4.2: Provide the smart retail recommendation results to users and merchants on the retail platform. For users, personalized recommendations can help them quickly find products of interest, reduce the time cost of selection, improve shopping experience, and increase the convenience of purchase; for merchants, accurate recommendations can effectively increase product exposure, promote sales conversion rate, promote cross-selling and up-selling, and help merchants better understand consumer preferences and needs, thereby optimizing inventory and marketing strategies.
[0112] Example 2
[0113] In order to verify the effectiveness and advancement of the technical solution proposed in this invention, the present invention is compared with the baseline methods GRU4Rec, GCE-GNN and S 2 -DHCN is used to compare the recommendation effects. The accuracy and average reciprocal ranking are used as evaluation indicators, and the recommendation results of the above method are evaluated using the Tmall dataset in the embodiment. The results are shown in Table 1:
[0114]
[0115] It can be seen from the results in the table that the technical solution of the present invention can obtain relatively accurate recommendation results when performing smart retail recommendations.
[0116] Example 3
[0117] like Figure 2 As shown, a smart retail recommendation system based on graph decoupling representation learning includes a computer processor and memory, a user behavior hypergraph structure construction unit, a smart retail recommendation model training unit, and a smart retail recommendation result output unit;
[0118] The user behavior hypergraph structure construction unit executes step 1, for the acquired user session behavior data set, represents the products as product nodes in the hypergraph, represents the association between the products as hyperedges between the product nodes, and uses the user's multiple intentions as the embedding of the product nodes to construct the user behavior hypergraph structure and load it into the computer memory;
[0119] The smart retail recommendation model training unit executes steps 2 to 3 according to the user behavior hypergraph structure constructed in step 1, constructs a smart retail recommendation model, and trains the model based on a defined objective function;
[0120] The smart retail recommendation result output unit executes step 4, classifies the products with high user interest in the smart retail platform into the recommendation column, and provides the smart retail recommendation results to users and merchants on the retail platform for use, so as to help users quickly find products of interest, improve shopping experience, and increase the convenience of purchase. At the same time, for merchants, accurate recommendations can effectively increase the exposure rate of products, help merchants better understand consumers' preferences and needs, thereby optimizing inventory and marketing strategies and achieving a win-win situation.
[0121] The contents not described in detail in the specification of the present invention belong to the prior art known to the professional and technical personnel in the field. Although the illustrative specific embodiments of the present invention are described above to facilitate the understanding of the present invention by the technical personnel in the field, it should be clear that the present invention is not limited to the scope of the specific embodiments. For the ordinary technical personnel in the field, as long as various changes are within the spirit and scope of the present invention defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A smart retail recommendation method and system based on graph decoupling representation learning, characterized by: The following steps are involved: Step 1: Build a hypergraph based on user session behavior data, embed multiple user intentions as product nodes to construct intention hyperedges, and form a complete user behavior hypergraph structure; Step 2: Based on the user behavior hypergraph structure, we first perform micro-decoupling and macro-decoupling to analyze the various intentions behind user behavior, and then calculate the preference scores of each product for prediction, thereby establishing a smart retail recommendation model based on graph decoupling representation learning; Step 3: For the smart retail recommendation model, design a joint optimization objective function and perform model training on the objective function; Step 4: Use the trained smart retail recommendation model based on graph decoupling representation learning to make recommendations for smart retail, and provide the recommendation results to users and retail platform merchants for use.
2. According to claim 1, a smart retail recommendation method and system based on graph decoupling representation learning is characterized by: The step 1 constructs a hypergraph based on the user session behavior data, embeds multiple user intentions as commodity nodes to construct intention hyperedges, and forms a complete user behavior hypergraph structure; Step 1.1: Obtain the user session behavior dataset from the retail platform and construct a hypergraph of the user session behavior data. Where V = {i1,i2,...,i N } is a set of N commodity nodes, representing all commodities included in a certain user behavior; E is a set of hyperedges, representing the association between commodities, and each hyperedge connects all commodities in a single user session; each hyperedge is represented by ε = i s,1 ,i s,2 ,...,i s,m ∈E, and each hyperedge ε∈E has at least two commodity nodes, assigned weight W εε , a diagonal matrix Used to represent all weights; Step 1.2, then analyze the relationship between products; for each product node i s ∈V, the product node embedding is initialized as in is i s The embedding size of is i s Product node embedding on the kth intent dimension; the kth blocks of all product node embeddings are in the same k-subspace, which indicates a certain user intent; for the kth subspace, the intent prototype is constructed by clustering the kth blocks of all product node embeddings as the center of the corresponding subspace, expressed as For the kth intent, calculate the kth intent prototype and product node i s ∈V, expressed as Each intention is then considered as ki The hyperedge connecting the top-λn product nodes is the intention hyperedge, where n is the product node number and λ controls the sparsity of the hyperedge. Finally, the intention hyperedge is added to the hypergraph to form a complete user behavior hypergraph structure.
3. According to claim 1, a smart retail recommendation method and system based on graph decoupling representation learning is characterized by: In step 2, based on the user behavior hypergraph structure, micro-decoupling and macro-decoupling are first performed to analyze the various intentions behind the user behavior, and then the preference scores of each product are calculated for prediction, thereby establishing a smart retail recommendation model based on graph decoupling representation learning; Step 2.1: Based on the user behavior hypergraph structure, the sub-hypergraph formed by each intent is regarded as a view for micro-decoupling, where each sub-hypergraph contains all the initial hyperedges, but only involves the intent hyperedges of a specific intent. Different user intents are processed by parallel intent-aware encoders, and the specific blocks embedded in each product node are propagated and learned independently in each view using Hypergraph Transformer. Each encoder captures a specific intent, including the propagation from node to hyperedge, the propagation from hyperedge to node, and the iterative propagation process of hypergraph information. Step 2.2, node-to-hyperedge propagation: The block vector embedded in each product node is used as the input of the Transformer. For each hyperedge, the block vectors embedded in all product nodes in this view are collected, and the collected block vectors are input as a sequence into a multi-head self-attention module; the self-attention module distinguishes nodes with large information content from nodes with small information content, and aggregates the block information embedded in all product nodes through the multi-head attention mechanism, as shown below: in, represents the embedding of all hyperedges under the kth intention, which is obtained by connecting the hyperedge embeddings specific to the head of the hypergraph H To calculate; q k,h ,k i,h , are the query, key, and value vectors in the attention mechanism. Multi-head query, key, and value vectors are calculated through linear transformation and slicing, as shown in formula (3): in, represents the embedding matrix of the hyperedge, Respectively represent the key and value conversion of all hypergraph H heads; a hierarchical hypergraph neural network is added on the commodity node side to mine the complex nonlinear feature interactions between hyperedges, and the final hyperedge embedding The calculation is as follows: HHGN(X)=s(H×X+X) (4) in, represents the final and original hyperedge embedding; HHGN 2 (×) indicates applying the hierarchical hypergraph neural network twice; HHGN configures a learnable parameter matrix Characterize hyperedge relationships; introduce activation function s(×) for nonlinear relationship modeling; Step 2.3, hyperedge to node propagation: According to the final hyperedge embedding The information is propagated from the hyperedge to the commodity node through the reverse process as follows: in, Represents the product node i refined by the hypergraph neural network s The new embedding of Indicates that the hth attention head is i s Computed commodity node embedding; q i,h ,k k,h , Represents product node i s and the query, key, and value vectors of the hyperedge; apply the query in the node-to-hyperedge propagation parameters as the key, the key as the query, and the value calculation applies the same value transformation to the hyperedge embedding, as shown in Equation (8): Step 2.4, iterative propagation process: Based on the learning process of steps 2.2 to 2.3, multiple Hypergraph Transformer layers are stacked to further learn global relationships, and the dependency relationship between commodity nodes is represented by iterative hypergraph propagation, so that the embeddings of nodes and hyperedges promote each other, thereby achieving optimization; the embedding in the (l-1)th iteration is used as input, and the hypergraph encoding (HyperTrans(×)) is applied, where the embeddings of a specific layer are combined by element-wise summation, as shown below: in, Represents the final product node embedding; each product node i is obtained through micro-decoupling s Intent specific blocks In step 2.5, the intention-specific blocks of the commodity nodes obtained in step 2.4 are used for macro decoupling, and the mutual information metric is introduced. By minimizing the mutual information of the specific blocks of the commodity node embeddings learned between different views, the coupling relationship between different intentions is eliminated, and the commodity node embeddings learned under different intentions are kept independent of each other. Specifically, the contrast loss of conditional probability is used to estimate the mutual information, as shown in formula (11): Where K represents the number of views, and is the implicit embedding of the blocks under different views; q(z i,m |z i,n ) is the approximate conditional probability distribution under given conditions, q(z i,m ) is an estimate of the marginal probability distribution; Step 2.6: Based on the intent-specific block of each product node embedding learned in steps 2.1 to 2.5, introduce reverse position embedding to learn the weight c of the product node embedding in each view. n k , as shown below: in, is the commodity node i s The embedding at the kth view, p m-n+1 Embedding for reverse position; and b k , are all learnable parameters under the k-th view; then, the commodity node embeddings learned under the k-th view are aggregated to generate specific intent embeddings As shown in formula (15): Finally, the preference score of each product in each view is calculated, and the scores between all views are combined to obtain the final preference score, as shown in formula (16): For user session behavior data, is a score vector containing the prediction scores of all candidate products. The final probability of each candidate product is expressed as In step 2.7, the standard cross entropy loss function is used to measure the difference between the probability distribution of the predicted value and the probability distribution of the true label, as shown in formula (17): Among them, y s represents the true label.
4. According to claim 1, a smart retail recommendation method and system based on graph decoupling representation learning is characterized by: In step 3, for the smart retail recommendation model, a joint optimization objective function is designed and a model training is performed on the objective function; Step 3.1: jointly train the three parts of microscopic decoupling, macroscopic decoupling and prediction described in step 2, and define a joint optimization objective function as shown in formula (18): in, and Respectively represent the losses of the recommendation task and the mutual information minimization task; In step 3.2, the gradient descent method is used to perform error back propagation based on the joint optimization objective function, and the undetermined parameters in the smart retail recommendation model based on graph decoupling representation learning are updated to complete the model training.
5. The method and system for intelligent retail recommendation based on graph decoupling representation learning according to claim 1, characterized in that: In step 4, the trained smart retail recommendation model based on graph decoupling representation learning is used to implement smart retail recommendations, and the recommendation results are provided to users and retail platform merchants for use; Step 4.1: For a given user to be recommended, input it into the smart retail recommendation model based on graph decoupling representation learning for training. Finally, the recommended label t of the product node i is obtained by formula (19): t=argmax{P si } (19) Among them, P si is an element in the product recommendation matrix P, representing the recommendation status of product node i; Step 4.2: Provide the smart retail recommendation results to users and merchants on the retail platform.
6. A smart retail recommendation system based on graph decoupling representation learning, characterized by: It includes a computer processor and memory, a user behavior hypergraph structure building unit, a smart retail recommendation model training unit, and a smart retail recommendation result output unit; The user behavior hypergraph structure construction unit, for the acquired user session behavior data set, represents the products as product nodes in the hypergraph, represents the associations between the products as hyperedges between the product nodes, and embeds the user's multiple intentions as the product nodes, constructs the user behavior hypergraph structure and loads it into the computer memory; A smart retail recommendation model training unit constructs a smart retail recommendation model according to the user behavior hypergraph structure constructed in step 1, and trains the model based on a defined objective function; The smart retail recommendation result output unit classifies the products with high user interest in the smart retail platform into the recommendation list, and provides the smart retail recommendation results to users and merchants on the retail platform for use.
Citation Information
Cited By
Recommendation method based on user use intention perception and electronic equipment
CN120492740A