Agricultural product quality abnormity propagation path prediction system and method based on graph neural network
By applying a prediction system of graph neural network and attention mechanism in the agricultural product supply chain, the problem of difficulty in accurately predicting the abnormal propagation path of agricultural product quality in the existing technology is solved, efficient anomaly prediction and real-time response are achieved, and the supply chain is significantly improved quality management efficiency.
Patent Information
- Application Number
- CN202411589546.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
AI Technical Summary
It is difficult for the existing technology to accurately track and predict the spread path of agricultural product quality abnormalities in the supply chain, resulting in lagging response measures and difficulty in curbing the spread of problems in a timely manner.
Adopt the agricultural product quality abnormality propagation path prediction system based on graph neural network, and build a graph structure between supply chain nodes, use graph neural network and attention mechanism to model the quality abnormality propagation mode between nodes, and monitor and dynamically adjust edge weights in real time. To optimize the prediction path.
Accurate prediction and real-time adjustment of the abnormal propagation path of agricultural product quality have been achieved, adaptability and accuracy of prediction of abnormal propagation paths have been improved, abnormal response time has been shortened, and abnormal spread risk has been reduced.
Smart Images

Figure CN119476669A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural products, and in particular to a system and method for predicting the propagation path of abnormal agricultural product quality based on a graph neural network. Background Art
[0002] In the existing technology, the tracking and prediction of the propagation path of agricultural product quality anomalies mainly rely on traditional data analysis methods and statistical models. Traditional methods usually use rule-based or simple regression analysis to statically monitor the quality of agricultural products at each node in the supply chain and detect anomalies. However, agricultural products go through multiple links in the process from production, transportation, storage to distribution. The supply chain network is complex and the relationships between nodes are diverse. Traditional methods are difficult to adapt to the needs of quality anomaly propagation path analysis in such a complex system. When anomalies are transmitted in the supply chain, the mutual influence between different nodes will accelerate the spread of quality problems. Traditional monitoring methods are difficult to accurately track the specific path of anomaly propagation and often need to wait until the problem is exposed at the downstream node before it can be detected.
[0003] At present, common anomaly propagation detection methods usually only focus on the abnormal state of a single node, and have weak prediction capabilities for the interactions between multiple nodes and the abnormal propagation paths. Traditional statistical methods mainly rely on linear models and lack the ability to model the complex relationships between multiple nodes. Therefore, it is difficult to effectively predict the possible paths of anomalies in the supply chain. The existing technology for identifying node quality anomalies mostly uses static features and cannot combine real-time data for dynamic detection and early warning of anomalies, resulting in delayed response measures and difficulty in timely curbing the spread of problems. Supply chain managers find it difficult to identify risk nodes in a timely manner and can only respond passively, missing the opportunity to actively warn and control the spread of anomalies, resulting in low efficiency in the overall quality management of the agricultural product supply chain.
[0004] In addition, most of the existing anomaly detection methods lack accuracy and effectiveness in identifying risk nodes, and fail to optimize and adjust the anomaly propagation path under the background of dynamic changes in node weights. With the dynamic changes of the supply chain, the anomaly propagation path and risk node location will also change. The existing technology lacks a mechanism for adaptively updating the relationship between nodes, and it is difficult to perform real-time optimization based on multiple factors such as the propagation speed, path length and severity of the anomaly. This leads to the defects of delayed response and waste of resources in the process of quality anomaly propagation in the agricultural product supply chain. When it is necessary to accurately identify high-risk nodes, the recognition accuracy and timeliness of traditional methods are difficult to meet actual needs. Summary of the invention
[0005] One object of the present invention is to propose a system and method for predicting the propagation path of abnormal quality of agricultural products based on graph neural network. The present invention realizes the accurate prediction and real-time adjustment of the propagation path of abnormal quality in the agricultural product supply chain network.
[0006] A method for predicting the propagation path of abnormal agricultural product quality based on a graph neural network according to an embodiment of the present invention comprises the following steps:
[0007] S1. Collect quality data sets of production nodes, transportation nodes, storage nodes and distribution nodes in the agricultural product supply chain;
[0008] S2. Preprocess the collected quality data set to form a feature vector for graph neural network input;
[0009] S3. Construct a prediction model for the propagation path of quality anomalies in the agricultural product supply chain based on graph neural networks. The prediction model for the propagation path of anomalies builds a graph structure based on each node in the supply chain. The nodes represent different links in the supply chain, and the edges represent the relationship between the nodes. Each edge has an initial weight.
[0010] S4, by inputting the preprocessed historical quality data set into the abnormal propagation path prediction model, the abnormal propagation path prediction model is trained to learn the quality abnormality propagation mode between nodes in the agricultural product supply chain, and the propagation path and edge weight between nodes are preliminarily established;
[0011] S5. During the operation of the supply chain, the quality status of each node is monitored in real time. When a quality anomaly is detected at a node, the propagation path of the quality anomaly is predicted based on the anomaly propagation path prediction model;
[0012] S6, dynamically update the weights of the edges in the graph based on the edge weight adaptive adjustment mechanism;
[0013] S7. According to the adaptively adjusted edge weights, the abnormal propagation path prediction model recalculates the optimal propagation path of the quality anomaly and generates a predicted path;
[0014] S8. Identify potential risk nodes based on the recalculated abnormal propagation path, and send warning information to relevant managers to prompt that the risk nodes need to be checked or processed;
[0015] S9. After identifying the risk nodes, the system updates the abnormal propagation path prediction model through real-time data and optimizes the edge weights after adaptive adjustment.
[0016] Optionally, S1 includes the following sub-steps:
[0017] S11, obtaining the original quality data set D of each node in the agricultural product supply chain, the nodes including the production node N p , transport node N t 、Storage Node N s and distribution node N d ;
[0018] S12: Classify and label the nodes of the original quality data set D to construct a quality data feature matrix X N ,Each row of the quality data feature matrix corresponds to a node, and each column in the quality data feature matrix represents a quality index Q. The quality index includes the physical properties, chemical composition and environmental factors of agricultural products;
[0019] S14. Define the time series feature matrix T N ,The time series feature matrix records the quality change information of each node at different time points. Each row in the time series feature matrix represents the quality status of a node at a specific time point, and the time point t represents the time step in the supply chain operation;
[0020] S15. Establish a node association matrix A based on node relationships and time series information, where the elements Represents the relationship between node i and node j. If there is a direct mass propagation path between node i and node j, then otherwise,
[0021] S16. Form an overall quality data set of the agricultural product supply chain based on S11-S15:
[0022] D N ={X N ,T N ,A}.
[0023] Optionally, S2 includes the following sub-steps:
[0024] S21, the collected quality data set D N Perform data denoising and use the mean filtering method to remove noise interference to obtain the denoised quality data set D';
[0025] S22, standardize the denoised quality data set D', normalize each quality indicator to the range of [0,1], and obtain a standardized quality data set D".
[0026] S23, extracting features from the standardized quality data set D”, extracting key quality features of each node, including physical property feature vectors, chemical composition feature vectors, and environmental factor feature vectors, and finally forming a feature vector F for graph neural network input;
[0027] S24. Uniformly encode the feature vector F. The encoded feature vector is represented as F'. Each feature vector is represented by a vector of fixed length.
[0028] Optionally, S3 includes the following sub-steps:
[0029] S31. Construct a graph structure of the agricultural product supply chain. The graph structure of the agricultural product supply chain reflects the propagation path of quality anomalies between nodes based on the physical circulation relationship in the supply chain:
[0030] G = (N, E);
[0031] Where N = {N p ,N t ,N s ,N d} represents the node set in the supply chain, which are production nodes, transportation nodes, storage nodes and distribution nodes. E represents the edge set between nodes. ij ∈E represents the direct interaction relationship between node i and node j in the supply chain;
[0032] Construct the adjacency matrix A of the graph structure G of the agricultural product supply chain. Each element A of the adjacency matrix ij Represents the relationship between nodes i and j:
[0033]
[0034] S32, for each edge e in the graph structure G of the agricultural product supply chain ij Set the initial weight w ij , the initial weight is based on the historical interaction frequency f between nodes ij , transportation time t ij and the degree of quality fluctuation v ij Determine, the initial weight w ij Calculated as:
[0035]
[0036] Among them, α1, β1 and γ1 are weight coefficients, which are used to adjust the proportion of interaction frequency, transportation time and quality fluctuation in the initial weight, f ij represents the historical interaction frequency between node i and node j, reflecting the circulation frequency of agricultural products between these two nodes, t ij represents the average transportation time between node i and node j, v ij It represents the degree of influence of node i on the quality fluctuation of node j, and quantifies the potential impact of the quality anomaly of node i on node j;
[0037] S33, graph structure G and weight w of agricultural product supply chain constructed based on ij An abnormal propagation path prediction model is established. The abnormal propagation path prediction model uses a graph neural network designed for optimizing the abnormal propagation path of agricultural product quality:
[0038]
[0039] Among them, H (l) is the node feature matrix of the lth layer, and the initial layer H (0) =F ′ , that is, the encoded feature vector, is the weighted adjacency matrix with self-connection, the element A of A ij =w ij , I is the identity matrix, for The degree matrix of W (l) is the weight matrix of the lth layer, σ is the activation function;
[0040] The attention mechanism is introduced to dynamically adjust the importance of neighbor nodes. The attention coefficient is calculated as follows:
[0041]
[0042] Among them, e ij is the attention energy between node i and node j, which measures the influence of node j on node i. a is a trainable attention weight vector. and are the feature vectors of node i and node j at layer l, respectively, ∥ represents the connection operation of the vector, α ij is the normalized attention coefficient, which indicates the contribution of node j when updating the features of node i;
[0043] The update formula of node features is:
[0044]
[0045] S34, initialize the parameters of the abnormal propagation path prediction model, and use the Xavier method to initialize the weight matrix W of each layer (l) , the attention weight vector a is randomly initialized to a small value, and the bias term is initialized to zero or a small random value.
[0046] Optionally, S5 includes the following sub-steps:
[0047] S51. Collect the quality status data of each node in real time during the supply chain operation process, and build each node N i The state vector S i , the state vector includes the real-time quality indicator data Q of the node i (t), that is, the quality status of node i at time point t:
[0048]
[0049] in, represents the physical attribute state of node i, Indicates the chemical composition state, Indicates the state of environmental factors;
[0050] S52, for node N i The real-time state vector S i (t) Perform quality anomaly detection. The detection method calculates the current state vector and the historical normal state vector The difference between the two can be used to determine whether there is quality abnormality;
[0051] S53, when node N is detected i When there is a quality anomaly, the feature vector H of node i is used based on the anomaly propagation path prediction model. i and the weight information w of its adjacent nodes ij Calculate the probability of the anomaly propagating to downstream nodes:
[0052]
[0053] Among them, P ij is the probability of quality anomaly propagating from node i to node j, α ij is the attention coefficient of node j to node i, W (l) and are the weight matrix of the abnormal propagation path prediction model and the feature vector of node j in the lth layer respectively;
[0054] S54, according to the propagation probability P ij Calculate the priority of the abnormal propagation path, priority R ij Based on the propagation probability between nodes and the path length, a weighted calculation is performed to determine the path where quality anomalies are preferentially propagated:
[0055]
[0056] Among them, L ij It represents the path length from node i to node j, which is used to suppress the impact of long paths on anomaly propagation.
[0057] Optionally, S6 includes the following sub-steps:
[0058] S61, dynamically update the weights of the edges in the anomaly propagation path prediction model based on the anomaly propagation speed, and calculate the anomaly from the upstream node N i Propagate to downstream node N j The propagation speed V ij :
[0059]
[0060] Among them, d ij Indicates the upstream node N iWith downstream node N j The physical distance between the upstream nodes N and i Transport to downstream node N j The actual path length traversed; Δt ij Indicates that the exception is from the upstream node N i Passed to downstream node N j The time required reflects the propagation delay of the anomaly between nodes; λ1 is the propagation speed adjustment coefficient, which is used to adjust the influence of the propagation speed on the edge weight;
[0061] Propagation speed V ij The larger it is, the faster the anomaly propagates between nodes, and the weight of the edge should be larger to highlight the fast-propagating anomaly path;
[0062] S62, dynamically adjust the weight of the edge in the abnormal propagation path prediction model based on the path length, and calculate the edge e ij The path length weight
[0063]
[0064] Among them, w ij is the initial edge weight, reflecting the upstream node N i With downstream node N j The initial correlation between ij is the upstream node N i To downstream node N j The path length indicates that the anomaly starts from the upstream node N i Propagate to downstream node N j The number of steps of the shortest path; η1 is the path length attenuation coefficient, which is used to adjust the impact of path length on edge weight; path length L ij The shorter, The larger it is, the edges with shorter transmission paths are given priority;
[0065] S63, dynamically adjust the weight of the edge based on the severity of the anomaly, and calculate the impact of the anomaly on the downstream node N j The impact of S ij :
[0066]
[0067] Among them, ΔQ j Represents the downstream node N j The abnormal change of the quality index reflects the impact of the abnormality on the downstream node N j The degree of impact of quality status; is the downstream node N jThe quality index reference value under normal conditions; ω is the abnormal severity adjustment coefficient, which is used to adjust the impact of abnormal severity on edge weight; Indicates the upstream node N i With downstream node N j The quality correlation between them quantifies the correlation strength of anomaly propagation between nodes;
[0068] Abnormal severity S ij The weight of the higher edge should be greater, highlighting the abnormal propagation path that has a greater impact on the overall quality of the supply chain;
[0069] S64. Comprehensively consider the anomaly propagation speed, path length weight and anomaly severity, and adaptively adjust the edge weight. The edge weight W of the anomaly propagation path prediction model is updated. ij Calculated as:
[0070]
[0071] Among them, α2, β2, and γ2 are weight coefficients, which are used to balance the influence of anomaly propagation speed, path length, and anomaly severity in edge weight updating.
[0072] Optionally, S7 includes the following sub-steps:
[0073] S71, based on the adaptively adjusted edge weight W ij , the abnormal propagation path prediction model is used to recalculate the optimal propagation path of quality anomalies, and the Bellman-Ford algorithm is used to determine the optimal propagation path from the abnormal source node N s To the target node N d The shortest weighted path, the best propagation path P sd The total weight is calculated as:
[0074]
[0075] Among them, P sd Indicates that from the abnormal source node N s To the target node N d The total weight of the propagation path;
[0076] S72, based on the recalculated optimal propagation path P sd Identify potential risk node set R, risk node N r ∈R is a node on the abnormal propagation path with high propagation probability and closely related to the downstream node, and the risk probability R i for:
[0077]
[0078] Among them, P ijis the probability of quality anomaly propagating from node i to node j, d ij is the physical distance between node i and node j, δ2 is the distance attenuation coefficient, which is used to adjust the impact of distance on the propagation probability in risk node identification. The risk probability R i Nodes above the threshold are potential risk nodes that should be given priority attention;
[0079] S73, generate warning information based on the identified risk node set R to construct a warning matrix M, where M ij =1 indicates that there is a high risk of abnormal propagation between nodes i and j:
[0080]
[0081] Among them, Alert ij Indicates sending an early warning signal from node i to node j, θ r is the risk probability threshold, θ p is the propagation probability threshold, and nodes that meet the warning conditions will be added to the warning matrix;
[0082] S74. Notify the generated warning matrix M and the corresponding risk node set R to the relevant managers, and check or process the risk nodes.
[0083] A prediction system for the propagation path of abnormal agricultural product quality based on graph neural network, including the following modules:
[0084] The data collection module is used to collect the quality status data of each node in the agricultural product supply chain in real time, including the physical properties, chemical composition and environmental factors of the production nodes, transportation nodes, storage nodes and distribution nodes, to form a node quality data set;
[0085] The data preprocessing module is used to denoise, standardize and extract features from the quality data set obtained by the data acquisition module, obtain the denoised quality data and feature vectors for graph neural network input, and generate time series feature matrix and correlation matrix;
[0086] The model building module is used to build an abnormal propagation path prediction model based on a graph neural network. The abnormal propagation path prediction model uses each node in the supply chain as a node of the graph structure, and the relationship between nodes as an edge. The initial weight of the edge is determined by the interaction frequency between nodes, transportation time, and the degree of influence of quality fluctuations;
[0087] The model training module is used to input the preprocessed feature vector, time series feature matrix and correlation matrix into the abnormal propagation path prediction model, train the abnormal propagation path prediction model, learn the propagation mode of agricultural product quality abnormalities between nodes in the supply chain, and generate a trained abnormal propagation path prediction model;
[0088] The real-time monitoring module is used to monitor the quality status of each node in real time during the operation of the supply chain. When a quality abnormality is detected at a certain node, the abnormal propagation path prediction model is called to make a real-time prediction of the abnormal propagation path and recalculate the propagation path based on the adaptively adjusted edge weights.
[0089] The risk node identification module is used to identify high-risk nodes according to the output of the abnormal propagation path prediction model and generate warning information. The identified high-risk nodes are nodes with a high propagation probability on the abnormal propagation path, and a warning matrix is generated;
[0090] The early warning notification module is used to send the early warning information generated by the risk node identification module to relevant supply chain managers, prompting potential risk nodes that need to be inspected or processed to prevent further spread of quality anomalies in the supply chain.
[0091] The beneficial effects of the present invention are:
[0092] (1) The present invention adaptively and dynamically adjusts edge weights based on anomaly propagation speed, path length, and anomaly severity factors, so that the model can reflect changes in the relationship between nodes in real time. On the basis of traditional static edge weights, the present invention introduces a weight adjustment mechanism to dynamically optimize edge weights according to actual propagation speed, path distance, and the degree of impact of anomalies on the overall quality of the supply chain during the prediction process, thereby improving the adaptability to anomaly propagation paths and the accuracy of prediction. Compared with the traditional fixed-weight model, the dynamic adjustment mechanism of the present invention significantly improves the accuracy of anomaly propagation paths, and the accuracy of propagation path identification is increased by more than 15% compared to the traditional model.
[0093] (2) The present invention uses a graph neural network and combines it with an attention mechanism to perform multi-layer nested modeling on the complex associations between nodes in the supply chain network, and performs weighted processing on the abnormal propagation paths of adjacent nodes. By automatically adjusting the influence of adjacent nodes through the attention mechanism, the present invention can give priority to key nodes and more accurately identify high-risk nodes. Traditional methods cannot flexibly capture the importance of different nodes when processing node associations in complex networks. The present invention processes the contribution of different nodes through dynamic weighting, effectively focusing on nodes that have a significant impact on quality anomalies, and improving the risk identification efficiency of the overall model.
[0094] (3) The present invention can timely identify and predict the propagation path of quality anomalies during the operation of the supply chain by introducing real-time monitoring data input and dynamic propagation path calculation. Whenever a node detects a quality anomaly, the model automatically recalculates the optimal propagation path and generates early warning information to ensure that managers can obtain risk warnings in a timely manner before the problem spreads to other nodes. Compared with traditional static detection methods that require post-processing, the dynamic prediction and real-time early warning mechanism of the present invention greatly shortens the abnormality response time. Experiments have shown that compared with existing static detection methods, the abnormality processing time of the present invention is shortened by more than 30%, providing supply chain managers with a faster response method and effectively reducing the risk of abnormality spread. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0096] Figure 1 This is a flow chart of a system and method for predicting the propagation path of abnormal agricultural product quality based on graph neural network proposed by the present invention. DETAILED DESCRIPTION
[0097] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0098] refer to Figure 1 , a method for predicting the propagation path of abnormal agricultural product quality based on graph neural network, comprising the following steps:
[0099] S1. Collect quality data sets of production nodes, transportation nodes, storage nodes and distribution nodes in the agricultural product supply chain;
[0100] S2. Preprocess the collected quality data set to form a feature vector for graph neural network input;
[0101] S3. Construct a prediction model for the propagation path of quality anomalies in the agricultural product supply chain based on graph neural networks. The prediction model for the propagation path of anomalies builds a graph structure based on each node in the supply chain. The nodes represent different links in the supply chain, and the edges represent the relationship between the nodes. Each edge has an initial weight.
[0102] S4, by inputting the preprocessed historical quality data set into the abnormal propagation path prediction model, the abnormal propagation path prediction model is trained to learn the quality abnormality propagation mode between nodes in the agricultural product supply chain, and the propagation path and edge weight between nodes are preliminarily established;
[0103] S5. During the operation of the supply chain, the quality status of each node is monitored in real time. When a quality anomaly is detected at a node, the propagation path of the quality anomaly is predicted based on the anomaly propagation path prediction model;
[0104] S6, dynamically update the weights of the edges in the graph based on the edge weight adaptive adjustment mechanism;
[0105] S7. According to the adaptively adjusted edge weights, the abnormal propagation path prediction model recalculates the optimal propagation path of the quality anomaly and generates a predicted path;
[0106] S8. Identify potential risk nodes based on the recalculated abnormal propagation path, and send warning information to relevant managers to prompt that the risk nodes need to be checked or processed;
[0107] S9. After identifying the risk nodes, the system updates the abnormal propagation path prediction model through real-time data and optimizes the edge weights after adaptive adjustment.
[0108] In this implementation, S1 includes the following sub-steps:
[0109] S11. Obtain the original quality data set D of each node in the agricultural product supply chain, including production node N p , transport node N t 、Storage Node N s and distribution node N d ;
[0110] S12. Classify and label the nodes of the original quality data set D and construct the quality data feature matrix X N ,Each row of the quality data feature matrix corresponds to a node, and each column in the quality data feature matrix represents a quality index Q. The quality index includes the physical properties, chemical composition and environmental factors of agricultural products;
[0111] S14. Define the time series feature matrix T N ,The time series feature matrix records the quality change information of each node at different time points. Each row in the time series feature matrix represents the quality status of a node at a specific time point, and the time point t represents the time step in the supply chain operation;
[0112] S15. Establish a node association matrix A based on node relationships and time series information, where the elements Represents the relationship between node i and node j. If there is a direct mass propagation path between node i and node j, then otherwise,
[0113] S16. Form an overall quality data set of the agricultural product supply chain based on S11-S15:
[0114] D N ={X N ,T N ,A}.
[0115] In this implementation, S2 includes the following sub-steps:
[0116] S21, the collected quality data set D N Perform data denoising and use the mean filtering method to remove noise interference to obtain the denoised quality data set D';
[0117] S22, standardize the denoised quality data set D', normalize each quality indicator to the range of [0,1], and obtain a standardized quality data set D".
[0118] S23, extracting features from the standardized quality data set D”, extracting key quality features of each node, including physical property feature vectors, chemical composition feature vectors, and environmental factor feature vectors, and finally forming a feature vector F for graph neural network input;
[0119] S24. Uniformly encode the feature vector F. The encoded feature vector is represented as F'. Each feature vector is represented by a vector of fixed length.
[0120] In this implementation, S3 includes the following sub-steps:
[0121] S31. Construct a graph structure of the agricultural product supply chain. The graph structure of the agricultural product supply chain reflects the propagation path of quality anomalies between nodes based on the physical circulation relationship in the supply chain:
[0122] G = (N, E);
[0123] Where N = {N p ,N t ,N s ,N d} represents the node set in the supply chain, which are production nodes, transportation nodes, storage nodes and distribution nodes. E represents the edge set between nodes. ij ∈E represents the direct interaction relationship between node i and node j in the supply chain;
[0124] Construct the adjacency matrix A of the graph structure G of the agricultural product supply chain. Each element A of the adjacency matrix ij Represents the relationship between nodes i and j:
[0125]
[0126] S32, for each edge e in the graph structure G of the agricultural product supply chain ij Set the initial weight w ij , the initial weight is based on the historical interaction frequency f between nodes ij , transportation time t ij and the degree of quality fluctuation v ij Determine, the initial weight w ij Calculated as:
[0127]
[0128] Among them, α1, β1 and γ1 are weight coefficients, which are used to adjust the proportion of interaction frequency, transportation time and quality fluctuation in the initial weight, f ij represents the historical interaction frequency between node i and node j, reflecting the circulation frequency of agricultural products between these two nodes, t ij represents the average transportation time between node i and node j, v ij It represents the degree of influence of node i on the quality fluctuation of node j, and quantifies the potential impact of the quality anomaly of node i on node j;
[0129] S33, graph structure G and weight w of agricultural product supply chain constructed based on ij An abnormal propagation path prediction model is established. The abnormal propagation path prediction model uses a graph neural network designed for optimizing the abnormal propagation path of agricultural product quality:
[0130]
[0131] Among them, H (l) is the node feature matrix of the lth layer, and the initial layer H (0) =F ′ , that is, the encoded feature vector, is the weighted adjacency matrix with self-connection, the element A of A ij =w ij , I is the identity matrix, for The degree matrix of W (l) is the weight matrix of the lth layer, σ is the activation function;
[0132] The attention mechanism is introduced to dynamically adjust the importance of neighbor nodes. The attention coefficient is calculated as follows:
[0133]
[0134] Among them, e ij is the attention energy between node i and node j, which measures the influence of node j on node i. a is a trainable attention weight vector. and are the feature vectors of node i and node j at layer l, respectively, ∥ represents the connection operation of the vector, α ij is the normalized attention coefficient, which indicates the contribution of node j when updating the features of node i;
[0135] The update formula of node features is:
[0136]
[0137] S34, initialize the parameters of the abnormal propagation path prediction model, and use the Xavier method to initialize the weight matrix W of each layer (l) , the attention weight vector a is randomly initialized to a small value, and the bias term is initialized to zero or a small random value.
[0138] In this implementation, S5 includes the following sub-steps:
[0139] S51. Collect the quality status data of each node in real time during the supply chain operation process, and build each node N i The state vector S i The state vector includes the real-time quality indicator data Q of the node i (t), that is, the quality status of node i at time point t:
[0140]
[0141] in, represents the physical attribute state of node i, Indicates the chemical composition state, Indicates the state of environmental factors;
[0142] S52, for node N i The real-time state vector S i (t) Perform quality anomaly detection. The detection method calculates the current state vector and the historical normal state vector The difference between the two can be used to determine whether there is quality abnormality;
[0143] S53, when node N is detected i When there is a quality anomaly, the feature vector H of node i is used based on the anomaly propagation path prediction model. i and the weight information w of its adjacent nodes ij Calculate the probability of the anomaly propagating to downstream nodes:
[0144]
[0145] Among them, P ij is the probability of quality anomaly propagating from node i to node j, α ijis the attention coefficient of node j to node i, W (l) and are the weight matrix of the abnormal propagation path prediction model and the feature vector of node j in the lth layer respectively;
[0146] S54, according to the propagation probability P ij Calculate the priority of the abnormal propagation path, priority R ij Based on the propagation probability between nodes and the path length, a weighted calculation is performed to determine the path where quality anomalies are preferentially propagated:
[0147]
[0148] Among them, L ij It represents the path length from node i to node j, which is used to suppress the impact of long paths on anomaly propagation.
[0149] In this implementation, S6 includes the following sub-steps:
[0150] S61, dynamically update the weights of the edges in the anomaly propagation path prediction model based on the anomaly propagation speed, and calculate the anomaly from the upstream node N i Propagate to downstream node N j The propagation speed V ij :
[0151]
[0152] Among them, d ij Indicates the upstream node N i With downstream node N j The physical distance between the upstream nodes N and i Transport to downstream node N j The actual path length traversed; Δt ij Indicates that the exception is from the upstream node N i Passed to downstream node N j The time required reflects the propagation delay of the anomaly between nodes; λ1 is the propagation speed adjustment coefficient, which is used to adjust the influence of the propagation speed on the edge weight;
[0153] Propagation speed V ij The larger it is, the faster the anomaly propagates between nodes, and the weight of the edge should be larger to highlight the fast-propagating anomaly path;
[0154] S62, dynamically adjust the weight of the edge in the abnormal propagation path prediction model based on the path length, and calculate the edge e ij The path length weight
[0155]
[0156] Among them, w ij is the initial edge weight, reflecting the upstream node N i With downstream node N j The initial correlation between ij is the upstream node N i To downstream node N j The path length indicates that the anomaly starts from the upstream node N i Propagate to downstream node N j The number of steps of the shortest path; η1 is the path length attenuation coefficient, which is used to adjust the impact of path length on edge weight; path length L ij The shorter, The larger it is, the edges with shorter transmission paths are given priority;
[0157] S63, dynamically adjust the weight of the edge based on the severity of the anomaly, and calculate the impact of the anomaly on the downstream node N j The impact of S ij :
[0158]
[0159] Among them, ΔQ j Represents the downstream node N j The abnormal change of the quality index reflects the impact of the abnormality on the downstream node N j The degree of impact of quality status; is the downstream node N j The quality index reference value under normal conditions; ω is the abnormal severity adjustment coefficient, which is used to adjust the impact of abnormal severity on edge weight; Indicates the upstream node N i With downstream node N j The quality correlation between them quantifies the correlation strength of anomaly propagation between nodes;
[0160] Abnormal severity S ij The weight of the higher edge should be greater, highlighting the abnormal propagation path that has a greater impact on the overall quality of the supply chain;
[0161] S64. Comprehensively consider the anomaly propagation speed, path length weight and anomaly severity, and adaptively adjust the edge weight. The edge weight W of the anomaly propagation path prediction model is updated. ij Calculated as:
[0162]
[0163] Among them, α2, β2, and γ2 are weight coefficients, which are used to balance the influence of anomaly propagation speed, path length, and anomaly severity in edge weight updating.
[0164] In this implementation, S7 includes the following sub-steps:
[0165] S71, based on the adaptively adjusted edge weight W ij , the abnormal propagation path prediction model is used to recalculate the optimal propagation path of quality anomalies, and the Bellman-Ford algorithm is used to determine the optimal propagation path from the abnormal source node N s To the target node N d The shortest weighted path, the best propagation path P sd The total weight is calculated as:
[0166]
[0167] Among them, P sd Indicates that from the abnormal source node N s To the target node N d The total weight of the propagation path;
[0168] S72, based on the recalculated optimal propagation path P sd Identify potential risk node set R, risk node N r ∈R is a node on the abnormal propagation path with high propagation probability and closely related to the downstream node, and the risk probability R i for:
[0169]
[0170] Among them, P ij is the probability of quality anomaly propagating from node i to node j, d ij is the physical distance between node i and node j, δ2 is the distance attenuation coefficient, which is used to adjust the impact of distance on the propagation probability in risk node identification. The risk probability R i Nodes above the threshold are potential risk nodes that should be given priority attention;
[0171] S73, generate warning information based on the identified risk node set R to construct a warning matrix M, where M ij =1 indicates that there is a high risk of abnormal propagation between nodes i and j:
[0172]
[0173] Among them, Alert ij Indicates sending an early warning signal from node i to node j, θ r is the risk probability threshold, θ p is the propagation probability threshold, and nodes that meet the warning conditions will be added to the warning matrix;
[0174] S74. Notify the generated warning matrix M and the corresponding risk node set R to the relevant managers, and check or process the risk nodes.
[0175] A prediction system for the propagation path of abnormal agricultural product quality based on graph neural network, including the following modules:
[0176] The data collection module is used to collect the quality status data of each node in the agricultural product supply chain in real time, including the physical properties, chemical composition and environmental factors of the production nodes, transportation nodes, storage nodes and distribution nodes, to form a node quality data set;
[0177] The data preprocessing module is used to denoise, standardize and extract features from the quality data set obtained by the data acquisition module, obtain the denoised quality data and feature vectors for graph neural network input, and generate time series feature matrix and correlation matrix;
[0178] The model building module is used to build an abnormal propagation path prediction model based on a graph neural network. The abnormal propagation path prediction model uses each node in the supply chain as a node of the graph structure, and the relationship between nodes as an edge. The initial weight of the edge is determined by the interaction frequency between nodes, transportation time, and the degree of influence of quality fluctuations;
[0179] The model training module is used to input the preprocessed feature vector, time series feature matrix and correlation matrix into the abnormal propagation path prediction model, train the abnormal propagation path prediction model, learn the propagation mode of agricultural product quality abnormalities between nodes in the supply chain, and generate a trained abnormal propagation path prediction model;
[0180] The real-time monitoring module is used to monitor the quality status of each node in real time during the operation of the supply chain. When a quality abnormality is detected at a certain node, the abnormal propagation path prediction model is called to make a real-time prediction of the abnormal propagation path and recalculate the propagation path based on the adaptively adjusted edge weights.
[0181] The risk node identification module is used to identify high-risk nodes according to the output of the abnormal propagation path prediction model and generate warning information. The identified high-risk nodes are nodes with a high propagation probability on the abnormal propagation path, and a warning matrix is generated;
[0182] The early warning notification module is used to send the early warning information generated by the risk node identification module to relevant supply chain managers, prompting potential risk nodes that need to be inspected or processed to prevent further spread of quality anomalies in the supply chain.
[0183] Embodiment 1:
[0184] This embodiment uses the agricultural product supply chain of a large agricultural company in Province A as the background to verify the feasibility and effectiveness of the agricultural product quality abnormality propagation path prediction system based on graph neural network of the present invention. The company operates a complete supply chain process from production, transportation, storage to distribution. Agricultural products are circulated among multiple nodes. Once quality problems occur, the stability of the entire supply chain will be affected. Under the conditions of high temperature and large humidity changes in summer, agricultural products are prone to spread problems due to quality fluctuations. The company hopes to use the system of the present invention to improve the efficiency of quality management and identify potential risk nodes in advance to prevent further spread of problems.
[0185] In this embodiment 1, the company monitors the quality of agricultural products during the summer period from June to August. The experimental scope covers picking and primary processing at the production site, cold chain transportation and warehousing, short-term storage at the distribution center and the terminal market. The supply chain nodes include 10 production nodes, 20 transportation nodes, 5 distribution center nodes and 50 terminal market nodes. In order to verify the superiority of the present invention, a batch of fresh citrus fruits were selected as experimental products to monitor their quality from picking to sales, focusing on real-time data collection of their appearance color, sugar content, acidity, microbial content and environmental temperature and humidity. Each node is equipped with a sensor to record the quality status of the citrus fruits and the environmental parameters in which they are located. The data is transmitted to the system in real time for analysis and early warning.
[0186] At the beginning of the experiment, the system collected the quality data of each node under normal conditions and performed preliminary feature extraction. For example, the sugar content of citrus at the production node was stable at 10-12%, the acidity was about 0.8%, and there was no obvious damage to the skin; the temperature in the cold chain transportation was kept at around 5°C and the humidity was around 80%; while the temperature in the distribution center was slightly higher, at 8-10°C, and the humidity was controlled at 75%. Based on the initial data, the system established the normal quality status of each node as a benchmark model to facilitate subsequent detection and prediction of abnormal situations.
[0187] In mid-July, a production node detected abnormal quality of a batch of citrus fruits, with acidity rising to 1.2%, sugar content falling to 8%, and small-scale damage to the skin. The system used the data preprocessing module to denoise and standardize the abnormal data and extract the key quality features of the batch of citrus fruits to generate input feature vectors for the graph neural network model. At this time, the system started the abnormal propagation path prediction model to adaptively adjust the edge weights based on the three factors of abnormal propagation speed, path length and abnormal severity to determine the propagation path of this batch of citrus fruits in the supply chain.
[0188] Through dynamic propagation path calculation, the system identified the potential risks of this batch of citrus at the transportation node: the intensified temperature fluctuations during transportation caused the appearance quality of some citrus to further decline, and the sugar content continued to decrease. The abnormality was detected in real time during transportation and triggered the system's early warning function. The system predicted that the probability of the spread of quality abnormalities for this batch of citrus would exceed 60% within 1 hour before entering the distribution center, and the risk of downstream nodes increased. The system's real-time monitoring data of the transportation node showed that the temperature rose from 5°C to 8°C, and the humidity changed by more than 10%. The system identified this transportation node as a high-risk node, and predicted that the distribution center would face the risk of spreading abnormal products based on the propagation probability.
[0189] After predicting the risk, the system automatically generated early warning information and notified relevant managers to recommend a quality inspection of the batch of citrus and take cooling measures. After receiving the notification, the distribution center immediately inspected the abnormal batch and confirmed that the acidity of the citrus had further increased to 1.5%, and the sugar content had dropped to 7.5%. Isolation measures were taken to prevent it from spreading to other batches. At the same time, based on the system's real-time prediction, managers also conducted quality inspections on other batches of products on the same transportation route to ensure that they were not affected by the spread of the abnormality.
[0190] In order to verify the effectiveness of the system of the present invention, the early warning effect and abnormal control efficiency of the system of the present invention and the traditional method in the same supply chain scenario are compared. The specific data comparison is shown in Table 1 below:
[0191] Table 1 Comparison of experimental data of agricultural product quality abnormality transmission path prediction system
[0192]
[0193] It can be seen from the data in Table 1 that compared with the traditional method, the system of the present invention has improved the recognition accuracy of abnormal propagation paths by about 30%, and the recognition rate of high-risk nodes has increased by more than 30%. In terms of abnormal diffusion control, the system of the present invention shortens the response time of abnormal diffusion, and the average response time is reduced by 8 hours, which effectively reduces the possibility of abnormal diffusion and reduces the abnormal control cost by about 60%.
[0194] In further simulation experiments, the performance of the system of the present invention under different conditions also showed significant advantages. In the cold chain transportation stage, when the transportation temperature exceeds the set threshold, the system immediately uses the temperature fluctuation as an input feature for adaptive adjustment, so that the model can quickly detect and calculate the optimal propagation path and issue early warning information in the shortest time. Under traditional methods, temperature anomalies at transportation nodes often need to be traced and processed after quality anomalies are discovered at subsequent nodes, resulting in delayed response.
[0195] In summary, this embodiment fully verifies the feasibility and superiority of the present invention. Through application tests in actual supply chain scenarios, it is proved that the system of the present invention has significant advantages in predicting the propagation path of abnormal agricultural product quality. Through adaptive edge weight adjustment, the combination of graph neural network model and attention mechanism, and the application of dynamic early warning mechanism, the present invention can not only realize the rapid identification of quality anomalies and accurate prediction of propagation paths, but also can take preventive measures in time at the early stage of abnormal spread, significantly improving the efficiency of supply chain management and quality control capabilities.
[0196] The present invention adaptively and dynamically adjusts edge weights based on abnormal propagation speed, path length and abnormal severity factors, so that the model can reflect the changes in the relationship between nodes in real time. On the basis of traditional static edge weights, the present invention introduces a weight adjustment mechanism to dynamically optimize edge weights according to actual propagation speed, path distance and the degree of impact of abnormalities on the overall quality of the supply chain during the prediction process, thereby improving the adaptability to abnormal propagation paths and the accuracy of prediction. Compared with traditional fixed weight models, the dynamic adjustment mechanism of the present invention significantly improves the accuracy of abnormal propagation paths, and the accuracy of propagation path identification is improved by more than 15% compared with traditional models.
[0197] The present invention adopts a graph neural network and combines it with an attention mechanism to perform multi-layer nested modeling on the complex associations between nodes in the supply chain network, and performs weighted processing on the abnormal propagation paths of adjacent nodes. By automatically adjusting the influence of adjacent nodes through the attention mechanism, the present invention can give priority to key nodes and more accurately identify high-risk nodes. Traditional methods cannot flexibly capture the importance of different nodes when processing node associations in complex networks. The present invention processes the contribution of different nodes through dynamic weighting, effectively focusing on nodes that have a significant impact on quality anomalies, and improving the risk identification efficiency of the overall model.
[0198] The present invention can timely identify and predict the propagation path of quality anomalies during the operation of the supply chain by introducing real-time monitoring data input and dynamic propagation path calculation. Whenever a node detects a quality anomaly, the model automatically recalculates the optimal propagation path and generates early warning information to ensure that managers can obtain risk warnings in time before the problem spreads to other nodes. Compared with traditional static detection methods that require post-processing, the dynamic prediction and real-time early warning mechanism of the present invention greatly shortens the abnormality response time. Experiments have shown that compared with existing static detection methods, the abnormality processing time of the present invention is shortened by more than 30%, providing supply chain managers with a faster response method and effectively reducing the risk of abnormality spread.
[0199] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for predicting the propagation path of abnormal agricultural product quality based on graph neural network, characterized in that: The steps include: S1. Collect quality data sets of production nodes, transportation nodes, storage nodes and distribution nodes in the agricultural product supply chain; S2. Preprocess the collected quality data set to form a feature vector for graph neural network input; S3. Construct a prediction model for the propagation path of quality anomalies in the agricultural product supply chain based on graph neural networks. The prediction model for the propagation path of anomalies builds a graph structure based on each node in the supply chain. The nodes represent different links in the supply chain, and the edges represent the relationship between the nodes. Each edge has an initial weight. S4, by inputting the preprocessed historical quality data set into the abnormal propagation path prediction model, the abnormal propagation path prediction model is trained to learn the quality abnormality propagation mode between nodes in the agricultural product supply chain, and the propagation path and edge weight between nodes are preliminarily established; S5. During the operation of the supply chain, the quality status of each node is monitored in real time. When a quality anomaly is detected at a node, the propagation path of the quality anomaly is predicted based on the anomaly propagation path prediction model; S6, dynamically update the weights of the edges in the graph based on the edge weight adaptive adjustment mechanism; S7. According to the adaptively adjusted edge weights, the abnormal propagation path prediction model recalculates the optimal propagation path of the quality anomaly and generates a predicted path; S8. Identify potential risk nodes based on the recalculated abnormal propagation path, and send warning information to relevant managers to prompt that the risk nodes need to be checked or processed; S9. After identifying the risk nodes, the system updates the abnormal propagation path prediction model through real-time data and optimizes the edge weights after adaptive adjustment.
2. According to claim 1, a method for predicting the propagation path of abnormal agricultural product quality based on graph neural network is characterized in that: The S1 comprises the following sub-steps: S11, obtaining the original quality data set D of each node in the agricultural product supply chain, wherein the node includes the production node N p , transport node N t 、Storage Node N s and distribution node N d ; S12: Classify and label the nodes of the original quality data set D to construct a quality data feature matrix X N ,Each row of the quality data feature matrix corresponds to a node, and each column in the quality data feature matrix represents a quality index Q. The quality index includes the physical properties, chemical composition and environmental factors of agricultural products; S14. Define the time series feature matrix T N ,The time series feature matrix records the quality change information of each node at different time points. Each row in the time series feature matrix represents the quality status of a node at a specific time point, and the time point t represents the time step in the supply chain operation; S15. Establish a node association matrix A based on node relationships and time series information, where element A ij1 Represents the relationship between node i and node j. If there is a direct mass propagation path between node i and node j, then A ij1 =1; otherwise ,A ij1 =0; S16. Form an overall quality data set of the agricultural product supply chain based on S11-S15: D N ={X N ,T N ,A}。 3. The method for predicting the propagation path of abnormal agricultural product quality based on graph neural network according to claim 1 is characterized in that: The S2 comprises the following sub-steps: S21, the collected quality data set D N Perform data denoising and use the mean filtering method to remove noise interference to obtain the denoised quality data set D'; S22, standardize the denoised quality data set D', normalize each quality indicator to the range of [0,1], and obtain a standardized quality data set D". S23, extracting features from the standardized quality data set D”, extracting key quality features of each node, including physical property feature vectors, chemical composition feature vectors, and environmental factor feature vectors, and finally forming a feature vector F for graph neural network input; S24. Uniformly encode the feature vector F. The encoded feature vector is represented as F'. Each feature vector is represented by a vector of fixed length.
4. The method for predicting the propagation path of abnormal agricultural product quality based on graph neural network according to claim 1 is characterized in that: The S3 comprises the following sub-steps: S31. Construct a graph structure of the agricultural product supply chain. The graph structure of the agricultural product supply chain reflects the propagation path of quality anomalies between nodes based on the physical circulation relationship in the supply chain: G = (N, E); Where N = {N p ,N t ,N s ,N d } represents the node set in the supply chain, which are production nodes, transportation nodes, storage nodes and distribution nodes. E represents the edge set between nodes. ij ∈E represents the direct interaction relationship between node i and node j in the supply chain; Construct the adjacency matrix A of the graph structure G of the agricultural product supply chain. Each element A of the adjacency matrix ij Represents the relationship between nodes i and j: S32, for each edge e in the graph structure G of the agricultural product supply chain ij Set the initial weight w ij , the initial weight is based on the historical interaction frequency f between nodes ij , transportation time t ij and the degree of quality fluctuation v ij Determine, the initial weight w ij Calculated as: Among them, α1, β1 and γ1 are weight coefficients, which are used to adjust the proportion of interaction frequency, transportation time and quality fluctuation in the initial weight, f ij represents the historical interaction frequency between node i and node j, reflecting the circulation frequency of agricultural products between these two nodes, t ij represents the average transportation time between node i and node j, v ij It represents the degree of influence of node i on the quality fluctuation of node j, and quantifies the potential impact of the quality anomaly of node i on node j; S33, graph structure G and weight w of agricultural product supply chain constructed based on ij An abnormal propagation path prediction model is established. The abnormal propagation path prediction model uses a graph neural network designed for optimizing the abnormal propagation path of agricultural product quality: Among them, H (l) is the node feature matrix of the lth layer, and the initial layer H (0) =F ′ , that is, the encoded feature vector, is the weighted adjacency matrix with self-connection, the element A of A ij =w ij , I is the identity matrix, for The degree matrix of W (l) is the weight matrix of the lth layer, σ is the activation function; The attention mechanism is introduced to dynamically adjust the importance of neighbor nodes. The attention coefficient is calculated as follows: Among them, e ij is the attention energy between node i and node j, which measures the influence of node j on node i. a is a trainable attention weight vector. and are the feature vectors of node i and node j at layer l, respectively, ∥ represents the connection operation of the vector, α ij is the normalized attention coefficient, which indicates the contribution of node j when updating the features of node i; The update formula of node features is: S34, initialize the parameters of the abnormal propagation path prediction model, and use the Xavier method to initialize the weight matrix W of each layer (l) , the attention weight vector a is randomly initialized to a small value, and the bias term is initialized to zero or a small random value.
5. The method for predicting the propagation path of abnormal agricultural product quality based on graph neural network according to claim 1 is characterized in that: The S5 comprises the following sub-steps: S51. Collect the quality status data of each node in real time during the supply chain operation process, and build each node N i The state vector S i , the state vector includes the real-time quality indicator data Q of the node i (t), that is, the quality status of node i at time point t: in, represents the physical attribute state of node i, Indicates the chemical composition state, Indicates the state of environmental factors; S52, for node N i The real-time state vector S i (t) Perform quality anomaly detection. The detection method calculates the current state vector and the historical normal state vector The difference between the two can be used to determine whether there is any quality abnormality; S53, when node N is detected i When there is a quality anomaly, the feature vector H of node i is used based on the anomaly propagation path prediction model. i and the weight information w of its adjacent nodes ij Calculate the probability of the anomaly propagating to downstream nodes: Among them, P ij is the probability of quality anomaly propagating from node i to node j, α ij is the attention coefficient of node j to node i, W (l) and are the weight matrix of the abnormal propagation path prediction model and the feature vector of node j in the lth layer respectively; S54, according to the propagation probability P ij Calculate the priority of the abnormal propagation path, priority R ij Based on the propagation probability between nodes and the path length, a weighted calculation is performed to determine the path where quality anomalies are preferentially propagated: Among them, L ij It represents the path length from node i to node j, which is used to suppress the impact of long paths on anomaly propagation.
6. The method for predicting the propagation path of abnormal agricultural product quality based on graph neural network according to claim 1 is characterized in that: The S6 comprises the following sub-steps: S61, dynamically update the weights of the edges in the anomaly propagation path prediction model based on the anomaly propagation speed, and calculate the anomaly from the upstream node N i Propagate to downstream node N j The propagation speed V ij : Among them, d ij Indicates the upstream node N i With downstream node N j The physical distance between the upstream nodes N and i Transport to downstream node N j The actual path length traversed; Δt ij Indicates that the exception is from the upstream node N i Passed to downstream node N j The time required reflects the propagation delay of the anomaly between nodes; λ1 is the propagation speed adjustment coefficient, which is used to adjust the influence of the propagation speed on the edge weight; Propagation speed V ij The larger it is, the faster the anomaly propagates between nodes, and the weight of the edge should be larger to highlight the fast-propagating anomaly path; S62, dynamically adjust the weight of the edge in the abnormal propagation path prediction model based on the path length, and calculate the edge e ij The path length weight Among them, w ij is the initial edge weight, reflecting the upstream node N i With downstream node N j The initial correlation between ij is the upstream node N i To downstream node N j The path length indicates that the anomaly starts from the upstream node N i Propagate to downstream node N j The number of steps of the shortest path; η1 is the path length attenuation coefficient, which is used to adjust the impact of path length on edge weight; path length L ij The shorter, The larger it is, the edges with shorter transmission paths are given priority; S63, dynamically adjust the weight of the edge based on the severity of the anomaly, and calculate the impact of the anomaly on the downstream node N j The impact of S ij : Among them, ΔQ j Represents the downstream node N j The abnormal change of the quality index reflects the impact of the abnormality on the downstream node N j The degree of impact of quality status; is the downstream node N j The quality index reference value under normal conditions; ω is the abnormal severity adjustment coefficient, which is used to adjust the impact of abnormal severity on edge weight; Indicates the upstream node N i With downstream node N j The quality correlation between them quantifies the correlation strength of anomaly propagation between nodes; Abnormal severity S ij The weight of the higher edge should be greater, highlighting the abnormal propagation path that has a greater impact on the overall quality of the supply chain; S64. Comprehensively consider the anomaly propagation speed, path length weight and anomaly severity, and adaptively adjust the edge weight. The edge weight W of the anomaly propagation path prediction model is updated. ij Calculated as: Among them, α2, β2, and γ2 are weight coefficients, which are used to balance the influence of anomaly propagation speed, path length, and anomaly severity in edge weight updating.
7. The method for predicting the propagation path of abnormal agricultural product quality based on graph neural network according to claim 1 is characterized in that: The S7 comprises the following sub-steps: S71, based on the adaptively adjusted edge weight W ij , the abnormal propagation path prediction model is used to recalculate the optimal propagation path of quality anomalies, and the Bellman-Ford algorithm is used to determine the optimal propagation path from the abnormal source node N s To the target node N d The shortest weighted path, the best propagation path P sd The total weight is calculated as: P sd =min∑ (i,j)∈E W ij ×L ij ; Among them, P sd Indicates that from the abnormal source node N s To the target node N d The total weight of the propagation path; S72, based on the recalculated optimal propagation path P sd Identify potential risk node set R, risk node N r ∈R is a node on the abnormal propagation path with high propagation probability and closely related to the downstream node, and the risk probability R i for: Among them, P ij is the probability of quality anomaly propagating from node i to node j, d ij is the physical distance between node i and node j, δ2 is the distance attenuation coefficient, which is used to adjust the impact of distance on the propagation probability in risk node identification. The risk probability R i Nodes above the threshold are potential risk nodes that should be given priority attention; S73, generate warning information based on the identified risk node set R to construct a warning matrix M, where M ij =1 indicates that there is a high risk of abnormal propagation between nodes i and j: Among them, Alert ij Indicates sending an early warning signal from node i to node j, θ r is the risk probability threshold, θ p is the propagation probability threshold, and nodes that meet the warning conditions will be added to the warning matrix; S74. Notify the generated warning matrix M and the corresponding risk node set R to the relevant managers, and check or process the risk nodes.
8. A prediction system for the propagation path of abnormal agricultural product quality based on graph neural network, characterized in that: Includes the following modules: The data collection module is used to collect the quality status data of each node in the agricultural product supply chain in real time, including the physical properties, chemical composition and environmental factors of the production nodes, transportation nodes, storage nodes and distribution nodes, to form a node quality data set; The data preprocessing module is used to denoise, standardize and extract features from the quality data set obtained by the data acquisition module, obtain the denoised quality data and feature vectors for graph neural network input, and generate time series feature matrix and correlation matrix; The model building module is used to build an abnormal propagation path prediction model based on a graph neural network. The abnormal propagation path prediction model uses each node in the supply chain as a node of the graph structure, and the relationship between nodes as an edge. The initial weight of the edge is determined by the interaction frequency between nodes, transportation time, and the degree of influence of quality fluctuations; The model training module is used to input the preprocessed feature vector, time series feature matrix and correlation matrix into the abnormal propagation path prediction model, train the abnormal propagation path prediction model, learn the propagation mode of agricultural product quality abnormalities between nodes in the supply chain, and generate a trained abnormal propagation path prediction model; The real-time monitoring module is used to monitor the quality status of each node in real time during the operation of the supply chain. When a quality abnormality is detected at a certain node, the abnormal propagation path prediction model is called to make a real-time prediction of the abnormal propagation path and recalculate the propagation path based on the adaptively adjusted edge weights. The risk node identification module is used to identify high-risk nodes according to the output of the abnormal propagation path prediction model and generate warning information. The identified high-risk nodes are nodes with a high propagation probability on the abnormal propagation path, and a warning matrix is generated; The early warning notification module is used to send the early warning information generated by the risk node identification module to relevant supply chain managers, prompting potential risk nodes that need to be inspected or processed to prevent further spread of quality anomalies in the supply chain.
Citation Information
Cited By
A pharmaceutical supply chain data security intelligent monitoring system and method
CN119785951A
Exception analysis method and system based on blasting data
CN119989245A
Purchase efficiency optimization management method and system based on artificial intelligence
CN119991180A
Information management system based on big data
CN120256562A
Communication security management method and system based on big data
CN120455117A