Risk control management system for agricultural product supply chain based on big data analysis

CN122596665APending Publication Date: 2026-08-18SHENZHEN YOUQI AGRICULTURAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610826178.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

当上游农药残留问题通过分批加工、多级批发等复杂路径传导至终端时,现有系统因缺乏批次间传递关系的拓扑化建模能力,无法追踪风险的实际传播轨迹,导致问题批次流入多个分支渠道后才被发现

Benefits of technology

本发明将流转数据抽象为批次节点与流转边构成的拓扑图,使风险扩散过程既符合时间自然衰减规律,又能识别超时流转等异常路径的风险阻断作用。本发明引入状态转移模型智能预测缺失的中间加工环节,使风险推断能够在数据不完整场景下持续运行且避免误差放大。基于概率图模型的信念传播算法实现了从单节点评估到全网络推断的范式跃迁。拓扑稀疏化机制在保障准确性前提下大幅降低计算复杂度,使系统能够在大规模网络上实现实时评估。风险回溯机制沿流转边反向追溯筛选最可能的传播路径精准定位风险源头。动态环境特征向量与劣变环境模式库的匹配机制通过环境风险补偿因子前瞻性提升环境条件不佳批次的风险敏感度,实现了从事后检测到事前预警的转变。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
Patent Text Reader

Abstract

The present application belongs to the technical field of agricultural product management, and discloses a risk control management system for agricultural product supply chain based on big data analysis; flow data generated in each link of the agricultural product supply chain is acquired, and batch nodes and flow edges are mapped; a local flow topology is constructed, and a relationship decay weight is distributed; whether there is a batch discontinuous fracture interval in the local flow topology is detected, a virtual batch node is generated to fill the fracture interval; the local flow topology containing the virtual batch node is input into a pre-constructed probability graph model, risk probability diffusion is performed based on the relationship decay weight and a confidence label, and a risk inference value of a target batch node is calculated; when the risk inference value exceeds a preset risk threshold, a suspicious backtracking path of the target batch node is generated based on a probability propagation path in the probability graph model, and risk control early warning information is output; the present application can accurately locate the risk source, and prospectively improve the risk sensitivity of batches under poor environmental conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural product management technology, and more specifically, to an agricultural product supply chain risk control management system based on big data analysis. Background Technology

[0002] The core challenge of existing agricultural product supply chain risk control technologies lies in a severe lack of understanding of the dynamic transmission characteristics of networks. Agricultural product supply chains are inherently extremely vulnerable; a quality lapse in one link can trigger a chain reaction of collapses. However, existing systems generally employ static node assessment models, focusing only on isolated risk indicators for individual batches, completely ignoring the dynamic diffusion mechanism of risk within the supply chain network. When upstream pesticide residue issues are transmitted to the end consumer through complex paths such as batch processing and multi-level wholesale, existing systems, lacking the ability to topologically model the inter-batch transmission relationships, cannot track the actual propagation trajectory of risk, resulting in problematic batches only being discovered after flowing into multiple branch channels. Even more serious is the challenge of identifying risk contagion paths under asymmetric information. For example, a broken cash flow in a cold chain logistics company not only directly leads to the spoilage of agricultural products in transit but also couples financial and quality risks to remote nodes through hidden debt guarantee relationships, triggering chain reactions such as raw material shortages at slaughterhouses and inventory buildup at retailers. Existing systems focus on single-enterprise financial assessments. When complex structures such as circular guarantees, hidden related parties, and batch-merging occur in the network, community detection algorithms based on traditional graph computing face severe computational complexity bottlenecks and response lags when processing massive amounts of real-time data, failing to provide early warnings during the critical window before risks erupt. Furthermore, significant data gaps exist in the supply chain, particularly among small and medium-sized processing enterprises and individual transporters, leading to numerous breaks in the supply chain topology. Existing systems can only terminate traceability or rely on manual data entry when faced with data gaps. Simultaneously, current technologies neglect the proactive impact of environmental conditions on agricultural product quality deterioration, relying solely on post-event testing indicators to determine risk. They lack the ability to predict potential deterioration risks caused by environmental anomalies such as high-temperature and high-humidity transportation and cold chain disruptions; by the time testing indicators show abnormalities, deterioration is already irreversible.

[0003] In view of this, the present invention proposes an agricultural product supply chain risk control management system based on big data analysis to solve the above problems. Summary of the Invention

[0004] To overcome the aforementioned shortcomings of existing technologies and achieve the above objectives, the present invention provides the following technical solution: an agricultural product supply chain risk control management system based on big data analysis, comprising: processor; Memory is used to store computer program instructions; The data acquisition and mapping module is used to acquire the circulation data generated in each link of the agricultural product supply chain, map the circulation data to batch nodes, and construct circulation edges connecting the batch nodes based on the upstream and downstream transmission relationships in the circulation data. The local topology construction module is used to extract batch nodes and flow edges within the current window based on a preset time sliding window, construct a local flow topology, and assign a relationship decay weight that decreases with time to the flow edges in the local flow topology. The fracture repair module is used to detect whether there are fracture intervals where batches are discontinuous in the local flow topology. If so, it generates virtual batch nodes to fill the fracture interval based on the attribute information and historical flow probability distribution of the known batch nodes adjacent to the fracture interval, and assigns corresponding confidence labels to the virtual batch nodes. The risk inference module is used to input the local flow topology containing the virtual batch nodes into a pre-constructed probabilistic graphical model, perform risk probability diffusion based on the relationship decay weight and the confidence label, and calculate the risk inference value of the target batch node. The early warning generation module is used to generate a suspicious backtracking path for the target batch node based on the probability propagation path in the probability graph model when the risk inference value exceeds a preset risk threshold, and output risk control early warning information. The processor is used to execute computer program instructions stored in the memory to control the data acquisition and mapping module, the local topology construction module, the fracture repair module, the risk inference module, and the early warning generation module to work together.

[0005] The technical effects and advantages of the agricultural product supply chain risk control management system based on big data analysis of this invention are as follows: This invention abstracts the flow of data into a topological graph composed of batch nodes and flow edges, ensuring that the risk diffusion process conforms to the natural decay law over time while also identifying the risk-blocking effect of abnormal paths such as time-out flow. This invention introduces a state transition model to intelligently predict missing intermediate processing steps, enabling risk inference to run continuously in scenarios with incomplete data and avoiding error amplification. A belief propagation algorithm based on a probabilistic graphical model achieves a paradigm shift from single-node assessment to full-network inference. A topology sparsification mechanism significantly reduces computational complexity while ensuring accuracy, enabling the system to achieve real-time assessment on large-scale networks. A risk backtracking mechanism traces back along the flow edges to screen the most probable propagation path and accurately locate the risk source. A matching mechanism between dynamic environmental feature vectors and a deteriorating environment pattern library proactively enhances the risk sensitivity of batches with poor environmental conditions through environmental risk compensation factors, realizing a shift from post-event detection to pre-event warning. Attached Figure Description

[0006] Figure 1This is a schematic diagram of the agricultural product supply chain risk control management system based on big data analysis according to the present invention. Detailed Implementation

[0007] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0008] like Figure 1 As shown, embodiments of the present invention propose an agricultural product supply chain risk control management system based on big data analysis, the system comprising: processor; Memory is used to store computer program instructions; The data acquisition and mapping module is used to acquire the circulation data generated in each link of the agricultural product supply chain, map the circulation data to batch nodes, and construct circulation edges connecting batch nodes based on the upstream and downstream transmission relationships in the circulation data. The local topology construction module is used to extract batch nodes and flow edges within the current window based on a preset time sliding window, construct a local flow topology, and assign relationship decay weights that decrease over time to the flow edges in the local flow topology. The fracture repair module is used to detect whether there are fracture intervals where batches are discontinuous in the local flow topology. If so, virtual batch nodes are generated to fill the fracture interval based on the attribute information of the known batch nodes adjacent to the fracture interval and the historical flow probability distribution, and corresponding confidence labels are assigned to the virtual batch nodes. The risk inference module is used to input the local flow topology containing virtual batch nodes into a pre-built probabilistic graphical model, perform risk probability diffusion based on relationship decay weights and confidence labels, and calculate the risk inference value of the target batch node. The early warning generation module is used to generate a suspicious backtracking path for the target batch node based on the probability propagation path in the probabilistic graphical model when the risk inference value exceeds the preset risk threshold, and output risk control early warning information. The processor is used to execute computer program instructions stored in the memory to control the data acquisition and mapping module, the local topology construction module, the fracture repair module, the risk inference module, and the early warning generation module to work together.

[0009] In this embodiment of the invention, the present invention employs a data acquisition and mapping module to map the flow data generated in each link of the agricultural product supply chain into batch nodes and construct flow edges. A local topology construction module uses a time sliding window to extract batch nodes and flow edges to construct a local flow topology and assign relationship attenuation weights. A fracture repair module detects and fills fracture intervals to generate virtual batch nodes and assigns confidence labels. A risk inference module performs risk probability diffusion calculations based on a probabilistic graphical model to infer risk values. An early warning generation module generates suspicious backtracking paths and outputs risk control early warning information. This effectively overcomes the technical problems in existing agricultural product supply chain risk control management, such as the lack of topological modeling of flow data, inability to handle data fractures, lack of dynamic risk inference mechanisms, and difficulty in tracing the source of risk. Thus, it achieves the technical effects of realizing dynamic monitoring of risks throughout the entire agricultural product supply chain, accurately identifying risk propagation paths, quickly locating risk source batches, and improving the accuracy and timeliness of risk control early warnings.

