A multi-value chain evolution training prediction method and system and a storage medium
By using a distributed federated temporal graph neural network, local parameters are trained locally on the client side, and global parameters are aggregated on the server side. Combined with metadata sharing and blockchain technology, the privacy and efficiency issues of predicting relationships between enterprises in multiple value chains are solved, achieving secure and efficient prediction results.
Patent Information
- Application Number
- CN202310580677.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-05-22
AI Technical Summary
Existing multi-value chain forecasting methods cannot effectively consider dynamic latency, cannot predict changes in inter-firm relationships without sharing raw data, and distributed graph neural networks have high communication volume and long processing time, making it difficult to effectively predict inter-firm cooperation relationships and whether a company will go out of business.
It employs a distributed federated temporal graph neural network, where local network parameters are trained locally on the client side and global parameters are aggregated on the server side. Prediction is performed using feature vectors and local loss functions. It utilizes metadata sharing instead of raw data and combines regularization and blockchain technologies to optimize communication efficiency.
It enables secure and efficient prediction of the evolution of relationships between firms across multiple value chains without sharing raw data, reducing communication volume and training time, and improving prediction accuracy and privacy protection.
Smart Images

Figure CN116542323B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence, specifically relating to a training and prediction method, system, and storage medium for multi-value chain evolution. Background Technology
[0002] This section is intended to provide background or context for embodiments of the invention as set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] Due to the significant improvement in machine hardware performance, deep learning methods based on neural networks have achieved great success in fields such as intelligent recommendation and network performance prediction. However, existing prediction methods rarely consider dynamic latency, mostly perform predictions under a given topology, and cannot output information that changes over time.
[0004] As various stakeholders in society place greater emphasis on issues such as data compliance, trade secrets, information security, and business competition, companies, enterprises, and individuals at the upstream and downstream levels of multi-value chains are increasingly reluctant to disclose their raw data. This results in low levels of data sharing across the value chain, with a significant amount of data remaining underutilized. Furthermore, companies, enterprises, and individuals within multi-value chains struggle to understand the relationships between other entities. Therefore, predicting the relationships between entities without accessing their raw data is a pressing issue that businesses within the value chain need to address.
[0005] Because the relationships between entities in a multi-value chain change over time—including but not limited to partnerships, supply and demand flows, business flows, and value flows—these relationships strengthen if there is a strong foundation for cooperation. Existing methods cannot predict the future partnerships between two entities. Furthermore, each entity struggles to ascertain the partnerships between other entities. Therefore, considering the time dimension, it is currently impossible to predict the future relationships between entities in a multi-value chain system or whether a particular entity is facing extinction.
[0006] Because there are numerous nodes in a multi-value chain, and the graph exhibits degree, with each node potentially corresponding to multiple clients, the challenge lies in communication between nodes and message passing and backpropagation within the distributed graph neural network over the internet when the number of nodes is large. The communication volume is enormous and extremely time-consuming. The degree of graph nodes varies significantly; for example, in scale-free networks, the degree of nodes follows an exponential distribution, with a few nodes having very high degrees and most having very low degrees. Since the number of messages a node sends / receives is proportional to its degree, nodes with high degrees become the performance bottleneck of the entire distributed temporal neural network. Deleting nodes cannot overcome the excessive time consumption problem.
[0007] Therefore, predicting the relationships between companies in a future multi-value chain system and whether a particular company is heading towards extinction is an urgent problem to be solved. Summary of the Invention
[0008] To address the problems existing in the prior art, a training and prediction method, system, and storage medium for multi-value chain evolution are proposed. This method, system, and storage medium can solve the aforementioned problems.
[0009] The present invention provides the following solutions.
[0010] In one embodiment, the present invention provides a training and prediction method for multi-value chain evolution, comprising: based on client c i and its neighboring client c j The local raw data generates the client c i Node v i eigenvectors The feature vector Used to characterize the client c i Each of its adjacent clients c j Information about the edges between the nodes, and information about each client v i The feature vectors and node information of the node constitute the distributed time series graph data G. t (V,E t V represents node v i A set, each node v i E represents a client, i.e., a company; E represents the edge e. ij The set, each edge e ij Represents node v i and v j Whether there are cooperative relationships, supply and demand flows, business flows, and value flows between them; t represents the time series, taking a value between 0 and T+1. Since a distributed federated time series graph neural network is used, each node's network is a component of the entire distributed federated time series graph neural network. The parameters of the neural network obtained by each client's local training are different. No entity in the network knows the complete distributed time series graph data; any entity includes clients or servers. The client, based on the feature vector of its node... The local network parameters of the distributed federated temporal graph neural network model at the current time are calculated and sent to the server. The client has a pre-built distributed federated temporal graph neural network model. The server obtains global network parameters based on the local network parameters and broadcasts these global network parameters to all clients. The client uses the global network parameters to update the network parameters of the distributed federated temporal graph neural network model and inputs the distributed temporal graph data of the next time step into the updated distributed federated temporal graph neural network model for learning, outputting the next time step edge e. ij The predicted value. Preferably, the edge e ij The predicted value is the label vector. Preferably, the next time point is time T+1.
[0011] One advantage of the above implementation is that each client node only knows the edges between itself and its neighboring nodes, and the server only knows the information of all nodes, thus obtaining the feature transformation matrix W through a federated temporal graph neural network. l The loss function L(t) and the local loss function L(t) implicitly contain the transfer relationship information of each node in the multi-value chain at time t, but neither the server nor the node has information about the edges between other nodes.
[0012] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, which generates the feature vector of the node where the client is located based on the local raw data of the client and its neighboring clients, including: at time t, each client c i The client c is generated based on local raw data. i Node v i eigenvectors The client c i Get its neighboring client c j The feature vector is used to generate a neighbor list N(i) of neighbor nodes that are willing to participate in the prediction, where i is the index of the node and j is the index of the neighbor node.
[0013] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, the method further comprising:
[0014] The client c i Update your feature vector using the following aggregation formula:
[0015]
[0016] in, Indicates the client c i The feature vector of the node, Indicates the neighboring customer cj The feature vector of the node where the endpoint is located, where i represents the index of the node and j represents the index of the neighboring node. The aggregation method includes summation and / or averaging and / or taking the maximum.
[0017] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, wherein the server records the response time of each client completing forward propagation, arranges all clients in descending order, selects the nodes containing the θ clients with the longest response times for regularization, and notifies the θ nodes with the longest response times to reduce the number of their neighbors.
[0018] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, the method further comprising: on the client c i Aggregator Neighbor Client c j When the feature vector of the node is being used, the client c i For each of its neighboring nodes v j Clients ∈N(i) learn a correlation coefficient a ij The feature vector of the client is updated using the following formula:
[0019]
[0020] In the final loss function, regularization R(A) is applied to make the correlation coefficients of most neighbors approach 0, while the absolute values of the correlation coefficients of a few neighbors are much greater than 0, where A is the correlation coefficient matrix, and a... ij The correlation coefficient is... Let W represent the feature vector of the node where the neighboring client is located, where i represents the index of the node, j represents the index of the neighboring node, and W represents the feature vector of the neighboring client. l (t) represents the local feature transformation matrix, and Linear indicates that a linear operation is performed.
[0021] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, the method further comprising:
[0022] The regularization includes L1 regularization.
[0023]
[0024] and l 2, Regularization
[0025]
[0026] Wherein, the a ij ∈A, by using regularization to retain important neighbors while removing a large number of unimportant neighbors, the number of nodes v is adaptively reduced by θ.i The number of neighbors reduces client c i The communication volume is then reduced. The neighbor node set N(i) is then updated with the k most relevant neighbors, thus retaining a few important neighbor nodes and removing unimportant ones.
[0027] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, wherein the client c i The generated local network parameters include local weights W E (t-1), Local feature transformation matrix W l (t-1), Local loss function L(t-1); The server performs backpropagation based on the local network parameters sent by each client to train a recurrent neural network, thereby obtaining the global network parameters, which include global weights. Global feature transformation matrix and global loss function Where t represents time.
[0028] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, wherein the client v i Generate the feature vector of the node where the client is located using local raw data. l represents the layer of the distributed federated temporal graph neural network model, i represents the node number, and t represents the time step, preferably t∈[1,T] or t∈[1,T-1].
[0029] The client establishes a distributed federated temporal graph neural network model, based on the node v i eigenvectors Calculate local weights W E (t-1), Local feature transformation matrix W l (t-1), local loss function L(t-1), and relationship with node v i Connected edge e ij eigenvectors of (t-1) Where e ij (t-1) represents node v i With neighbor node v j The edge between, v j ∈N(i);
[0030] Server S obtains client c i Sending local weight W E (t-1), Local feature transformation matrix W l The local loss function L(t-1) is used and backpropagated to obtain the global weights. Global feature transformation matrix and global loss function Where t represents time; preferably, the server uses the Adam algorithm for backpropagation to obtain global network parameters, which include global weights. Global feature transformation matrix and / or global loss function
[0031] Each node v i The feature vectors are updated, and each client receives the global weights sent by the server. Global feature transformation matrix and global loss function Where t represents time step, and backpropagation is performed to obtain a pre-trained distributed federated temporal graph neural network. Preferably, t takes values sequentially between time steps 0 and T.
[0032] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution. The distributed federated temporal graph neural network model includes a feature learning network and a label prediction network. The feature learning network mainly consists of message passing layers, which are used to calculate graph convolution and graph attention. The label prediction network consists of fully connected layers, which are used to generate edges e. ij Predicted value
[0033] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, wherein the global loss is calculated by the following formula:
[0034]
[0035] in, Let λ be the edge loss, λ·R(A) be the regularization term, i be the index of the node, j be the index of the neighboring node of the node, and t be the time.
[0036] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, wherein the client utilizes feature vectors. and Calculate edge e ij Predicted values:
[0037]
[0038] in, The feature vector of the node where the client is located. The feature vector of the node where the neighboring client is located. Here is the updated global weight, E represents edge e. ijThe set of nodes, where l represents a layer in the distributed federated temporal graph neural network model, i represents the index of the node, j represents the index of the node's neighboring nodes, and t represents time. In one embodiment, the client can connect edge e. ij Predicted value Send to the server.
[0039] In another embodiment, the present invention provides a training and prediction method for multi-value chain evolution, wherein the client calculates edge e using the following formula. ij Local loss function:
[0040]
[0041] in, Let be the local loss function of the client. For edge e ij The tag, For edge e ij The predicted value is given by i, where i is the index of the node, j is the index of the neighboring node of the node, and t is the time.
[0042] In another embodiment, the present invention provides a training and prediction system for multi-value chain evolution. The system includes a server and multiple clients. Each client includes a data acquisition module, a raw data module, a local parameter module, a data annotation module, a message passing module, a local training module, and a blockchain. The data acquisition module collects and records the client's raw data; the raw data module stores the client's raw data; the local parameter module stores all parameters of the client's local graph neural network; the data annotation module annotates the data for training the graph neural network; the message passing module supports concurrent communication between the client and server, as well as information uploading to the blockchain; the local training module performs all computations on the client, including feature vector calculation, training and prediction of the client's federated temporal graph neural network; and the blockchain records all communication data between the server and clients. The server-side includes a metadata module, a parameter database module, a parameter management module, a communication module, a global training module, and a blockchain. The metadata module manages and stores metadata; the parameter database module stores all parameters of the server's recurrent neural network; the parameter management module manages and updates the parameters of the graph neural network; the communication module supports concurrent communication between the server and multiple clients' message passing modules, as well as information uploading to the blockchain; the global training module merges local network parameters sent by multiple clients; and the blockchain records all communication data between the server and clients. The server-side and the client-side include at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to perform the method described in any embodiment of this invention.
[0043] In another embodiment, the present invention provides a computer-readable storage medium storing a program that, when executed by a multi-core processor, causes the multi-core processor to perform the method as described in any embodiment of the present invention.
[0044] Other advantages of the present invention will be explained in more detail below with reference to the accompanying drawings.
[0045] It should be understood that the above description is merely an overview of the technical solution of the present invention, so as to enable a clearer understanding of the technical means of the present invention, and thus enable its implementation in accordance with the contents of the specification. To make the above and other objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are illustrated below. Attached Figure Description
[0046] By reading the detailed description of the exemplary embodiments below, those skilled in the art will understand the advantages and benefits described herein, as well as other advantages and benefits. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0047] Figure 1 This is a schematic diagram of a system architecture according to an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram of a distributed federated temporal graph neural network architecture according to an embodiment of the present invention.
[0049] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0050] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0051] In the description of embodiments of this application, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, numbers, steps, behaviors, components, portions or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence of one or more other features, numbers, steps, behaviors, components, portions or combinations thereof.
[0052] Unless otherwise stated, " / " means "or". For example, A / B can mean A or B. In this article, "and / or" is merely a way of describing the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.
[0053] The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0054] All code in this invention is exemplary, and those skilled in the art will conceive of various modifications without departing from the spirit of this invention, depending on factors such as the programming language used, specific needs, and personal habits.
[0055] To clearly illustrate the implementation methods of this application, some concepts that may appear in subsequent implementation methods will be introduced first.
[0056] The raw data refers to the actual data collected by various entities in the multi-value chain at specific periods, including features and samples. The raw data can be collected according to rules and methods specified by those skilled in the art. The raw data is recorded in the form of tensors or tables, including features and samples. For example, feature 1 is car sales, and the samples include car sales data for January, February, March, etc., corresponding to different clients; feature 2 is car inventory, and the samples include car inventory data for January, February, March, etc., corresponding to different clients; feature 3 is parts sales, and the samples include parts sales data for January, February, March, etc., corresponding to different clients; feature 4 is parts inventory, etc., and so on. Those skilled in the art should understand that the features and samples referred to in this invention are not limited to those listed above. Features can be features of some or all of the data actually collected or recorded by each client, and samples can also be some or all of the data actually collected or recorded by each client. The characteristics, dimensions, and types of raw data input from different clients can vary, as can the characteristics, dimensions, and types of raw data from different groups. Clients can collect raw data on a monthly, weekly, or real-time basis, and those skilled in the art can set these parameters arbitrarily according to actual needs. Metadata is data that describes information resources or data objects. Its purpose is to: identify resources; evaluate resources; track changes in resources during use; achieve simple and efficient management of large amounts of networked data; and achieve effective discovery, retrieval, integrated organization, and effective management of information resources. Therefore, metadata is publicly available data. Metadata includes the characteristics, size, dimensions, attributes, generation time, type, shape, client identifiers, variable names, and dimensions of input data. Metadata is data that describes other data, or structured data used to provide information about a certain resource. It can be generated by the client or server based on the input data or raw data from each client.
[0057] Based on the prediction method based on multi-value chain evolution proposed in this invention, the client only needs to share metadata, without sharing the original data, which protects the data privacy and security of enterprises and makes it possible for enterprises in multiple value chains to carry out certain collaborations securely without sharing data.
[0058] This invention provides a distributed federated temporal graph neural network, employing a "server-multiple client" distributed architecture. The server primarily manages parameters and coordinates the clients to form the distributed federated temporal graph neural network. Because it uses a distributed federated temporal graph neural network, each node's network is a component of the entire distributed federated temporal graph neural network, and the parameters of the neural network obtained by each client's local training are different. The federated temporal graph neural network corresponds to a graph at each time step. Nodes in the graph represent clients or companies, with clients corresponding to companies. Edges represent relationships between clients or between companies, including cooperation, transactions, supply and demand, etc. As time changes, the graph's topology changes, and the edges also change. The federated temporal graph neural network constructed by this invention allows companies to predict future graph edges and whether a company will disappear without sharing its original data.
[0059] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0060] First see Figure 1 The illustration schematically shows an environment 100 in which an exemplary implementation according to the present disclosure can be used.
[0061] Figure 1 A schematic diagram of an example of a computing device 100 according to an embodiment of the present disclosure is shown. It should be noted that... Figure 1 This is a schematic diagram of the hardware operating environment for a multi-value chain prediction method and device architecture. The embodiments of this invention are based on client devices such as PCs, laptops, and other terminal devices.
[0062] like Figure 1As shown, in the "server-multiple client" distributed architecture, the client uses raw data to train a sub-model representing the current graph nodes and edges locally. Preferably, the client includes a raw data module, a local parameter module, a data acquisition module, a data annotation module, a message passing module, and a local training module. The raw data module stores the client's raw data; the data acquisition module collects and records the client's raw data; the local parameter module stores all parameters of the client's local graph neural network; the data annotation module annotates the data for graph neural network training; the message passing module supports concurrent communication between the client and server, as well as information uploading to the blockchain; the local training module trains the client-side federated temporal graph neural network; and the blockchain records all communication between the server and client, enabling traceability and non-repudiation of information leaks. The server manages the global parameters of the graph neural network. Preferably, the server includes a metadata module, a parameter database module, a parameter management module, a communication module, and a global training module. The system comprises several modules: a metadata module for managing and storing metadata; a parameter database module for storing all parameters of the server's graph neural network; a parameter management module for managing and updating the parameters of the graph neural network; a communication module for supporting concurrent communication between the server and multiple clients' message passing modules, as well as information uploading to the blockchain; a global training module for fusing data sent by multiple clients; and a blockchain for recording all communication between the server and clients, facilitating traceability and non-repudiation of information leaks. In one embodiment, each graph neural network is trained locally on the client, while the server primarily performs parameter processing without a graph neural network; this processing includes averaging. Further, in another embodiment, each graph neural network is trained locally on the client, while the server uses a neural network for parameter processing, including parameter fitting and / or prediction. The client and server may also include: a processor, such as a CPU; a network interface; a user interface; a memory; and a communication bus. The communication bus enables communication between different components. The user interface may include a display screen and an input unit such as a keyboard; optional user interfaces may also include standard wired or wireless interfaces. The network interface may optionally include standard wired or wireless interfaces (such as Wi-Fi, Bluetooth, or 5G interfaces). The memory can be high-speed RAM or stable, non-volatile memory, such as disk storage. Alternatively, the memory can be a storage device independent of the aforementioned processor.
[0063] Those skilled in the art will understand that Figure 1The server and client structures shown do not constitute a limitation on the server or client. The server and client may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0064] Example 1
[0065] Perform node evolution state prediction, such as Figure 2 As shown, a memory, as a computer storage medium, can include an operating system, a network communication module, a user interface module, and a federated temporal graph neural network program. Each client can be assigned a graph node, with a one-to-one correspondence between graph nodes and clients. The operating system manages and controls the hardware and software resources of the client devices, supporting the execution of the federated temporal graph neural network program and other software or programs. In the federated temporal graph neural network, each time step corresponds to a graph topology; assuming the nodes remain unchanged, the edges in the graph change over time. Figure 1 In the server shown, the communication module is mainly used to send and receive requests and data between the server and multiple clients, including clients A, B, C, D, and E. The message passing module among the multiple clients is mainly used to send and receive requests and data between each client and the server, where the number of clients may be more or less. Preferably, the communication module and the message passing module can communicate via their respective network interfaces. The processor can be used to call the federated temporal graph neural network program stored in memory and perform the following operations:
[0066] (1) The client establishes a distributed graph neural network model, including a feature learning network and a label prediction network.
[0067] This invention provides a distributed graph neural network architecture with a server-multiple client structure, consisting of one server S and n clients {c1, c2, ..., cn}. n It consists of one enterprise corresponding to one client, and a node v is created for each client. i The nodes corresponding to clients in multiple value chains form a mesh-like time-series data G. t (V,E t In this invention, without causing conflicts, the timing diagram data G... t (V,E t (abbreviated as Graph G) A collection of time-series graph data at multiple times is called multi-temporal graph data. Graph G exists either throughout the network space or logically. Each client c i A node v in graph G i Therefore, client c i It can also be represented as client vi The two can be used interchangeably when there is no contradiction. Because a distributed federated temporal graph neural network is used, each node's network is a component of the entire distributed federated temporal graph neural network. The parameters of the neural network trained locally by each client are different, and no entity in the network knows the complete distributed temporal graph data. "Any entity" includes any client or server. Each client c... i It can only communicate with neighboring node v j Client c j Communicating with the server, where n is a natural number or a positive integer, i represents the node's index (ranging from 0 to n), and j represents the neighbor node's index (ranging from 0 to n). In one embodiment, the adjacent client or neighbor node in this invention refers to a first-order neighbor node. In another embodiment, the neighbor node in this invention includes first-order neighbor nodes and / or second-order neighbor nodes. In yet another embodiment, the neighbor node in this invention includes first-order neighbor nodes and / or second-order neighbor nodes and / or other higher-order neighbor nodes. For any node v i Its neighbor list N(i) on the graph constitutes the first feature, namely the structural relationship of the graph.
[0068] In one optional embodiment, the server sends a request to the client to establish a distributed graph neural network. The request message includes a request for data resources required for training. Preferably, this data is metadata, such as descriptive information like value streams, supply and demand streams, and business flows. If client c i If the client is willing to participate, it sends a message to the server indicating acceptance of the request. In another optional embodiment, client c i The client can proactively send a request message to the server to join the graph neural network prediction, and the server chooses whether to agree to the request. i Join if client c agrees i If joined, then client c i Create a graph neural network. In this invention, without causing contradictions, the client c... i It refers to node v i The corresponding client. In this invention, nodes use their corresponding clients to send and receive signals or perform computational calculations. The distributed graph neural network model includes a feature learning network and a label prediction network. The feature learning network mainly includes a message passing layer, where the client receives messages from its neighbors and performs operations such as graph convolutional neural networks (GNN), graph attention networks (GAT), and graph transformers. The label prediction network includes fully connected layers. In this invention, the global loss function... It can also be expressed as global loss function It can also be expressed as Their meanings are the same. Preferably, such as... Figure 2 As shown, nodes A, B, C, D, and E correspond to clients A, B, C, D, and E, respectively. The local parameters of client A at time t-1 include at least the local feature transformation matrix W shown in the dashed box next to client A. l (t-1), Local weight W E (t-1) and local loss function Loss A (t-1), in this invention, the local loss function Loss A (t-1) represents the loss function of client A. The local loss function of each node is represented as Loss(t-1), which is abbreviated as L(t-1). The local parameters at time t include at least the local feature transformation matrix W shown in the dashed box next to client A. l (t), Local weights W E (t) and local loss function Loss A (t), and correspondingly, each of the other nodes, such as node B, node C, node D, and node E, includes its own local parameters at the corresponding time (not shown in the figure). The global parameters in the server include at least the global feature transformation matrix at time t-1. Global weight and global loss function and the global eigentransformation matrix at time t Global weight and global loss function Where t represents time, moment, or sequence. Node B can only communicate with the server, node A, and node C; node D can only communicate with the server, node A, node C, and node E; and so on for other nodes. This will not be elaborated further here or below.
[0069] (2) The server obtains the graph node set V.
[0070] When the server agrees to client c i When adding a graph neural network, the server sends a message to the client c. i Send an consent token, the consent token being used by client c i Incorporate training into the graph neural network. In an optional embodiment, client c i Invite neighboring clients with relevant data to participate in modeling, i.e., train a multi-value chain graph neural network evolution prediction model to determine a list N(i) of willing neighbors, where the list of neighbors does not include client c. i Here, i represents the client's index, where i is a natural number or a positive integer. Each client acquires the feature vectors of its neighboring nodes. This logically forms a distributed, stored time-series graph data G. t (V,Et ), where t = 0, 1, 2, ... represents time or time sequence, and the server does not know the complete time sequence data G. t (V,E t V represents the set of nodes, where each node v i E represents a client, i.e., a company; E is the set of edges, each edge e ij Represents node v i and v j Whether there is a cooperative relationship, supply and demand flow, business flow, or value flow between them, the label vector corresponding to the edge is denoted as . At this point, the server knows the set of graph nodes V, but not the set of edges E or the edge label vectors. The client and server functionalities are as follows:
[0071] Client c i Used to process a node v in graph G i Related calculations, v i ∈V, including: compute node v i The feature vector, i.e., the calculation of the relationship with node v i Connected edge e ij eigenvectors v j ∈N(i), predict node v i With neighbor node v j The weight w of the connected edges ij Where i represents the node v i The sequence number, j represents the neighbor node v j The sequence number. Sending and / or receiving graph node v i Feature vectors on the graph, graph node v i Error backpropagation on the client. i possessing neighbor node information v of the corresponding graph node j and edge information e ij ,v j ∈N i The label of the edge Preferably, the node v i With neighbor node v j The weight w of the edge at time t ij That is, the label of the edge.
[0072] The third-party server's function is to coordinate the entire training process of the graph neural network, including: collecting the loss of each node and calculating the global loss, updating the global parameters using the Adam algorithm, and initiating backpropagation on all client sides. For example... Figure 2As shown, a third-party server, also called a server, can be one or more, or its functions can be implemented by a distributed server cluster. The server may also contain a neural network. In one embodiment, the neural network on the server differs from the neural network on the client. Preferably, the neural network on the server is implemented using any combination of one or more of the following neural networks: Recurrent Graph Neural Network (RNN), LSTM, Graph Convolutional Neural Network (GNN), Graph Attention Network (GAT), or Graph Transformer. In another embodiment, when the server generates parameters for the current time, it can consider parameter data from historical time points and broadcast the generated parameters to all clients or a specified client. In another embodiment, the neural network on the server is similar to the neural network on the client, belonging to a distributed neural network, and the server corresponds to a node in the distributed neural network. In yet another embodiment, the server does not have a neural network; it simply uploads data to all clients at each time point. For privacy protection purposes, the third-party server does not know the global topology information of graph G; that is, it knows the nodes V of the graph but not the edges E, thus achieving privacy protection for each node.
[0073] (3) Training the graph neural network.
[0074] ① The client updates the node feature vector;
[0075] First, graph node features are learned using graph snapshots at each time step. Each graph snapshot refers to the time-series graph data at a specific time. Then, the evolution characteristics of node features over time are learned using multi-temporal graph data. Finally, the obtained graph node features are used to predict graph edges. Specifically, in the r-th iteration, the l-th layer of the graph neural network at time t is operated as follows:
[0076] For each graph node v i There is a client v i Node v is fully responsible for handling all learning tasks on this node. i The feature vector update rule is as follows:
[0077]
[0078] Where, v j ∈N(i) is node v i The neighboring nodes of node v. i Node updates are implemented in a distributed manner via the Internet: the node v i Send to neighbor node v via the Internet j Send a request to get v j Node feature vectors v iAfter receiving the feature vectors of all neighboring nodes, the feature vector of the node is updated by aggregating the feature vectors of its neighbors. The available aggregation methods include summation, average, maximum, and any one or a combination thereof.
[0079] node v i Send a request to the server to obtain the global eigenvalue transformation matrix at time t. Among them, the server utilizes Calculate the global eigentransformation matrix at time t. That is, learning the temporal effects of multi-temporal graphical neural networks using weight matrices. right Perform a linear transformation to obtain node v i The final feature of the lth layer
[0080] Repeat the above steps to calculate the feature vectors of each layer of nodes.
[0081] ②The client selects a neighbor;
[0082] Distributed graph neural networks (Graph Neural Networks) rely on the internet for message passing and backpropagation, resulting in high communication volume and long processing times. The degree of graph nodes varies significantly; for example, in scale-free networks, the degree of nodes follows an exponential distribution, with a few nodes having very high degrees and most having very low degrees. Since the number of messages a node sends / receives is proportional to its degree, nodes with high degrees become the performance bottleneck of the entire distributed temporal neural network. To address this issue, when aggregating neighbor information on the client side, the client c... i For each neighbor node v j ∈N(i) learn a correlation coefficient a ij The updated matrix becomes:
[0083]
[0084] In the final global loss function, after regularization R(A), the correlation coefficients of most neighboring nodes approach 0, while the absolute values of the correlation coefficients of a few neighbors are much greater than 0. The preferred regularization method is L1 regularization.
[0085] R(A) = ∑ i,j |a ij |
[0086] and l 2,1 Regularization
[0087]
[0088] Then, the neighbor node set N(i) is updated with the k most relevant neighbors, thus retaining a few important neighbor nodes and removing unimportant ones. This reduces the number of communication messages generated during forward and backward propagation in the training of the distributed graph neural network, significantly improving communication efficiency.
[0089] Optionally, the server records the response time of each node to complete the forward propagation, sorts all clients in descending order, selects the θ nodes with the longest response times for regularization, and notifies the θ nodes with the longest response times to reduce the number of their neighbors.
[0090] ③ Client-side prediction of edge labels;
[0091] Client v i Calculate edge e using a fully connected layer ij The predicted values for the labels. The client obtains the global weights of the fully connected layer from the server to predict the edges. Calculate edge e ij The predicted value, preferably, the edge e ij The predicted value is the label vector.
[0092]
[0093] in Let be the distance function, representing the distance between node i and node j. Optionally, the distance function can be cosine distance, Euclidean distance, or Mahalanobis distance. In one embodiment, the client c i Or client c j Edge e can be ij Predicted value Send to the server. The local edge loss function is...
[0094]
[0095] Client v i Local edge loss Send to the server.
[0096] ④ The server updates global parameters;
[0097] The server uses the global weight matrix at time t-1. Calculate the global weight matrix at time t Optionally, RNN, GRU, LSTM, or Transformer can be used. Optionally, server S can connect via the internet. Broadcast to all clients reduces the waiting time for clients to receive global parameters. The server calculates the global loss as the sum of node loss and edge loss, i.e.
[0098]
[0099] in, Let λ be the edge loss and λ·R(A) be the regularization term.
[0100] ⑤ The server initiates backpropagation;
[0101] After calculating the global loss, the server begins backpropagation. The Adam algorithm is used to optimize the model parameters. In one embodiment, the neural network on the server differs from the neural network on the client. Preferably, the neural network on the server is implemented using one or more of the following neural networks: Recurrent Graph Neural Network (RNN), LSTM, Graph Convolutional Neural Network (GNN), Graph Attention Network (GAT), or Graph Transformer. In another embodiment, the neural network on the server is similar to the neural network on the client, being part of a distributed neural network, with the server corresponding to a node in the distributed neural network. The server is responsible for updating the global parameters. and and k represents the number of global parameters. In one embodiment, the server broadcasts the global parameters to the clients and initiates backpropagation for all clients. In another embodiment, the server broadcasts the global parameters to the clients, and the clients decide whether to initiate backpropagation. The clients are responsible for updating local parameters, including the correlation coefficient matrix A.
[0102] Optionally, a blockchain can be established to store communication traffic such as node feature vectors, parameters, and gradients between clients and between servers and clients, preventing repudiation and supporting auditing of whether servers and clients have engaged in privacy leaks.
[0103] (4) Predict the labels of the edges.
[0104] In one embodiment, in order to predict edge e at time T ij The server uses the graph data {G} from time 0 to T-1 to define the tags. t The distributed federated temporal graph neural network model (V,E)|t∈{0,1,…,T-1}}, after being trained, notifies the client to input the graph G at time T. T (V,E)\e ij In one embodiment, the server ultimately outputs edge e. ij In another embodiment, the predicted value of the label is ultimately output by the client as edge e. ij The predicted value of the label, wherein the client is client c i Or client c j Or a specified client. In another embodiment, in order to predict edge e at time T+1. ij tags The server uses graph data {G} from time 0 to T. t The distributed federated temporal graph neural network model (V,E)|t∈{0,1,…,T}}, after training, notifies the client to input the graph G at time T+1. T (V,E)\e ij The server ultimately outputs edge e ij In another embodiment, the predicted value of the label is ultimately output by the client as edge e. ij The predicted value of the label, wherein the client is client c i Or client c j Or a specified client.
[0105] Example 2
[0106] Predicting the evolutionary state of enterprise nodes is crucial in the complex multi-value chain manufacturing system, where intricate competitive and cooperative relationships exist among enterprises. With technological advancements and the emergence of innovative companies, those lagging behind are gradually eliminated, making the evolutionary state of enterprise nodes difficult to predict. The following steps utilize a distributed federated temporal graph neural network to predict the evolutionary state of enterprise nodes across multiple value chains:
[0107] (1) Obtain the feature vectors among enterprises in the value chain.
[0108] Server S can be a third-party server, and enterprises in the value chain act as clients {v1, v2, ..., v}. n} where n represents the number of clients. The server sends a request to the clients to build a distributed graph neural network. The request message includes the data resources required for training, such as descriptive information about value streams, supply and demand streams, and business flows. If each enterprise client v i If you are willing to participate, you will send a message to the server to indicate that you accept the request. i Invite neighboring clients to participate in modeling and determine the list N(i) of neighbors willing to participate.
[0109] (2) Establish a distributed graph neural network model.
[0110] Distributed graph neural networks (DNNs) are divided into feature learning networks and label prediction networks. The feature learning network mainly consists of message-passing layers, which implement operations such as graph convolution and graph attention through message passing. The label prediction network consists of fully connected layers. The architecture of a distributed graph neural network is a client-server structure, consisting of one server and n clients {c1, c2, ..., cn}. n The sequence data consists of}, with each client corresponding to a time series diagram G. t (V,E t A node of ), where t = 0, 1, 2, ... represents time; V represents node v. i A set, each node vi Representing an enterprise, in this invention, where there is a one-to-one correspondence between nodes and clients, node v i and client v i Client c i They can represent each other; when one node corresponds to multiple clients, node v i and client v i The two need to be distinguished; E t Let e be the edge at time t ij The set, each edge e ij Represents enterprise node v i and v j Network traffic such as value flow, supply and demand flow, business flow and / or technology flow between edges is denoted by the edge's labeled vector. The server knows the set of graph nodes V, but does not know the set of edges E. t Edge label vector Because each node v i Know yourself and your neighboring nodes v j The weight w of the connected edges ij In one embodiment, the weight w of the connected edge is... ij The label vector of the connected edge That is, each node v i Know the label vectors of all its edges The label vector of an edge is simply called the edge label.
[0111] The enterprise client consists of raw data, local parameters, a data acquisition module, a data annotation module, a message passing module, and a local training module. Its function is to process a node v in a graph G. i ∈V, including: compute node v i The feature vectors are used to calculate the relationship between node v. i Connected edge e ij The feature vector of (t-1), where j represents the neighbor node v j The serial number, v j ∈N(i), predict node v i The weight w of the edges connecting to other nodes in the graph ij j represents the neighbor node v j The serial number, v j ∈N(i), nodes participating in multi-value chain evolution prediction send and / or receive feature vectors from neighboring nodes, preferably, graph node v i Receive feature vectors from neighboring nodes, graph node v i Error backpropagation on the client v i possessing neighbor node information v of the corresponding graph node j and edge information e ij ,vj ∈N(i), and the label vector with edges.
[0112] The server-side consists of metadata, a parameter database, a parameter management module, a communication module, and a global training module. Its function is to coordinate the entire training process of the graph neural network, including: collecting the loss of each node and calculating the global loss, updating global parameters, and initiating backpropagation. Initiating backpropagation includes initiating backpropagation on the server side and / or on the client side. The third-party server does not know the global topological structure information of graph G; that is, it knows the nodes E of the graph, but does not know the edges E, their weights, or their label vectors.
[0113] (3) Train the federated temporal graph neural network model.
[0114] The client and server jointly train the distributed federated temporal graph neural network model, which mainly includes the following five steps:
[0115] ① Retailers, distributors, and manufacturers along the value chain update node feature vectors. First, graph node features are learned using graph snapshots at each time step. Then, the evolution of node features over time is learned using multi-temporal graph data. Finally, the obtained graph node features are used to predict graph nodes / edges. Specifically, in the r-th iteration, the following operations are performed on the l-th layer of the neural network at time t:
[0116] For each graph node v i There is a client v i Node v is fully responsible for handling all learning tasks on this node. i The feature vector update rule is as follows:
[0117]
[0118] node v i Send to neighbor node v via the Internet j Send a request to get v j Node feature vectors v i After receiving the feature vectors of all neighboring nodes, the feature vector of the node is updated by aggregating the feature vectors of its neighbors. The available aggregation methods include summation, averaging, and maximum.
[0119] node v i Send a request to the server to obtain the feature transformation matrix at time t. Among them, the server utilizes Calculate the global weight matrix at time t When calculating the information at time t, information from historical times is considered simultaneously, i.e., the temporal effect of the weight matrix learning multi-temporal graph neural network. Preferably, the quantities at time T-1 are considered simultaneously. Preferably, the quantities from time 0 to T-1 are considered simultaneously. Preferably, the quantities from time 0 to T are considered simultaneously. Utilizing... right Perform a linear transformation to obtain node v i The final feature of the lth layer
[0120] Repeat the above steps to calculate the feature vectors of each layer of nodes.
[0121] ②The client selects neighbors; when the client aggregates neighbor information, client c i For its node v i Each neighbor node v j ∈N(i) learn a correlation coefficient a ij The updated matrix becomes:
[0122]
[0123] By adding a regularization operation to the final loss function, the correlation coefficients of most neighbors are approximately equal to 0, while the absolute values of the correlation coefficients of a minority of neighbors are much greater than 0. The regularization method is L1 regularization and / or L... 2,1 Regularization is then applied. The neighbor set N(i) is updated with the k most relevant neighbors, thus retaining a few important neighbors and removing unimportant ones. This reduces the number of communication messages generated during forward and backward propagation in the training of the distributed graph neural network, significantly improving communication efficiency.
[0124] Meanwhile, the server records the response time of each node to complete the forward propagation, sorts all clients in descending order, selects the θ nodes with the longest response times for regularization, and notifies the θ nodes with the longest response times to reduce the number of their neighbors.
[0125] ③ The labels of the predicted edges for client-side enterprises; client c i Calculate edge e using a fully connected layer ij The predicted values for the labels. The client obtains the global weights of the fully connected layer from the server to predict the edges. Predicted values of computing nodes The local loss of the edge is node v i At least the edge local loss The data is sent to the server. The server updates the global parameters. Preferably, the global parameters include global weights. Global feature transformation matrix and global loss function Where l represents a layer in the distributed federated temporal graph neural network model, and t represents time step. The global parameters are also called the global network parameters. The server uses the global weight matrix at time t-1. Calculate the global weight matrix at time t Optionally, the server uses RNN, GRU, LSTM, or Transformer to calculate the global weight matrix. Optionally, server S will connect via the Internet At least one global parameter is broadcast to all clients, reducing the time clients spend waiting to receive the global parameter. In one embodiment, the server calculates the global loss as the sum of the node loss and the edge loss, i.e.:
[0126]
[0127] in, Let λ be the edge loss and λ·R(A) be the regularization term, i.e., the node loss.
[0128] ④ Initiate backpropagation; after calculating the global loss, the server begins backpropagation. The server is responsible for updating the global parameters. and The server will update the global parameters. and At least one server broadcasts the data to all clients, and each client performs backpropagation and is responsible for updating parameter A, which is a correlation coefficient matrix. Preferably, the server sends the global parameter... and At least one of them was updated to and in, for abbreviation, for The abbreviation for .
[0129] ⑤ Establish a blockchain; store the communication traffic such as node feature vectors, parameters and gradients between clients and between servers into the blockchain to prevent repudiation and support auditing of whether the server and client have leaked privacy.
[0130] (4) Predict corporate cooperation relationships based on the model.
[0131] In one embodiment, in order to predict edge e at time T ij The server uses the graph data {G} from time 0 to T-1 to define the tags. t The federated temporal graph neural network model (V,E)|t∈{0,1,…,T-1}}, after training, notifies the client to input the graph G at time T. T(V,E)\e ij The server ultimately outputs edge e ij The predicted value of the label. In another embodiment, in order to predict the edge e at time T. ij The label is ultimately output by the client as edge e. ij The predicted value of the label. Similarly, the predicted value of edge e at time T+1 can be obtained. ij The labels for nodes v will not be elaborated upon here. i If with v i If the predicted values of all connected edges are 0 or show a continuous trend towards 0, then v i Its evolutionary state is "extinction".
[0132] The above methods can not only predict future network flows such as value flow, supply and demand flow, business flow, and technology flow between enterprises, but also predict whether an enterprise will evolve into a "disappearance" state.
[0133] Example 3
[0134] In multi-value chain digital ecosystems, predicting enterprise product sales cannot be accurately achieved using only internal enterprise data; it requires comprehensive utilization of data from upstream and downstream enterprises in the enterprise's value chain. The following describes the application of the distributed federated temporal graph neural network proposed in this invention to enterprise product sales prediction in a multi-value chain environment:
[0135] (1) Obtain characteristic data of related enterprises in each value chain
[0136] Server S is located on a trusted third party, and the client {c1,c2,…,c…} n Located in enterprises such as suppliers, manufacturers, and distributors, where n represents the number of clients, the server sends a request to the client to build a distributed graph neural network. The request message includes the data resources required for training, such as descriptive information about value streams, supply and demand streams, and business streams.
[0137] (2) Establish a distributed graph neural network model
[0138] Distributed graph neural networks (DNNs) are divided into feature learning networks and label prediction networks. The feature learning network mainly consists of message-passing layers, which implement operations such as graph convolution and graph attention through message passing. The label prediction network consists of fully connected layers. The architecture of a distributed graph neural network is a client-server structure, consisting of one server and n clients {c1, c2, ..., cn}. n It consists of}, with each client corresponding to graph G. t (V,E t A node is a set of nodes, where t = 0, 1, 2, ... represents time; V is a set of nodes, each node vi Represents a company; E t Let e be the set of edges, and each edge e ij Represents enterprise node v i and v j Whether there is a cooperative relationship between them, the label vector of the edge is denoted as
[0139] The enterprise client consists of raw data, local parameters, a data acquisition module, a data annotation module, a message passing module, and a local training module. Its function is to use the data from the client enterprise to train a sub-model representing the nodes and edges of the current graph locally on the client.
[0140] The server consists of metadata, a parameter database, a parameter management module, a communication module, and a global training module. Its role is to coordinate the entire training process of the graph neural network, including: collecting the loss of each node and calculating the global loss, updating global parameters, and initiating backpropagation.
[0141] (3) Training the model
[0142] Training a distributed federated temporal graph neural network model on servers and clients mainly involves the following five steps:
[0143] ① Clients such as retailers, distributors, and manufacturers update node feature vectors. First, graph node features are learned using graph snapshots at each time step. Then, the evolution characteristics of node features over time are learned using multi-temporal graph data. Finally, the obtained graph node features are used to predict edge labels. Specifically, in the r-th iteration, the following operations are performed on the l-th layer of the neural network at time t:
[0144] For each graph node v i There is a client v i Node v is fully responsible for handling all learning tasks on this node. i The feature vector update rule is as follows:
[0145]
[0146] node v i Send to neighbor node v via the Internet j Send a request to get v j Node feature vectors v i After receiving the feature vectors of all neighboring nodes, the feature vector of the node is updated by aggregating the feature vectors of its neighbors. The available aggregation methods include summation, average, and maximum.
[0147] node v iSend a request to the server to obtain the global weights at time t. Global feature transformation matrix and global loss function At least one parameter is specified, where l represents a layer in the distributed federated temporal graph neural network model, and t represents time step. The server utilizes... and Calculate the weight matrix and global weights at time t using at least one parameter or global network parameters from historical time points. That is, learning the temporal effects of a multi-temporal graphical neural network using a weight matrix. Utilizing W... l (t) Perform a linear transformation to obtain node v i The final feature of the lth layer
[0148] Repeat the above steps to calculate the feature vectors of each layer of nodes.
[0149] ② The client node selects important neighbor nodes. When the client aggregates neighbor information, client c i For the node v i Each neighbor node v j ∈N(i) learn a correlation coefficient a ij The updated matrix becomes:
[0150]
[0151] Among them, a ij For node ∈A, a regularization method is used to retain important neighbors while removing a large number of unimportant neighbors, thereby adaptively reducing the number of neighbors per node v. i The number of neighbors reduces client c i The communication volume. In the final loss function, regularization R(A) is applied to make the correlation coefficient of most neighbors approach 0, while the absolute value of the correlation coefficient of a small number of neighbors is much greater than 0, where a ij Let A be the correlation coefficient and A be the correlation coefficient matrix. This represents the feature vector of the node where the client is located. W represents the feature vector of the node where the neighboring client is located. l (t) represents the local feature transformation matrix, and Linear indicates that a linear operation is performed. By adding a regularization operation to the final loss function, the correlation coefficients of most neighbors are reduced to near 0, while the absolute values of the correlation coefficients of a few neighbors are much greater than 0. The regularization method is l1 regularization or l... 2,1Regularization is then applied. The neighbor node set N(i) is updated with the k most relevant neighbors, thus retaining a few important neighbor nodes and removing unimportant ones. This reduces the number of communication messages generated during forward and backward propagation in the distributed graph neural network training process, significantly improving communication efficiency. Simultaneously, the server records the response time of each node completing forward propagation, sorts all clients in descending order, selects the θ nodes with the longest response times for regularization, and notifies these θ nodes to reduce their neighbor count.
[0152] ③ The labels of the predicted edges for client enterprises.
[0153] Client v i Calculate edge e using a fully connected layer ij The predicted values for the labels. The client obtains the global weights of the fully connected layer from the server to predict the edges. Predicted values of computing nodes in Let v be the distance function, representing the distance between nodes v. i With node v j The distance between them can be selected using cosine distance, Euclidean distance, or Mahalanobis distance. The local edge loss is... node v i Local loss at the edge Send to the server.
[0154] ④ The server updates global parameters. The server updates the global weight matrix at time t-1. Calculate the global weight matrix at time t Optionally, the server uses RNN, GRU, LSTM, or Transformer to compute the global weight matrix at time t. Optionally, server S transmits the data via the Internet. Broadcasting to all clients reduces the time clients spend waiting to receive global parameters. In one embodiment, the server calculates the global loss as the sum of the node loss and the edge loss, i.e.
[0155]
[0156] in, Let λ be the edge loss and λ·R(A) be the regularization term.
[0157] ⑤ Initiate backpropagation. After calculating the global loss, the server begins backpropagation. The server is responsible for updating the global parameters and global weights. Global feature transformation matrix and global loss function Global weight Global feature transformation matrix and global loss function The client is responsible for updating local parameters. Preferably, the local parameters updated by the client include the correlation coefficient matrix parameter A.
[0158] (4) Sales forecasting based on the model
[0159] Clients such as retailers, distributors, and manufacturers input local data, which is then used by a distributed graph neural network model to learn the feature vectors of nodes in the next time step, ultimately yielding a predicted value for product sales in the next time step. The predicted value of product sales at the next moment. For node v i Forecast of sales for all products The sum. Preferably, the server or designated client ultimately outputs the predicted value of product sales at the next moment. The specified client is preferably client c. i .
[0160] Through the steps described above, a distributed federated temporal graph neural network model is built based on privacy-preserving data to predict product sales. Distributed training is performed by comprehensively utilizing data from upstream and downstream related enterprises in the target company's value chain, thereby achieving more accurate sales predictions.
[0161] It should be noted that steps not described in detail in this embodiment can be referred to... Figure 1 The descriptions of the relevant steps in the illustrated implementation are not repeated here.
[0162] In the description of this specification, the references to terms such as "some possible implementations," "some implementations," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that implementation or example is included in at least one implementation or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same implementation or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more implementations or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different implementations or examples described in this specification, as well as the features of different implementations or examples.
[0163] The method flowcharts for embodiments of this application describe certain operations as different steps performed in a certain order. Such flowcharts are illustrative and not restrictive. Some steps described herein may be grouped together and performed in a single operation, some steps may be divided into multiple sub-steps, and some steps may be performed in an order different from that shown herein. The various steps shown in the flowcharts may be implemented in any way by any circuit structure and / or tangible mechanism (e.g., software running on a computer device, hardware (e.g., logic functions implemented by a processor or chip), and / or any combination thereof).
[0164] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A training and prediction method for multi-value chain evolution, characterized in that, include: Based on the local raw data of the client and its neighboring clients, a feature vector is generated for the node where the client is located. The feature vector is used to characterize the edge information between the client and the nodes where its neighboring clients are located. The feature vectors and node information of each node where the client is located constitute distributed time series graph data. The client calculates the local network parameters of its current distributed federated temporal graph neural network model based on the feature vector of its node, and sends the local network parameters to the server. The client has a pre-built distributed federated temporal graph neural network model. The server obtains global network parameters based on the local network parameters and broadcasts the global network parameters to all clients; The client updates the network parameters of the distributed federated temporal graph neural network model using the global network parameters, and inputs the distributed temporal graph data of the next time step into the updated distributed federated temporal graph neural network model for learning, and outputs the predicted value of the edge of the next time step.
2. The method according to claim 1, characterized in that, The local network parameters generated by the client include local weights W. E (t-1), Local feature transformation matrix W l (t-1), local loss function L(t-1); The server performs backpropagation based on the local network parameters sent by each client to train a recurrent neural network, thereby obtaining the global network parameters, which include global weights. Global feature transformation matrix and global loss function Where l represents a layer in the distributed federated temporal graph neural network model, and t represents time step.
3. The method according to claim 2, characterized in that, The process of generating the feature vector of the node where the client is located based on the client's and its neighboring clients' local raw data includes: Each client generates a feature vector of the node where the client is located based on the local raw data. The client obtains the feature vectors of its neighboring clients and generates a neighbor list N(i) of neighboring nodes that are willing to participate in the prediction, where i is the index of the node where the client is located.
4. The method according to claim 3, characterized in that, The method further includes: The client updates its feature vector using the following aggregation formula: in, This represents the feature vector of the node where the client is located. The feature vector of the node where the neighboring client is located is represented, where l represents the layer of the distributed federated time sequence graph neural network model, i represents the node number, t represents the time, and the aggregation method includes summation and / or averaging and / or taking the maximum.
5. The method according to claim 4, characterized in that, The server records the response time of each client completing the forward propagation, sorts all clients in descending order, selects the nodes containing the θ clients with the longest response times for regularization, and notifies the θ nodes to reduce the number of neighboring nodes.
6. The method according to claim 5, characterized in that, The method further includes: When the client aggregates the feature vectors of the nodes where its neighboring clients reside, the client learns a correlation coefficient 'a' for the clients of each of its neighboring nodes. ij The feature vector of the client is updated using the following formula: Among them, a ij ∈A, a ij Let R(A) be the correlation coefficient, and A be the correlation coefficient matrix. In the final global loss function, regularization R(A) is used to make the correlation coefficients of most of the neighbor nodes approach 0, while the absolute values of the correlation coefficients of a small number of the neighbors are much greater than 0. Here, i represents the index of the node, and j represents the index of the neighbor node. This represents the feature vector of the node where the client is located. W represents the feature vector of the node where the neighboring client is located. l (t) represents the local feature transformation matrix, and Linear indicates that a linear operation is performed.
7. The method according to claim 6, characterized in that, The method further includes: The regularization R(A) includes l1 regularization. R(A)=∑ i,j |a ij |, and l 2,1 Regularization Wherein, the a ij ∈A, by using regularization to retain important neighbor nodes while removing a large number of unimportant neighbor nodes, the number of neighbor nodes of the θ nodes is adaptively reduced, thereby reducing the communication volume of the client.
8. The method according to claim 7, characterized in that, The client uses local raw data to generate the feature vector of the node where the client is located. Where l represents the layer of the distributed federated temporal graph neural network model, i represents the node number, and t represents the time step; The client establishes a distributed federated temporal graph neural network model based on the feature vectors of the nodes. Calculate local weights W E (t-1), Local feature transformation matrix W l (t-1), the local loss function L(t-1), and the edge e connected to the node. ij eigenvectors of (t-1) The server obtains the local weight W sent by the client. E (t-1), Local feature transformation matrix W L The local loss function L(t-1) is used and backpropagated to obtain the global weights. Global feature transformation matrix and global loss function Each node v i The feature vector is updated, and each client receives the global weights sent by the server. Global feature transformation matrix and global loss function Then, backpropagation is performed to obtain a pre-trained distributed federated temporal graph neural network, where l represents the layer of the distributed federated temporal graph neural network model, i represents the node number, and t represents the time step.
9. The method according to claim 8, characterized in that, The server uses the Adam algorithm to perform backpropagation to obtain global network parameters.
10. The method according to claim 8, characterized in that, The distributed federated temporal graph neural network model includes a feature learning network and a label prediction network. The feature learning network mainly consists of a message passing layer, which is used to calculate graph convolution and graph attention. The label prediction network consists of fully connected layers, which are used to generate edges e. ij Predicted value 11. The method according to claim 10, characterized in that, Calculate edge e using the following formula ij Predicted values: in, The feature vector of the node where the client is located. The feature vector of the node where the neighboring client is located. The updated global weights are defined as follows: l represents the layer of the distributed federated temporal graph neural network model, i represents the index of the node, j represents the index of the node's neighboring nodes, and t represents the time step.
12. The method according to any one of claims 1-11, characterized in that, The global loss function is calculated using the following formula: in, For edge e ij The edge loss function is given by λ·R(A), which is the regularization term, i is the index of the node, j is the index of the neighboring node of the node, and t is the time.
13. The method according to any one of claims 1-11, characterized in that, The local loss function of an edge is calculated using the following formula: in, For the client, the local loss function, For edge e ij The tag, For edge e ij The predicted value is given by i, where i is the index of the node, j is the index of the neighboring node of the node, and t is the time.
14. A training and prediction system for multi-value chain evolution, characterized in that, The system includes: Server-side and multiple clients; The client includes a data acquisition module, a raw data module, a local parameter module, a data annotation module, a message passing module, a local training module, and a blockchain. The data acquisition module is used to collect and record the client's raw data. The raw data module is used to store the client's raw data. The local parameter module is used to store all parameters of the client's local graph neural network. The data annotation module annotates the data for use in training the graph neural network. The message passing module is used to support concurrent communication between the client and the server and to upload information to the blockchain. The local training module is used to perform all calculations of the client, including the calculation of feature vectors, the training and prediction of the client's federated temporal graph neural network, and the blockchain is used to record all communication data between the server and the client. The server includes a metadata module, a parameter database module, a parameter management module, a communication module, a global training module, and a blockchain. The metadata module is used to manage and store metadata. The parameter database module is used to store all parameters of the server's recurrent neural network. The parameter management module is used to manage and update the parameters of the graph neural network. The communication module is used to support concurrent communication between the server and multiple clients' message passing modules and to upload information to the blockchain. The global training module is used to fuse local network parameters sent by multiple clients. The blockchain is used to record all communication data between the server and clients. The server and the client each include at least one processor; And a memory communicatively connected to at least one processor; wherein the memory stores instructions executable by at least one processor, the instructions being executed by at least one processor to enable at least one processor to perform the method as described in any one of claims 1-8.
15. A computer-readable storage medium storing a program that, when executed by a multi-core processor, causes the multi-core processor to perform the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Enterprise operation condition prediction method and device
CN112598256A
Decentralized federated learning method, device and system
CN113645197A