A commodity alignment method based on a dynamic graph neural network
By combining contextual clustering and temporal attention mechanisms of dynamic graph neural networks with GCN-GRU combined networks, the dynamic and complex issues of product matching in e-commerce platforms are solved, achieving efficient and accurate cross-platform product alignment.
Patent Information
- Application Number
- CN202410877618.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Existing entity alignment technologies struggle to effectively utilize dynamic attributes and complex contextual information in e-commerce platforms, impacting matching accuracy and efficiency, and lacking timeliness.
By employing a dynamic graph neural network-based approach, which utilizes contextual clustering, temporal relationship attention mechanisms, and a combined GCN-GRU network, we can capture the temporal changes and relationships of product attributes, thereby achieving accurate cross-platform matching.
It significantly improves the accuracy and efficiency of product matching on e-commerce platforms, reduces invalid matches, and enhances the model's sensitivity to changes in products.
Smart Images

Figure CN118709693B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the application field of network alignment technology, and particularly relates to a commodity alignment method based on a dynamic graph neural network. BACKGROUND
[0002] In recent years, with the rapid development of Internet technology, e-commerce has become one of the main forms of global business activities, and commodity entity information on e-commerce platforms is increasingly large and dynamically changing. These information often comes from different data channels, so there may be a large number of duplicate entities. Entity alignment technology aims to match corresponding entities in different data sources in order to better integrate and analyze data. In the business field, entity alignment provides convenience for enterprises to implement personalized marketing strategies and accurately push products and services; in the aspect of national security, entity alignment can help track and identify potential terrorists or network attackers. Therefore, entity alignment research has received widespread attention from many domestic and foreign scholars.
[0003] So far, domestic and foreign researchers have conducted in-depth research on entity alignment technology. Existing entity alignment methods can be mainly divided into two types: traditional knowledge graph alignment technology based on relationship reasoning and similarity calculation; entity alignment model based on graph neural network which uses graph neural network to learn low-dimensional vector representation of different entities of knowledge graph, considers domain information to aggregate entity and relationship features, and considers single-hop and multi-hop domain information to realize efficient feature aggregation process and improve the efficiency of entity alignment.
[0004] At present, although a large amount of research has been conducted on entity alignment technology, and fruitful research results have been achieved, there are still some problems:
[0005] (1) In the e-commerce platform, the entity relationship and attribute are dynamically changing, and how to better utilize the dynamic attribute for entity alignment is a difficult problem.
[0006] (2) The problem of complex information in the e-commerce platform. How to effectively extract the context information of the complex e-commerce platform affects the accuracy of alignment.
[0007] (3) The timeliness of data in the e-commerce platform. In the e-commerce platform, rich time information is the key to alignment, and how to effectively utilize the time information is obviously a problem. SUMMARY
[0008] To solve the above prior art problems, the application adopts a commodity alignment method based on a dynamic graph neural network, comprising: obtaining commodity information of different e-commerce platforms, determining a to-be-matched commodity, inputting the commodity information of different e-commerce platforms into a trained dynamic graph neural network to obtain a matching score of the to-be-matched commodity and the remaining commodities, and selecting a commodity that is on a different e-commerce platform and has the highest matching score as the alignment commodity of the to-be-matched commodity; the dynamic graph neural network comprises: a context evolution module, a graph attention network GAT, and a GCN-GRU combined network.
[0009] The training process of the dynamic graph neural network comprises:
[0010] S1, obtaining commodity information of different e-commerce platforms, extracting the commodity information to obtain a commodity sequence; the commodity sequence comprises a plurality of commodities, each commodity comprising basic attributes and attribute values thereof; the basic attributes are arranged in chronological order;
[0011] S2, performing context clustering on the commodity sequence by using a context clustering method to obtain a commodity cluster set;
[0012] S3, constructing a commodity knowledge graph of each commodity cluster in the commodity cluster set; the nodes of the commodity knowledge graph are commodities, and the edges are the relationships between commodities;
[0013] S4, inputting the commodity cluster and the commodity knowledge graph thereof into the context evolution module to obtain commodity embedding of each commodity cluster;
[0014] S5, inputting the commodity embedding of the commodity cluster into the GAT to process by using a time relationship attention mechanism to obtain an implicit feature representation of each commodity of each commodity cluster;
[0015] S6, determining a target commodity, inputting the implicit feature representation of each commodity of the commodity cluster into the GCN-GRU combined network to obtain a final embedding representation of the target commodity;
[0016] S7, inputting the final embedding representation of the target commodity into a full connection layer to obtain a prediction result of the target commodity;
[0017] S8, calculating a loss function value according to the prediction result of the target commodity, updating the model parameters according to the loss function value, and completing the model training when the loss function value is the minimum.
[0018] The context clustering method comprises:
[0019] S21, dividing the basic attributes of the commodity to obtain general attributes and specific attributes;
[0020] S22. Calculate the similarity matrix between all products using the Jaccard similarity algorithm based on common attributes; cluster the products based on the similarity matrix to obtain product clusters based on common attributes;
[0021] S23. Calculate the similarity matrix among all products using the Jaccard similarity algorithm based on specific attributes; cluster the products based on the similarity matrix to obtain product clusters based on specific attributes;
[0022] S24. Combine the product clusters based on general attributes and the product clusters based on specific attributes to obtain a set of product clusters: Among them, commodity cluster C k [p * ]={(p * ,e i ,o i )|e i ∈C k}, where e i For the i-th item in the k-th item cluster, p * Let $\mathbf{k}$ be the attribute group for the $k$-th product cluster. The attributes in this group are arranged in chronological order of appearance. i For product e i In attribute group p * The attribute value vector on the vector, where K is the number of product clusters.
[0023] The basic attributes of goods can be categorized as follows:
[0024]
[0025] Among them, l p For identifying attributes, l p =0 indicates a general attribute, l p =1 indicates a specific attribute, w and a represent parameters, prop p This indicates the proportion of attribute p, and "unknown" means unknown.
[0026] Constructing a product knowledge graph for each product cluster in the product cluster set includes: treating each product as a node in the product knowledge graph; each occurrence of an attribute corresponds to a time step, calculating the relationships between products at each time step, and treating these relationships as edges in the product knowledge graph.
[0027] The context evolution module includes a GNN encoder and a temporal context encoder; the context evolution module processes product clusters and their product knowledge graphs, including:
[0028] S41. Input the product cluster into the time context encoder to aggregate the context information and obtain the time vector of each product in the product cluster.
[0029] S42, input the commodity knowledge graph of the commodity cluster into the GNN encoder to obtain the relationship vector of each commodity of the commodity cluster;
[0030] S43, respectively embedding the time vector and the relationship vector of each commodity of the commodity cluster, and fusing the embedding results to obtain the commodity embedding of each commodity cluster.
[0031] The time context encoder processes the commodity clusters in the commodity cluster set, including: generating an initial representation of each commodity of each commodity cluster by using a linear mapping method, splicing the initial representations of the respective commodities of each commodity cluster to obtain an initial commodity embedding of each commodity cluster, and processing the initial commodity embedding of each commodity cluster by using the time context encoder to obtain a time vector of each commodity of the commodity cluster.
[0032] Processing the commodity embedding of the commodity cluster by using the time relationship attention mechanism includes:
[0033]
[0034] wherein, a i,j,x is a time-specific attention coefficient on the edge from the commodity node e i to e j , t x is a time step, β i,j,m is a relationship-specific attention coefficient of the relationship r m on the edge from the commodity node e i to e j , t x is a time step, W t is a diagonal time transformation matrix, W r is a diagonal relationship transformation matrix, represents a set of time steps on all edges from the commodity node e i to e j , represents a set of adjacent commodities of the commodity node e i , t x represents a time step included in the set of time steps , r m represents a relationship on the edge from the commodity node e i to e j at the time step t x , is the hidden feature of the commodity node e j at the qth layer of the GAT.
[0035] The time-specific attention coefficient a i,j,x is:
[0036]
[0037] in, Indicates product node e i The time vector, Indicates product node e i At time step t x Embedding of time vectors, Indicates product node e z At time step t x Embedding of the time vector.
[0038] Relationship-specific attention coefficient β i,j,m for:
[0039]
[0040] in, Indicates product node e i relation vectors, Indicates product node e i and product node e j Relationship r m Embedding of the corresponding relation vector, Indicates product node e i and product node e z Relationship r′ m Embedding of the corresponding relation vector, Indicates from product node e i To product node e z The set of time steps and relations on the edge, r′ m Represents a set In time step t x The relationship.
[0041] The GCN-GRU combined network processes the latent feature representation of each item, including:
[0042]
[0043] Among them, W (l-1) This represents the parameter matrix of the GCN in the (l-1)th layer GCN-GRU combined network. For product node e u The features of the GCN output in the (l-1)th layer GCN-GRU combined network, For target product e f The set of adjacent product nodes, This represents the characteristics of the GRU output in the (l-1)th layer GCN-GRU combined network. The features of the GCN output in the l-th layer GCN-GRU combined network are as follows: the implicit feature representation of the target commodity at the lth time step, Q is the number of layers of the GAT
[0044] Advantages:
[0045] 1、The application designs a time-aware context evolution module, which captures the time relationship between the attributes of the commodity changing over time when processing the data of the e-commerce platform; 2、The application adopts a time relationship attention mechanism, which ensures that the relationship between commodities is considered while different time points are evaluated and given corresponding attention weights, accurately reflecting the contribution and importance of each time node, thereby realizing more accurate cross-platform commodity matching, significantly reducing invalid matching of commodity changes, and optimizing the efficiency of matching; 3、The application combines GCN and GRU to capture dynamic information of the evolution of commodity features over time, thereby enhancing the sensitivity of the model to commodity changes. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 A flowchart of a commodity alignment method based on a dynamic graph neural network provided by an embodiment of the application is shown in the figure;
[0047] Figure 2 A schematic diagram of a time relationship attention mechanism provided by an embodiment of the application is shown in the figure;
[0048] Figure 3 A schematic diagram of a context evolution module provided by an embodiment of the application is shown in the figure;
[0049] Figure 4 A schematic diagram of an alignment module provided by an embodiment of the application is shown in the figure. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.
[0051] The application provides a commodity alignment method based on a dynamic graph neural network, which comprises the following steps: obtaining commodity information of different e-commerce platforms, determining a commodity to be matched, inputting the commodity information of different e-commerce platforms into a trained dynamic graph neural network, obtaining a matching score of the commodity to be matched and other commodities, and selecting a commodity with the highest matching score and located in a different e-commerce platform from the commodity to be matched as an aligned commodity of the commodity to be matched; the dynamic graph neural network comprises a context evolution module, a graph attention network GAT, and a GCN-GRU combined network.
[0052] As Figure 1As shown, the training process of a dynamic graph neural network includes:
[0053] S1. Obtain product information from different e-commerce platforms, extract the product information, and obtain a product sequence; the product sequence includes multiple products, each product including: basic attribute P = {p1, ..., p...} n} and its attribute values; the basic attributes are arranged in chronological order of appearance; where n is the number of attributes;
[0054] S2. Use context clustering to perform context clustering on the product sequence to obtain a set of product clusters;
[0055] In product databases, the attributes "production date" and "expiration date start date" often appear together, but their contribution to revealing the evolution of a product's life cycle is limited. This is because there are inherent relationships between certain product attributes (e.g., food with an "expiration date start date" necessarily has a "production date"), leading to attribute overlap. For a particular product category, its general attributes are often prevalent across all products in that category, while specific attributes are only present in a few individuals within that category. For example, the "production date" attribute appears in almost all food products, but attributes such as "suitable for sports occasions" and "outdoor protection level" only appear in certain types of outdoor equipment.
[0056] Therefore, contextual clustering of product sequences includes:
[0057] S21. Divide the basic attributes of the product to obtain general attributes and specific attributes;
[0058] S22. Calculate the similarity matrix between all products using the Jaccard similarity algorithm based on common attributes; cluster the products based on the similarity matrix to obtain product clusters based on common attributes;
[0059] S23. Calculate the similarity matrix among all products using the Jaccard similarity algorithm based on specific attributes; cluster the products based on the similarity matrix to obtain product clusters based on specific attributes;
[0060] S24. Combine product clusters based on general attributes and product clusters based on specific attributes to obtain a set of product clusters: Among them, commodity cluster C k [p * ]={(p * ,e i ,o i )|e i ∈C k}, where e i For the i-th item in the k-th item cluster, p* represents the attribute group (specific attribute or general attribute) of the kth commodity cluster, and the attributes in the attribute group are arranged in chronological order, o i is the attribute value vector of the commodity e i on the attribute group p * , including a plurality of attribute-specific attribute values, K is the number of commodity clusters, and {(p * , e i , o i} is the commodity attribute change sequence, which means that at time t, each commodity cluster of the commodity cluster set contains a series of commodities, and these commodities have specific observation vectors or changes on the attribute group p * .
[0061] The division of the basic attributes of the commodity includes:
[0062]
[0063] wherein, l p =0 represents a general attribute, l p =1 represents a specific attribute, w,a∈[0,1] represents a parameter, prop p represents the attribute proportion; in order to reduce errors, l p =unknown (unknown) is introduced, when the unknown attribute appears, the unknown attribute is ignored, and the clustering is only based on the known attribute;
[0064] In an embodiment, preferably, w=0.8, a=0.2;
[0065] The formula for calculating prop p is as follows:
[0066]
[0067] wherein, count(p) represents the number of times the attribute p appears, and parentType(p) represents the direct parent type of the type of the commodity set including the attribute p in the commodity type hierarchy Γ, that is, when the input type is “smartphone”, this function may return the upper type “mobile phone”, according to the different levels of entity types, more organized management and analysis is carried out, and the calculation formula of parentType(p) is as follows:
[0068] parentType(p)=parent(type(E[p]),Γ)
[0069] wherein, E[p] represents the commodity set containing p attribute, and type(·) is a type function, which represents the type of the commodity set according to the commodity set;
[0070] The parentType() is a function proposed in the paper TEA: Temporal-aware Entity Alignment in Knowledge Graphs. Since there is no predefined commodity type hierarchy Γ that can be used directly, the application estimates the commodity type hierarchy Γ according to a co-occurrence-based method.
[0071] Estimation process:
[0072] Create an attribute co-occurrence matrix M, where M[i][j] represents the number of times attribute p i and attribute p j appear in the same commodity:
[0073]
[0074] where δ is an indicator function, and E represents all commodity and attribute data;
[0075] Use the values in the co-occurrence matrix to calculate the co-occurrence measure between attributes:
[0076]
[0077] Use the co-occurrence measure between attributes to build the attribute hierarchy:
[0078] Step 1, initialization: each attribute is a separate cluster;
[0079] Step 2, calculate the similarity between clusters according to the co-occurrence measure between attributes, and merge the most similar clusters;
[0080] Step 3, repeat step 2 until a preset number of iterations is reached, and obtain the predefined attribute hierarchy; the attribute hierarchy includes multiple levels of attribute clusters, and the commodity type hierarchy is inferred from the attribute hierarchy: commodity type is a higher level abstraction of attribute set, reflecting the main categories and subcategories of commodities. For example, from attribute groups such as "hardware configuration" and "appearance design", commodity types such as "high-end smart phones" and "economical tablet computers" can be inferred; organize commodity types into a tree structure or hierarchy according to their inclusion relationship and similarity. The top layer may be the most general commodity category (such as electronic products), followed by subcategories (such as mobile devices), and then specific commodity types (such as gaming phones); finally, establish the mapping relationship between attributes and commodity types to clearly identify which attributes belong to which type.
[0081] S3, build commodity knowledge graph for each commodity cluster in the commodity cluster set: define nodes in the graph as commodities, and define edges in the graph as relationships r m between commodities, m is the index of the relationship type.
[0082] Each occurrence of an attribute corresponds to a time step, and the relationship between commodities is calculated at each time step, including:
[0083] Same category relationship: indicates that two commodities belong to the same category, such as "apple mobile phone" and "samsung mobile phone" are subclasses of "smartphone"; the edges of the same category relationship include: obtaining the category attribute of the commodity, if two commodities belong to the same category, such as apple mobile phone and samsung mobile phone belong to the smart phone category, then a same category relationship edge is constructed between them.
[0084] Complementary relationship: indicates that two commodities are usually purchased or used together, such as "coffee machine" and "coffee beans". The edges of the complementary relationship include: obtaining user behavior data, determining whether two commodities are usually purchased or used together, if so, a complementary relationship edge is constructed between them.
[0085] Substitute relationship: indicates that the functions of two commodities are similar and can be replaced by each other, such as different brands of "bluetooth earphones". The edges of the substitute relationship include: obtaining the function attribute of two commodities, if the functions of two commodities are similar, then a substitute relationship edge is constructed between them.
[0086] S4, inputting the commodity cluster and its commodity knowledge graph into the context evolution module to obtain the commodity embedding of each commodity cluster;
[0087] In considering the similarity between commodities, it is generally believed that commodities with the same or similar characteristics are likely to belong to the same category or have comparability. However, commodity attributes are not fixed and will evolve with market changes, technology updates, changes in user demand and other factors. In a certain characteristic cluster (general attribute or specific attribute) of a commodity, time-related attribute changes show mutual interaction along the time axis, that is, early attribute changes often affect other attribute changes in a period of time later. For example, the time attribute of the first listing date of a smart phone can provide an important background for understanding the subsequent system upgrade, processor update and other time attribute changes.
[0088] Therefore, as Figure 3 shown, the present application uses a context evolution module to process the commodity cluster and its commodity knowledge graph of the commodity cluster set, including:
[0089] Before processing the commodity cluster using the time context encoder and the GNN encoder, the initial representation of each commodity of the commodity cluster is generated, including:
[0090] The initial representation of each commodity of the commodity cluster is generated by means of linear mapping, so as to depict the initial state of the commodity in the time sequence and the law of its change over time:
[0091]
[0092] wherein, W1 is a weight matrix to be learned, is a randomly initialized commodity node e i embedding, is an initial representation of the kth commodity cluster, and I is the number of commodities in the commodity cluster.
[0093] S41, inputting the commodity cluster into a temporal context encoder to aggregate context information, and obtaining a temporal vector of each commodity of each commodity cluster;
[0094] The temporal context encoder is used to process the initial representation, and a temporal vector of each commodity of the commodity cluster is obtained.
[0095] S42, inputting the commodity knowledge graph of the commodity cluster into a GNN encoder to obtain a relationship vector of the commodity node of each commodity cluster;
[0096] S43, embedding the temporal vector and the relationship vector of the commodity of the commodity cluster, and performing weighted summation on the embedding result to obtain a commodity embedding of each commodity cluster.
[0097] S5, inputting the commodity embedding of each commodity cluster into a GAT to process by using a temporal relationship attention mechanism, and obtaining a hidden feature representation of each commodity of each commodity cluster.
[0098] The temporal relationship attention mechanism includes:
[0099] The graph attention network (GAT) is an extension of the traditional graph convolution network (GCN), and the self-attention mechanism is integrated into the GAT, which optimizes the feature representation of each commodity by paying attention to other commodities adjacent to the current commodity:
[0100]
[0101] wherein, sigma (.) is a nonlinear activation function, is a set of adjacent commodity nodes of the commodity node e i , e j is the jth commodity node included in the set , W is a shared transformation matrix, a i,j is an attention coefficient from the node e i to the node e j , and q is an index of the GAT layer.
[0102] As shown in Figure 2 , in order to establish the temporal relationship attention mechanism, the application defines a new time-specific attention coefficient a i,j,x , a relationship-specific attention coefficient β i,j,mDiagonal time transformation matrix W t And the diagonal relation transformation matrix W r .
[0103] Note that the coefficients are calculated as follows:
[0104]
[0105] The updated product characteristic equation can be obtained from the above formula:
[0106]
[0107] Among them, a i,j,x For product node e i to e j On the edge, time step t x The corresponding time-specific attention coefficient, β i,j,m For product node e i to e j On the edge, at time step t x The corresponding relation r m The corresponding relational attention coefficient, W t W is the diagonal time transformation matrix. r The diagonal relationship transformation matrix, This indicates all items from product node e. i to e j The set of time steps on the edge, Indicates product node e i The set of adjacent goods, t x Represents the set of time steps The included time steps, r m Indicates at time step t x From product node e i to e j The relationship on the edge, For product node e j Hidden features in the q-th layer of GAT; Indicates product node e i The time vector, Indicates product node e i At time step t x Embedding of time vectors, Indicates product node e z At time step t′ x Embedding of time vectors; Indicates product node e i relation vectors, Indicates product node e i and product node e j Relationship r membedding of the corresponding relation vector, representing the commodity node e i and the relation r′ z m embedding of the corresponding relation vector, representing the set of time steps and relations on the edge from the commodity node e i to the commodity node e z r′ m representing the relation in the set at the time step t x .
[0108] S6, determining a target commodity, inputting the implicit feature representation of each commodity of each commodity cluster into a GCN-GRU combined network to obtain a final embedding representation of the target commodity;
[0109] As shown in Figure 4 , in order to effectively extract relevant information from the adjacent nodes of each commodity node, the graph neural network (GNNs) and the recurrent neural network (GRU) are used for reference, which respectively focus on the correlation between the node and its adjacent nodes and the sequence dependence relationship between adjacent nodes.
[0110] The graph convolutional neural network (GCNs) is an advanced graph neural network model, and its core idea is to integrate the embedding representation of all neighbor nodes around each node in an intuitive and direct manner, to determine a commodity node as the target commodity e f . Next, the current data related to the node will be extracted from the local environment in which the node is located, i.e. the characteristic set of its adjacent nodes, and the information state carried by it in the previous layer network architecture.
[0111] The recurrent neural network (gated recurrent unit, GRU) has excellent ability to capture complex sequence dependence, and the present application selects this network architecture to extract the time information features contained in the sequence of adjacent nodes around the selected commodity node.
[0112] Therefore, the present application uses a GCN-GRU combined network to effectively extract relevant information from the adjacent nodes of each commodity node:
[0113]
[0114] wherein W (l-1) represents the parameter matrix of the GCN in the l-1 layer GCN-GRU combined network, is the commodity node e u The feature of the GCN output in the GCN-GRU combined network of the l-1th layer, The target commodity e f The set of adjacent commodity nodes of the target commodity e The feature of the GRU output in the GCN-GRU combined network of the l-1th layer, The feature of the GCN output in the GCN-GRU combined network of the lth layer, The lth hidden feature representation of the target commodity, i.e., the hidden feature representation at the lth time step, and Q is the number of layers of the GAT.
[0115] Since two clustering operations are performed when clustering the context, a commodity belongs to two commodity clusters, and the features of the neighbor nodes of the target commodity in the two commodity clusters are aggregated and updated by the GCN-GRU combined network, and the obtained results are fused to obtain the final embedding representation.
[0116] S7, input the final embedding representation of the target commodity into a fully connected layer to obtain the prediction result of the target commodity
[0117] S8, calculate the loss function value according to the prediction result of the target commodity, update the model parameters according to the loss function value, and complete the model training when the loss function value is the minimum.
[0118] After the embedding representation learning of all nodes is completed, the final embedding vector of the target node is transformed through a fully connected layer, and the purpose is to predict the matching score of the node and other candidate commodities, and the loss function is defined as:
[0119]
[0120] Where y z represents the prediction result of the model, represents the similarity between the candidate commodity e z and the target commodity e f , y z is the true label, and N is the total number of candidate commodities.
[0121] The above examples further illustrate the purpose, technical solutions and advantages of the present application. It should be understood that the above examples are only preferred embodiments of the present application and do not limit the present application. Any modification, equivalent replacement, improvement, etc. made to the present application within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A commodity alignment method based on a dynamic graph neural network, characterized in that, The method comprises the following steps: The dynamic graph neural network comprises a context evolution module, a graph attention network (GAT) and a GCN-GRU combined network. The training process of the dynamic graph neural network comprises the following steps: S1, obtaining commodity information of different e-commerce platforms, extracting the commodity information to obtain a commodity sequence; the commodity sequence comprises a plurality of commodities, and each commodity comprises basic attributes and attribute values of the basic attributes; the basic attributes are arranged in chronological order; S2, performing context clustering on the commodity sequence by using a context clustering method to obtain a commodity cluster set; S3, constructing a commodity knowledge graph of each commodity cluster in the commodity cluster set; nodes of the commodity knowledge graph are commodities, and edges are relationships between commodities; S4, inputting the commodity cluster and the commodity knowledge graph thereof into the context evolution module to obtain commodity embedding of each commodity cluster; S5, inputting the commodity embedding of the commodity cluster into the GAT to process the commodity embedding by using a time relationship attention mechanism to obtain an implicit feature representation of each commodity of each commodity cluster; S6, determining a target commodity, inputting the implicit feature representation of each commodity of the commodity cluster into the GCN-GRU combined network to obtain a final embedding representation of the target commodity; S7, inputting the final embedding representation of the target commodity into a fully connected layer to obtain a prediction result of the target commodity; S8, calculating a loss function value according to the prediction result of the target commodity, updating model parameters according to the loss function value, and completing model training when the loss function value is minimum; The context evolution module comprises a GNN encoder and a time context encoder; the context evolution module processes the commodity cluster and the commodity knowledge graph thereof, and comprises the following steps: S41, inputting the commodity cluster into the time context encoder to aggregate context information to obtain a time vector of each commodity of the commodity cluster; S42, inputting the commodity knowledge graph of the commodity cluster into the GNN encoder to obtain a relationship vector of each commodity of the commodity cluster; S43, embedding the time vector and the relationship vector of each commodity of the commodity cluster respectively, and fusing the embedding results to obtain commodity embedding of each commodity cluster. The context clustering method comprises the following steps:
2. The commodity alignment method based on dynamic graph neural network according to claim 1, characterized in that, S21, dividing the basic attributes of the commodities to obtain general attributes and specific attributes; S22, calculating a similarity matrix between all commodities according to the general attributes by using a Jaccard similarity algorithm; clustering the commodities according to the similarity matrix to obtain commodity clusters based on the general attributes; S23, calculating a similarity matrix between all commodities according to the specific attributes by using the Jaccard similarity algorithm; clustering the commodities according to the similarity matrix to obtain commodity clusters based on the specific attributes; The dividing of the basic attributes of the commodities comprises the following steps: S24. Combine the product clusters based on general attributes and the product clusters based on specific attributes to obtain a set of product clusters: Among them, commodity cluster C k [p * ]={(p * ,e i ,o i )|e i ∈C k }, where e i For the i-th item in the k-th item cluster, p * Let $\mathbf{k}$ be the attribute group for the $k$-th product cluster. The attributes in this group are arranged in chronological order of appearance. i For product e i In attribute group p * The attribute value vector on the vector, where K is the number of product clusters.
3. The commodity alignment method based on dynamic graph neural network according to claim 2, characterized in that, wherein, l p is an identification of the attribute, l p = 0 indicates a generic attribute, l p = 1 indicates a specific attribute, w and a indicate parameters, prop p represents a proportion of the attribute p, and unknown indicates unknown.
4. The commodity alignment method based on dynamic graph neural network according to claim 1, characterized in that, The constructing the commodity knowledge graph of each commodity cluster in the commodity cluster set comprises: taking each commodity as a node of the commodity knowledge graph; calculating the relationship between commodities at each time step corresponding to each occurrence of an attribute, and taking the relationship as an edge of the commodity knowledge graph.
5. The commodity alignment method based on dynamic graph neural network according to claim 1, characterized in that, The processing of the commodity cluster in the commodity cluster set by the time context encoder comprises: generating an initial representation of each commodity of each commodity cluster by using a linear mapping method, splicing the initial representations of the commodities of each commodity cluster to obtain an initial commodity embedding of each commodity cluster, and processing the initial commodity embedding of each commodity cluster by using the time context encoder to obtain a time vector of each commodity of the commodity cluster.
6. The commodity alignment method based on dynamic graph neural network according to claim 1, characterized in that, The processing of the commodity embedding of the commodity cluster by using the time relationship attention mechanism comprises: where a i,j,x is the time-specific attention coefficient on the edge from commodity node e i to e j at time step t x , β i,j,m is the relation-specific attention coefficient on the edge from commodity node e i to e j at time step t x corresponding to relation r m , W t is the diagonal time transformation matrix, W r is the diagonal relation transformation matrix, denotes the set of time steps on all edges from commodity node e i to e j , denotes the set of neighboring commodities of commodity node e i , t x denotes the time step contained in the set of time steps , r m denotes the relation on the edge from commodity node e x to e i at time step t j , is the hidden feature of commodity node e j at the q-th layer of GAT.
7. The commodity alignment method based on dynamic graph neural network according to claim 6, characterized in that, Time-specific attention coefficient a i,j,x is: wherein, denotes the time vector of the commodity node e i , denotes the embedding of the time vector of the commodity node e i at time step t x , denotes the embedding of the time vector of the commodity node e z at time step t' x .
8. The commodity alignment method based on dynamic graph neural network according to claim 6, characterized in that, Relationship-specific attention coefficient β i,j,m is: wherein, represents the relationship vector of the commodity node e i , represents the embedding of the relationship r m between the commodity node e i and the commodity node e j , represents the embedding of the relationship r' between the commodity node e i and the commodity node e z , m represents the embedding of the relationship r' between the commodity node e i and the commodity node e z , represents the set of time steps and relationships r' on the edge from the commodity node e i to the commodity node e z , m represents the relationship in the set at time step t x .
9. The commodity alignment method based on dynamic graph neural network according to claim 1, characterized in that, The processing of the hidden feature representation of each commodity by the GCN-GRU combined network comprises: where W (l-1) denotes the parameter matrix of GCN in the l-1th GCN-GRU combined network, is the set of neighboring commodity nodes of the target commodity e u is the feature output by GCN in the l-1th GCN-GRU combined network, is the set of neighboring commodity nodes of the target commodity e f is the feature output by GRU in the l-1th GCN-GRU combined network, is the feature output by GCN in the l-1th GCN-GRU combined network, is the feature output by GCN in the l-1th GCN-GRU combined network, is the feature of the lth time step of the implicit feature representation of the target commodity, and Q is the number of layers of GAT.
Citation Information
Patent Citations
Cross-website commodity alignment method and device
CN115345687A
Entity alignment method for customs import and export commodity knowledge graph
CN115641599A