[0010] In a preferred embodiment of the present invention, the specific implementation process of acquiring the circulation data generated at each stage of the agricultural product supply chain, mapping the circulation data to batch nodes, and constructing circulation edges connecting the batch nodes based on the upstream and downstream transmission relationships in the circulation data includes: Step 1.1: Extract circulation records of agricultural products at each stage of the supply chain. Circulation records include at least batch codes, stage identifiers, timestamps, and a set of testing indicators. Specifically, the data acquisition and mapping module extracts circulation records of agricultural products at each stage of the agricultural product supply chain management information system, including production, processing, warehousing, transportation, and sales. By establishing data interfaces with heterogeneous data sources such as planting base management systems, processing plant production management systems, logistics tracking systems, wholesale market transaction systems, and retail terminal sales systems, circulation data recorded at each stage is collected in real time or periodically. The circulation record must contain at least the following key information: a batch code to uniquely identify the agricultural product batch, such as "20240315-001-Origin Code-Variety Code"; a link identifier to identify the supply chain link of the agricultural product, such as "planting," "initial processing," "cold chain transportation," "wholesale transaction," and "retail sales"; a timestamp to record the specific time the circulation record was generated, accurate to the second, such as "2024-03-15 08:30:45"; and a set of testing indicators containing various quality tests and environmental monitoring data conducted on the agricultural product at this link, such as pesticide residue test values, heavy metal content, microbial indicators, temperature and humidity records, and transportation time. The data acquisition and mapping module will perform preliminary cleaning on the extracted circulation records, removing invalid records with missing key fields, abnormal timestamps, or empty testing indicator sets, ensuring that subsequent mapping operations are based on valid data.

[0011] Step 1.2 involves performing standardization and alignment processing on batch codes to eliminate identification differences caused by heterogeneous data sources. The standardized flow data is then mapped to batch nodes, and the detection index set is transformed into a multi-dimensional feature vector as the node attributes of the batch nodes. Specifically, the data acquisition and mapping module performs standardization and alignment processing on batch codes extracted from circulation records from different supply chain links and information systems. Since heterogeneous data sources may use different coding rules for the same batch of agricultural products—for example, planting bases may use the "origin-date-serial number" format, while processing plants may use the "processing plant code-raw material batch-processing batch" format—the data acquisition and mapping module uses a preset coding mapping rule library to identify the core identification elements representing the same batch in different coding formats, such as raw material traceability codes, production dates, and product varieties. This process unifies the heterogeneous codes into the platform's standard batch code format, such as "BatchID-origin code-variety code-production date-serial number," eliminating the problem of the same batch being misidentified as multiple batches due to identification differences. After standardization and alignment, the data acquisition and mapping module maps each piece of data to a batch node, with each batch node corresponding to a single flow status record of agricultural products at a certain stage of the supply chain. The module transforms the set of detection indicators in the flow records into a multi-dimensional feature vector, which serves as the node attribute of that batch node. The specific transformation process is as follows: First, the indicators in the detection indicator set are normalized, mapping indicators with different dimensions and numerical ranges to the [0, 1] interval. For example, pesticide residue detection values ​​are normalized according to national standard limits, and temperature records are normalized according to suitable storage temperature ranges. Then, the normalized indicator values ​​are combined according to a preset feature dimension order to form a multi-dimensional feature vector. For example, the feature vector of a certain batch node might be [normalized pesticide residue value, normalized heavy metal content value, normalized microbial indicator value, normalized temperature value, normalized humidity value, normalized transportation time value]. This multi-dimensional feature vector fully characterizes the quality and environmental status of that batch node at the corresponding stage of the supply chain.

[0012] Step 1.3 identifies upstream and downstream transmission relationships based on the chronological order of timestamps. When it is determined that there are batch-based or batch-based transfer operations, a one-to-many or many-to-one composite transfer edge is generated. Specifically, the data acquisition and mapping module identifies the upstream and downstream transmission relationships between batch nodes based on the chronological order of timestamps in the circulation record and the association rules of batch codes. For cases where a single batch flows from one stage to the next, such as a batch of vegetables flowing from the planting base (batch node A, timestamp T1) to the primary processing workshop (batch node B, timestamp T2), where T2>T1, and the batch codes have an inheritance relationship, the data acquisition and mapping module will construct a directed transfer edge between batch node A and batch node B, with the direction from A to B, indicating that agricultural products flow from the upstream stage to the downstream stage. When determining the existence of batch transfer operations, for example, when a batch of raw vegetables (batch node C) is divided into multiple sub-batches (batch nodes D1, D2, D3) and processed into different products during the processing stage, the data acquisition and mapping module will identify the timestamp relationship between batch node C and batch nodes D1, D2, D3, as well as the batch identification in the batch code, and generate a one-to-many composite transfer edge, that is, three transfer edges pointing from batch node C to batch nodes D1, D2, and D3 respectively. When determining the existence of batch transfer operations, for example, when multiple batches of semi-finished products (batch nodes E1, E2) are merged into a finished product batch (batch node F) during the packaging stage, the data acquisition and mapping module will identify the timestamp relationship between batch nodes E1, E2, and batch node F, as well as the batch merging identification in the batch code, and generate a many-to-one composite transfer edge, that is, two transfer edges pointing from batch nodes E1, E2, and F respectively.

[0013] Step 1.4: Based on the volume or mass proportion of each sub-batch in the batching or merging operation, assign corresponding batching / merging weight coefficients to the composite circulation edge. These weight coefficients are used to adjust the propagation ratio during subsequent risk probability diffusion. Specifically, the data acquisition and mapping module extracts the volume or mass data of each sub-batch from the circulation record for the one-to-many composite circulation edge generated by the batching operation, and calculates the volume or mass proportion of each sub-batch in the original batch. For example, if the total mass of the original batch C is 1000 kg, and after batching, sub-batch D1 is 300 kg, D2 is 400 kg, and D3 is 300 kg, then the batching / merging weight coefficient assigned to the circulation edge from batch node C to D1 is 300 / 1000 = 0.3, to D2 is 0.4, and to D3 is 0.3. The data acquisition and mapping module extracts volume or mass data for each source batch in the many-to-one composite flow edge generated by the batch consolidation operation, and calculates the volume or mass percentage of each source batch in the consolidated batch. For example, if batch E1 has a mass of 200 kg, E2 has a mass of 300 kg, and the total mass of batch F after consolidation is 500 kg, then the batch consolidation weight coefficient assigned to the flow edge from batch node E1 to F is 200 / 500 = 0.4, and the flow edge from E2 to F is assigned 0.6. The batch consolidation weight coefficient is recorded in the attributes of the corresponding flow edge and used to adjust the risk propagation ratio at the batch consolidation or batch splitting node during subsequent risk probability diffusion calculations. This ensures that the risk propagation amount is proportional to the actual material flow amount. For example, if batch C is detected to have a risk, the risk will be attenuated by a weight coefficient of 0.3 when propagating to D1 and by a weight coefficient of 0.4 when propagating to D2, reflecting the actual risk share borne by each sub-batch after consolidation.

[0014] In a preferred embodiment of the present invention, the specific implementation process of extracting batch nodes and flow edges within the current window based on a preset time sliding window, constructing a local flow topology, and assigning time-decreasing relationship decay weights to the flow edges in the local flow topology includes: Step 2.1: The local topology construction module slides a time window according to a preset time step, filtering out batch nodes and their associated flow edges whose timestamps fall within the time window's range to construct a local flow topology. Specifically, this includes: The local topology construction module first sets a preset time step, for example, sliding the time window every 24 hours. The window width is set according to the characteristics of the agricultural product supply chain's flow cycle, for example, set to 7 days, covering the typical flow cycle from planting and harvesting to retail sales. The local topology construction module continuously slides the time window according to the preset time step. After each slide, it obtains the start and end times of the current time window, for example, the current window is from March 15, 2024, 00:00:00 to March 21, 2024, 23:59:59. The local topology construction module filters out batch nodes whose timestamps fall within the current time window's range from all batch nodes generated by the data acquisition and mapping module; that is, batch nodes whose timestamps are greater than or equal to the window's start time and less than or equal to the window's end time. These batch nodes constitute the set of batch nodes for the current window. The local topology construction module further filters associated flow edges, meaning that each flow edge connects to at least one upstream or downstream batch node that is in the current window's batch node set. These flow edges constitute the current window's flow edge set. Based on the current window's batch node set and flow edge set, the local topology construction module constructs a local flow topology. This local flow topology is organized in the form of a directed graph, with batch nodes as vertices and flow edges as directed edges, fully depicting the flow structure of the agricultural product supply chain within the current time sliding window.

[0015] Step 2.2: For each flow edge in the local flow topology, obtain the timestamps of the upstream and downstream batch nodes connected to that edge, calculate the flow time interval between them, and compare the flow time interval with the standard flow cycle of the corresponding supply chain link. Specifically, the local topology construction module traverses each flow edge in the current local flow topology, and for each flow edge, obtains the timestamp of the upstream batch node it connects to. Timestamps of downstream batch nodes The local topology building module calculates the time interval between the two processes. This circulation time interval represents the actual time taken for agricultural products to flow from the upstream to the downstream stage. The local topology construction module determines the supply chain stage transformation type corresponding to the circulation edge based on the stage identifiers of the upstream and downstream batch nodes connected by the circulation edge, such as from planting to primary processing, or from cold chain transportation to wholesale trading. The local topology construction module then queries a pre-configured standard circulation cycle database to retrieve the standard circulation cycle corresponding to this stage transformation type. The standard circulation cycle is a normal circulation time range determined comprehensively based on agricultural product industry standards, historical statistical data, and expert experience. For example, the standard circulation cycle from harvesting to initial processing is 12 hours, and the standard circulation cycle from cold chain transportation to wholesale trading is 48 hours. The circulation time interval is calculated by comparing the local topology construction module. With standard turnover cycle ,judge Whether it is within a reasonable range provides a basis for subsequent calculation of relationship decay weights.

