CN-122022501-A - Supply chain prediction and early warning method based on space-time diagram neural network
Abstract
The invention provides a supply chain prediction and early warning method based on a space-time diagram neural network, which comprises the following steps of S1, acquiring multi-source heterogeneous data of the supply chain network, carrying out data cleaning and alignment, constructing a supply chain heterogeneous time sequence diagram, S2, constructing and training an end-to-end space diagram neural network prediction model, S3, constructing a risk early warning module, and based on the prediction value The method comprises the steps of (1) calculating interruption risk indexes of a node level and a network level and generating a hierarchical early warning signal comprising a risk level, a risk source and a treatment suggestion by adopting a t+H, a preset dynamic threshold and a risk propagation dynamics model, and (4) inputting supply chain data into the prediction model in real time by adopting a sliding window mode, dynamically updating a prediction result and an early warning signal and utilizing an online increment learning mechanism.
Inventors
- LI WEISHI
- CHENG JIANGYAN
- Wei Hongmao
- LIU XINGZE
Assignees
- 福建信息职业技术学院
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1. A supply chain prediction and early warning method based on a space-time diagram neural network is characterized by comprising the following steps of S1, acquiring multi-source heterogeneous data of the supply chain network, performing data cleaning and alignment, constructing a supply chain heterogeneous time sequence diagram, S2, constructing and training an end-to-end space diagram neural network prediction model, wherein the space-time diagram neural network prediction model comprises: The spatial feature extraction module adopts a multi-head graph attention network based on relation perception to allocate independent attention mechanisms for different types of node-edge combinations so as to capture high-order structure dependence and semantic information in a supply chain heterogeneous network; the time feature extraction module adopts a time convolution network based on a gate-controlled expansion causal convolution network, enlarges the perception field of view by stacking causal convolution layers with exponentially increased expansion rate, and combines a gate-controlled linear unit to control time sequence information flow so as to capture the long-term and short-term time evolution law of the state of a supply chain; The space-time feature fusion module adopts a multi-head cross attention mechanism, takes space features as a query matrix, takes time features as a key matrix and a value matrix, carries out deep interactive fusion, and outputs fusion features through residual connection and layer normalization; the forecast output module outputs the forecast values of the supply chain key performance indexes of H time steps in the future through a multi-step forecast composed of all connection layers S3, constructing a risk early warning module based on the predicted value And S4, inputting supply chain data into the prediction model in real time by adopting a sliding window mode, dynamically updating a prediction result and an early warning signal, and carrying out fine adjustment on model parameters according to newly arrived feedback data by utilizing an online increment learning mechanism.
- 2. The method of claim 1, wherein the supply chain heterogeneous timing diagram in the step S1 is defined as G_t= (V, E, X_t, A_t), wherein V is a node set including a plurality of types of suppliers, manufacturers, distributors, and logistics service providers, E is an edge set representing a transaction, transportation or information transfer relationship among the nodes, X_t εR (N X F) is an F-dimensional feature matrix of all N nodes at time t, A_t εR (N X N) is a weighted adjacency matrix at time t, and element values thereof are dynamically calculated based on transaction frequency, transportation duration or cooperation strength.
- 3. A supply chain prediction and early warning method based on a space-time diagram neural network according to claim 1 is characterized in that a spatial feature extraction module in the step S2 specifically comprises a type mapping layer, a relational awareness attention layer, a learning weight matrix for each element path or relation type r, wherein the independent calculation node i and the neighbor j of the node i are in a hidden state by a special type of learnable linear transformation, e_ { ij } r= LeakyReLU ((a_ r) } T [ W_ { src } { tau (i) } h_i|W_ { dst } { tau (j) } h_ j|W_ r e _ ij in a relation, and a { j } is a relation between the node i { j } and the inner side of the node { j } is a relation, and a { j } is a relation between the node i_ and the node i { j } is a relation, and a { j } is a relation between the node i_ is a relation between { j } and a { j } is a relation between the node j } and a { j } is a relation between the inner side of a { j }, the final spatial feature representation h_i { spatial }, is obtained.
- 4. The supply chain prediction and early warning method based on a space-time diagram neural network of claim 1, wherein the time feature extraction module in the step S2 specifically comprises a sequence embedding layer, a gating expansion causal convolution layer, a first layer and a second layer, wherein the sequence embedding layer carries out channel transformation on an input node feature sequence XE R (NxT X F) through 1X1 convolution and adds a leachable position code to reserve time sequence information, the gating expansion causal convolution layer is formed by stacking L residual blocks, each residual block comprises two parallel expansion causal convolution operations, one is used for outputting a main feature, the other is used as gating, the input of the first layer is z { L-1}, the expansion factor is d_l, and the output z L of the layer is calculated as z { L-1} W_f { l+b_f } L Sigma (z { l-1}, w_gl+b_gl) +z { l-1}, where x represents a causal convolution with an expansion factor d_l, W f and W g are convolution kernel weights, For the multiplication on an element-by-element basis, And the output layer outputs the last residual block through a full-connection layer or a global average pooling layer to obtain a compressed time characteristic representation h_i { temporal }.
- 5. The supply chain prediction and early warning method based on the space-time diagram neural network of claim 1, wherein the space-time feature fusion module in the step S2 comprises a multi-headed cross Attention layer, wherein d_k is the dimension of a key vector, then the outputs of a plurality of heads are spliced and linearly transformed to obtain cross Attention features, the self-adaptive gate fusion layer, the fusion weight g=sigma ([ H_s| ] H_t ] W_g+b_g) and the final fusion feature H_f=g_H_cross (1-H_cross) are calculated by mapping the space features H_s to the query matrix Q=H_ S W _Q, the value matrix V=H_ T W _V, and the final fusion feature H_f=g_h_cross (Q_i, K_i, V_i) =softmax ((Q_ i K _i)/[ d_k), wherein d_k is the dimension of the key vector, and then the outputs of a plurality of heads are spliced and linearly transformed to obtain the cross Attention features, and the self-adaptive gate fusion layer, the fusion feature g=sigma ([ H_s|H_t ] W_g+b_g), and the final fusion feature H_f=g_g (H_f+h_g) are calculated by multiplying the two elements, and the two elements are connected by the whole-time-space-time diagram neural network, and the whole time diagram neural network, and the supply chain prediction and early warning method based on the space-time diagram.
- 6. The supply chain prediction and early warning method based on a space-time diagram neural network of claim 1, wherein the risk early warning module in the step S3 specifically comprises a dynamic threshold generation sub-module, a node risk index calculation sub-module, a prediction threshold upper limit theta_i≡u (t) and a lower limit theta_i≡l (t) of each index of each node by adopting an exponential weighted moving average method based on a historical prediction residual error and a real-time data stream The risk propagation and tracing sub-module constructs a directed weighted risk propagation graph, wherein the node weight is r_i (t), the edge weight is an interaction coefficient between supply chain nodes, a propagation path and an influence range of risks in the network are simulated through a graph rolling network or a random walk algorithm, the most possible 'risk source' node is traced reversely, the calculated network level risk index R (t) and the identified risk source information are mapped into four levels of 'attention, prompt, warning and alarm', and a decision suggestion comprising specific treatment steps is generated according to a preset rule base.
- 7. The supply chain prediction and early warning method based on the space-time diagram neural network of claim 1, wherein the online incremental learning mechanism in the step S4 specifically comprises the following steps: Step S41, real-time data stream processing and sample construction, wherein the system is continuously connected with a real-time data stream from a multi-source sensor, and a node characteristic matrix X_t and an adjacent matrix A_t at the current moment t are formed through the same data cleaning and characteristic engineering flow as in the step S1; S42, a prediction and early warning service inputs the current sliding window data into a deployed space-time diagram neural network prediction model to obtain a future H-step predicted value The risk early warning module generates a real-time early warning signal; step S43, updating trigger condition judgment, including timing trigger and performance trigger; Step S44, online increment updating algorithm; And step S45, model version management and rollback, wherein after each increment is updated, a new model version is generated and the performance index is recorded, and if the performance of the new version on the verification set is obviously reduced, the system automatically rolls back to the previous stable version and triggers an alarm to prompt manual intervention to check data or update a strategy.
- 8. The supply chain prediction and early warning method based on the space-time diagram neural network of claim 7, wherein the step S41 is further specifically characterized in that a sliding window with the length of T is adopted, the latest T time step data { X_ { T-T+1}, the number of the latest T time step data { X_ T } and the corresponding future H step real labels Y_ { t+1:t+H } form an online training sample (X_ { T-T+1:t }, A_ { T-T+1:t }, Y_ { t+1:t+H }), and the online training sample is stored in an experience playback pool D, and the experience playback pool adopts a first-in first-out strategy, the capacity of which is fixed as M, so that the most representative sample in the near term is ensured to be stored.
- 9. The supply chain prediction and early warning method based on the space-time diagram neural network of claim 8, wherein the step S44 further comprises the following incremental learning process when the trigger condition is satisfied: sampling, namely randomly sampling a sample set D_batch with a batch size of B from an experience playback pool D, wherein a sampling strategy takes the recent sample and a history representative sample into consideration, for example, priority experience playback is adopted, and higher sampling weight is given according to the prediction error of the sample; calculating joint loss, wherein the loss function is formed by weighting two parts: New data fitting loss computing model predictions on D_batch The Huber loss L_new with the true value Y ensures that the model fits the new data distribution; Knowledge distillation loss-introducing distillation loss for preserving old knowledge, approximating the output of the current student model on the old sample to the output of the teacher model before updating, specifically, calculating the prediction of the teacher model simultaneously in a sample batch Teteacher then calculates the student model predictions The mean square error or KL divergence between the student and the teacher prediction is used as a distillation loss L_ distill, the total loss is L=L_new+lambda which is L_ distill, wherein lambda is a balance coefficient and can be dynamically adjusted according to the new data quantity and the importance of old knowledge; Gradient calculation and parameter updating, namely calculating a gradient based on total loss L by using an Adam optimizer, and performing one-step or multi-step gradient descent updating on model parameters theta; And soft updating of the teacher model, namely updating the parameters of the teacher model by adopting an index moving average method at regular intervals in order to prevent the teacher model from being outdated, wherein θ_teacher=α+θ_teacher+ (1- α) θ_student, and α is an attenuation factor close to 1.
- 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-9.
Description
Supply chain prediction and early warning method based on space-time diagram neural network Technical Field The application relates to a supply chain prediction and early warning technology, in particular to a supply chain prediction and early warning method based on a space-time diagram neural network. Background Supply chain networks are complex heterogeneous systems composed of multiple types of entities, such as suppliers, manufacturers, distributors, retailers, and the like, where the entities form close dependencies by the flow of materials, funds, and information. With the increase of economic globalization and market dynamics, the network structure of the supply chain is increasingly complex, the risk of interruption is frequent, and the accurate prediction and early warning of the supply chain are provided with serious challenges. The existing supply chain prediction method mainly comprises two types, namely a statistical method based on time sequence analysis, such as ARIMA, exponential smoothing and the like, only focuses on the historical data change of a single node, and cannot model the interaction among nodes in a supply chain network, and the other type comprises a prediction method based on machine learning, such as a cyclic neural network and a long-term and short-term memory network, wherein the time dependency can be captured, but the supply chain node is regarded as an independent individual, and the restriction relation of a network topological structure on the node state is hard to characterize. In recent years, the graph neural network has advantages in the field of relational modeling, but the prior scheme still has the defects that (1) most methods only consider network structures and ignore time characteristics of dynamic evolution of a supply chain, (2) a fusion mechanism of node characteristics and edge characteristics is single and is difficult to cope with complexity of a heterogeneous supply chain network, (3) early warning capability of potential interruption risks is lacking, and a prediction result cannot be converted into executable decision support. Disclosure of Invention In order to overcome the problems, the invention aims to provide a supply chain prediction and early warning method based on a space-time diagram neural network, which can capture a dynamic topological structure and a time evolution rule of a supply chain network at the same time and realize accurate prediction and real-time risk early warning. The supply chain prediction and early warning method based on the space-time diagram neural network comprises the following steps of S1, obtaining multi-source heterogeneous data of the supply chain network, carrying out data cleaning and alignment, and constructing a supply chain heterogeneous timing diagram, S2, constructing and training an end-to-end space-time diagram neural network prediction model, wherein the space-time diagram neural network prediction model comprises the following steps: The spatial feature extraction module adopts a multi-head graph attention network based on relation perception to allocate independent attention mechanisms for different types of node-edge combinations so as to capture high-order structure dependence and semantic information in a supply chain heterogeneous network; the time feature extraction module adopts a time convolution network based on a gate-controlled expansion causal convolution network, enlarges the perception field of view by stacking causal convolution layers with exponentially increased expansion rate, and combines a gate-controlled linear unit to control time sequence information flow so as to capture the long-term and short-term time evolution law of the state of a supply chain; The space-time feature fusion module adopts a multi-head cross attention mechanism, takes space features as a query matrix, takes time features as a key matrix and a value matrix, carries out deep interactive fusion, and outputs fusion features through residual connection and layer normalization; the forecast output module outputs the forecast values of the supply chain key performance indexes of H time steps in the future through a multi-step forecast composed of all connection layers S3, constructing a risk early warning module based on the predicted valueAnd S4, inputting supply chain data into the prediction model in real time by adopting a sliding window mode, dynamically updating a prediction result and an early warning signal, and carrying out fine adjustment on model parameters according to newly arrived feedback data by utilizing an online increment learning mechanism. Further, the supply chain heterogeneous timing diagram in the step S1 is defined as g_t= (V, E, x_t, a_t), where V is a set of nodes including multiple types of suppliers, manufacturers, distributors, and logistics service providers, E is a set of edges representing transaction, transportation, or information transfer relationships between nodes, x_t E R (n