CN114358452A - Graph model processing method and device for predicting competition and cooperation relationship - Google Patents

Graph model processing method and device for predicting competition and cooperation relationship Download PDF

Info

Publication number
CN114358452A
CN114358452A CN202011089208.7A CN202011089208A CN114358452A CN 114358452 A CN114358452 A CN 114358452A CN 202011089208 A CN202011089208 A CN 202011089208A CN 114358452 A CN114358452 A CN 114358452A
Authority
CN
China
Prior art keywords
network
supply chain
node
information
loss function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011089208.7A
Other languages
Chinese (zh)
Inventor
陈垦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202011089208.7A priority Critical patent/CN114358452A/en
Publication of CN114358452A publication Critical patent/CN114358452A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to a graph model processing method and device for predicting competition and cooperation relations. The method comprises the following steps: acquiring a supply chain diagram network based on logistics data; edges in the supply chain graph network represent receiving and sending relations among companies, each node represents a receiving and sending account number of the company, and attribute information of each node comprises industry information of the company and business range data of the company; vectorizing the structure coding information and the attribute coding information of each node in the supply chain diagram network to obtain an embedded vector matrix of each node in the supply chain diagram network; determining a target loss function of the graph model according to the first loss function of the triangular structure network and the second loss function of the bridge structure network; and based on the target loss function, training a graph model for predicting competition and cooperation in the logistics supply chain according to the embedded vector matrix of each node to obtain a trained target graph model. By adopting the method, the accuracy of competition and cooperation in the supply chain can be improved.

Description