[0016] Step 2.3: If the circulation time interval does not exceed the standard circulation cycle, the relationship attenuation weight that decreases over time is calculated using the standard attenuation base. Specifically, this includes: the local topology construction module comparing the circulation time interval... With standard turnover cycle Afterwards, if a judgment is made This means that the time interval between transactions did not exceed the standard transaction cycle, indicating that the agricultural product transaction process corresponding to this transaction edge conforms to normal transaction patterns and no abnormal delays occurred. The local topology construction module uses a standard attenuation base. Calculate the decay weight of the relationship that decreases over time, and the standard decay base. It is a pre-set constant, for example This represents the rate at which risk naturally decays over time under normal operating conditions. The local topology construction module calculates the relationship decay weights according to the exponential decay model. ,in A unit of time, such as 1 day. This indicates a time interval in days. For example, if... sky, sky, Then the relation decay weight This relationship decay weight reflects the objective law that as the circulation time increases, the correlation strength between batch nodes gradually decreases, and the risk impact of earlier batches on subsequent batches gradually weakens.

[0017] Step 2.4: If the circulation time interval exceeds the standard circulation cycle, the attenuation base is dynamically adjusted based on the excess ratio, and the relationship attenuation weight is calculated. This ensures that the relationship attenuation weight of circulation edges with longer timeouts decreases at a faster rate. Specifically, this includes: the local topology construction module comparing circulation time intervals... With standard turnover cycle Afterwards, if a judgment is made If the time interval for circulation exceeds the standard circulation cycle, it indicates an abnormal delay in the circulation process of the agricultural products corresponding to that circulation edge, potentially indicating risks such as transportation interruptions, improper storage, or misalignment in the process. (The local topology construction module calculation exceeds the limit.) This excess ratio quantifies the degree of timeout in the actual circulation time relative to the standard circulation cycle. For example, if Hour, Hours, This means a timeout of 25%. The local topology building module is based on the excess ratio. Dynamically adjust the attenuation base and calculate the adjusted attenuation base. ,in This is the timeout penalty coefficient, a pre-set constant, for example... This is used to control the strength of the reduction in the attenuation base after timeout. For example, if , , ,but The local topology building block uses an adjusted attenuation base. Calculate the relationship decay weights according to the exponential decay model. For example, if sky, sky, Then the relation decay weight Compared to the weight in the case without timeout (if using) Calculated as The significant decrease in the timeout period indicates that the relationship decay weight of the longer the timeout period, the faster the rate of decline, reflecting the enhanced blocking effect of the timeout period on risk propagation.

[0018] Step 2.5: The ratio of the relationship attenuation weight to the flow time interval is determined as the risk propagation damping coefficient of the flow edge. The risk propagation damping coefficient is used to characterize the transmission resistance of risk on the flow edge. Specifically, the local topology construction module calculates the relationship attenuation weight for each flow edge. Then, the risk propagation damping coefficient of the flow edge is further calculated. ,in The time interval for circulation. Risk propagation damping coefficient. Taking into account both the relationship decay weight and the flow time interval, the risk propagation damping coefficient is numerically equal to the relationship decay weight per unit time, representing the magnitude of the resistance encountered by risk propagation along this flow edge per unit time. The larger the value, the smaller the resistance to risk transmission along the flow edge, and the easier it is for the risk to propagate from the upstream batch node to the downstream batch node; the risk propagation damping coefficient. The smaller the value, the greater the transmission resistance, and the stronger the suppression of risk propagation. The local topology construction module will calculate the risk propagation damping coefficient. Recorded in the attributes of the corresponding flow edge, along with the relation decay weight. The combination of factors such as batch weighting coefficients and other attributes constitutes a complete set of attributes for the flow edge, providing quantitative parameters for the subsequent risk inference module to perform risk probability diffusion.

[0019] In a preferred embodiment of the present invention, the specific implementation process of detecting whether there are discontinuous intervals in the local flow topology, and if so, generating virtual batch nodes to fill the intervals based on the attribute information and historical flow probability distribution of the known batch nodes adjacent to the intervals, and assigning corresponding confidence labels to the virtual batch nodes includes: Step 3.1: Traverse the flow edges in the local flow topology to detect whether there is a missing processing conversion relationship between the output category of the upstream batch node and the input category of the downstream batch node. If a missing relationship exists, it is marked as a broken section. Specifically, the break repair module starts from the initial batch node of the local flow topology and performs a depth-first or breadth-first traversal along the direction of the flow edges. For each flow edge, the break repair module obtains the output category of the upstream batch node and the input category of the downstream batch node it connects to. The output category refers to the form or state of the agricultural product output by the upstream batch node in the corresponding supply chain link, such as "fresh-cut vegetables", "preliminary processed semi-finished products", and "refrigerated finished products"; the input category refers to the form or state of the agricultural product received by the downstream batch node in the corresponding supply chain link, such as "raw vegetables", "semi-finished products", and "finished products awaiting packaging". The break repair module queries the pre-configured processing conversion relationship knowledge base to determine whether there is a valid processing conversion relationship between the output category of the upstream batch node and the input category of the downstream batch node. The processing and conversion relationship knowledge base records the reasonable product form conversion rules between various links in the agricultural product supply chain. For example, "fresh-cut vegetables" can be converted into "washed vegetables" through the "washing" step, and "washed vegetables" can be converted into "pre-packaged vegetables" through the "packaging" step. If the query results show that there is no direct processing and conversion relationship between the output category of the upstream batch node and the input category of the downstream batch node, that is, there is a lack of necessary intermediate processing links between the two, such as "fresh-cut vegetables" flowing directly to "pre-packaged vegetables" skipping the "washing" step, the break repair module determines that there is a missing processing and conversion relationship in the flow path corresponding to the flow edge, marks the flow edge as the boundary of the break interval, and marks the blank area between the upstream batch node and the downstream batch node as the break interval.

[0020] Step 3.2: Extract the environmental feature vectors and geographic trajectory information of the known batch nodes at both ends of the fracture interval. Input the environmental feature vectors and geographic trajectory information into the Markov chain state transition model to predict the most likely intermediate processing state sequence within the fracture interval. Specifically, the fracture repair module extracts the environmental feature vectors and geographic trajectory information of the known batch nodes at both ends of the marked fracture interval. The environmental feature vectors include vectors formed by normalizing environmental monitoring data such as temperature, humidity, and transportation time in the circulation records corresponding to the batch nodes; the geographic trajectory information includes spatial information such as geographical coordinates, region code, and movement path in the circulation records corresponding to the batch nodes. The fracture repair module inputs the extracted environmental feature vectors and geographic trajectory information of the upstream and downstream known batch nodes, as well as their output and input categories, into the pre-constructed Markov chain state transition model. The Markov chain state transition model is a probabilistic model trained on historical agricultural product supply chain data. The states in the model correspond to various processing stages in the supply chain, such as "cleaning, sorting, packaging, and refrigeration." The state transition probability in the model represents the probability of moving from one processing stage to the next; for example, the probability of moving from "cleaning" to "sorting" is 0.8, and the probability of moving from "cleaning" to "packaging" is 0.2. The Markov chain state transition model calculates the probability of various possible intermediate processing state sequences between upstream and downstream known batch nodes based on the output category of the upstream known batch node, the input category of the downstream known batch node, the similarity of environmental feature vectors, and the spatial continuity of geographical trajectory information. It selects the intermediate processing state sequence with the highest probability as the prediction result. For example, a prediction result of ["cleaning", "sorting", "packaging"] indicates that the most likely sequence within the break interval is cleaning, sorting, and packaging.

[0021] Step 3.3 involves generating a corresponding number of virtual batch nodes to fill the gaps in the intermediate processing state sequence, and extracting the generation probability of each virtual batch node from the transition probability matrix of the Markov chain state transition model. Specifically, the gap repair module generates a corresponding number of virtual batch nodes to fill the gaps based on the intermediate processing state sequence predicted by the Markov chain state transition model. For each state in the intermediate processing state sequence, the gap repair module creates a virtual batch node, whose stage identifier is set to the corresponding processing state name, such as "cleaning, sorting, packaging". The gap repair module assigns a virtual batch code to each virtual batch node, with the encoding format consistent with the standard batch code, but with the "Virtual" prefix added to identify its virtual attributes, such as "Virtual-BatchID-cleaning-timestamp". Based on the timestamps of the upstream and downstream known batch nodes, the gap repair module assigns interpolated timestamps to each virtual batch node according to the order of the intermediate processing state sequence, ensuring that the timestamps of the virtual batch nodes are evenly distributed between the upstream and downstream known batch nodes. The fracture repair module extracts the generation probability corresponding to each virtual batch node from the transition probability matrix of the Markov chain state transition model. Specifically, for the... Each virtual batch node has a generation probability. This is equal to the transition probability from the state of the upstream known batch node (or the previous virtual batch node) to the processing state corresponding to this virtual batch node. For example, if the first virtual batch node corresponds to the "washing" state, and the output category of the upstream known batch node corresponds to the "fresh-cut vegetables" state, the transition probability from "fresh-cut vegetables" to "washing" is 0.9. Therefore, the generation probability of the first virtual batch node is... If the second virtual batch node corresponds to the "sorting" state, and the probability of transitioning from "cleaning" to "sorting" is 0.8, then the generation probability of the second virtual batch node is... The fracture repair module records the extracted generation probability in the attributes of the corresponding virtual batch node.

[0022] Step 3.4 involves calling the pre-stored prior probabilities of node existence and performing a Bayesian fusion calculation between the generated probability and the prior probabilities of node existence to obtain the confidence label for each virtual batch node. Specifically, the break repair module retrieves the prior probability of node existence for the corresponding processing stage from the pre-stored database of prior probabilities of node existence. The prior probability of node existence is the probability of a specific processing stage actually existing in the supply chain flow, based on historical agricultural product supply chain data statistics. For example, the prior probability of node existence for the "cleaning" stage is 0.95, indicating that 95% of the historical flow paths include the cleaning stage; the prior probability of node existence for the "packaging" stage is 0.85. The break repair module generates the probability for each virtual batch node. Prior probability of existence of nodes in the corresponding processing stage Perform Bayesian fusion calculation to obtain confidence labels. The Bayesian fusion formula is: For example, if the generation probability of a certain virtual batch node is... The prior probability of the existence of nodes in the corresponding processing stage Then confidence label Confidence label The value range is [0, 1]. The closer the value is to 1, the higher the probability that the virtual batch node actually exists; the closer the value is to 0, the lower the probability that the virtual batch node is falsely generated and actually exists. The fracture repair module will use the calculated confidence label. The attributes recorded in the corresponding virtual batch node, together with the batch code, stage identifier, timestamp, and generation probability of the virtual batch node, constitute the complete attribute set of the virtual batch node. The break repair module adds the generated virtual batch node and its associated flow edges (flow edges connecting the upstream known batch node to the first virtual batch node, between virtual batch nodes, and from the last virtual batch node to the downstream known batch node) to the local flow topology, completing the filling of the broken interval and making the flow path of the local flow topology continuous and complete.

[0023] In a preferred embodiment of the present invention, the specific implementation process of inputting the local flow topology containing virtual batch nodes into a pre-constructed probabilistic graphical model, performing risk probability diffusion based on relationship decay weights and confidence labels, and calculating the risk inference value of the target batch nodes includes: Step 4.1: In the probabilistic graphical model, the prior risk probability is initialized based on the detection index set of each batch node, and the confidence label of the virtual batch node is used as a correction factor for its prior risk probability to lower the probability. Specifically, this includes: The risk inference module first constructs a probabilistic graphical model, which is based on a local flow topology (including virtual batch nodes filled by the fracture repair module). Batch nodes are random variable nodes in the probabilistic graphical model, and flow edges are the dependencies between random variable nodes. For each real batch node in the local flow topology, the risk inference module initializes the prior risk probability based on its detection index set. The specific initialization method is as follows: Key risk indicators are extracted from the detection index set, such as pesticide residue detection values, heavy metal content, and microbial indicators. The normalized values ​​of these indicators are compared with the corresponding national standard limits or safety thresholds to calculate the degree of exceedance. Based on the degree of exceedance, the detection index set is mapped to a prior risk probability through a preset risk scoring function. The prior risk probability ranges from [0, 1]. A value closer to 1 indicates a higher initial risk for that batch, while a value closer to 0 indicates a lower initial risk. For example, if a batch has pesticide residue levels 1.2 times the national standard limit, heavy metal content 0.8 times the standard limit, and microbial indicators that are within acceptable limits, then the prior risk probability calculated by the risk scoring function is... The risk inference module, for each virtual batch node in the local flow topology, cannot directly initialize the prior risk probability based on detection data due to the lack of actual detection indicator sets for virtual batch nodes. Therefore, the risk inference module uses an interpolation method based on the prior risk probabilities of adjacent real batch nodes to initially estimate the prior risk probability of the virtual batch node. For example, the average of the prior risk probabilities of known batch nodes at both ends of the fracture interval is taken as the initial prior risk probability of the virtual batch node. The risk inference module further assigns confidence labels to the virtual batch nodes. As a correction factor for its prior risk probability, the probability reduction operation is performed, and the reduced prior risk probability is... ,in C represents the initial prior probability of risk, which is a preliminary estimate, and C is the confidence level label. For example, if the initial prior probability of risk for a virtual batch node... Confidence label The reduced prior probability of risk This correction significantly reduces the prior risk probability of virtual batch nodes with lower confidence labels, minimizing their impact on overall risk inference and preventing excessively high risk misjudgments introduced by low-confidence virtual data.

[0024] Step 4.2: Based on the belief propagation algorithm, risk messages are iteratively transmitted in the local flow topology. In each iteration, the message transmission volume from the source batch node to the target batch node is calculated. The message transmission volume is the product of the current risk posterior probability of the source batch node, the relation decay weight of the flow edge, and the risk propagation damping coefficient. Specifically, the risk inference module uses the belief propagation algorithm to iteratively transmit risk messages in the probabilistic graphical model composed of the local flow topology. The belief propagation algorithm is a classic algorithm for probabilistic inference in a probabilistic graphical model. Through message transmission between nodes, the probability distribution of each node is gradually updated, eventually converging to the marginal probability distribution of each node. The risk inference module initializes the iteration counter t=0, sets the maximum number of iterations (e.g., 100) and the convergence threshold (e.g., 0.001). In the t-th iteration, the risk inference module traverses each flow edge in the local flow topology. For each flow edge from the source batch node... To the target batch node Flow edge Calculate from source batch node Transmit to the target batch node message volume Message volume The calculation formula is: ,in For source batch node In the The posterior probability of the current risk after the next iteration For the flow edge Relationship decay weight, For the flow edge The risk propagation damping coefficient. In the 0th iteration, the current posterior risk probability of each batch node is initialized to its prior risk probability, i.e. (For real batch nodes) or (For virtual batch nodes). If the flow edge For composite flow edges generated by batch or combined flow, they also need to be multiplied by the corresponding batch weighting coefficient. After calculating the message transmission volume of all flowing edges, the risk inference module performs risk assessment on each target batch node. Summarize all message traffic directed to this node and update the posterior probability of the node's risk. ,in Prior weight coefficients (e.g.) =0.3), used to balance the prior probability of risk with the impact of the incoming message. This indicates that for all nodes pointing to the batch... Sum the message passing volume of the flowing edges.

[0025] Step 4.3: For the message transmission volume to the virtual batch node, a weighted constraint is introduced based on the generation probability of the virtual batch node to suppress the risk amplification effect caused by low-probability virtual nodes. Specifically, when updating the posterior probability of the risk of the virtual batch node, the risk inference module considers the message transmission volume to the virtual batch node. The message transmission volume is used to introduce the generation probability of this virtual batch node. Apply weighted constraints. The specific constraint method is as follows: when calculating virtual batch nodes... When calculating the posterior probability of risk, the aggregated incoming message transmission volume will be used. Multiply by the generation probability The weighted total number of incoming messages is obtained. Then substitute it into the posterior probability update formula: By introducing generation probability By applying weighted constraints, the amount of incoming messages received by virtual batch nodes with low generation probability (e.g., P_gen=0.5) is significantly attenuated, and the growth of the risk posterior probability of the virtual batch node is suppressed. This avoids the risk amplification effect caused by low-probability virtual nodes receiving a large number of risk messages and prevents virtual data from causing excessive interference to the real risk inference results.

[0026] Step 4.4: Repeat the iterative propagation until the change in the risk posterior probability of the global batch nodes in two adjacent iterations is less than the convergence threshold. The converged risk posterior probability of the target batch node is then determined as the risk inference value. Specifically, after updating the risk posterior probabilities of all batch nodes in the t-th iteration, the risk inference module calculates the change in the risk posterior probability of the global batch nodes in two adjacent iterations. ,in Traverse all batch nodes (including real batch nodes and virtual batch nodes) in the local flow topology. Represents batch node In the The iteration and the The absolute difference in the posterior probability of risk after each iteration. The risk inference module determines the change in the global posterior probability of risk. If the probability of the risk posterior probability of each batch node in the two adjacent iterations is less than the preset convergence threshold, it indicates that the change in risk posterior probability of each batch node in the two adjacent iterations has stabilized, the belief propagation algorithm has reached the convergence state, and the risk inference module stops iterating. If the probability of the risk posterior probability is greater than or equal to the current iteration number t < the maximum iteration number, the risk inference module increments the iteration counter by 1, i.e., t = t + 1, and continues to execute the next iteration propagation. If the probability of the risk posterior probability is greater than or equal to the current iteration number t but the current iteration number t has reached the maximum iteration number, the risk inference module forcibly stops iterating and outputs the current risk posterior probability as the final result. After the iteration converges, the risk inference module extracts the converged risk posterior probability of the target batch node (i.e., the specific batch node that needs to be risk assessed, such as the finished product batch that is about to enter the retail stage), and determines this probability value as the risk inference value of the target batch node. For example, if the target batch node converges after the 50th iteration and its risk posterior probability is 0.75, then the risk inference value of the target batch node is 0.75, which means that based on the risk propagation analysis of the supply chain flow topology, the target batch node has a 75% risk probability.

[0027] In a preferred embodiment of the present invention, the process of iteratively transmitting risk messages in a local flow topology based on the belief propagation algorithm further includes: Step 4.5: Monitor the message transmission volume on each flow edge in real time. For flow edges whose message transmission volume is lower than the propagation blocking threshold, mark their state as dormant and cut off the message transmission channel of the flow edge within the current iteration cycle. Specifically, during the iterative transmission of the belief propagation algorithm, the risk inference module monitors the message transmission volume on each flow edge in the local flow topology in real time. The risk inference module pre-sets a propagation blocking threshold (e.g., 0.01), which represents the minimum effective value of message transmission volume. Message transmission below this threshold is considered to have negligible contribution to risk inference. In the t-th iteration, the risk inference module determines whether the message transmission volume of each flow edge is lower than the propagation blocking threshold. If it is lower, the risk inference module marks the state of the flow edge as dormant and cuts off the message transmission channel of the flow edge within the current iteration cycle. That is, in the subsequent message aggregation and risk posterior probability update process, the message transmission volume of the flow edge will no longer be included in the sum of incoming messages of the target batch nodes, which is equivalent to temporarily removing the flow edge from the probabilistic graphical model within the current iteration cycle. For example, if a certain flow edge... Message passing volume in the t-th iteration If the value is below the transmission blocking threshold of 0.01, the risk inference module will transfer the data to the next step. If marked as dormant, it will not be included in the risk posterior probability when updating batch node 2. This item reduces the transmission and computation of invalid messages by cutting off the message transmission channels of low-message-transmission edges, thereby lowering the computational complexity of the belief propagation algorithm and improving iteration efficiency.

[0028] Step 4.6: Count the total number of currently active flowing edges. When the proportion of the total number of active flowing edges to the total number of flowing edges in the local flowing topology is lower than a preset activity threshold, a topology sparsity mechanism is triggered. Specifically, this includes: In each iteration, the risk inference module counts the total number of flowing edges currently in an active state (i.e., message transmission volume is not lower than the propagation blocking threshold and not marked as dormant), and simultaneously obtains the total number of flowing edges in the local flowing topology (including active and dormant flowing edges). The risk inference module calculates the proportion of the total number of active flowing edges to the total number of flowing edges. The risk inference module presets an activity threshold (e.g., 0.3). When the calculated proportion of active flowing edges is lower than the activity threshold θ_active, it indicates that the message transmission volume of a large number of flowing edges in the local flowing topology has dropped to a negligible level, the topology structure has become sparse, and continuing to perform iterative transmission on the complete topology will generate a large amount of invalid computation. The risk inference module determines that the proportion of active flowing edges < the activity threshold, triggers the topology sparsity mechanism, and starts subsequent topology simplification operations.

[0029] Step 4.7 involves removing dormant edges from the local flow topology to generate a simplified computational subgraph. In subsequent iterations, risk probability diffusion is performed only within this simplified subgraph to suppress computational complexity. Specifically, after triggering the topology sparsity mechanism, the risk inference module traverses all edges in the local flow topology, removing those marked as dormant—essentially removing them from the edge set of the probabilistic graphical model. The risk inference module retains active edges and their connected batch nodes, generating a simplified computational subgraph. This simplified subgraph is a subset of the local flow topology, containing only edges whose message passing volume exceeds the propagation blocking threshold in the current iteration and their associated batch nodes, removing redundant edges and isolated nodes that contribute minimally to risk inference. In subsequent iterations (t+1, t+2, etc.), the risk inference module performs risk probability diffusion only within the simplified computational subgraph. This means it only calculates the message propagation volume of flowing edges in the simplified computational subgraph and updates the posterior probability of batch nodes, without calculating the removed dormant flowing edges and isolated batch nodes. By performing iterations within the simplified computational subgraph, the number of flowing edges and batch nodes to be calculated in each iteration is significantly reduced, lowering the computational complexity of the belief propagation algorithm, accelerating iteration convergence, and suppressing the increase in computational resource consumption and time overhead caused by the large scale of the local flowing topology. For example, if the original local flowing topology contains 1000 flowing edges and 500 batch nodes, the simplified computational subgraph generated after removing dormant flowing edges contains only 250 active flowing edges and 200 batch nodes, reducing the computational load of subsequent iterations to 25% of the original, significantly improving computational efficiency.

[0030] In a preferred embodiment of the present invention, step 5 above may include: Step 5.1: Extract target batch nodes whose risk inference values ​​exceed a preset risk threshold as the backtracking starting point, and obtain the final message transmission volume on each flow edge after the probabilistic graphical model converges. Specifically, the early warning generation module selects target batch nodes whose risk inference values ​​exceed a preset risk threshold from all target batch nodes output by the risk inference module. The preset risk threshold is a risk judgment threshold determined comprehensively based on agricultural product safety standards, platform risk control strategies, historical risk event data, etc. For example, 0.7 indicates that batch nodes with risk inference values ​​exceeding 0.7 are judged as high-risk batches, requiring the initiation of risk control early warning and backtracking analysis. For example, if the risk inference value of a target batch node is 0.75 > 0.7, the early warning generation module extracts this target batch node as the backtracking starting point. The early warning generation module obtains the final message transmission volume on each flow edge from the probabilistic graphical model after the belief propagation algorithm converges in the risk inference module. The final message transmission volume refers to the message transmission volume calculated by each flow edge in the last iteration. The early warning generation module traverses all flow edges in the local flow topology (or simplified computational subgraph), extracts and records the final message transmission amount of each flow edge, and constructs a mapping table from flow edges to the final message transmission amount, providing a basis for subsequent backtracking path generation.

[0031] Step 5.2: Starting from the backtracking starting point, trace back layer by layer along the reverse direction of the flow edges. In each layer of tracing, select the flow edge with the largest final message transmission volume as the most likely propagation path branch, until tracing back to the source batch node where the prior risk probability is greater than the high-risk marking threshold. Specifically, the early warning generation module starts from the extracted backtracking starting point (high-risk target batch node) and traces back layer by layer along the reverse direction of the flow edges (i.e., from the downstream batch node to the upstream batch node). The early warning generation module initializes the current tracing node as the backtracking starting point and initializes the suspicious backtracking paths as an empty list. In the first layer of tracing, the early warning generation module searches for all flow edges pointing to the current tracing node (i.e., flow edges where the current tracing node is the target batch node). From the mapping table of flow edges to final message transmission volume, it obtains the final message transmission volume of these flow edges and selects the flow edge with the largest final message transmission volume as the most likely propagation path branch. For example, if the backtracking starting point is a batch node... There are three flow edges pointing to the batch node. , respectively , , The final message transmission volumes were 0.35, 0.25, and 0.15 respectively. The early warning generation module selected the flow edge with the largest final message transmission volume. As the most likely propagation path branch in the first layer of tracing, the flow edge The upstream batch node (batch node 1) connected to it is added to the suspicious backtracking path. The warning generation module updates the current traceability node to the selected upstream batch node (batch node 1), enters the second layer of tracing, and repeats the above operation of selecting the flow edge with the largest final message transmission volume, tracing upstream layer by layer. In each layer of tracing, the warning generation module also checks the prior risk probability of the current traceability node to determine whether the prior risk probability > ,in High-risk labeling threshold (e.g.) This indicates that the nodes in this batch are themselves high-risk sources and there is no need to trace them upstream. If the prior probability of the risk of the currently traced node is greater than... The early warning generation module marks this batch of nodes as the source of risk and stops tracing; if the prior probability of risk is ≤ The early warning generation module continues to trace upstream. The early warning generation module repeats the layer-by-layer tracing operation until it traces back to the source batch node where the prior risk probability is greater than the high-risk marking threshold, or to the starting node of the local flow topology (without upstream flow edges).

[0032] Step 5.3 involves combining the batch nodes and flow edges traversed during the tracing process according to the tracing order to generate a suspicious backtracking path. Specifically, after completing the layer-by-layer tracing, the warning generation module combines the batch nodes and flow edges traversed during the tracing process according to the tracing order from the backtracking starting point to the source batch node to generate a suspicious backtracking path. The suspicious backtracking path is organized in list form, with the elements in the list as follows: [Source batch node, Flow edge 1, Intermediate batch node 1, Flow edge 2, Intermediate batch node 2, ..., Flow edge n, Backtracking starting point (high-risk target batch node)]. For example, if the tracing process is: Backtracking starting point batch node... ←Flowing edge ←Intermediate Batch Node 1←Flow Edge ←Source Batch Node The generated suspicious backtracking path is: [batch node] Flowing edge Batch node 1, flow edge Batch node The suspicious backtracking path fully records the most likely path of risk propagation from the source batch node through intermediate circulation links to the high-risk target batch node, providing a basis for risk control personnel to trace the source of risk and locate key risk links.

[0033] Step 5.4 extracts the detection indicator set and environmental feature vector of each batch node on the suspicious backtracking path, and generates risk control early warning information containing the trend changes of abnormal indicators and the risk transmission link topology. Specifically, the early warning generation module traverses each batch node in the suspicious backtracking path. For real batch nodes, it extracts the detection indicator set (including pesticide residue detection values, heavy metal content, microbial indicators, etc.) and environmental feature vector (including normalized values ​​such as temperature, humidity, and transportation time) from their node attributes. For virtual batch nodes, due to the lack of actual detection data, the early warning generation module marks the node as a virtual node and extracts its confidence label and generation probability as auxiliary information. The early warning generation module performs time series analysis on the extracted detection indicator set, and plots the trend change curves of each key detection indicator (e.g., pesticide residue detection values) along the tracing order of the suspicious backtracking path (from the source batch node to the backtracking starting point), identifying abnormal indicator trend changes, such as an indicator suddenly rising at an intermediate batch node, exceeding the safety threshold, or an indicator showing abnormal patterns such as missing data at a virtual batch node. The early warning generation module generates a risk transmission link topology diagram based on batch nodes and flow edges in the suspicious backtracking path. This topology diagram is a directed graph that visually displays the path structure of risk propagating step by step from the source batch node to the backtracking starting point. Nodes in the diagram are marked with different colors or sizes to indicate the prior or posterior probability of risk for each batch node, and edges are marked with different thicknesses to indicate the final message transmission volume of each flow edge, highlighting key nodes and edges in risk propagation. The early warning generation module integrates the extracted detection indicator set, environmental feature vectors, abnormal indicator trend curves, risk transmission link topology diagram, and text descriptions of suspicious backtracking paths (e.g., "Source batch: BatchID-xxx, Risk source: Pesticide residue exceeds standard by 1.5 times → Intermediate link: Processing plant A → Target batch: BatchID-yyy, Risk inferred value: 0.75") to generate risk control early warning information. The early warning generation module pushes the generated risk control early warning information to relevant risk control personnel, supply chain managers, and regulatory departments through the platform's early warning notification system, triggering risk handling processes. These processes include measures such as sealing up high-risk batches at the traceability starting point, initiating verification of suppliers at the source batch nodes, and strengthening testing of intermediate links on suspicious traceability paths, thereby achieving rapid response and precise handling of agricultural product supply chain risks.

[0034] In a preferred embodiment of the present invention, after sliding the time sliding window according to a preset time step, the method further includes: Step 2.8 compares the current local flow topology constructed in the current window with the historical local flow topology constructed in the previous window, extracts newly added batch nodes, eliminated batch nodes, and changed flow edges, and constructs a differential topology increment. Specifically, this includes: after the local topology construction module slides the time sliding window according to a preset time step to construct the current local flow topology of the current window, it calls the historical local flow topology data constructed in the previous window. The historical local flow topology is the local flow topology constructed when the time sliding window slid (e.g., the previous day), and the risk probability diffusion calculation has been completed and converged, and the risk posterior probability of each batch node has stabilized. The local topology construction module compares the set of batch nodes in the current local flow topology with the set of batch nodes in the historical local flow topology, extracts newly added batch nodes, i.e., batch nodes that exist in the current local flow topology but not in the historical local flow topology. These batch nodes correspond to the flow data newly included in the current time sliding window; and extracts eliminated batch nodes, i.e., batch nodes that exist in the historical local flow topology but not in the current local flow topology. These batch nodes correspond to flow data whose timestamps have exceeded the range of the current time sliding window and have been removed. The local topology construction module compares the set of flowing edges in the current local flowing topology with the set of flowing edges in the historical local flowing topology, extracting changed flowing edges, including newly added flowing edges (flow edges that exist in the current local flowing topology but not in the historical local flowing topology), removed flowing edges (flow edges that exist in the historical local flowing topology but not in the current local flowing topology), and attribute-changed flowing edges (flow edges that exist in both but whose attributes such as relationship decay weight and risk propagation damping coefficient have changed). The local topology construction module integrates the extracted newly added batch nodes, eliminated batch nodes, newly added flowing edges, removed flowing edges, and attribute-changed flowing edges to construct a differential topology increment. The differential topology increment records the structural and attribute changes of the current local flowing topology relative to the historical local flowing topology, providing input for subsequent incremental risk probability diffusion.

[0035] Step 2.9 involves injecting the differential topology increment into the probabilistic graphical model that has converged in the previous window, freezing the posterior probabilities of batch nodes and transition edges unaffected by the differential topology increment. Specifically, the local topology construction module injects the constructed differential topology increment into the probabilistic graphical model that has converged in the previous window. The probabilistic graphical model that has converged in the previous window refers to the historical local transition topology corresponding to the previous time sliding window, which, after iterative convergence by the belief propagation algorithm executed by the risk inference module, has reached a stable state in terms of the posterior probabilities of each batch node. The local topology construction module adds corresponding random variable nodes to the probabilistic graphical model based on the newly added batch nodes in the differential topology increment, and initializes the prior risk probabilities of these newly added batch nodes (based on the detection index set for real batch nodes and corrected based on confidence labels for virtual batch nodes). Based on the eliminated batch nodes in the differential topology increment, it removes the corresponding random variable nodes and their associated flow edges from the probabilistic graphical model. Based on the newly added flow edges in the differential topology increment, it adds corresponding dependency edges to the probabilistic graphical model and configures their relationship decay weights, risk propagation damping coefficients, and other attributes. Based on the removed flow edges in the differential topology increment, it deletes the corresponding dependency edges from the probabilistic graphical model. Based on the attribute changes in the flow edges in the differential topology increment, it updates the relationship decay weights, risk propagation damping coefficients, and other attributes of the corresponding flow edges in the probabilistic graphical model. The local topology construction module identifies batch nodes and flow edges unaffected by the differential topology increment, i.e., batch nodes and flow edges that exist in both the historical and current local flow topologies and whose flow edge attributes have not changed. The local topology building module freezes the posterior probabilities of these unaffected batch nodes, that is, it keeps their posterior probabilities unchanged after convergence in the previous window. In subsequent iterations, the posterior probabilities of these batch nodes are not updated, thus avoiding repeated calculations of converged stable nodes and reducing the amount of computation.

[0036] Step 2.10 involves re-exercising the local risk probability diffusion for a set number of rounds only for batch nodes within the neighborhood affected by the differential topology increment, to update the risk inference values ​​within the neighborhood. Specifically, the local topology construction module determines the neighborhood affected by the differential topology increment. This neighborhood includes newly added batch nodes in the differential topology increment, as well as batch nodes directly or indirectly connected to the newly added batch nodes through newly added flow edges or attribute-change flow edges (within a set number of hops, e.g., 2 hops). The local topology construction module marks the batch nodes within the affected neighborhood as nodes requiring updates and marks the unaffected batch nodes with frozen risk posterior probabilities as nodes that do not require updates. The risk inference module receives the probabilistic graphical model injected by the local topology construction module after the differential topology increment and re-exercises the local risk probability diffusion for a set number of rounds (e.g., 10 rounds) only for the batch nodes within the affected neighborhood. During the iterative process of local risk probability diffusion, the risk inference module only calculates the message transmission volume of the flow edges connecting batch nodes within the affected neighborhood, and only updates the risk posterior probability of batch nodes within the affected neighborhood. For batch nodes with frozen risk posterior probabilities, their risk posterior probabilities remain unchanged and participate in message transmission calculations as constants. After completing a set number of local risk probability diffusion iterations, the risk inference module outputs the updated risk inference values ​​of batch nodes within the affected neighborhood. These updated risk inference values ​​comprehensively consider the impact of new flow data introduced by the differential topology increment on the risk distribution, while retaining the converged risk inference results of unaffected areas, thus achieving incremental risk inference updates. By performing local risk probability diffusion only on the neighborhood affected by the differential topology increment, rather than re-executing the complete belief propagation algorithm iteration on the entire current local flow topology, the computational load is significantly reduced, the risk inference update speed is accelerated, and the real-time risk control requirements of scenarios with continuous sliding time windows and continuous updates of flow data are met.

[0037] In a preferred embodiment of the present invention, it further includes: Step 4.8 clarifies that the node attributes of batch nodes also include dynamic environmental feature vectors. These dynamic environmental feature vectors are generated by fusing meteorological data from the production area with time-series temperature and humidity data during transportation. Specifically, when constructing batch nodes, the data acquisition and mapping module, in addition to converting the detection index set into a multi-dimensional feature vector as the node attribute, also configures a dynamic environmental feature vector as an extension of the node attributes. The dynamic environmental feature vector is a vector generated by fusing meteorological data from the agricultural product's production area with time-series temperature and humidity data during transportation. It is used to characterize the environmental conditions experienced by the agricultural product corresponding to the batch node during production and distribution. The data acquisition and mapping module obtains meteorological data from the meteorological data service interface for the agricultural product's production area during the production period (e.g., the planting cycle, the week before harvest), including meteorological indicators such as daily average temperature, daily average humidity, cumulative rainfall, and sunshine duration; and obtains time-series temperature and humidity data for the agricultural product corresponding to the batch node during transportation from the transportation monitoring system, including hourly temperature and humidity values ​​recorded by transport vehicles or cold chain equipment. The data acquisition and mapping module performs statistical processing on meteorological data, such as calculating statistical features like average temperature, average humidity, highest temperature, lowest temperature, and temperature fluctuation variance during the production period; it also extracts time-series features from transportation temperature and humidity time-series data, such as calculating average temperature, average humidity, duration of temperature exceeding the standard (cumulative duration of temperature exceeding the suitable transportation temperature range), duration of humidity exceeding the standard, and frequency of temperature fluctuations during transportation. The data acquisition and mapping module normalizes the extracted meteorological statistical features and transportation temperature and humidity time-series features, mapping them uniformly to the [0, 1] interval, and then combines them according to the preset feature dimension order to form a dynamic environmental feature vector. For example, the dynamic environmental feature vector is [normalized value of average temperature at the production site, normalized value of average humidity at the production site, normalized value of temperature fluctuation variance at the production site, normalized value of average temperature during transportation, normalized value of average humidity during transportation, normalized value of duration of temperature exceeding the standard during transportation, normalized value of frequency of temperature fluctuation during transportation]. The data acquisition and mapping module merges the generated dynamic environmental feature vector with the multidimensional feature vector transformed based on the detection index set to jointly constitute the complete node attributes of the batch node, ensuring that the batch node contains both quality detection information and environmental condition information, thus providing a data foundation for subsequent environmental risk compensation calculations.

[0038] Step 4.9: When calculating the risk inference value of the target batch node, the matching degree between the dynamic environmental feature vector and each degradation mode vector in the preset agricultural product degradation environment mode library is calculated. Specifically, this includes: when the risk inference module performs risk probability diffusion calculation on the risk inference value of the target batch node, it extracts the dynamic environmental feature vector of the target batch node. The risk inference module calls the preset agricultural product degradation environment mode library, which is a knowledge base built based on research literature on agricultural product quality degradation, historical degradation event data, expert knowledge, etc. The library stores a variety of typical environmental modes that lead to agricultural product quality degradation, and each degradation mode is represented in the form of a degradation mode vector. The degradation pattern vector and the dynamic environment feature vector have the same feature dimensions. For example, a high temperature and high humidity degradation pattern vector is [0.9, 0.9, 0.3, 0.85, 0.85, 0.6, 0.4], indicating that the average temperature at the production site is high (0.9), the average humidity at the production site is high (0.9), the temperature fluctuation at the production site is small (0.3), the average temperature during transportation is relatively high (0.85), the average humidity during transportation is relatively high (0.85), the duration of temperature exceeding the standard during transportation is relatively long (0.6), and the frequency of temperature fluctuation during transportation is moderate (0.4). This environmental pattern easily leads to the spoilage and deterioration of agricultural products due to high temperature and high humidity. The risk inference module traverses each degradation pattern vector in the agricultural product degradation environment pattern library. ( =1, 2, ..., K, where K is the total number of degradation modes), calculate the dynamic environmental feature vector of the target batch nodes. With each degraded mode vector Matching degree The matching degree is calculated using cosine similarity or the reciprocal of Euclidean distance. For example, using cosine similarity, the matching degree... The value range is [0, 1]. The closer the value is to 1, the more similar the dynamic environment feature vector of the target batch node is to the degradation mode vector. The more similar the environmental conditions experienced by the batch node are to the degradation mode, the higher the risk of quality degradation.

[0039] Step 4.10: If a degradation pattern vector with a matching degree higher than the degradation warning threshold exists, then the environmental risk compensation factor is calculated based on the matching degree. Specifically, after calculating the matching degree between the dynamic environmental feature vector of the target batch node and each degradation pattern vector, the risk inference module sets a degradation warning threshold (e.g., 0.75) and determines whether there are degradation pattern vectors with a matching degree higher than the degradation warning threshold. If a degradation pattern vector with a matching degree higher than the degradation warning threshold exists, it indicates that the environmental conditions experienced by the target batch node are highly matched with a certain degradation environmental pattern. Even if the current detection indicator set of the target batch node does not show obvious abnormalities, based on the environmental conditions, the batch node still has a high potential risk of quality degradation, and its prior risk probability needs to be compensated and adjusted. The risk inference module is based on the matching degree. Calculate environmental risk compensation factors The calculation formula is: ,in This is an environmental risk compensation coefficient (e.g., 0.5), used to control the intensity of environmental risk compensation. This indicates that the matching degree exceeds the deterioration warning threshold. The greater the excess, the larger the environmental risk compensation factor. For example, if the matching degree of a certain degradation mode vector is 0.85, the degradation warning threshold is 0.75, and the environmental risk compensation coefficient is 0.5, then the environmental risk compensation factor is equal to 0.05. If there are multiple degradation mode vectors with matching degrees higher than the degradation warning threshold, the risk inference module takes the environmental risk compensation factor corresponding to the degradation mode vector with the highest matching degree, or takes the average or maximum value of multiple environmental risk compensation factors as the final environmental risk compensation factor.

[0040] Step 4.11: The environmental risk compensation factor is superimposed onto the prior risk probability of the corresponding batch node to improve its risk sensitivity under specific environmental conditions. Specifically, after calculating the environmental risk compensation factor, the risk inference module superimposes this factor onto the prior risk probability of the corresponding batch node (target batch node), updating the prior risk probability accordingly. ,in This refers to the original prior risk probabilities initialized based on the detection index set (or corrected based on the confidence labels). This represents the prior probability of the new risk after overlaying environmental risk compensation factors. The risk inference module ensures the prior probability of the new risk after overlay. If the value is greater than 1, it is truncated to 1. The risk inference module uses the updated prior risk probabilities. In subsequent iterations of the belief propagation algorithm, the initial risk probability of the nodes in this batch participates in the risk probability diffusion calculation, replacing the original prior risk probability. By superimposing environmental risk compensation factors, the risk sensitivity of corresponding batch nodes under specific environmental conditions (environmental conditions highly matched with the deterioration environmental pattern) is enhanced. Even if the detection index set of a batch node shows that it is qualified, the system will still judge it as having a high risk prior probability because the environmental conditions it has experienced have a high risk of deterioration. In the process of risk probability diffusion, the batch node will transmit higher risk information to downstream batch nodes, improve the risk inference value of downstream batch nodes, thereby realizing a forward-looking risk warning based on environmental conditions and avoiding risk omissions caused by relying solely on the detection index set.

[0041] In a preferred embodiment of the present invention, after generating a corresponding number of virtual batch nodes based on the intermediate processing state sequence to fill the broken interval, the method further includes: Step 3.5 involves setting a lifecycle timer for each virtual batch node and continuously monitoring the actual supplementary data corresponding to that virtual batch node in the supply chain system. Specifically, after generating a virtual batch node to fill the gap, the break repair module sets an independent lifecycle timer for each virtual batch node. The lifecycle timer starts counting from the moment the virtual batch node is generated and continuously accumulates the duration of its existence. The break repair module sets a timeout threshold (e.g., 72 hours) for each lifecycle timer, representing the maximum time a virtual batch node is allowed to wait for actual supplementary data after its generation. Simultaneously, the break repair module initiates a monitoring process to continuously monitor the actual supplementary data corresponding to that virtual batch node in the supply chain management information system. Actual supplementary data refers to the actual circulation records of intermediate processing stages predicted by the virtual batch node and subsequently supplemented at each stage of the supply chain, including the actual batch code, stage identifier, timestamp, and detection indicator set. The monitoring process establishes a data subscription interface with the supply chain management information system to receive newly added circulation records in real time. For each new circulation record, it determines whether its batch code, process identifier, and timestamp match the predicted information of a certain virtual batch node. For example, it determines whether the process identifier of the new circulation record is the intermediate processing state predicted by the virtual batch node (such as "cleaning" or "sorting"), whether the timestamp falls within the time window (e.g., ±6 hours) of the interpolated timestamp of the virtual batch node, and whether the batch code has an inheritance relationship with the batch codes of known batch nodes at both ends of the break interval associated with the virtual batch node. If the new circulation record matches a certain virtual batch node, the monitoring process marks the new circulation record as the actual supplementary data corresponding to that virtual batch node and notifies the break repair module to perform subsequent conversion operations.

[0042] Step 3.6: If actual supplementary data is received before the lifecycle timer expires, the real detection index set from the actual supplementary data is extracted to replace the node attributes of the virtual batch node, its state is converted to a real batch node, and its risk prior probability is reset based on the real detection index set. Specifically, if the monitoring process notifies that actual supplementary data matching a certain virtual batch node has been received during the period when the cumulative duration of the lifecycle timer has not exceeded the timeout threshold, the break repair module performs the conversion operation from virtual batch node to real batch node. The break repair module extracts the real batch code, stage identifier, timestamp, and detection index set from the actual supplementary data, replaces the virtual batch code (with the "Virtual" prefix) of the virtual batch node with the real batch code in the actual supplementary data, updates the timestamp of the virtual batch node to the real timestamp in the actual supplementary data, and confirms the stage identifier of the virtual batch node as the real stage identifier in the actual supplementary data. The break repair module extracts the real detection index set from the actual supplementary data, converts it into a multi-dimensional feature vector, and replaces the original node attributes of the virtual batch node generated based on interpolation estimation, so that the node attributes of the batch node are completely based on the real detection data. The fracture repair module converts the status identifier of the batch node from "virtual node" to "real node," removing its virtual attribute markers, including deleting attributes unique to virtual nodes such as confidence labels and generation probabilities. Based on the extracted real detection index set, the fracture repair module recalculates the risk prior probability of the batch node according to the risk prior probability initialization method for real batch nodes, replacing the original risk prior probability generated based on interpolation and confidence label correction. For example, if the original risk prior probability of a virtual batch node (corrected by confidence label) is 0.4865, and the actual supplementary data's detection index set shows that the pesticide residue detection value is 1.1 times the national standard limit, the recalculated risk prior probability is 0.65. The fracture repair module resets the risk prior probability of this batch node to 0.65. The fracture repair module notifies the risk inference module that the batch node has been converted to a real batch node. In subsequent risk probability diffusion iterations, the risk inference module uses the reset risk prior probability and updates the risk posterior probability of this batch node according to the processing rules for real batch nodes (no longer introducing generation probabilities for weighted constraints), improving the accuracy of risk inference.

[0043] Step 3.7: If the lifecycle timer times out and no actual supplementary data is received, the confidence label of the virtual batch node is reduced according to a decay coefficient negatively correlated with the timeout duration. When the confidence label drops below the confidence retention threshold, the virtual batch node and its associated flow edges are removed from the local flow topology, and a topology reconnection operation between adjacent real batch nodes is triggered. Specifically, this includes: If the monitoring process still does not receive actual supplementary data matching the virtual batch node after the cumulative lifecycle timer exceeds the timeout threshold, it indicates that the intermediate processing step predicted by the virtual batch node may not have occurred in the actual supply chain flow, or may not have been recorded due to data loss, thus reducing the confidence of the virtual batch node. The breakage repair module calculates the timeout duration, i.e., the duration for which the lifecycle timer exceeds the timeout threshold. The breakage repair module reduces the confidence label of the virtual batch node according to a decay coefficient negatively correlated with the timeout duration. The decay formula is: ,in The original confidence level label. For the timeout duration, The new confidence label after reduction, This is the confidence decay rate coefficient (e.g., 0.01 / hour). It is a natural exponential function. Hourly. For example, if the original confidence label of the virtual batch node... =0.973, the lifecycle timer timeout threshold is 72 hours, and the current timeout duration is... =24 hours, confidence decay rate coefficient =0.01, then the new confidence label ≈0.973 × 0.787 ≈ 0.766. The fracture repair module updates the confidence label of this virtual batch node. Simultaneously, the risk inference module is notified. In subsequent risk probability diffusion iterations, the risk inference module uses the reduced confidence label to correct the prior risk probability of this virtual batch node, further reducing its impact on risk inference. The fracture repair module sets a confidence retention threshold (e.g., 0.5). When the confidence label of the virtual batch node... When the credibility threshold drops below a certain threshold, the credibility of the virtual batch node is deemed too low, making it unsuitable for inclusion in the local flow topology for risk inference. The break repair module removes the virtual batch node and its associated flow edges (including those pointing to the virtual batch node and those pointing downstream) from the local flow topology, deleting the corresponding random variable nodes and dependency edges from the probabilistic graphical model. The break repair module then triggers a topology reconnection operation between adjacent real batch nodes, identifying the upstream and downstream real batch nodes originally connected to the removed virtual batch node. A new flow edge is directly constructed between these nodes, and the relationship decay weight and risk propagation damping coefficient of the new flow edge are recalculated based on the timestamps of the upstream and downstream real batch nodes, restoring the connectivity of the local flow topology. For example, if the removed virtual batch node was originally connected to upstream real batch node A and downstream real batch node B, the break repair module constructs a new flow edge between batch node A and batch node B. ,calculate The relationship decay weight and risk propagation damping coefficient are used to complete the topology reconnection, ensuring that the risk inference module can still perform risk probability diffusion based on the reconnected local flow topology in subsequent iterations, avoiding topology breakage and risk propagation path interruption caused by the removal of virtual batch nodes.

[0044] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0045] It should be noted that all formulas in this manual are calculated by removing dimensions and taking their numerical values. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0046] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A risk control management system for agricultural product supply chains based on big data analytics, characterized in that: include: processor; Memory is used to store computer program instructions; The data acquisition and mapping module is used to acquire the circulation data generated in each link of the agricultural product supply chain, map the circulation data to batch nodes, and construct circulation edges connecting the batch nodes based on the upstream and downstream transmission relationships in the circulation data. The local topology construction module is used to extract batch nodes and flow edges within the current window based on a preset time sliding window, construct a local flow topology, and assign a relationship decay weight that decreases with time to the flow edges in the local flow topology. The fracture repair module is used to detect whether there are fracture intervals where batches are discontinuous in the local flow topology. If so, it generates virtual batch nodes to fill the fracture interval based on the attribute information and historical flow probability distribution of the known batch nodes adjacent to the fracture interval, and assigns corresponding confidence labels to the virtual batch nodes. The risk inference module is used to input the local flow topology containing the virtual batch nodes into a pre-constructed probabilistic graphical model, perform risk probability diffusion based on the relationship decay weight and the confidence label, and calculate the risk inference value of the target batch node. The early warning generation module is used to generate a suspicious backtracking path for the target batch node based on the probability propagation path in the probability graph model when the risk inference value exceeds a preset risk threshold, and output risk control early warning information. The processor is used to execute computer program instructions stored in the memory to control the data acquisition and mapping module, the local topology construction module, the fracture repair module, the risk inference module, and the early warning generation module to work together.

2. The system according to claim 1, characterized in that, The process of acquiring circulation data generated at each stage of the agricultural product supply chain, mapping the circulation data to batch nodes, and constructing circulation edges connecting the batch nodes based on the upstream and downstream transmission relationships in the circulation data includes: Extract the circulation records of agricultural products at each link of the supply chain. The circulation records include at least batch codes, link identifiers, timestamps, and sets of testing indicators. The batch code is standardized and aligned to eliminate the identification differences caused by heterogeneous data sources, and the standardized flow data is mapped to batch nodes. The detection index set is transformed into a multi-dimensional feature vector as the node attribute of the batch node. The upstream and downstream transmission relationship is identified based on the order of the timestamps. When it is determined that there are batch transfer or batch transfer operations, a composite transfer edge with one-to-many or many-to-one relationships is generated. Based on the volume or mass percentage of each sub-batch in the batching or merging operation, a corresponding batching / merging weight coefficient is assigned to the composite flow edge.

3. The system according to claim 1, characterized in that, The process of extracting batch nodes and flow edges within the current window based on a preset time sliding window, constructing a local flow topology, and assigning relationship decay weights that decrease over time to the flow edges in the local flow topology includes: The time sliding window is slid according to a preset time step to filter out batch nodes and associated flow edges whose timestamps fall within the range of the time sliding window in order to construct a local flow topology. For the flow edge in the local flow topology, obtain the timestamps of the upstream and downstream batch nodes connected to the flow edge, calculate the flow time interval between the two, and compare the flow time interval with the standard flow cycle of the corresponding supply chain link. If the circulation time interval does not exceed the standard circulation cycle, the relationship attenuation weight that decreases with time is calculated using the standard attenuation base. If the circulation time interval exceeds the standard circulation cycle, the attenuation base is dynamically reduced based on the excess ratio, and the relationship attenuation weight is calculated. The ratio of the relationship decay weight to the flow time interval is determined as the risk propagation damping coefficient of the flow edge.

4. The system according to claim 1, characterized in that, The process involves detecting whether there are discontinuous intervals in the local flow topology. If such intervals exist, virtual batch nodes are generated to fill the discontinuities based on the attribute information and historical flow probability distribution of the known batch nodes adjacent to the discontinuity interval. A corresponding confidence label is then assigned to each virtual batch node, including: Traverse along the flow edges in the local flow topology and detect whether there is a missing processing conversion relationship between the output category of the upstream batch node and the input category of the downstream batch node. If so, mark it as a broken interval. Extract the environmental feature vectors and geographical trajectory information of the known batch nodes at both ends of the fracture interval, and input the environmental feature vectors and geographical trajectory information into the Markov chain state transition model to predict the most likely intermediate processing state sequence within the fracture interval. Based on the intermediate processing state sequence, a corresponding number of virtual batch nodes are generated to fill the broken interval, and the generation probability corresponding to each virtual batch node is extracted from the transition probability matrix of the Markov chain state transition model. The pre-stored prior probability of node existence is called, and the generation probability and the prior probability of node existence are fused using Bayesian calculation to obtain the confidence label of each virtual batch node.

5. The system according to claim 4, characterized in that, The step of inputting the local flow topology containing the virtual batch nodes into a pre-constructed probabilistic graphical model, performing risk probability diffusion based on the relationship decay weights and the confidence labels, and calculating the risk inference value of the target batch nodes includes: In the probabilistic graphical model, the prior risk probability is initialized based on the detection index set of each batch node, and the confidence label of the virtual batch node is used as a correction factor for its prior risk probability to adjust the probability down. Based on the belief propagation algorithm, risk messages are iteratively transmitted in the local flow topology. In each iteration, the message transmission amount from the source batch node to the target batch node is calculated. The message transmission amount is the product of the current risk posterior probability of the source batch node, the relation decay weight of the flow edge, and the risk propagation damping coefficient. For the amount of messages transmitted to the virtual batch node, a weighted constraint is introduced based on the generation probability of the virtual batch node; The iterative propagation is repeated until the change in the risk posterior probability of the global batch node in two adjacent iterations is less than the convergence threshold. The risk posterior probability of the target batch node after convergence is then determined as the risk inference value.

6. The system according to claim 5, characterized in that, The process of iteratively transmitting risk messages in the local flow topology based on the belief propagation algorithm also includes: Monitor the message transmission volume on each flow edge in real time. For flow edges whose message transmission volume is lower than the propagation blocking threshold, mark their status as dormant and cut off the message transmission channel of the flow edge in the current iteration cycle. The total number of currently active flowing edges is counted. When the proportion of the total number of active flowing edges to the total number of flowing edges in the local flowing topology is lower than a preset activity threshold, the topology sparsification mechanism is triggered. The dormant flow edges are removed from the local flow topology to generate a simplified computational subgraph, and in subsequent iterations, risk probability diffusion is performed only within the simplified computational subgraph.

7. The system according to claim 1, characterized in that, When the risk inference value exceeds a preset risk threshold, a suspicious backtracking path for the target batch node is generated based on the probability propagation path in the probabilistic graphical model, and risk control early warning information is output, including: Extract the target batch node whose risk inference value exceeds the preset risk threshold as the backtracking starting point, and obtain the final message transmission volume on each flow edge after the convergence of the probabilistic graphical model; Starting from the backtracking starting point, trace back layer by layer in the opposite direction of the flow edge. In each layer of tracing, select the flow edge with the largest final message transmission volume as the most likely propagation path branch, until the source batch node with a risk prior probability greater than the high-risk marking threshold is traced back. The suspected backtracking path is generated by combining the batch nodes and flow edges that have been traced in the tracing order. Extract the detection index set and environmental feature vector of each batch node on the suspicious backtracking path, and generate risk control early warning information containing the trend changes of abnormal indicators and the risk transmission link topology.

8. The system according to claim 3, characterized in that, After sliding the time sliding window according to the preset time step, the method further includes: Compare the current local flow topology constructed in the current window with the historical local flow topology constructed in the previous window, extract newly added batch nodes, eliminated batch nodes, and changed flow edges, and construct the differential topology increment; The differential topology increment is injected into the probabilistic graphical model that has converged in the previous window, and the risk posterior probability of batch nodes and flow edges that are not affected by the differential topology increment is frozen. For only the batch of nodes within the neighborhood affected by the differential topology increment, a set number of rounds of local risk probability diffusion are re-executed to update the risk inference value within the neighborhood.

9. The system according to claim 2, characterized in that, The node attributes of the batch node also include a dynamic environmental feature vector, which is generated by fusing origin meteorological data and transportation temperature and humidity time-series data. When calculating the risk inference value of the target batch node, the matching degree between the dynamic environmental feature vector and each degradation mode vector in the preset agricultural product degradation environment mode library is calculated. If there is a deterioration pattern vector with a matching degree higher than the deterioration warning threshold, then the environmental risk compensation factor is calculated based on the matching degree. The environmental risk compensation factor is superimposed on the prior risk probability of the corresponding batch node.

10. The system according to claim 4, characterized in that, After generating a corresponding number of virtual batch nodes based on the intermediate processing state sequence to fill the broken interval, the method further includes: Set a lifecycle timer for each virtual batch node and continuously monitor the actual supplementary data corresponding to that virtual batch node in the supply chain system; If actual supplementary data is received before the lifecycle timer expires, the real detection index set in the actual supplementary data is extracted to replace the node attributes of the virtual batch node, its state is converted to a real batch node, and its risk prior probability is reset based on the real detection index set. If the lifecycle timer times out and no actual supplementary data is received, the confidence label of the virtual batch node is reduced according to the decay coefficient negatively correlated with the timeout duration. When the confidence label drops below the confidence retention threshold, the virtual batch node and its associated flow edge are removed from the local flow topology, and a topology reconnection operation between adjacent real batch nodes is triggered.