Graph model processing method and device for predicting competition and cooperation relationships
By using graph model processing methods in the supply chain graph network, combining structure coding and attribute coding information, and training triangular structural networks and bridge structure networks, the problem of low accuracy in predicting competition and cooperative relationships is solved, and more efficient relationship prediction is achieved.
Patent Information
- Application Number
- CN202011089208.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-13
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-10-13
AI Technical Summary
The existing competition and cooperative relationship prediction based on traditional machine learning models. In structured data, the classification effect depends on the quality of feature engineering, and the graph structure information cannot be effectively captured, resulting in low prediction accuracy.
A graph model processing method is proposed for predicting competition and cooperative relationships. By obtaining node structure encoding information and attribute encoding information in the supply chain graph network, vectorization processing is performed to obtain embedded vector matrix, and combining the loss function of the triangular structure network and the bridge structure network, the graph model is trained to improve prediction accuracy.
Through graph model processing methods, competition and cooperation relationships between companies in the supply chain can be more accurately predicted, improving the accuracy and effectiveness of predictions.
Smart Images

Figure CN114358452B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of neural network technology, and in particular to a method and device for processing a graph model for predicting competition and cooperation relationships. Background Art
[0002] In the supply chain scenario, there are upstream and downstream relationships between companies. At the same time, each company has its own attributes (including industry, business scope, etc.), and different companies may be in a competitive or cooperative relationship. Therefore, the entire supply chain scenario is transformed into a supply chain graph network. A node in the supply chain graph network represents a company. The nodes are connected through relationships to form a huge network. Each node has attributes, and the edges have a directed graph structure with positive and negative symbols. The positive and negative symbols represent whether the companies are in a competitive or cooperative relationship. At the same time, since each node carries different attributes, the information generated by the direct interaction between different nodes should also be different.
[0003] However, the current prediction of competition and cooperation relationships based on traditional machine learning models is based on structured data. The classification effect depends largely on the quality of feature engineering. At the same time, structured data cannot capture the information of the graph structure well, resulting in low prediction accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a graphical model processing method and device for predicting competition and cooperation relationships, which can improve the accuracy of predicting competition and cooperation relationships in the supply chain, in response to the above technical problems.
[0005] A graphical model processing method for predicting competition and cooperation relationships, the method comprising:
[0006] Obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the industry information of the company and the company's business scope data;
[0007] Obtaining structural coding information and attribute coding information of each node in the supply chain graph network;
[0008] Vectorizing the structural coding information and the attribute coding information of each node to obtain an embedding vector matrix of each node in the supply chain graph network;
[0009] Determine a first loss function of the triangle structure network and a second loss function of the bridge structure network in the graph model to obtain a target loss function;
[0010] Taking the target loss function as a constraint, a graph model for predicting competition and cooperation relationships in a logistics supply chain is trained according to the embedded vector matrix of each node to obtain a trained target graph model.
[0011] In one embodiment, the step of obtaining the structural coding information and the supply chain graph network attribute coding information of each node in the supply chain graph network includes:
[0012] Determine similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encode the similarity information, and obtain structural encoding information of the supply chain graph network;
[0013] The attribute information of each node is encoded based on the attention mechanism and the convolutional neural network to obtain the attribute encoding information of the supply chain graph network.
[0014] In one embodiment, determining similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encoding the similarity information, and obtaining structural coding information of the supply chain graph network includes:
[0015] Determine the first-order similarity information and the second-order similarity information between the nodes in the supply chain graph network according to the collection and delivery relationship between the nodes;
[0016] The first-order similarity information and the second-order similarity information are encoded to obtain structural encoding information of the supply chain graph network.
[0017] In one embodiment, encoding the attribute information of each node based on the attention mechanism and the convolutional neural network to obtain the attribute encoding information of the supply chain graph network includes:
[0018] Encoding the industry information and company business scope data in the attribute information of each node based on a convolutional neural network; and
[0019] Based on the attention mechanism, the interactive information of nodes carrying different attribute information is encoded to obtain the attribute encoding information of the supply chain graph network.
[0020] In one embodiment, determining a first loss function of a triangular structure network and a second loss function of a bridge structure network in the graph model to obtain a target loss function includes:
[0021] Based on deep neural network learning, the determined maximum likelihood loss function is used as the first loss function of the triangular structure network in the graph model;
[0022] Determine a second loss function of the bridge structure network in the graph model according to the optimized structural balance theory data and the embedding vector matrix of each node;
[0023] The target loss function of the graphical model is obtained according to the first loss function and the second loss function.
[0024] In one embodiment, the target loss function is used as a constraint, and a graph model for predicting competition and cooperation in a logistics supply chain is trained according to an embedded vector matrix of each node to obtain a trained target graph model, including:
[0025] Taking the target loss function as a constraint, the embedding vector matrix of each node is input into a graph model for predicting competition and cooperation relationships in a logistics supply chain for iterative training, and the training is terminated when the target loss function obtains an optimal solution to obtain a trained target graph model.
[0026] In one embodiment, the method further comprises:
[0027] Acquire attribute information and the relationship between receiving and sending items of the node to be predicted; the node to be predicted represents the receiving and sending account to be predicted;
[0028] Input the attribute information and the relationship between receiving and sending items into the target graph model, and output symbols for representing the relationship between cooperation and competition;
[0029] The relationship between the to-be-predicted receiving and sending accounts is determined according to the symbols.
[0030] A graphical model processing device for predicting competition and cooperation relationships, the device comprising:
[0031] A first acquisition module is used to acquire a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, the edges in the supply chain graph network represent the collection and delivery relationships between companies, and the attributes of each node represent the industry to which the company belongs and the company's business scope;
[0032] A second acquisition module is used to acquire the structure coding information and attribute coding information of each node in the supply chain graph network;
[0033] A processing module, used for performing vectorization processing on the structural coding information and the attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network;
[0034] A determination module, used to determine a first loss function of a triangular structure network and a second loss function of a bridge structure network in the graph model to obtain a target loss function;
[0035] The training module is used to train a graph model for predicting competition and cooperation relationships in a logistics supply chain based on the embedded vector matrix of each node using the target loss function as a constraint to obtain a trained target graph model.
[0036] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0037] Obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the industry information of the company and the company's business scope data;
[0038] Obtaining structural coding information and attribute coding information of each node in the supply chain graph network;
[0039] Vectorizing the structural coding information and the attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network;
[0040] Determine a first loss function of the triangle structure network and a second loss function of the bridge structure network in the graph model to obtain a target loss function;
[0041] Taking the target loss function as a constraint, a graph model for predicting competition and cooperation relationships in a logistics supply chain is trained according to the embedded vector matrix of each node to obtain a trained target graph model.
[0042] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0043] Obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the industry information of the company and the company's business scope data;
[0044] Obtaining structural coding information and attribute coding information of each node in the supply chain graph network;
[0045] Vectorizing the structural coding information and the attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network;
[0046] Determine a first loss function of the triangle structure network and a second loss function of the bridge structure network in the graph model to obtain a target loss function;
[0047] Taking the target loss function as a constraint, a graph model for predicting competition and cooperation relationships in a logistics supply chain is trained according to the embedded vector matrix of each node to obtain a trained target graph model.
[0048] The above-mentioned graph model processing method and device for predicting competition and cooperation relationships obtains a supply chain graph network that represents the collection and delivery relationships between companies in the supply chain, as well as the industry information and business scope data of the companies, and vectorizes the obtained structural coding information and attribute coding information to obtain an embedded vector matrix for each node in the supply chain graph network; obtains a target loss function by determining the first loss function of the triangular structure network and the second loss function of the bridge structure network; uses the target loss function as a constraint, trains a graph model for predicting competition and cooperation relationships in the logistics supply chain according to the embedded vector matrix of each node, and obtains a trained target graph model; the graph model includes a triangular structure network and a bridge structure network, and according to the obtained graph model, the signs of the edges of the supply chain graph network with nodes at both ends of the edges having common nodes and the signs of the edges of the structure with common third-party nodes can be predicted, which solves the problem that the signs of the edges of the supply chain graph network with nodes at both ends of the edges having common third-party nodes cannot be predicted, thereby improving the accuracy of predicting competition and cooperation relationships in the logistics supply chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A diagram of an application environment of a graph model processing method for predicting competition and cooperation relationships in one embodiment;
[0050] Figure 2 A schematic diagram of a flow chart of a graph model processing method for predicting competition and cooperation relationships in one embodiment;
[0051] Figure 3 A schematic diagram of a triangle structure edge and a bridge structure edge in a supply chain graph network in one embodiment;
[0052] Figure 4 is a flow chart of a graph model processing method for predicting competition and cooperation relationships in another embodiment;
[0053] Figure 5 is a structural block diagram of a graphical model processing device for predicting competition and cooperation relationships in one embodiment;
[0054] Figure 6 is a structural block diagram of a graphical model processing device for predicting competition and cooperation relationships in another embodiment;
[0055] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] The graph model processing method for predicting competition and cooperation relationships provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 obtains a supply chain graph network based on logistics data from the server 104 through the network; wherein each node in the supply chain graph network represents the company's collection and delivery account, the edge in the supply chain graph network represents the collection and delivery relationship between companies, and the attribute information of each node includes the company's industry information and the company's business scope data; obtain the structural coding information and attribute coding information of each node in the supply chain graph network; vectorize the structural coding information and attribute coding information of each node to obtain the embedded vector matrix of each node in the supply chain graph network; determine the first loss function of the triangle structure network and the second loss function of the bridge structure network in the graph model to obtain the target loss function; with the target loss function as a constraint, train the graph model for predicting the competition and cooperation relationship in the logistics supply chain according to the embedded vector matrix of each node to obtain the trained target graph model. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0058] In one embodiment, Figure 2 As shown in FIG, a graph model processing method for predicting competition and cooperation relationships is provided, and the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0059] Step 202, obtaining a supply chain graph network based on logistics data.
[0060] Among them, logistics data includes the company's collection and delivery account number, the industry to which the company belongs, the company's business scope, the number of parcels sent and received between companies, and the collection and delivery relationship between companies. The company's collection and delivery account number can be used to represent a company.
[0061] The supply chain graph network is used to describe the logistics exchange relationship (e.g., collection and delivery relationship) between companies in the supply chain in the logistics scenario. Each node in the supply chain graph network represents the collection and delivery account of the company. The connection between nodes is called an edge. The edge can be used to represent the dependency relationship between nodes, that is, the collection and delivery relationship between companies. The attribute information of each node includes the industry information of the company and the company's business scope data; among them, the weight value between nodes is determined according to the standardized piece quantity, and the weight value can be used to characterize the first-order similarity between two nodes. The standardized piece quantity refers to the value obtained by dividing the actual piece quantity of the collection and delivery between companies by the maximum piece quantity, and the value of the standardized piece quantity is between 0 and 1. For example, node A in the supply chain graph network represents an electronic component manufacturing company, node B represents a mobile phone manufacturing company, and node C represents a clothing company. Among them, the company that manufactures mobile phones needs to purchase the required electronic components from the company that manufactures electronic components, that is, there is a collection and delivery relationship between the company that manufactures mobile phones and the company that manufactures electronic components; the company that manufactures electronic components and the company that manufactures mobile phones belong to the same electronics industry, and their business scope involves electronic products, etc. The attribute information of each node in the supply chain graph network includes data such as the industry to which the company belongs and the company's business scope.
[0062] Specifically, the terminal obtains logistics data from the server, and abstracts the determined supply chain network into a supply chain graph network for describing the transaction relationships between companies in the supply chain based on the obtained logistics data.
[0063] Step 204, obtaining the structural coding information and attribute coding information of each node in the supply chain graph network.
[0064] Among them, the structural coding information determines the similarity information between each node according to the collection and delivery relationship between each node in the supply chain graph network, and encodes the similarity information using a set coding format (for example, one-hot coding) to obtain a structural vector of a binary structure.
[0065] The attribute coding information is to encode the similarity information using a set coding format (for example, one-hot coding), and encode the industry information and business scope of the company represented by each node in the supply chain graph network to obtain an attribute vector with a binary structure.
[0066] Specifically, based on a similarity algorithm (e.g., LINE algorithm), the similarity information between nodes in the supply chain graph network is determined according to the collection and delivery relationship between each node, and the similarity information is encoded to obtain the structural coding information of the supply chain graph network; based on the attention mechanism and convolutional neural network, the attribute information of each node (e.g., the industry to which the company belongs and the company's business scope data) is encoded to obtain the attribute coding information of the supply chain graph network.
[0067] Step 206, vectorize the structural coding information and attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network.
[0068] Specifically, the structure vector and attribute vector of each node in the supply chain graph network are obtained, and reasonable vector processing (i.e., graph embedding processing) is performed on the structure vector and attribute vector of each node to obtain the embedding vector matrix of each node in the supply chain graph network. Among them, the graph embedding processing can make the embedding vector matrix of nodes with similar structures or similar attributes in the supply chain graph network the same.
[0069] Step 208, determine the first loss function of the triangle structure network and the second loss function of the bridge structure network in the graph model to obtain the target loss function.
[0070] Among them, the triangular structure network in the graph model is used to predict the sign of the edge with a common third-party node at both ends of the edge in the supply chain graph network, that is, to predict the sign of the edge in the triangular structure in the supply chain graph network; the sign of the edge can be but not limited to positive or negative, the positive sign can be but not limited to indicate a cooperative relationship, and the negative sign can be but not limited to indicate a competitive relationship; the common third-party node in the corresponding logistics scenario is a third-party company that has a collection and delivery relationship with the two companies, and by predicting the sign of the edge, the cooperative relationship and competitive relationship between the two companies with the collection and delivery relationship can be predicted. For example, there is a collection and delivery relationship between Company A and Company B, a collection and delivery relationship between Company B and Company C, and a collection and delivery relationship between Company A and Company C. Based on the triangular structure network, it can be predicted whether there is a competitive relationship or a cooperative relationship between Company A and Company B, Company B and Company C, and Company A and Company C. If the predicted edge signs are all positive, it indicates that there is a cooperative relationship between Company A and Company B, Company B and Company C, and Company A and Company C; if the predicted edge signs are all negative, it indicates that there is a competitive relationship between Company A and Company B, Company B and Company C, and Company A and Company C. The triangular structure network is modeled based on the deep neural network (DNN) structure, and the maximum likelihood loss function is determined as the first loss function of the triangular structure network.
[0071] The bridge structure network in the graph model is used to predict the sign of the structural edge in the supply chain graph network where the nodes at both ends of the edge do not have a common third-party node, that is, to predict the sign of the bridge structure edge in the supply chain graph network. In the corresponding logistics scenario, it is used to predict the cooperative relationship and competitive relationship between two companies with a collection and delivery relationship. For example, there is a collection and delivery relationship between Company A and Company B, a collection and delivery relationship between Company A and Company C, a collection and delivery relationship between Company A and Company D, and no collection and delivery relationship between Company B, C, and Company D. Through the bridge structure network, it can be predicted whether there is a competitive or cooperative relationship between Company A and Company D, Company A and Company C, and Company A and Company B. The bridge structure network is modeled based on the deep neural network structure, and the loss function determined by the structural balance theory is determined as the second loss function of the bridge angle structure network; wherein, the structural balance theory is that the distance between two nodes with positive connections in the supply chain graph network is less than the distance between two nodes with negative connections.
[0072] Specifically, by determining the first loss function of the triangle structure network and the second loss function of the bridge structure network in the graph model, the target loss function of the graph model is obtained.
[0073] Step 210 , taking the target loss function as a constraint, training a graph model for predicting competition and cooperation relationships in a logistics supply chain according to the embedding vector matrix of each node, and obtaining a trained target graph model.
[0074] Specifically, with the target loss function as a constraint, the embedding vector matrix of each node is input into the graph model for predicting the competition and cooperation relationship in the logistics supply chain for iterative training until the target loss function is optimally solved, and the training is terminated to obtain a trained target graph model, which can predict the signs of the edges (triangle structure edges) in which the nodes at both ends of the edges in the supply chain graph network have common nodes and the signs of the edges (bridge structure edges) in which the nodes at both ends of the edges have common third-party nodes, such as Figure 4 As shown, the solid line refers to the known competitive or cooperative relationship, the virtual line refers to the competitive or cooperative relationship to be predicted, A is the triangle structure edge, and B is the bridge structure edge.
[0075] In the above-mentioned graph model processing method for predicting competition and cooperation relationships, by obtaining a supply chain graph network that represents the collection and delivery relationships between companies in the supply chain, as well as the company's industry information and company business scope data, the obtained structural coding information and attribute coding information are vectorized to obtain an embedding vector matrix for each node in the supply chain graph network; by determining the first loss function of the triangular structure network and the second loss function of the bridge structure network, the target loss function is obtained; with the target loss function as a constraint, the graph model for predicting competition and cooperation relationships in the logistics supply chain is trained according to the embedding vector matrix of each node to obtain a trained target graph model; the graph model includes a triangular structure network and a bridge structure network, and the obtained graph model can be used to predict the relationship between the nodes at both ends of the middle edge and the relationship with the common third-party node, thereby improving the accuracy of the prediction of competition and cooperation relationships in the logistics supply chain.
[0076] In another embodiment, Figure 4 As shown in FIG, a graph model processing method for predicting competition and cooperation relationships is provided, and the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0077] Step 402, obtaining a supply chain graph network based on logistics data.
[0078] Among them, each node in the supply chain graph network represents the company's collection and delivery account, the edges in the supply chain graph network represent the collection and delivery relationship between companies, and the attribute information of each node includes the company's industry information and the company's business scope data.
[0079] Step 404, obtaining the structure coding information and attribute coding information of each node in the supply chain graph network.
[0080] Specifically, the first-order similarity information and second-order similarity information between nodes in the supply chain graph network are determined according to the collection and delivery relationship between each node; the first-order similarity information and the second-order similarity information are encoded using a set encoding form to obtain the structural encoding information of the supply chain graph network. Based on the convolutional neural network, the industry information and company business scope data in the attribute information of each node are encoded using a set encoding form; and the interactive information of nodes carrying different attribute information (i.e., the collection and delivery relationship) is dynamically encoded based on the attention mechanism to obtain the attribute encoding information of the supply chain graph network.
[0081] Among them, the first-order similarity information refers to the similarity between two nodes in the supply chain graph network. For each pair of nodes connected by an edge, the weight value of the edge represents the first-order similarity between the two nodes; if there is no edge between two nodes, the first-order similarity is 0; in the actual scenario, that is, there is a sending and receiving relationship between two companies (which is an upstream and downstream relationship in the supply chain). For example, the similarity between a company manufacturing electronic components and a company manufacturing mobile phones is greater than the similarity between an electronic component company and a clothing company. The second-order similarity information refers to the similarity between the adjacent network structures of a pair of vertices (i.e., nodes) in the supply chain graph network. If there is no vertex that is connected to both of these two nodes at the same time, the second-order similarity of these two nodes is 0; in the actual scenario, that is, there is a common third company that has a sending and receiving relationship with both of these two companies. In the supply chain network, these three companies may be three nodes belonging to a certain sub-supply chain. For example, a transistor manufacturer and a mobile phone manufacturer have a common electronic component company, and the electronic component company makes the second-order similarity between the transistor manufacturer and the mobile phone manufacturer higher than that between the mobile phone manufacturer and the clothing company.
[0082] Step 406: Perform vectorization processing on the structural coding information and attribute coding information of each node to obtain the embedding vector matrix of each node in the supply chain graph network.
[0083] Step 408: Determine the first loss function of the triangular structure network and the second loss function of the bridge structure network in the graph model to obtain the target loss function.
[0084] Specifically, based on deep neural network learning, the determined maximum likelihood loss function is used as the first loss function of the triangular structure network in the graph model; the second loss function of the bridge structure network in the graph model is determined according to the optimized structure balance theory data and the embedding vector matrix of each node; the target loss function of the graph model is obtained from the first loss function and the second loss function.
[0085] Step 410: Using the target loss function as a constraint, train a graph model for predicting competition and cooperation relationships in the logistics supply chain according to the embedding vector matrix of each node to obtain a trained target graph model.
[0086] Specifically, using the target loss function as a constraint, input the embedding vector matrix of each node into the graph model for predicting competition and cooperation relationships in the logistics supply chain for iterative training until the target loss function reaches the optimal solution and then end the training to obtain a trained target graph model.
[0087] Step 412: Obtain the attribute information and sending and receiving relationship of the node to be predicted; the node to be predicted represents the sending and receiving account to be predicted.
[0088] Step 414: Input the attribute information and sending and receiving relationship into the target graph model and output a symbol representing the cooperation and competition relationship.
[0089] Among them, the symbol representing the cooperative and competitive relationship can be a positive sign "+" or a negative sign "-". The positive sign "+" is used to indicate that the relationship between two nodes is a cooperative relationship, and the negative sign "-" is used to indicate that the relationship between two nodes is a competitive relationship.
[0090] Specifically, the attribute information and the mail-receiving and mail-sending relationships of the nodes to be predicted are encoded using the set encoding method to obtain the structural encoding information and attribute encoding information of the nodes to be predicted, the structural encoding information and attribute encoding information of the nodes to be predicted are vectorized to obtain the embedding vector matrix of the nodes to be predicted, the embedding vector matrix is input into the trained target graph model to obtain the symbols of the edges between the nodes to be predicted.
[0091] Step 416, determining the relationship between the receiving and sending accounts to be predicted according to the symbols.
[0092] Specifically, it can be determined whether the relationship between the receiving and sending accounts to be predicted is a competitive relationship or a cooperative relationship according to the signs of the edges between the nodes to be predicted.
[0093] In the above-mentioned graph model processing method for predicting competition and cooperation relationships, the logistics data is abstracted into a supply chain graph network, the structural coding information and attribute coding information of each node in the supply chain network are obtained, and then the structural coding information and attribute coding information of each node are vectorized to obtain the embedding vector matrix of each node, that is, the attribute information of each node in the supply chain network and the collection and delivery relationship between the nodes are vectorized, and the obtained embedding vector matrix is input into a graph model including a triangular structure network and a bridge structure network for training with a determined target loss function as a constraint to obtain a trained target graph model that can be used to predict competition and cooperation relationships in the logistics supply chain, and the attribute information and collection and delivery relationship of the node to be predicted are input into the target graph model, and the sign of the edge where the nodes at both ends of the edge have a common third-party node and the sign of the edge where the nodes at both ends of the edge have a common node can be accurately predicted according to the sign of the output edge, so as to determine whether the relationship between the collection and delivery accounts to be predicted is a competitive relationship or a cooperative relationship, thereby improving the accuracy of the prediction of competitive and cooperative relationships.
[0094] It should be understood that although Figure 2 , Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , Figure 4At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0095] In one embodiment, Figure 6 As shown, a graphical model processing device for predicting competition and cooperation relationships is provided, comprising: a first acquisition module 502, a second acquisition module 504, a processing module 506, a determination module 508 and a training module 510, wherein:
[0096] The first acquisition module 502 is used to obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, the edges in the supply chain graph network represent the collection and delivery relationships between companies, and the attributes of each node represent the industry to which the company belongs and the company's business scope.
[0097] The second acquisition module 504 is used to acquire the structure coding information and attribute coding information of each node in the supply chain graph network.
[0098] The processing module 506 is used to perform vectorization processing on the structural coding information and attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network.
[0099] The determination module 508 is used to determine the first loss function of the triangle structure network and the second loss function of the bridge structure network in the graph model to obtain the target loss function.
[0100] The training module 510 is used to train a graph model for predicting competition and cooperation relationships in a logistics supply chain based on the embedded vector matrix of each node with a target loss function as a constraint, to obtain a trained target graph model.
[0101] In the above-mentioned graphical model processing device for predicting competition and cooperation relationships, by obtaining a supply chain graph network that represents the collection and delivery relationships between companies in the supply chain, as well as the company's industry information and company business scope data, the acquired structural coding information and attribute coding information are vectorized to obtain an embedding vector matrix for each node in the supply chain graph network; by determining the first loss function of the triangular structure network and the second loss function of the bridge structure network, a target loss function is obtained; with the target loss function as a constraint, a graphical model for predicting competition and cooperation relationships in the logistics supply chain is trained according to the embedding vector matrix of each node to obtain a trained target graphical model; the graphical model includes a triangular structure network and a bridge structure network, and according to the obtained graphical model, the relationship between the nodes at the two ends of the middle edge and the relationship with the common third-party node can be predicted, thereby improving the accuracy of the prediction of competition and cooperation relationships in the logistics supply chain.
[0102] In another embodiment, Figure 5 As shown, a graphical model processing device for predicting competition and cooperation relationships is provided, which includes, in addition to a first acquisition module 502, a second acquisition module 504, a processing module 506, a determination module 508 and a training module 510, an encoding module 512 and a prediction module 514, wherein:
[0103] The encoding module 512 is used to determine the similarity information between the nodes in the supply chain graph network according to the collection and delivery relationship between each node, encode the similarity information, and obtain the structural encoding information of the supply chain graph network; encode the attribute information of each node based on the attention mechanism and convolutional neural network to obtain the attribute encoding information of the supply chain graph network.
[0104] In one embodiment, the determination module 508 is further configured to determine first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node.
[0105] The encoding module 512 is also used to encode the first-order similarity information and the second-order similarity information to obtain structural encoding information of the supply chain graph network.
[0106] In one embodiment, the encoding module 512 is also used to encode the industry information and company business scope data in the attribute information of each node based on a convolutional neural network; and to encode the interaction information of nodes carrying different attribute information based on an attention mechanism to obtain attribute encoding information of the supply chain graph network.
[0107] In one embodiment, the determination module 508 is also used to use the determined maximum likelihood loss function as the first loss function of the triangular structure network in the graphical model based on deep neural network learning; determine the second loss function of the bridge structure network in the graphical model according to the optimized structural balance theoretical data and the embedded vector matrix of each node; and obtain the target loss function of the graphical model according to the first loss function and the second loss function.
[0108] In one embodiment, the training module 510 is also used to input the embedded vector matrix of each node into a graph model for predicting competition and cooperation relationships in a logistics supply chain for iterative training with the target loss function as a constraint, until the training is terminated when the target loss function obtains the optimal solution, thereby obtaining a trained target graph model.
[0109] In one embodiment, the first acquisition module 502 is further used to acquire the attribute information of the node to be predicted and the relationship between the receiving and sending items; the node to be predicted represents the receiving and sending account to be predicted;
[0110] The prediction module 514 is used to input the attribute information and the relationship between the receiving and sending items into the target graph model, output symbols for representing the cooperation and competition relationship, and determine the relationship between the receiving and sending accounts to be predicted based on the symbols.
[0111] In one embodiment, logistics data is abstracted into a supply chain graph network, the structural coding information and attribute coding information of each node in the supply chain network are obtained, and then the structural coding information and attribute coding information of each node are vectorized to obtain an embedded vector matrix of each node, that is, the attribute information of each node in the supply chain network and the collection and delivery relationship between the nodes are vectorized, and the obtained embedded vector matrix is input into a graph model including a triangular structure network and a bridge structure network for training with a determined target loss function as a constraint to obtain a trained target graph model that can be used to predict competition and cooperation relationships in the logistics supply chain, and the attribute information and collection and delivery relationship of the node to be predicted are input into the target graph model, and the sign of the edge where the nodes at both ends of the edge have a common third-party node and the sign of the edge where the nodes at both ends of the edge have a common node can be accurately predicted based on the sign of the output edge, so as to determine whether the relationship between the collection and delivery accounts to be predicted is a competitive relationship or a cooperative relationship, thereby improving the accuracy of the prediction of competitive and cooperative relationships.
[0112] For the specific limitations of the graphical model processing device for predicting competition and cooperation relationships, please refer to the limitations of the graphical model processing method for predicting competition and cooperation relationships mentioned above, which will not be repeated here. The various modules in the above-mentioned graphical model processing device for predicting competition and cooperation relationships can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0113] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a graph model processing method for predicting competition and cooperation relationships is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0114] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0116] Obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the company's industry information and the company's business scope data;
[0117] Obtain the structural coding information and attribute coding information of each node in the supply chain graph network;
[0118] The structural coding information and attribute coding information of each node are vectorized to obtain the embedding vector matrix of each node in the supply chain graph network;
[0119] The first loss function of the triangular structure network and the second loss function of the bridge structure network in the graph model are determined to obtain the target loss function. Taking the target loss function as a constraint, the graph model for predicting competition and cooperation relationships in the logistics supply chain is trained according to the embedded vector matrix of each node to obtain a trained target graph model.
[0120] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0121] Determine the similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encode the similarity information, and obtain the structural encoding information of the supply chain graph network;
[0122] Based on the attention mechanism and convolutional neural network, the attribute information of each node is encoded to obtain the attribute encoding information of the supply chain graph network.
[0123] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0124] Determine the first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node;
[0125] The first-order similarity information and the second-order similarity information are encoded to obtain the structural encoding information of the supply chain graph network.
[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0127] Encoding the industry information and company business scope data in the attribute information of each node based on a convolutional neural network; and
[0128] Based on the attention mechanism, the interactive information of nodes carrying different attribute information is encoded to obtain the attribute encoding information of the supply chain graph network.
[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0130] Based on deep neural network learning, the determined maximum likelihood loss function is used as the first loss function of the triangular structure network in the graph model;
[0131] Determine a second loss function of the bridge structure network in the graph model according to the optimized structural balance theory data and the embedding vector matrix of each node;
[0132] The target loss function of the graphical model is obtained according to the first loss function and the second loss function.
[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0134] Taking the target loss function as a constraint, the embedding vector matrix of each node is input into the graph model used to predict the competition and cooperation relationship in the logistics supply chain for iterative training until the target loss function is optimally solved, and the training is terminated to obtain the trained target graph model.
[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0136] Acquire the attribute information and the relationship between the receiving and sending items of the node to be predicted; the node to be predicted represents the receiving and sending account to be predicted;
[0137] Input the attribute information and the relationship between receiving and sending items into the target graph model, and output the symbols used to represent the cooperation and competition relationship;
[0138] The relationship between the receiving and sending accounts to be predicted is determined based on the symbols.
[0139] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0140] Obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the company's industry information and the company's business scope data;
[0141] Obtain the structural coding information and attribute coding information of each node in the supply chain graph network;
[0142] The structural coding information and attribute coding information of each node are vectorized to obtain the embedding vector matrix of each node in the supply chain graph network;
[0143] The first loss function of the triangular structure network and the second loss function of the bridge structure network in the graph model are determined to obtain the target loss function. Taking the target loss function as a constraint, the graph model for predicting competition and cooperation relationships in the logistics supply chain is trained according to the embedded vector matrix of each node to obtain a trained target graph model.
[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0145] Determine the similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encode the similarity information, and obtain the structural encoding information of the supply chain graph network;
[0146] Based on the attention mechanism and convolutional neural network, the attribute information of each node is encoded to obtain the attribute encoding information of the supply chain graph network.
[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0148] Determine the first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node;
[0149] The first-order similarity information and the second-order similarity information are encoded to obtain the structural encoding information of the supply chain graph network.
[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0151] Encoding the industry information and company business scope data in the attribute information of each node based on a convolutional neural network; and
[0152] Based on the attention mechanism, the interactive information of nodes carrying different attribute information is encoded to obtain the attribute encoding information of the supply chain graph network.
[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0154] Based on deep neural network learning, the determined maximum likelihood loss function is used as the first loss function of the triangular structure network in the graph model;
[0155] Determine a second loss function of the bridge structure network in the graph model according to the optimized structural balance theory data and the embedding vector matrix of each node;
[0156] The target loss function of the graphical model is obtained according to the first loss function and the second loss function.
[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0158] Taking the target loss function as a constraint, the embedding vector matrix of each node is input into the graph model used to predict the competition and cooperation relationship in the logistics supply chain for iterative training until the target loss function is optimally solved, and the training is terminated to obtain the trained target graph model.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] Acquire the attribute information and the relationship between the receiving and sending items of the node to be predicted; the node to be predicted represents the receiving and sending account to be predicted;
[0161] Input the attribute information and the relationship between receiving and sending items into the target graph model, and output the symbols used to represent the cooperation and competition relationship;
[0162] The relationship between the receiving and sending accounts to be predicted is determined based on the symbols.
[0163] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0164] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0165] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A graphical model processing method for predicting competition and cooperation relationships, It is characterized in that The method comprises: Obtain a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the industry information of the company and the company's business scope data; Determine the similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encode the similarity information, and obtain the structural encoding information of the supply chain graph network; encode the attribute information of each node based on the attention mechanism and convolutional neural network to obtain the attribute encoding information of the supply chain graph network; Vectorizing the structural coding information and the attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network; Based on deep neural network learning, the determined maximum likelihood loss function is used as the first loss function of the triangular structure network in the graph model; the second loss function of the bridge structure network in the graph model is determined according to the optimized structural balance theoretical data and the embedded vector matrix of each node; the target loss function of the graph model is obtained according to the first loss function and the second loss function; the bridge structure network is used to predict the sign of the edge of the structure in which the nodes at both ends of the edge in the supply chain graph network have a common third-party node; the triangular structure network is used to predict the sign of the edge in which the nodes at both ends of the edge in the supply chain graph network have a common node; Taking the target loss function as a constraint, a graph model for predicting competition and cooperation relationships in a logistics supply chain is trained according to the embedded vector matrix of each node to obtain a trained target graph model.
2. The method according to claim 1, It is characterized in that The determining of similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encoding the similarity information, and obtaining structural coding information of the supply chain graph network includes: Determine the first-order similarity information and the second-order similarity information between the nodes in the supply chain graph network according to the collection and delivery relationship between the nodes; The first-order similarity information and the second-order similarity information are encoded to obtain structural encoding information of the supply chain graph network.
3. The method according to claim 1, It is characterized in that The attribute information of each node is encoded based on the attention mechanism and the convolutional neural network to obtain the attribute encoding information of the supply chain graph network, including: Encoding the industry information and company business scope data in the attribute information of each node based on a convolutional neural network; and Based on the attention mechanism, the interactive information of nodes carrying different attribute information is encoded to obtain the attribute encoding information of the supply chain graph network.
4. The method according to claim 1, It is characterized in that The target loss function is used as a constraint, and the graph model for predicting competition and cooperation relationships in the logistics supply chain is trained according to the embedding vector matrix of each node to obtain a trained target graph model, including: Taking the target loss function as a constraint, the embedding vector matrix of each node is input into a graph model for predicting competition and cooperation relationships in a logistics supply chain for iterative training, and the training is terminated when the target loss function obtains an optimal solution to obtain a trained target graph model.
5. The method according to claim 1, It is characterized in that The method further comprises: Acquire attribute information and the relationship between receiving and sending items of the node to be predicted; the node to be predicted represents the receiving and sending account to be predicted; Input the attribute information and the relationship between receiving and sending items into the target graph model, and output symbols representing the relationship between cooperation and competition; The relationship between the to-be-predicted receiving and sending accounts is determined according to the symbols.
6. A graphical model processing device for predicting competition and cooperation relationships, It is characterized in that The device comprises: A first acquisition module is used to acquire a supply chain graph network based on logistics data; each node in the supply chain graph network represents a company's collection and delivery account, and the edges in the supply chain graph network represent the collection and delivery relationships between companies. The attribute information of each node includes the industry information of the company and the company's business scope data; An encoding module is used to determine the similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node, encode the similarity information, and obtain the structural encoding information of the supply chain graph network; encode the attribute information of each node based on the attention mechanism and convolutional neural network to obtain the attribute encoding information of the supply chain graph network; A processing module, used for performing vectorization processing on the structural coding information and the attribute coding information of each node to obtain an embedded vector matrix of each node in the supply chain graph network; A determination module is used to use the determined maximum likelihood loss function as the first loss function of the triangular structure network in the graph model based on deep neural network learning; determine the second loss function of the bridge structure network in the graph model according to the optimized structural balance theoretical data and the embedded vector matrix of each node; obtain the target loss function of the graph model according to the first loss function and the second loss function; the bridge structure network is used to predict the sign of the edge of the structure in which the nodes at both ends of the edge in the supply chain graph network have a common third-party node; the triangular structure network is used to predict the sign of the edge in which the nodes at both ends of the edge in the supply chain graph network have a common node; The training module is used to train a graph model for predicting competition and cooperation relationships in a logistics supply chain based on the embedded vector matrix of each node using the target loss function as a constraint to obtain a trained target graph model.
7. The device according to claim 6, It is characterized in that The encoding module is also used to determine the first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the collection and delivery relationship between each node; encode the first-order similarity information and the second-order similarity information to obtain the structural coding information of the supply chain graph network.
8. The device according to claim 6, It is characterized in that The encoding module encodes the industry information and company business scope data in the attribute information of each node based on a convolutional neural network; and encodes the interaction information of nodes carrying different attribute information based on an attention mechanism to obtain the attribute encoding information of the supply chain graph network.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Port type logistics hub trunk control and distribution integrated operation mode evaluation method
CN117151503A
Graph neutral networks with attention
US20210081717A1