Graph model processing method and device for predicting competition and cooperation relationship
Technical Field
The application relates to the technical field of neural networks, in particular to a graph model processing method and device for predicting competition and cooperation relations.
Background
In a supply chain scenario, there is an upstream-downstream relationship between companies, and each company has its own attributes (including industry, business scope, etc.), and there may be a competition or cooperation relationship between different companies. Therefore, the whole supply chain scene is converted into a supply chain graph network, wherein one node in the supply chain graph network represents a company, the nodes are connected through relations to form a huge network, each node has attributes, a directed graph structure with signs is provided, and the signs represent competition relations or cooperation relations between companies. Meanwhile, because the attributes carried by each node are different, the information generated by direct interaction of different nodes should be different.
However, at present, competition and cooperation relation prediction based on a traditional machine learning model is established on structured data, the classification effect depends on the quality of feature engineering to a great extent, and meanwhile, the structured data cannot well capture the information of a graph structure, so that the prediction accuracy is low.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a graph model processing method and apparatus for predicting competition and partnership which can improve accuracy of the competition and partnership in a supply chain.
A graph model processing method for predicting competition and partnership, the method comprising:
acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company;
acquiring structure coding information and attribute coding information of each node of the supply chain graph network;
vectorizing the structure 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;
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;
and training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
In one embodiment, the obtaining structure coding information and supply chain graph network attribute coding information of each node in the supply chain graph network includes:
determining similarity information between nodes in the supply chain graph network according to the receiving and sending relation between the nodes, and coding the similarity information to obtain structural coding information of the supply chain graph network;
and encoding the attribute information of each node based on an attention mechanism and a convolutional neural network to obtain the attribute encoding information of the supply chain graph network.
In one embodiment, the determining similarity information between nodes in the supply chain graph network according to the receiving-sending relationship between the nodes, and encoding the similarity information to obtain structure encoding information of the supply chain graph network includes:
determining first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the receiving and sending relation among the nodes;
and coding the first-order similarity information and the second-order similarity information to obtain structural coding information of the supply chain diagram network.
In one embodiment, the encoding the attribute information of each node based on the attention mechanism and the convolutional neural network to obtain the attribute encoded information of the supply chain graph network includes:
coding industry information and company operation range data in the attribute information of each node based on a convolutional neural network; and
and coding the interaction information of the nodes carrying different attribute information based on an attention mechanism to obtain the attribute coding information of the supply chain graph network.
In one embodiment, the 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 an objective loss function includes:
based on deep neural network learning, taking the determined maximum likelihood loss function as a first loss function of a triangular structure network in the graph model;
determining a second loss function of the bridge structure network in the graph model according to the optimized structure balance theoretical data and the embedded vector matrix of each node;
and obtaining a target loss function of the graph model according to the first loss function and the second loss function.
In one embodiment, the training of the graph model for predicting the competition and cooperation relationship in the logistics supply chain according to the embedded vector matrix of each node with the target loss function as a constraint to obtain the trained target graph model includes:
and inputting the embedded vector matrix of each node into a graph model for predicting competition and cooperation in a logistics supply chain by taking the target loss function as constraint, and performing iterative training until the training is finished when the target loss function obtains an optimal solution, thereby obtaining a trained target graph model.
In one embodiment, the method further comprises:
acquiring attribute information and a receiving and sending relation of a node to be predicted; the node to be predicted represents a receiving and sending account number to be predicted;
inputting the attribute information and the receiving-sending relation into the target graph model, and outputting symbols for representing cooperation and competition relations;
and determining the relation between the receiving and sending account numbers to be predicted according to the symbols.
A graph model processing apparatus for predicting competition and partnership, the apparatus comprising:
the first acquisition module is used for acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and the attribute of each node represents the industry to which the company belongs and the operating range of the company;
the second acquisition module is used for acquiring the structure coding information and the attribute coding information of each node of the supply chain graph network;
the processing module is used for carrying out vectorization processing on the structure 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;
the determining module is used for 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;
and the training module is used for training a graph model for predicting competition and cooperation in a logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company;
acquiring structure coding information and attribute coding information of each node of the supply chain graph network;
vectorizing the structure 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;
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;
and training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company;
acquiring structure coding information and attribute coding information of each node of the supply chain graph network;
vectorizing the structure 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;
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;
and training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
According to the graph model processing method and device for predicting competition and cooperation, the acquired structure coding information and attribute coding information are subjected to vectorization processing by acquiring the supply chain graph network representing the receiving and sending relation among companies in the supply chain, the industry information to which the companies belong and the company operation range data, so that an embedded vector matrix of each node in the supply chain graph network is obtained; obtaining a target loss function by determining a first loss function of the triangular structure network and a second loss function of the bridge structure network; training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking a target loss function as constraint to obtain a trained target graph model; the graph model comprises a triangular structure network and a bridge structure network, the symbol of the edge with the common node of the nodes at the two ends of the edge in the supply chain graph network and the symbol of the edge with the structure of the common third-party node can be predicted according to the obtained graph model, the problem that the symbol of the edge with the structure of the common third-party node of the nodes at the two ends of the edge in the supply chain graph network cannot be predicted is solved, and the accuracy of competition and cooperation relation prediction in the logistics supply chain is improved.
Drawings
FIG. 1 is a diagram of an application environment for a graphical model processing method for predicting competition and partnership in one embodiment;
FIG. 2 is a flow diagram that illustrates a graphical model processing method for predicting competition and partnerships, under an embodiment;
FIG. 3 is a schematic diagram of a triangle structure side and a bridge structure side in a supply chain graph network in one embodiment;
FIG. 4 is a flow diagram illustrating a graphical model processing method for predicting competition and partnership in another embodiment;
FIG. 5 is a block diagram of a graph model processing apparatus for predicting competition and partnership in one embodiment;
FIG. 6 is a block diagram showing the construction of a graph model processing apparatus for predicting competition and cooperative relationships in another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The graph model processing method for predicting competition and cooperative relationship provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 acquires a supply chain diagram network based on logistics data from the server 104 through the network; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and business range data of the company; acquiring structure coding information and attribute coding information of each node of a supply chain graph network; vectorizing the structure 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; 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; and training a graph model for predicting competition and cooperation relations in the logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a graph model processing method for predicting competition and cooperation relationship is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
at step 202, a supply chain graph network based on logistics data is obtained.
The logistics data includes data such as a receiving and sending account number of a company, an industry to which the company belongs, an operating range of the company, the number of mutually receiving and sending elements between the companies, and a receiving and sending relationship between the companies, and the receiving and sending account number of the company can be used for representing one company.
The supply chain graph network is used for describing logistics round-trip relations (such as receiving-sending relations) among companies in a supply chain in a logistics scene, each node in the supply chain graph network represents a receiving-sending account number of the company, connections among the nodes are called edges, the edges can be used for representing dependency relations among the nodes, namely representing receiving-sending relations among the companies, and attribute information of each node comprises industry information of the company and company operation range data; the weight values of the nodes are determined according to standardized component quantity, the weight values can be used for representing first-order similarity between the two nodes, the standardized component quantity refers to a numerical value obtained by dividing actual component quantity of mutual receiving and sending components between companies by the maximum component quantity, and the value of the standardized component quantity is between 0 and 1. For example, a node a in the supply chain diagram network represents an electronic component manufacturing company, a node B represents a mobile phone manufacturing company, and a node C represents a clothing company, wherein the mobile phone manufacturing company needs to purchase required electronic components from the electronic component manufacturing company, that is, a receiving and sending relationship exists between the mobile phone manufacturing company and the electronic component manufacturing company; the company for manufacturing electronic components and the company for manufacturing mobile phones belong to the electronic industry, and the operation range relates to electronic products and the like. The attribute information of each node in the supply chain graph network comprises data such as the industry information of the company and the operation range of the company
Specifically, the terminal acquires logistics data from the server, and abstracts the determined supply chain network into a supply chain graph network for describing the traffic relation among companies in the supply chain according to the acquired logistics data.
Step 204, obtaining structure coding information and attribute coding information of each node of the supply chain graph network.
The structure coding information determines similarity information between nodes according to receiving and sending relation between the nodes in the supply chain graph network, and codes the similarity information by adopting a set coding form (for example, one-hot coding) to obtain a structure vector of a binary structure.
The attribute coding information is obtained by coding the similarity information by adopting a set coding form (for example, one-hot coding), and coding data such as industry information and company operating range of a company represented by each node in the supply chain graph network to obtain an attribute vector with a binary structure.
Specifically, based on a similarity algorithm (e.g., a LINE algorithm), determining similarity information between nodes in the supply chain graph network according to a receiving-sending relation between the nodes, and encoding the similarity information to obtain structure encoding information of the supply chain graph network; and encoding attribute information (such as the industry to which the company belongs and company operation range data) of each node based on the attention mechanism and the convolutional neural network to obtain attribute encoding information of the supply chain graph network.
And step 206, vectorizing the structure 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.
Specifically, a structure vector and an attribute vector of each node in the supply chain graph network are obtained, and reasonable vector processing (namely graph embedding processing) is performed on the structure vector and the attribute vector of each node to obtain an embedded vector matrix of each node in the supply chain graph network. Wherein the graph embedding process may make the embedded vector matrices of nodes in the supply chain graph network that are similar in structure or attributes the same.
And step 208, determining a first loss function of the triangular structure network and a second loss function of the bridge structure network in the graph model to obtain a target loss function.
The triangular structure network in the graph model is used for predicting the symbols of the edges of which two end nodes in the supply chain graph network have the common third-party node, namely the symbols of the edges in the triangular structure in the supply chain graph network; the sign of the edge may be, but is not limited to, a positive sign or a negative sign, the positive sign may be, but is not limited to, indicating a cooperative relationship, and the negative sign may be, but is not limited to, indicating a competitive relationship; the common third-party node in the corresponding logistics scene is a third-party company which has a receiving and sending relation with the two companies, and the cooperation relation and the competition relation of the two companies with the receiving and sending relation can be predicted through the symbol of the prediction edge. For example, a receiving and sending relation exists between company a and company B, a receiving and sending relation exists between company B and company C, a receiving and sending relation exists between company a and company C, whether competition relations or cooperation relations exist between company a and company B, between company B and company C, and between company a and company C can be predicted based on a triangular structure network, and if the predicted edge symbols are all positive, cooperation relations exist between company a and company B, between company B and company C, and between company a and company C; if the predicted edge signs are all negative, the competitive relations between company A and company B, between company B and company C, and between company A and company C are represented. The triangular structure network is modeled based on a Deep Neural Network (DNN) structure, and a maximum likelihood loss function is determined as a first loss function of the triangular structure network.
The bridge structure network in the graph model is used for predicting symbols of structure edges of nodes at two ends of edges in the supply chain graph network without common third-party nodes, namely predicting symbols of the bridge structure edges in the supply chain graph network. The method is used for predicting the cooperation relationship and the competition relationship of two companies with a receiving-sending relationship in a logistics scene, for example, the receiving-sending relationship exists between company A and company B, the receiving-sending relationship exists between company A and company C, the receiving-sending relationship exists between company A and company D, the receiving-sending relationship does not exist between company B, C, D, and whether the competition or the cooperation relationship exists between company A and company D, between company A and company C, and between company A and company B can be predicted through a bridge structure network. The bridge structure network is modeled based on a deep neural network structure, and a loss function determined according to a structure balance theory is determined as a second loss function of the bridge angle structure network; the structural balance theory is that the distance between two nodes with positive contact in the supply chain diagram network is smaller than the distance between two nodes with negative contact.
Specifically, a target loss function of the graph model is obtained by determining a first loss function of a triangular structure network and a second loss function of a bridge structure network in the graph model.
And step 210, training a graph model for predicting competition and cooperation relations in the logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
Specifically, with a target loss function as a constraint, inputting the embedded vector matrix of each node into a graph model for predicting competition and cooperation in a logistics supply chain for iterative training, and ending the training until the target loss function obtains an optimal solution, thereby obtaining a trained target graph model, wherein the target graph model can predict symbols of edges (triangular structure edges) in which nodes at two ends of the edges in a supply chain graph network have common nodes, and symbols of edges (bridge structure edges) in which nodes at two ends of the edges have common third-party nodes, as shown in fig. 4, wherein a solid line refers to a known competition cooperation relationship, a virtual refers to a competition or cooperation relationship to be predicted, a is a triangular structure edge, and B is a bridge structure edge.
In the graph model processing method for predicting competition and cooperation, the acquired structure coding information and attribute coding information are subjected to vectorization processing by acquiring a supply chain graph network representing receiving and sending relation among companies in a supply chain, industry information to which the companies belong and company operation range data to obtain an embedded vector matrix of each node in the supply chain graph network; obtaining a target loss function by determining a first loss function of the triangular structure network and a second loss function of the bridge structure network; training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking a target loss function as constraint to obtain a trained target graph model; the graph model comprises a triangular structure network and a bridge structure network, and the relationship between the nodes at two ends of the middle edge and the relationship between the nodes and a common third-party node can be predicted according to the obtained graph model, so that the accuracy of the competition and cooperation relationship prediction in the logistics supply chain is improved.
In another embodiment, as shown in fig. 4, a graph model processing method for predicting competition and cooperation relationship is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
at step 402, a supply chain graph network based on logistics data is obtained.
Each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company.
Step 404, obtaining structure coding information and attribute coding information of each node of the supply chain graph network.
Specifically, first-order similarity information and second-order similarity information between nodes in the supply chain graph network are determined according to receiving and sending relation among the nodes; and coding the first-order similarity information and the second-order similarity information by adopting a set coding form to obtain structural coding information of the supply chain graph network. Based on the convolutional neural network, adopting a set coding form to code the industry information and the company operation range data in the attribute information of each node; and dynamically encoding the interaction information (namely receiving and sending relation) of the nodes carrying different attribute information based on the attention mechanism to obtain the attribute encoding information of the supply chain graph network.
Wherein, the first-order similarity information refers to the similarity between two nodes of the supply chain graph network, each pair of nodes connected by an edge, and the weight value of the edge represents the first-order similarity between the two nodes; if no edge exists between the two nodes, the first-order similarity is 0; in a practical scenario where there is a mail receiving relationship between two companies (upstream and downstream 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 components company and a clothing company. The second-order similarity information refers to the similarity between adjacent network structures of a pair of vertexes (namely nodes) in the supply chain graph network, and if no vertex is simultaneously connected with the two nodes, the second-order similarity of the two nodes is 0; in a practical scenario where two companies have a common third company with a receiving and sending relationship, the three companies may be three nodes belonging to a certain supply chain in the supply chain network, for example, a transistor manufacturer and a mobile phone manufacturer have a common electronic component company, and the second-order similarity between the transistor manufacturer and the mobile phone manufacturer is higher than that between the mobile phone manufacturer and the clothing company due to the electronic component company.
And step 406, performing vectorization processing on the structure 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.
And step 408, determining a first loss function of the triangular structure network and a second loss function of the bridge structure network in the graph model to obtain a target loss function.
Specifically, based on deep neural network learning, the determined maximum likelihood loss function is used as a first loss function of a triangular structure network in the graph model; determining a second loss function of the bridge structure network in the graph model according to the optimized structure balance theoretical data and the embedded vector matrix of each node; and obtaining a target loss function of the graph model according to the first loss function and the second loss function.
And step 410, training a graph model for predicting competition and cooperation relations in the logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
Specifically, with the target loss function as a constraint, the embedded vector matrix of each node is input into a graph model for predicting competition and cooperation in a logistics supply chain for iterative training, and the training is finished until the target loss function obtains an optimal solution, so that a trained target graph model is obtained.
Step 412, acquiring attribute information and a receiving and sending relation of the node to be predicted; and the node to be predicted represents the receiving and sending account number to be predicted.
And step 414, inputting the attribute information and the receiving and sending relation into the target graph model, and outputting symbols for representing the cooperation and competition relation.
The symbol representing the cooperative and competitive relationship may be a positive sign "+" or a negative sign "-", where 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.
Specifically, the set coding mode is utilized to code the attribute information of the node to be predicted and the receiving-sending relation to obtain the structure coding information and the attribute coding information of the node to be predicted, vectorization processing is conducted on the structure coding information and the attribute coding information of the node to be predicted to obtain an embedded vector matrix of the node to be predicted, the embedded vector matrix is input into a trained target graph model, and symbols of edges between the nodes to be predicted are obtained.
And step 416, determining the relation between the forwarding account numbers to be predicted according to the symbols.
Specifically, whether the relationship between the forwarding account numbers to be predicted is a competitive relationship or a cooperative relationship can be determined according to the symbols of the edges between the nodes to be predicted.
The graph model processing method for predicting competition and cooperation relationships comprises the steps of abstracting logistics data into a supply chain graph network, obtaining structure coding information and attribute coding information of each node in the supply chain network, conducting vectorization processing on the structure coding information and the attribute coding information of each node to obtain an embedded vector matrix of each node, conducting vectorization on the attribute information of each node in the supply chain network and receiving and sending relation among the nodes, using a determined target loss function as constraint, inputting the obtained embedded vector matrix into a graph model comprising a triangular structure network and a bridge structure network for training to obtain a trained target graph model capable of predicting competition and cooperation relationships in the logistics supply chain, inputting the attribute information of the node to be predicted and the receiving and sending relation into the graph model, and accurately predicting the edge of the nodes at two ends of the edge according to the output edge symbols The symbol and the symbol of the edge with the common node at the nodes at the two ends of the edge can determine whether the relation between the receiving and sending account numbers to be predicted is a competitive relation or a cooperative relation, so that the accuracy of the prediction of the competitive relation and the cooperative relation is improved.
It should be understood that, although the steps in the flowcharts of fig. 2 and 4 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 and 4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in other steps.
In one embodiment, as shown in fig. 6, there is provided a graph model processing apparatus for predicting competition and cooperative relationship, including: a first acquisition module 502, a second acquisition module 504, a processing module 506, a determination module 508, and a training module 510, wherein:
a first obtaining module 502, configured to obtain a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of the company, edges in the supply chain graph network represent receiving and sending relations among the companies, and the attribute of each node represents the industry to which the company belongs and the operating range of the company.
A second obtaining module 504, configured to obtain structure coding information and attribute coding information of each node of the supply chain graph network.
The processing module 506 is configured to perform vectorization processing on the structure 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.
The determining module 508 is configured to determine a first loss function of the triangular structure network and a second loss function of the bridge structure network in the graph model to obtain a target loss function.
And the training module 510 is configured to train a graph model for predicting competition and cooperation relationships in the logistics supply chain according to the embedded vector matrix of each node with the target loss function as a constraint, so as to obtain a trained target graph model.
In the graph model processing device for predicting competition and cooperation, the acquired structure coding information and attribute coding information are subjected to vectorization processing by acquiring a supply chain graph network representing receiving and sending relations among companies in a supply chain, industry information to which the companies belong and company operation range data, so that an embedded vector matrix of each node in the supply chain graph network is obtained; obtaining a target loss function by determining a first loss function of the triangular structure network and a second loss function of the bridge structure network; training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking a target loss function as constraint to obtain a trained target graph model; the graph model comprises a triangular structure network and a bridge structure network, and the relationship between the nodes at two ends of the middle edge and the relationship between the nodes and a common third-party node can be predicted according to the obtained graph model, so that the accuracy of the competition and cooperation relationship prediction in the logistics supply chain is improved.
In another embodiment, as shown in fig. 5, a graph model processing apparatus for predicting competition and cooperative relationship is provided, which comprises, in addition to a first obtaining module 502, a second obtaining module 504, a processing module 506, a determining module 508 and a training module 510: an encoding module 512 and a prediction module 514, wherein:
the encoding module 512 is configured to determine similarity information between nodes in the supply chain graph network according to a receiving-sending relationship between the nodes, and encode the similarity information to obtain structure encoding information of the supply chain graph network; and 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.
In one embodiment, the determining 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 receiving and sending relation between the nodes.
The encoding module 512 is further configured to encode the first-order similarity information and the second-order similarity information to obtain structure encoding information of the supply chain graph network.
In one embodiment, the encoding module 512 is further configured to encode the industry information and the company operation range data in the attribute information of each node based on a convolutional neural network; and coding the interaction information of the nodes carrying different attribute information based on the attention mechanism to obtain the attribute coding information of the supply chain graph network.
In one embodiment, the determining module 508 is further configured to use the determined maximum likelihood loss function as a first loss function of a triangular structure network in the graph model based on deep neural network learning; determining a second loss function of the bridge structure network in the graph model according to the optimized structure balance theoretical data and the embedded vector matrix of each node; and obtaining a target loss function of the graph model according to the first loss function and the second loss function.
In an embodiment, the training module 510 is further configured to input the embedded vector matrix of each node into a graph model for predicting competition and cooperation in a logistics supply chain for iterative training with the target loss function as a constraint, and terminate training until the target loss function obtains an optimal solution, so as to obtain a trained target graph model.
In one embodiment, the first obtaining module 502 is further configured to obtain attribute information and a receiving-sending relationship of a node to be predicted; the node to be predicted represents the receiving and sending account number to be predicted;
the prediction module 514 is used for inputting the attribute information and the receiving and sending relation into the target graph model and outputting symbols for representing cooperation and competition relations; and determining the relation between the receiving account numbers to be predicted according to the symbols.
In one embodiment, the logistics data is abstracted into a supply chain graph network, the structure coding information and the attribute coding information of each node in the supply chain network are obtained, vectorization processing is further carried out on the structure coding information and the attribute coding information of each node, an embedded vector matrix of each node is obtained, vectorization is carried out on the attribute information of each node in the supply chain network and the receiving and sending part relations among the nodes, a determined target loss function is taken as constraint, the obtained embedded vector matrix is input into a graph model comprising a triangular structure network and a bridge structure network to be trained, a trained target graph model which can be used for predicting competition and cooperation relations in the logistics supply chain is obtained, the attribute information of the node to be predicted and the receiving and sending part relations are input into the target graph model, the edge symbols of the edge with a third party node at two ends of the edge can be accurately predicted according to the output edge symbols, and the common node at two ends of the edge can be accurately predicted The symbol of the point edge can determine whether the relation between the receiving and sending account numbers to be predicted is a competitive relation or a cooperative relation, so that the accuracy of the prediction of the competitive relation and the cooperative relation is improved.
For specific limitations of the graph model processing apparatus for predicting competition and cooperation relationships, reference may be made to the above limitations of the graph model processing method for predicting competition and cooperation relationships, which are not described herein again. The respective modules in the graph model processing apparatus for predicting competition and cooperation relationship described above may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a graph model processing method for predicting competition and partnership. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company;
acquiring structure coding information and attribute coding information of each node of a supply chain graph network;
vectorizing the structure 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;
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; and training a graph model for predicting competition and cooperation relations in the logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining similarity information among nodes in the supply chain diagram network according to the receiving and sending relation among the nodes, and coding the similarity information to obtain structural coding information of the supply chain diagram network;
and 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.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the receiving and sending relation between the nodes;
and coding the first-order similarity information and the second-order similarity information to obtain structural coding information of the supply chain diagram network.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
coding industry information and company operation range data in the attribute information of each node based on a convolutional neural network; and
and coding the interaction information of the nodes carrying different attribute information based on the attention mechanism to obtain the attribute coding information of the supply chain graph network.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
based on deep neural network learning, taking the determined maximum likelihood loss function as a first loss function of a triangular structure network in the graph model;
determining a second loss function of the bridge structure network in the graph model according to the optimized structure balance theoretical data and the embedded vector matrix of each node;
and obtaining a target loss function of the graph model according to the first loss function and the second loss function.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and inputting the embedded vector matrix of each node into a graph model for predicting competition and cooperation in a logistics supply chain by taking the target loss function as constraint to perform iterative training until the training is finished when the target loss function obtains the optimal solution, thereby obtaining the trained target graph model.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring attribute information and a receiving and sending relation of a node to be predicted; the node to be predicted represents the receiving and sending account number to be predicted;
inputting the attribute information and the receiving and sending relation into a target graph model, and outputting symbols for representing cooperation and competition relations;
and determining the relation between the receiving account numbers to be predicted according to the symbols.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company;
acquiring structure coding information and attribute coding information of each node of a supply chain graph network;
vectorizing the structure 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;
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; and training a graph model for predicting competition and cooperation relations in the logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining similarity information among nodes in the supply chain diagram network according to the receiving and sending relation among the nodes, and coding the similarity information to obtain structural coding information of the supply chain diagram network;
and 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.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the receiving and sending relation between the nodes;
and coding the first-order similarity information and the second-order similarity information to obtain structural coding information of the supply chain diagram network.
In one embodiment, the computer program when executed by the processor further performs the steps of:
coding industry information and company operation range data in the attribute information of each node based on a convolutional neural network; and
and coding the interaction information of the nodes carrying different attribute information based on the attention mechanism to obtain the attribute coding information of the supply chain graph network.
In one embodiment, the computer program when executed by the processor further performs the steps of:
based on deep neural network learning, taking the determined maximum likelihood loss function as a first loss function of a triangular structure network in the graph model;
determining a second loss function of the bridge structure network in the graph model according to the optimized structure balance theoretical data and the embedded vector matrix of each node;
and obtaining a target loss function of the graph model according to the first loss function and the second loss function.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and inputting the embedded vector matrix of each node into a graph model for predicting competition and cooperation in a logistics supply chain by taking the target loss function as constraint to perform iterative training until the training is finished when the target loss function obtains the optimal solution, thereby obtaining the trained target graph model.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring attribute information and a receiving and sending relation of a node to be predicted; the node to be predicted represents the receiving and sending account number to be predicted;
inputting the attribute information and the receiving and sending relation into a target graph model, and outputting symbols for representing cooperation and competition relations;
and determining the relation between the receiving account numbers to be predicted according to the symbols.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A graph model processing method for predicting competition and partnership, the method comprising:
acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and attribute information of each node comprises industry information of the company and management range data of the company;
acquiring structure coding information and attribute coding information of each node of the supply chain graph network;
vectorizing the structure 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;
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; the bridge structure network is used for predicting the symbols of the edges of the structure that nodes at two ends of the edges in the supply chain graph network have the common third-party node; the triangular structure network is used for predicting the symbols of the edges of which the nodes at two ends of the edges in the supply chain graph network have common nodes;
and training a graph model for predicting competition and cooperation relations in a logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
2. The method of claim 1, wherein obtaining structure code information and supply chain graph network attribute code information of each node in the supply chain graph network comprises:
determining similarity information between nodes in the supply chain graph network according to the receiving and sending relation between the nodes, and coding the similarity information to obtain structural coding information of the supply chain graph network;
and encoding the attribute information of each node based on an attention mechanism and a convolutional neural network to obtain the attribute encoding information of the supply chain graph network.
3. The method according to claim 2, wherein the determining similarity information between nodes in the supply chain graph network according to the receiving and sending relation between the nodes, and encoding the similarity information to obtain structure encoding information of the supply chain graph network comprises:
determining first-order similarity information and second-order similarity information between nodes in the supply chain graph network according to the receiving and sending relation among the nodes;
and coding the first-order similarity information and the second-order similarity information to obtain structural coding information of the supply chain diagram network.
4. The method of claim 2, wherein the encoding attribute information for each node based on the attention mechanism and the convolutional neural network to obtain attribute encoded information for the supply chain graph network comprises:
coding industry information and company operation range data in the attribute information of each node based on a convolutional neural network; and
and coding the interaction information of the nodes carrying different attribute information based on an attention mechanism to obtain the attribute coding information of the supply chain graph network.
5. The method of claim 1, wherein 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 comprises:
based on deep neural network learning, taking the determined maximum likelihood loss function as a first loss function of a triangular structure network in the graph model;
determining a second loss function of the bridge structure network in the graph model according to the optimized structure balance theoretical data and the embedded vector matrix of each node;
and obtaining a target loss function of the graph model according to the first loss function and the second loss function.
6. The method of claim 1, wherein the training of the graph model for predicting competition and cooperation in the logistics supply chain according to the embedded vector matrix of each node with the target loss function as a constraint to obtain the trained target graph model comprises:
and inputting the embedded vector matrix of each node into a graph model for predicting competition and cooperation in a logistics supply chain by taking the target loss function as constraint, and performing iterative training until the training is finished when the target loss function obtains an optimal solution, thereby obtaining a trained target graph model.
7. The method of claim 1, further comprising:
acquiring attribute information and a receiving and sending relation of a node to be predicted; the node to be predicted represents a receiving and sending account number to be predicted;
inputting the attribute information and the receiving-sending relation into the target graph model, and outputting symbols representing cooperation and competition relations;
and determining the relation between the receiving and sending account numbers to be predicted according to the symbols.
8. A graph model processing apparatus for predicting competition and partnership, the apparatus comprising:
the first acquisition module is used for acquiring a supply chain diagram network based on logistics data; each node in the supply chain graph network represents a receiving and sending account number of a company, edges in the supply chain graph network represent receiving and sending relations among the companies, and the attribute of each node represents the industry to which the company belongs and the operating range of the company;
the second acquisition module is used for acquiring the structure coding information and the attribute coding information of each node of the supply chain graph network;
the processing module is used for carrying out vectorization processing on the structure 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;
the determining module is used for 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;
and the training module is used for training a graph model for predicting competition and cooperation in a logistics supply chain according to the embedded vector matrix of each node by taking the target loss function as constraint to obtain a trained target graph model.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011089208.7A 2020-10-13 2020-10-13 Graph model processing method and device for predicting competition and cooperation relationship Pending CN114358452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011089208.7A CN114358452A (en) 2020-10-13 2020-10-13 Graph model processing method and device for predicting competition and cooperation relationship

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011089208.7A CN114358452A (en) 2020-10-13 2020-10-13 Graph model processing method and device for predicting competition and cooperation relationship

Publications (1)

Publication Number Publication Date
CN114358452A true CN114358452A (en) 2022-04-15

Family

ID=81090299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011089208.7A Pending CN114358452A (en) 2020-10-13 2020-10-13 Graph model processing method and device for predicting competition and cooperation relationship

Country Status (1)

Country Link
CN (1) CN114358452A (en)

Similar Documents

Publication Publication Date Title
TWI682304B (en) Abnormal account prevention and control method, device and equipment based on graph structure model
CN110929047B (en) Knowledge graph reasoning method and device for focusing on neighbor entity
CN113361658B (en) Method, device and equipment for training graph model based on privacy protection
CN109635990B (en) Training method, prediction method, device, electronic equipment and storage medium
CN112910710B (en) Network flow space-time prediction method and device, computer equipment and storage medium
CN111144576A (en) Model training method and device and electronic equipment
CN112766649B (en) Target object evaluation method based on multi-scoring card fusion and related equipment thereof
CN112035549B (en) Data mining method, device, computer equipment and storage medium
CN113538070B (en) User life value cycle detection method and device and computer equipment
CN111080304A (en) Credible relationship identification method, device and equipment
CN114861746A (en) Anti-fraud identification method and device based on big data and related equipment
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN113806350B (en) Management method and system for improving security of big data transaction platform
CN116186295B (en) Attention-based knowledge graph link prediction method, attention-based knowledge graph link prediction device, attention-based knowledge graph link prediction equipment and attention-based knowledge graph link prediction medium
CN111339163B (en) Method, device, computer equipment and storage medium for acquiring user loss state
CN112507323A (en) Model training method and device based on unidirectional network and computing equipment
CN111008311A (en) Complex network node importance evaluation method and device based on neighborhood weak connection
CN114358452A (en) Graph model processing method and device for predicting competition and cooperation relationship
CN114493850A (en) Artificial intelligence-based online notarization method, system and storage medium
CN113011459B (en) Model training method, device and computing equipment
CN112163170B (en) Method and system for improving social network alignment based on virtual nodes and meta-learning
CN113469415B (en) Network flow prediction method and computer equipment
CN115314513B (en) Trust twinning method based on block chain and related equipment
CN113298636B (en) Risk control method, device and system based on simulation resource application
CN114363363B (en) Data storage method, device, equipment and medium based on multiple chains

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination