A food safety supervision system and method based on digital twinning
By constructing a dynamic attribute matrix and regulatory decision tree of a digital twin, combined with a spatiotemporal evolution model, the problems of data isolation and risk prediction in the food production supervision system are solved, realizing intelligent and forward-looking food safety supervision and improving regulatory efficiency.
Patent Information
- Application Number
- CN202511563431.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-10-30
AI Technical Summary
The existing food production supervision system lacks data interconnection and interoperability, is unable to conduct in-depth analysis and risk prediction, and has difficulty in integrating regulatory data, resulting in the inability to form a comprehensive risk view and a lack of intelligence and foresight in regulatory decision-making.
By deploying IoT sensing devices to collect real-time status data from each link of the food production chain, a dynamic attribute matrix of a digital twin is constructed, a regulatory decision tree is generated, a spatiotemporal evolution model is used to deduce the risk propagation path, an early warning and control instruction set is output, and the instruction is distributed to the execution terminal through edge computing nodes to form a closed-loop management.
It enables precise digital mapping of the food production chain, automates and automates regulatory decision-making, quickly identifies abnormal events and predicts risk spread, improves the speed and accuracy of regulatory response, and ensures the timeliness and effectiveness of control measures.
Smart Images

Figure CN121032233B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food safety supervision technology, specifically to a food safety supervision system and method based on digital twins. Background Technology
[0002] With the development of IoT technology, some food production companies have begun deploying sensors in their production processes to monitor key parameters such as temperature and humidity. However, these systems are often isolated, with inconsistent data formats, making it difficult to achieve interconnectivity across the supply chain. Their functions are also largely limited to real-time monitoring and exceeding limits, lacking in-depth data analysis and utilization, and thus unable to perform risk prediction and intelligent decision-making. Information barriers between regulatory agencies and enterprises also make it difficult to effectively integrate regulatory data and form a comprehensive risk view.
[0003] Digital twin technology, as an effective means of achieving interaction and integration between the physical and information worlds, has shown great potential in fields such as industrial manufacturing and smart cities. This technology, by constructing virtual mappings of physical entities, can reflect the real-time state of those entities and support simulation, analysis, and prediction. Introducing digital twin technology into the field of food safety supervision could theoretically achieve precise mapping and dynamic monitoring of the entire food production chain. However, key issues that current technologies have not yet effectively addressed include: how to effectively integrate heterogeneous data scattered across different stages to construct a multi-dimensional attribute matrix that accurately reflects the state of food safety; how to transform static safety standards into executable and intelligent regulatory decision-making logic; and how to predict the propagation path of risks and generate precise intervention instructions. Summary of the Invention
[0004] The purpose of this invention is to provide a food safety supervision system and method based on digital twins to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides a food safety supervision method based on digital twins, the method comprising:
[0006] Real-time status data of target entities are collected by IoT sensing devices deployed in various stages of the food production chain, and a dynamic attribute matrix of the digital twin is constructed based on the real-time status data.
[0007] Based on the compliance comparison results between the dynamic attribute matrix and the preset food safety standard library, a regulatory decision tree containing abnormal event markers is generated.
[0008] The spatiotemporal evolution model of the digital twin is invoked to deduce the risk propagation path of the regulatory decision tree, and output a set of early warning and control instructions covering the entire chain;
[0009] The early warning control instruction set is distributed to the corresponding execution terminal through edge computing nodes, and the historical status record library of the digital twin is updated synchronously.
[0010] Preferably, the step of collecting real-time status data of the target entity through IoT sensing devices deployed at various stages of the food production chain, and constructing a dynamic attribute matrix of the digital twin based on the real-time status data, specifically involves:
[0011] Obtain multi-source heterogeneous data streams of target entities during processing, transportation, and storage from cold chain temperature and humidity sensors, visual inspection equipment, and chemical composition analyzers;
[0012] A sliding time window is used to perform time-series alignment processing on the multi-source heterogeneous data streams to generate standardized data blocks with unified timestamps;
[0013] Key feature dimensions strongly correlated with food safety are extracted from the standardized data blocks, including microbial activity indicators, physical morphological change rate, and chemical residue concentration gradient;
[0014] The key feature dimensions are categorized and aggregated according to the type of process to construct a dynamic attribute matrix indexed by the time axis. Each element in the matrix contains a feature value and its acquisition location code.
[0015] Preferably, the step of generating a regulatory decision tree containing abnormal event markers based on the compliance comparison results between the dynamic attribute matrix and the preset food safety standard library specifically involves:
[0016] Load a threshold rule set from a preset food safety standard library. The threshold rule set is divided by food category and associated with specific links in the production chain.
[0017] Traverse each feature value in the dynamic attribute matrix and calculate its deviation score from the corresponding threshold rule set;
[0018] Feature values whose deviation scores exceed the critical value are marked as abnormal events, and the abnormality type, occurrence stage, and duration are recorded.
[0019] Based on the spatiotemporal distribution density of abnormal event markers, a greedy algorithm is used to generate a regulatory decision tree with the priority of each link as the branch condition, and the tree nodes store the code of the disposal measures.
[0020] Preferably, the step of invoking the spatiotemporal evolution model of the digital twin to perform risk propagation path deduction on the regulatory decision tree and outputting a set of early warning and control instructions covering the entire chain specifically includes:
[0021] The correlation between abnormal event markers in the regulatory decision tree is analyzed to construct a causal directed graph of cross-stage effects.
[0022] Retrieve propagation patterns of anomalous events from the historical state record database of the digital twin and extract the spatiotemporal diffusion coefficient;
[0023] Based on the real-time topology of the current production chain, calculate the probability of risk transmission along the logistics path and the expected scope of impact;
[0024] Based on the transmission probability threshold, a graded early warning is triggered, and a control instruction set containing equipment control parameters, batch isolation instructions, and traceability path truncation commands is generated.
[0025] Preferably, the step of distributing the early warning control instruction set to the corresponding execution terminal through edge computing nodes and synchronously updating the historical state record library of the digital twin specifically involves:
[0026] The geofence identifier of the edge computing node is matched according to the target link encoding of the control instruction set;
[0027] The instruction set is encapsulated with a transmission protocol, and execution timeliness tags and feedback verification codes are added;
[0028] Monitor the response status data of the execution terminal and verify the matching degree between the actual execution parameters and the instruction requirements;
[0029] The verified response status data is appended to the historical status record library of the digital twin and associated with the corresponding abnormal event marker.
[0030] Preferably, the method further includes:
[0031] Regularly scan the historical state record database of the digital twin to extract the characteristic patterns of high-frequency abnormal events;
[0032] A virtual anomaly scenario is constructed using a generative adversarial network and injected into the real-time simulation environment of the digital twin;
[0033] Record the response delay and control command accuracy of the regulatory decision tree in handling virtual anomaly scenarios;
[0034] The sensitivity parameter of the threshold rule set is dynamically adjusted based on the degree of accuracy degradation.
[0035] Preferably, the step of constructing a virtual anomaly scenario using a generative adversarial network and injecting it into the real-time simulation environment of the digital twin specifically involves:
[0036] Extract the probability density function of the normal state data distribution from the historical state record database;
[0037] Perturbation factors that meet the boundary conditions of food safety standards are synthesized through a generator network;
[0038] The disturbance factor is superimposed on the feature dimension of the real-time state data to generate a virtual anomaly data stream with concealment;
[0039] Establish a sandbox testing area within the simulation environment of the digital twin to isolate and run virtual abnormal scenarios.
[0040] Preferably, the method further includes:
[0041] Establish a credit assessment model for participants in the food production chain and quantify the historical compliance rate of each link;
[0042] When a credit score falls below the industry benchmark, an enhanced monitoring mode is triggered.
[0043] Increase the sampling frequency and feature granularity of IoT sensing devices under enhanced monitoring mode;
[0044] Enhanced monitoring data will be stored separately and labeled as a high-risk entity dataset.
[0045] Preferably, the establishment of a credit assessment model for participants in the food production chain, quantifying the historical compliance rate of each link, specifically involves:
[0046] Calculate the total number and severity level of abnormal events for each participant within a preset period;
[0047] Calculate the ratio coefficient between the abnormal handling response time and the standard time limit;
[0048] Dynamic credit weights are generated by integrating total numbers, grades, and ratio coefficients.
[0049] Credit assessment scores are updated using an exponential smoothing algorithm based on a sliding time window.
[0050] Preferably, the present invention also includes a food safety supervision system based on digital twins, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.
[0051] Compared with the prior art, the beneficial effects of the present invention are:
[0052] This invention achieves a precise digital mapping of the physical food production chain by constructing a digital twin. Real-time status data collected by IoT devices enables the virtual model to dynamically reflect the actual condition of the physical objects, changing the traditional regulatory reliance on static reports and lagging information. This virtual-real mapping provides a data foundation for full-chain, transparent regulation, significantly enhancing the breadth and depth of oversight.
[0053] By automatically comparing real-time data with a standard library and generating a regulatory decision tree, the method automates and intelligently manages regulatory decisions. It transforms abstract regulatory standards into concrete, executable computational logic, enabling rapid identification of anomalous events deviating from standards and presenting a structured decision-making path. This significantly reduces the subjectivity and delays of human judgment, improving the speed and accuracy of regulatory response.
[0054] By utilizing a spatiotemporal evolution model to simulate risk propagation, a shift from passive response to proactive early warning has been achieved. The system not only focuses on anomalies in the current stage but also predicts how these anomalies might spread along the supply chain and assesses their potential impact. This forward-looking analysis enables more targeted regulatory measures, allowing for precise control before risks escalate and effectively curbing the spread of food safety incidents.
[0055] By distributing instructions through edge computing nodes, the timeliness and effectiveness of control measures are ensured. Instructions are directly sent to on-site execution terminals, shortening the decision-making-action chain, enabling rapid isolation of risk points, and preventing problematic products from flowing into the next stage. Simultaneously, execution results are fed back and the historical status database is updated, forming a closed-loop management system of "perception-decision-execution-recording," allowing the digital twin to continuously learn and optimize, thereby constantly improving regulatory efficiency. This method provides technical support for building an intelligent and forward-looking modern food safety governance system. Attached Figure Description
[0056] Figure 1 This is a schematic diagram illustrating the working principle of the food safety supervision method based on digital twins as described in this invention.
[0057] Figure 2 A flowchart for constructing a dynamic attribute matrix;
[0058] Figure 3 A flowchart for generating a regulatory decision tree;
[0059] Figure 4 This is a heatmap of the probability matrix for risk propagation across different stages. Detailed Implementation
[0060] 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.
[0061] Please see Figure 1This invention provides a food safety supervision system and method based on digital twins. The method integrates IoT sensing, digital twin modeling, and intelligent decision analysis to achieve real-time monitoring and risk control throughout the food production chain. The overall scheme is as follows: IoT sensing devices, such as cold chain temperature and humidity sensors, are deployed in key stages of the food production chain, including processing, transportation, and storage, to collect real-time status data of target entities, including multi-source heterogeneous information such as temperature and humidity. The data is transmitted to a central processing unit via an interface. The central processing unit preprocesses the data, generating standardized data blocks and organizing them with timestamp indexes. Based on this, key feature dimensions strongly correlated with food safety are extracted and aggregated according to production stages to form a dynamic attribute matrix. Matrix elements contain feature values, collection location codes, and time information. The dynamic attribute matrix is compared with a preset food safety standard library to calculate the deviation of feature values from thresholds and mark abnormal events. A regulatory decision tree is generated based on the distribution of abnormal event markings, using a tree structure to store disposal measure codes, with stage priority as the branching condition. The system uses a digital twin spatiotemporal evolution model to deduce risk propagation paths, constructs a causal influence directed graph based on a historical state record database, calculates the propagation probability and impact range, triggers tiered early warnings, and generates a set of early warning control instructions. These instructions are distributed to execution terminals via edge computing nodes. Nodes match target stages based on geofence identifiers, encapsulate the instructions, and add tags and checksums. Upon execution, the terminal monitors response status data, verifies parameter matching, and updates the digital twin's historical state record database upon successful verification, associating it with anomaly event markers to form a closed-loop monitoring system.
[0062] Example 1: See Figure 2A series of IoT sensing devices are deployed at key nodes in the food production chain, including processing, transportation, and storage. Cold chain temperature and humidity sensors, using high-precision probes, are installed at multiple key locations inside cold storage warehouses and transport vehicles. Their installation positions are optimized through fluid dynamics simulation to avoid temperature dead zones. The sensors periodically read ambient temperature and humidity values at configurable intervals and transmit them to a data aggregation gateway via a low-power wide-area network. Visual inspection equipment typically uses industrial-grade high-speed cameras paired with near-infrared spectral imaging modules. These are fixed above the production line or to the side of the sorting area, capturing high-definition image sequences of the food's appearance in triggered or continuous operation modes. The image data contains rich information on surface texture, color distribution, and morphological features. Chemical composition analyzers are integrated into online inspection lines or used as mobile inspection terminals. Using electrochemical sensors or miniature spectrometer technology, they rapidly scan samples that come into contact with or are extracted from the food surface to obtain concentration readings of specific chemical indicators such as pesticide residues, heavy metal content, and volatile basic nitrogen. The raw data streams generated by these devices have significant multi-source heterogeneity. Temperature and humidity data are high-frequency numerical sequences, image data are structured pixel matrices, and chemical data are time-stamped discrete event points. The data streams are asynchronously transmitted to edge computing units for initial caching and labeling via dedicated communication protocols such as OPCUA or MQTT.
[0063] Before entering the core processing system, multi-source heterogeneous data streams must undergo rigorous time alignment. This is because different devices have different sampling clocks, communication delays, and data generation frequencies. A sliding time window mechanism is introduced to address this issue. The window size is dynamically adjusted according to the data change rate of the specific stage. For example, the window is set to the second level in the refrigerated transport stage with drastic temperature fluctuations, while it can be set to the minute level in the chemical indicator monitoring stage. The alignment process corrects the timestamps of each data stream, synchronizes the clocks of all devices to millisecond precision using a network time protocol, and performs interpolation processing on non-uniformly sampled data points within each sliding window. For example, missing instantaneous readings from temperature sensors are filled using linear interpolation or spline interpolation algorithms, and image data is aligned to the nearest timestamp grid based on its acquisition time. The interpolated and aligned data is encapsulated into standardized data blocks. Each data block contains a unified master timestamp and a snapshot of all sensor data within that time slice. The data blocks are encoded using serialization formats such as Apache Avro or Protocol Buffers to optimize storage and transmission efficiency, and data quality identifiers are attached to record metadata such as missing rate and confidence level.
[0064] Extracting key feature dimensions strongly correlated with food safety from standardized data blocks is a feature engineering process. This process relies on domain knowledge of food spoilage mechanisms and contamination pathways. Microbial activity indicators are not direct measurements, but rather predictive indicators derived by establishing a correlation between historical temperature and humidity sequences and microbial growth models. These indicators quantify the risk level of potential microbial reproduction under specific temperature and humidity conditions. The microbial growth model, built upon domain knowledge of food spoilage mechanisms and contamination pathways, describes the relationship between temperature and humidity conditions and microbial reproduction patterns. This model uses food categories (such as fresh meat and fruits and vegetables) as a basis, incorporating characteristic data such as the growth cycle and reproduction rate of different microorganisms (such as E. coli and Salmonella) under specific temperature and humidity environments. Based on the input historical temperature and humidity sequences, it can calculate the trend of microbial quantity changes under corresponding environmental conditions, thereby deriving microbial activity indicators that quantify the risk level of potential microbial reproduction. Furthermore, the model parameters can be dynamically calibrated using microbial growth data of similar foods in a digital twin historical state record library to ensure the matching degree between the derived results and actual food safety risks. The specific association between historical temperature and humidity sequences and microbial growth models involves using time-aligned historical temperature and humidity sequences (including continuous temperature and humidity data with unified timestamps and collection location codes) from standardized data blocks as input. This input is then imported into the corresponding food category and process's microbial growth model. Based on pre-defined temperature and humidity-microbial growth association logic—such as low-temperature environments slowing microbial growth and high-humidity environments accelerating microbial reproduction—and combined with observations of microbial activity under similar temperature and humidity sequences in the historical state record database, the model extrapolates the microbial reproduction trend under current temperature and humidity conditions. Ultimately, it outputs a predictive index that quantifies the potential risk level of microbial reproduction, namely the microbial activity index. The entire association process requires no manual intervention; the system automatically calls the model and historical data to complete the calculations. Furthermore, the association results are synchronously fed back to the dynamic attribute matrix of the digital twin, serving as a key feature dimension for subsequent compliance comparisons.
[0065] The rate of change in physical morphology is calculated from image sequences captured by visual inspection equipment. Computer vision algorithms are applied to segment and track target objects in consecutive frames, extracting the gradients of changes in morphological parameters such as area, perimeter, and roundness. For example, the degree of wilting in fruits and vegetables or the ice crystal growth in frozen meat can be quantified using the rate of change in morphology. The gradient of chemical residue concentration is directly derived from the readings of a chemical composition analyzer, but its rate of change over time or deviation from a baseline value needs further calculation to identify abnormal accumulation or contamination events. Feature extraction algorithms are typically deployed on edge computing nodes or cloud servers, employing lightweight machine learning models or predefined mathematical transformation functions to ensure real-time performance. Specifically, feature extraction algorithms are uniformly deployed on edge computing nodes at various stages of the food production chain. These nodes are directly integrated near IoT sensing devices, such as cold chain temperature and humidity sensors or visual inspection equipment, to reduce data transmission latency. The algorithm uses a lightweight machine learning model combined with predefined mathematical transformation functions for feature extraction. For microbial activity indicators, lightweight time-series classification models, such as small neural networks based on gated recurrent units, are used to predict microbial growth trends from temperature and humidity data streams. For physical morphological change rates, predefined image processing mathematical transformation functions are applied, such as using the Sobel operator to calculate edge gradient changes of target objects in image sequences. For chemical residue concentration gradients, mathematical transformation functions, such as moving average filtering, are used to smooth the data before calculating concentration differences. The machine learning model is optimized through pruning and quantization techniques, with model parameters stored in the memory of edge nodes. The mathematical transformation functions are based on preset thresholds according to food safety standards. The entire extraction process is completed within a sliding time window, ensuring that feature dimensions are efficiently generated from standardized data blocks and updated in real time to the dynamic attribute matrix.
[0066] The extracted key feature dimensions need to be categorized and aggregated according to the type of production stage from which they originate. For processing stages, the focus might be on microbial activity indicators and real-time chemical concentrations; for transportation stages, the focus might be on polymer physicomorphic change rates and temperature and humidity stability; and for storage stages, a comprehensive evaluation of all dimensions is required. Aggregation is performed on a timeline, statistically summarizing all feature values for each stage within a specific time window. This includes calculating averages, maximums, minimums, or more complex statistics such as trend slopes. The aggregation results are organized into a dynamic attribute matrix indexed by time. This matrix is typically represented as a two-dimensional table or tensor. The row index is a strictly increasing timestamp sequence, while the column index corresponds to different feature dimensions for different stages. Each element in the matrix contains not only the calculated feature value but also the data point's collection location code. The location code uses a hierarchical structure, such as a four-level coding system of "country-region-facility-equipment," to uniquely identify the data source globally. The dynamic attribute matrix is persistently stored in a time-series database, and an efficient indexing mechanism is established to support rapid retrieval and update operations by time range or location code.
[0067] A continuous data quality monitoring system is embedded in the data acquisition and matrix construction process. This system acts like a sensitive nervous system, permeating every key node of the data pipeline. The monitoring system detects the health status of sensing devices in real time through multiple mechanisms. The determination of sensor offline status relies on periodic heartbeat detection signals. If a sensor fails to upload any data within a preset time window, the system marks it as "offline" and records the event log. To address potential sensor drift issues, the system employs statistical process control methods to establish short-term historical models of key parameters. When the latest reading continuously deviates from the model's prediction range and the deviation shows a trend, a potential "drift" alarm is triggered. For obvious abnormal readings, such as a temperature value experiencing an impossible drastic jump within milliseconds, the system applies anomaly detection algorithms based on physical rules or statistical distributions for rapid identification. Specifically, the system uses anomaly detection algorithms based on physical rules and statistical distributions for rapid identification. The algorithm is deployed on edge computing nodes. For real-time data streams such as temperature values, it applies physical rule-based detection, such as checking if the rate of temperature change exceeds the threshold allowed by thermodynamic laws (e.g., setting an instantaneous temperature change not to exceed 5 degrees Celsius per second, otherwise it is considered a physically impossible event). It also applies statistical distribution detection, calculating the mean and standard deviation of temperature values based on historical normal data, and using the Z-score method to calculate the deviation of the current value from the mean in real time. When the Z-score exceeds 3, it is marked as a statistical anomaly. The algorithm employs a sliding window mechanism to analyze the data stream within milliseconds. Physical rule detection is triggered first, with statistical detection used for verification. Anomalies are immediately recorded in terms of type, stage, and duration, triggering a data reconstruction mechanism, such as replacing outlier values with data from adjacent sensors.
[0068] Once a data quality issue is identified, the system will trigger corresponding handling procedures according to preset strategies. For offline sensors, the system may attempt to send remote wake-up commands or reset commands through the gateway. If the attempt fails, a work order will be automatically generated to notify maintenance personnel. For sensors suspected of drift, the system can initiate an automatic calibration routine. This routine may include cross-validating sensor readings with those of adjacent, normally functioning sensors, or invoking the device's built-in self-calibration function. For definitively abnormal readings, the system will immediately mark the data at that point in time as unreliable and trigger a data reconstruction mechanism. This may involve replacing and filling the data with readings from other sensors in the same process or reasonable estimates of historical data from the same period to maintain the continuity of the data flow. The entire data pipeline adopts a distributed and redundant design. Failures of individual sensors or gateways are isolated, and the data flow is automatically routed to backup paths to prevent localized problems from spreading and affecting the integrity of the global data chain.
[0069] The update mechanism of the dynamic attribute matrix is tightly coupled with the data inflow rhythm. New standardized data blocks are continuously generated according to the sliding time window step size, and the arrival of each new data block triggers an incremental update operation of the matrix. The update process is not a simple full overwrite, but rather, based on the timestamp and feature dimension corresponding to the new data block, it locates specific rows and columns in the matrix, replaces old values with new feature values, or adds new observation records. For high-speed data streams, the update operation is optimized to support high throughput. In-memory computing technology is typically used to first apply the update to a copy of the matrix in memory, and then periodically persist it to the storage system. The system follows a configurable data retention strategy to manage the lifecycle of historical data. The strategy is usually based on the time span and data value. For example, data from the most recent hour is retained in a cache for real-time analysis, data from the past day is retained in an online database for immediate querying, and data older than one month is compressed and archived in a lower-cost cold storage system. An automated cleanup process periodically scans the matrix and related storage areas, migrating or deleting old data that has exceeded the retention period. This hierarchical storage and cleanup mechanism effectively balances real-time access performance and infrastructure storage costs.
[0070] Example 2: See Figure 3 In the regulatory process, a pre-defined food safety standard library is loaded into the system's memory as a comparison benchmark. This standard library typically exists in the form of relational database tables or distributed key-value stores. Its structure is hierarchically organized according to food categories, subcategories, and specific varieties. Each food category is associated with a complete set of threshold rules. The threshold rule set defines in detail the upper and lower limits or reasonable fluctuation ranges of various characteristic parameters allowed in different production stages, such as raw material acceptance, cleaning, cutting, heating, packaging, warehousing, and transportation. These rules are derived from the Codex Alimentarius Commission, national mandatory standards, and industry best practice guidelines, and support dynamic updates and version control through a management interface. During system initialization, all or frequently accessed threshold data from the standard library is pre-loaded into the application server's memory cache to significantly reduce frequent disk I / O operations during subsequent compliance comparisons and improve real-time processing efficiency.
[0071] The core of compliance comparison is to traverse each feature value in the dynamic attribute matrix. The rows of the dynamic attribute matrix represent consecutive time points, and the columns represent different feature dimensions at different stages. The traversal process is usually performed chronologically, using parallel stream processing technology to simultaneously initiate comparison requests for multiple feature values. Each feature value is matched against its corresponding food category and production stage threshold rules. The matching process determines the corresponding food category and stage information based on the feature value's timestamp and location encoding, and then retrieves the applicable threshold range from the threshold rule set in memory. The deviation score is calculated using a relative difference quantification method. For example, for numerical features with clear upper and lower limits, the deviation can be the percentage of the current value deviating from the midpoint of the threshold. Or, for features with only upper or lower limits, the absolute or relative amount of exceeding the limit is calculated. The resulting score is a standardized numerical value, facilitating unified comparison across features of different dimensions.
[0072] When the deviation score of a certain feature exceeds a preset threshold, the system immediately triggers the anomaly event marking process. The threshold is not fixed and can be set differently based on the risk sensitivity of different features. For example, the threshold for microbial indicators may be set more strictly than that for physical morphology indicators. Marking an anomaly event requires recording multiple pieces of information. The anomaly type is identified according to a predefined coding system for the feature dimensions. The occurrence stage is precisely coded down to the specific equipment or workstation. The duration is automatically calculated by analyzing the timestamp sequence of consecutively exceeding limits for that feature value. The event is considered closed only when its deviation score falls below the threshold. All marked anomalies are encapsulated into an event object, containing attributes such as event ID, trigger time, end time, associated feature value, calculated deviation score, and event level, and are persistently stored in the anomaly event log database.
[0073] Within a defined statistical time window, the system analyzes the spatiotemporal distribution of all active or newly generated anomaly event markers. The spatiotemporal distribution density is quantified by calculating the frequency of anomalies occurring within a specific spatial region per unit time. Based on this density information, the system employs a greedy algorithm to automatically generate a regulatory decision tree. At each step of tree node construction, the greedy algorithm selects the highest-priority stage as the branch condition. The stage priority is typically determined by a comprehensive assessment of factors such as the stage's historical anomaly frequency, the risk level of the processed food, and the potential severity of the anomaly's consequences. The root node of the decision tree represents the initial judgment requiring regulatory intervention. Each non-leaf node is a judgment condition based on stage priority, while leaf nodes store specific handling measure codes. These codes point to predefined standardized operating instructions, such as "adjust the refrigeration equipment setpoint to -18°C," "move batch A001 to the isolation area," and "suspend the operation of production line B." The generated decision tree structure is serialized into a parsable data format and distributed to subsequent risk deduction and instruction execution modules, thus forming an automated decision-making chain from anomaly detection to handling recommendations.
[0074] To ensure the rationality and effectiveness of the decision tree, the system also introduces a feedback optimization mechanism. Each time a control command issued based on the decision tree is executed, its effects are monitored and recorded. This feedback information, including whether abnormal states are eliminated and the time taken for handling the situation, is used to evaluate the effectiveness of the decision path. Based on long-term evaluation results, the system can adaptively adjust the weight calculation strategy for process priorities or optimize the evaluation function of the greedy algorithm when selecting branches. This allows the generated decision tree to continuously evolve over time, better aligning with the operational characteristics and risk patterns of the actual production chain. This dynamic adjustment mechanism endows the monitoring strategy with learning capabilities, enabling it to gradually adapt to new risk patterns or changes in production processes.
[0075] Example 3: After the regulatory decision tree is generated and abnormal events are marked, the system enters the risk propagation path deduction stage. The core task of this stage is to understand how local anomalies affect the whole through the production chain network. The deduction module analyzes the potential causal relationships between the various abnormal event markings in the decision tree. This analysis is based on the temporal order of events, geographical proximity, and direct connectivity of logistics paths. For example, if the microbiological index anomaly in the "primary processing stage" occurs earlier than the temperature anomaly in the "cold chain transportation stage," and these two stages have a direct material flow relationship in the supply chain topology, the system will initially determine that the former may be the cause of the latter. Based on these analyzed relationships, the system constructs a cross-stage causal influence directed graph. Nodes in the directed graph represent specific production stages, and node attributes include the current state capacity of the stage. Directed edges represent possible propagation paths of risk from the source stage to the target stage. Each edge is assigned a weight during initialization, which can be preset based on domain knowledge to reflect the basic propagation strength of the path in the absence of historical data.
[0076] The system then performs a deep search in the historical state record database of the digital twin, looking for past event sequences similar in feature patterns to the current cluster of anomalous events. The search process employs a matching algorithm based on the similarity of time series shape and event attributes. For each matched historical similar sequence, the system extracts its key spatiotemporal diffusion coefficients. These coefficients quantify the speed and attenuation characteristics of risk along a specific propagation path. For example, historical data might indicate that from exceeding the total bacterial count on the surface of equipment in the "processing stage" to exceeding the microbial standard in the finished product sampling in the "packaging stage," there is an average time delay and a certain concentration decay rate in the risk transmission. The extraction of spatiotemporal diffusion coefficients relies on regression analysis of historical event chains, thus providing data-driven parameters for current inferences.
[0077] Based on the real-time topology of the current production chain, which dynamically reflects the actual flow of materials, semi-finished products, and finished products across various stages, the system begins calculating the probability of risk transmission along each potential path. The calculation process considers various dynamic factors, including the physical distance between stages, logistics transfer time, current environmental conditions, and existing control measures. Based on these calculations, the system further simulates the risk diffusion process to estimate its expected impact range, such as determining the number of downstream finished product batches potentially affected by contaminated raw materials. The calculation of the risk transmission probability can be expressed using a quantitative model, where the probability of risk propagating from stage i to stage j is influenced by the severity of the risk at the source stage, the historical diffusion coefficient, and the current path status.
[0078] When the calculated risk transmission probability exceeds a preset threshold, the system will trigger a tiered early warning mechanism of the corresponding level. The threshold is usually set at multiple levels based on risk tolerance. Based on the early warning level and the detailed path deduced, the system automatically generates a set of specific, executable early warning control instructions covering the entire chain. The instructions may be very specific, such as "immediately lower the temperature setpoint of the cold storage with the number CH-05 by 2 degrees Celsius", "move all packaging boxes with batch number B-20231027-085 into the isolation area for further testing", and "suspend the input of all raw materials from supplier S-408 into production line A".
[0079] The generated early warning control command set needs to be distributed to the corresponding physical execution terminals via edge computing nodes. The distribution process matches the target component code within the command with the geofence identifier in the edge node registration information. Upon successful matching, the command set is encapsulated according to the communication protocol supported by the terminal. During encapsulation, key metadata is embedded, including the last valid execution time limit and a feedback checksum for verifying command integrity. The system continuously monitors the response status data returned by the execution terminal. This data comes from feedback signals from the terminal's own status sensors or actuators. The verification logic compares the actual execution parameters with the command requirements. For example, if the command requires the temperature to drop to 5 degrees Celsius, the system will check whether the actual temperature reported by the sensors has reached and stabilized within the allowable error range near the target value within a reasonable time window.
[0080] All verified response status data is appended to the digital twin's historical status record library, forming new historical records. These new records are precisely associated with the anomaly event marker that initially triggered the process via event ID. This association ensures that the entire closed-loop process, from anomaly detection, risk simulation, instruction issuance to execution feedback, is fully recorded, achieving not only state synchronization between the digital twin and the physical entity, but also fault tolerance mechanisms, including instruction retransmission, status timeout judgment, and degradation handling, are designed to address real-world challenges such as network latency and terminal offline issues, ensuring the ultimate effectiveness of control intentions.
[0081] ;
[0082] in: This represents the probability that the risk is transmitted from stage i to stage j, and its value ranges from [0,1]. This represents the severity index of the current abnormal event in source element i; This represents the path propagation coefficient from stage i to stage j, learned from historical data. It is a dimensionless parameter that reflects the inherent risk transmission characteristics of the path. This represents the path status index from stage i to stage j at the current moment; function It is a mapping function. This formula is used to calculate the probability that risk is passed from stage i to stage j.
[0083] See Figure 4 This chart is the core visualization output of the risk propagation simulation module in the digital twin food safety supervision system. The chart employs a two-layer structure. The upper bar chart visually displays the initial risk probability at each stage of the food production chain. The lower heatmap, the essence of the technology, visually presents the propagation path and intensity of risk within the industry chain. The data above the diagonal of the matrix quantifies the probability of risk transmission from the source stage to the target stage. This data provides a quantitative basis for the system to generate batch isolation instructions and traceability path truncation commands, ensuring precise control before risks escalate. The entire visualization design fully demonstrates the technological advancement of digital twin technology in food safety supervision, moving from passive response to proactive early warning, and provides intuitive and quantitative scientific evidence for regulatory decisions.
[0084] Example 4: During the continuous operation of the digital twin system, a periodic self-assessment and optimization mechanism is activated. The system is set to automatically initiate a global scan task every 24 hours, scanning the historical state record library that is constantly accumulating within the digital twin. The scanning engine identifies abnormal event sequences from the massive historical event logs that have occurred more than a certain threshold within a statistical period, according to preset filtering criteria. For example, the system may find that in the past week, the sensor located in the "cold chain transportation link - vehicle number A - rear area" reported more than five "instantaneous temperature exceeding the standard" anomalies. After identifying these high-frequency abnormal events, the system will conduct in-depth analysis of their inherent characteristic patterns. The analysis of characteristic patterns is not limited to the event type itself, but also includes the temporal regularity of the event occurrence, the distribution characteristics of the event duration, and the related event sequences.
[0085] Based on the extracted feature patterns, the system employs a pre-trained Generative Adversarial Network (GAN) to construct realistic virtual anomaly scenarios. This GAN consists of two competing neural network modules: a generator and a discriminator. The generator network learns the inherent distribution patterns of historical normal state data. By analyzing tens of thousands of normal temperature, humidity, image, and chemical data records, it grasps their statistical characteristics and change patterns. While maintaining the basic reasonable structure of the data, the generator attempts to synthesize extremely subtle perturbation factors that conform to real-world physical constraints. For example, it might generate a perturbation signal simulating the periodic, slow temperature rise caused by slight aging of a refrigerated truck door seal. The discriminator network is trained to distinguish whether the input data comes from normal records in the real world or is a "forgery" synthesized by the generator. Through repeated adversarial learning, the two networks ultimately enable the generator to produce virtual anomaly data that is indistinguishable from reality.
[0086] The generator employs an encoder-decoder structure based on a convolutional neural network. The encoder extracts features from the input normal-state data (normal temperature, humidity, physical morphology, and chemical residue data from various stages of the food production chain extracted from a digital twin historical state record database) through multiple convolutional layers, compressing the high-dimensional data into low-dimensional feature vectors. The decoder reconstructs the low-dimensional feature vectors through deconvolutional layers, generating a virtual abnormal data stream with distribution characteristics similar to normal data. Batch normalization layers are embedded in the network to stabilize the training process and avoid the gradient vanishing problem. The discriminator uses a multi-layer fully connected neural network structure. The input layer receives the data to be judged (real normal records or virtual abnormal data synthesized by the generator). The intermediate hidden layers perform nonlinear transformations on the data features through activation functions. The output layer outputs a single-channel probability value to determine the authenticity of the input data. The last layer of the network uses a sigmoid activation function to ensure that the output value falls within the 0-1 range, used to distinguish the data source. The generator's training data comes from the probability density function of normal state data distribution extracted from the historical state record library of the digital twin, covering multi-source heterogeneous data (temperature and humidity time-series data, physical morphological change data, and chemical residue concentration data) from various stages of processing, transportation, and storage. The discriminator's training data consists of two parts: one is real-world normal records (standardized data blocks without anomaly markers selected from the historical state record library), and the other is virtual anomaly data initially synthesized by the generator. Both types of data are mixed according to a preset ratio and then input into the discriminator for training. The generator's loss function aims to make the discriminator unable to distinguish between the virtual anomaly data it generates and the real normal data; its loss value is constructed using the following formula:
[0087] ;
[0088] in: The loss function representing the generator. Representative generator based on input noise The generated virtual anomaly data, This represents the probability that the discriminator predicts the authenticity of the input data. Represents mathematical expectation, Represents input noise The probability distribution is calculated. A loss value is constructed by calculating the probability of the discriminator misclassifying virtual anomaly data, guiding the generator to adjust network parameters to optimize the realism of the virtual anomaly data. The discriminator's loss function aims to accurately distinguish between real normal data and virtual anomaly data; its loss value is constructed using the following formula:
[0089] ;
[0090] in: The loss function representing the discriminator. This represents real, normal data selected from the historical state record database of the digital twin. The probability distribution represents real, normal data. A loss value is constructed by calculating the combined deviation between the probability of correctly identifying real data and the probability of correctly identifying virtual anomaly data. This loss value guides the discriminator to improve its data discrimination ability. During training, the two systems alternately update network parameters and repeatedly engage in adversarial learning, gradually optimizing the quality of the virtual anomaly data generated by the generator. Ultimately, the generated virtual anomaly data achieves a high degree of consistency with real anomaly data in terms of feature distribution and temporal patterns, making it suitable for anomaly scenario testing in real-time simulation environments of digital twins.
[0091] These virtual anomaly data streams, generated by the generator, are carefully injected into the real-time simulation environment of the digital twin. This simulation environment is a sandbox test area completely isolated from the real production control chain. The injection process simulates the access method of real data streams; virtual sensor readings, image frames, or chemical indicators are sent to the simulation system's data receiving port according to time sequence and protocol. This realistically recreates a risk scenario within the digital twin. For example, the simulation environment might simulate a batch of virtual frozen shrimp undergoing a slow temperature rise process for two hours during transportation. The regulatory decision tree module's response to this virtual scenario is fully recorded and evaluated. Key recorded indicators include the time interval between the system's perception of the virtual anomaly and the generation of the first control command, as well as the degree of agreement between the generated warning control command and the expected optimal handling plan for the virtual scenario. The evaluation results are quantified and stored to determine the sensitivity and effectiveness of the current regulatory system. Table 1 shows a test record for a virtual anomaly scenario of "slow temperature rise during cold chain transportation."
[0092] Table 1: Virtual Abnormal Scenario Test Records
[0093] ;
[0094] The system determines whether there is a trend of performance degradation by comparing the average accuracy of multiple virtual tests over a period of time with the baseline accuracy. If the accuracy is detected to be consistently below a set warning threshold, the system will initiate a dynamic adjustment process. The adjustment targets sensitivity parameters in the threshold rule set. For example, for temperature monitoring, if the system frequently misses slowly developing temperature anomalies in virtual tests (manifested as a decrease in accuracy), the automated algorithm may suggest fine-tuning the threshold from 0.15 to 0.12, making the system alert to even smaller temperature deviations. The entire adjustment process is gradual and feedback-based. After each adjustment, a new round of virtual testing is conducted to verify the effect, thereby steadily improving the system's ability to detect new or hidden risks while avoiding a significant increase in the false alarm rate. This method of using virtual scenarios for stress testing and parameter tuning allows the food safety supervision system to move away from simply relying on historical risks and possess a certain degree of foresight and adaptive evolutionary capability.
[0095] Example 5: In the long-term operation of the food safety regulatory system, establishing a credit assessment model for participants in the food production chain aims to quantify the historical performance of each participant. The core output of the credit assessment model is a comprehensive credit assessment score, which is calculated based on the historical compliance rate of each link. The historical compliance rate is not simply the percentage of qualified batches, but a weighted calculation value. Its calculation period is usually set to one month or one quarter to balance the timeliness and statistical stability of the data. The specific operation of the credit assessment model begins with the statistics of abnormal events of each participant within a preset period. The system extracts all abnormal event records related to a specific participant within that period from the historical status record database. The statistical dimensions include the total number of abnormal events and the severity level of each event. The severity level is divided according to the deviation score corresponding to the event type. For example, events with a deviation score between 20% and 50% are defined as "Level 1" abnormalities, and events with a score exceeding 50% are defined as "Level 2" abnormalities. At the same time, the model calculates the response time of the participants to abnormal events and compares it with the predefined standard response time to obtain a ratio coefficient. This coefficient reflects the efficiency of the participants in correcting deviations. The lower the ratio, the faster the response.
[0096] The model integrates the total number of abnormal events, severity level weights, and response ratio coefficients to generate dynamic credit weights. The integration process uses a linear weighted summation method, but assigns higher weights to the total number of abnormal events and severity levels, as these directly reflect the frequency and impact of risk occurrences. The response ratio receives a relatively lower weight, as it primarily reflects post-event remediation capabilities. An exponential smoothing algorithm based on a sliding time window is used to update credit assessment scores. This algorithm assigns higher weights to recent data, making the participant's latest performance have a greater impact on the score, thus reflecting changes in their creditworthiness in a timely manner. The final credit assessment score is normalized to a range of 0 to 100 for easy understanding and comparison. When a participant's credit assessment score falls below the industry benchmark set by an industry alliance or regulatory agency, the system automatically triggers an enhanced monitoring mode for that participant. The industry benchmark may be a dynamically changing value, such as the median or lower quartile of the credit scores of all participants within the same industry. Activating the enhanced monitoring mode signifies an increased level of monitoring across all aspects related to that participant.
[0097] Once the credit assessment model determines that a participant needs to enter enhanced monitoring mode, the system's central management module generates a set of device configuration instructions. The generation logic of these instructions is based on a pre-defined enhanced monitoring strategy library. This strategy library defines specific parameter adjustment ranges for different types of IoT sensing devices in enhanced mode. For example, for temperature sensors, the strategy might specify adjusting their sampling interval from once per minute in standard mode to once per second; for vibration sensors, it might require increasing their sampling frequency from 10 times per second to 100 times per second. The instruction generation module selects the corresponding parameter configuration template from the strategy library based on the type of process and device list involved by the target participant.
[0098] The generated configuration commands are sent to edge computing nodes or device gateways within the target participant's facility via a secure communication link. A two-way authentication mechanism ensures the trustworthiness of the command source. The command message uses a structured data format, explicitly specifying the device identifier to be modified, the target parameter name, and the new parameter value. Upon receiving the command, the edge node performs syntax and semantic checks to confirm the command format is correct and the parameter values are within a reasonable range allowed by the device. It then writes the new configuration parameters into the device's registers or configuration file using a dedicated protocol adapter. The system incorporates command confirmation and timeout retransmission mechanisms. After successfully completing device configuration, the edge node sends a confirmation receipt to the central management system. If no confirmation is received within a certain time, the central system triggers a retry process or generates an exception alarm.
[0099] In terms of refining the feature dimensions of visual inspection equipment, adjustments in enhanced mode mainly involve parameter configuration and model switching of image analysis algorithms. The system sends instructions to the visual inspection system, requesting it to load algorithm models designed for higher precision detection. For example, in standard mode, a lightweight convolutional neural network might be used to identify the overall appearance and approximate size of a product, while in enhanced mode, a deeper neural network model is switched to. This model is trained to detect minute surface defects, such as mold on fruit, or subtle wrinkles or damage on packaging. Simultaneously, the parameters of the image acquisition system itself may also be adjusted, such as increasing the brightness of the illumination unit to enhance contrast, or increasing the camera's resolution setting to capture richer details.
[0100] For chemical composition analyzers, enhanced mode instructions guide them to execute more comprehensive analytical procedures. This might include adding detection channels, expanding from detecting only a few key indicators to scanning a broader spectrum of potential contaminants; or adjusting analytical method parameters, such as lowering the detection limit, enabling the instrument to identify hazardous substances at lower concentrations. The analyzer may be instructed to run longer warm-up times or more frequent self-calibration cycles to ensure data reliability in high-precision detection mode. All data streams generated by enhanced monitoring mode are tagged with special metadata indicating their acquisition from the enhanced monitoring context. This data is treated differently in subsequent processing and data storage, typically prioritized for real-time analysis on high-performance computing nodes and stored in a dedicated high-risk entity dataset for in-depth analysis and audit trails.
[0101] All data collected under enhanced monitoring mode is specially tagged and stored separately in a dedicated storage area called the "High-Risk Entity Dataset." This dataset is isolated from regular monitoring data and subject to stricter access control and security auditing policies. Separate storage facilitates subsequent focused in-depth analysis. For example, data analysts can run more complex anomaly detection algorithms specifically on this dataset or study whether the abnormal behavior patterns of the high-risk participant exhibit any regularity. This credit assessment and dynamic monitoring adjustment mechanism forms a closed loop. If a participant can continuously improve its operational compliance, causing its credit score to recover and stabilize above the industry benchmark, the system can automatically switch its monitoring mode back to standard mode after a period of observation. Conversely, if the credit score deteriorates further, the system can even trigger higher-level interventions, such as recommending increased frequency of spot checks or initiating special audit processes. In this way, limited regulatory resources are more precisely directed towards higher-risk targets, achieving differentiated and precise regulation based on credit levels.
[0102] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0103] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art 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 appended claims and their equivalents.
Claims
1. A food safety supervision method based on digital twins, characterized in that, include: Real-time status data of target entities are collected by IoT sensing devices deployed in various stages of the food production chain, and a dynamic attribute matrix of the digital twin is constructed based on the real-time status data. Based on the compliance comparison results between the dynamic attribute matrix and the preset food safety standard library, a regulatory decision tree containing abnormal event markers is generated. The spatiotemporal evolution model of the digital twin is invoked to deduce the risk propagation path of the regulatory decision tree, and output a set of early warning and control instructions covering the entire chain; The early warning control instruction set is distributed to the corresponding execution terminal through edge computing nodes, and the historical status record library of the digital twin is updated synchronously. The spatiotemporal evolution model of the digital twin is invoked to deduce the risk propagation path of the regulatory decision tree, and output a set of early warning and control instructions covering the entire chain, specifically: The correlation between abnormal event markers in the regulatory decision tree is analyzed to construct a causal directed graph of cross-stage effects. Retrieve propagation patterns of anomalous events from the historical state record database of the digital twin and extract the spatiotemporal diffusion coefficient; Based on the real-time topology of the current production chain, calculate the probability of risk transmission along the logistics path and the expected scope of impact; Based on the transmission probability threshold, a graded early warning is triggered, and a control instruction set containing equipment control parameters, batch isolation instructions, and source tracing path truncation commands is generated. The step of distributing the early warning control instruction set to the corresponding execution terminal through edge computing nodes and synchronously updating the historical state record library of the digital twin is specifically as follows: The geofence identifier of the edge computing node is matched according to the target link encoding of the control instruction set; The instruction set is encapsulated with a transmission protocol, and execution timeliness tags and feedback verification codes are added; Monitor the response status data of the execution terminal and verify the matching degree between the actual execution parameters and the instruction requirements; The verified response status data is appended to the historical status record library of the digital twin and associated with the corresponding abnormal event marker.
2. The food safety supervision method based on digital twins according to claim 1, characterized in that, The process involves collecting real-time status data of the target entity using IoT sensing devices deployed at various stages of the food production chain, and constructing a dynamic attribute matrix for the digital twin based on this real-time status data. Specifically: Obtain multi-source heterogeneous data streams of target entities during processing, transportation, and storage from cold chain temperature and humidity sensors, visual inspection equipment, and chemical composition analyzers; A sliding time window is used to perform time-series alignment processing on the multi-source heterogeneous data streams to generate standardized data blocks with unified timestamps; Key feature dimensions strongly correlated with food safety are extracted from the standardized data blocks, including microbial activity indicators, physical morphological change rate, and chemical residue concentration gradient; The key feature dimensions are categorized and aggregated according to the type of process to construct a dynamic attribute matrix indexed by the time axis. Each element in the matrix contains a feature value and its acquisition location code.
3. The food safety supervision method based on digital twins according to claim 2, characterized in that, The step of generating a regulatory decision tree containing abnormal event markers based on the compliance comparison results between the dynamic attribute matrix and the preset food safety standard library is as follows: Load a threshold rule set from a preset food safety standard library. The threshold rule set is divided by food category and associated with specific links in the production chain. Traverse each feature value in the dynamic attribute matrix and calculate its deviation score from the corresponding threshold rule set; Feature values whose deviation scores exceed the critical value are marked as abnormal events, and the abnormality type, occurrence stage, and duration are recorded. Based on the spatiotemporal distribution density of abnormal event markers, a greedy algorithm is used to generate a regulatory decision tree with the priority of each link as the branch condition, and the tree nodes store the code of the disposal measures.
4. The food safety supervision method based on digital twins according to claim 1, characterized in that, The method further includes: Regularly scan the historical state record database of the digital twin to extract the characteristic patterns of high-frequency abnormal events; A virtual anomaly scenario is constructed using a generative adversarial network and injected into the real-time simulation environment of the digital twin; Record the response delay and control command accuracy of the regulatory decision tree in handling virtual anomaly scenarios; The sensitivity parameter of the threshold rule set is dynamically adjusted based on the degree of accuracy degradation.
5. The food safety supervision method based on digital twins according to claim 4, characterized in that, The process of constructing virtual anomaly scenarios using generative adversarial networks and injecting them into the real-time simulation environment of the digital twin specifically involves: Extract the probability density function of the normal state data distribution from the historical state record database; Perturbation factors that meet the boundary conditions of food safety standards are synthesized through a generator network; The disturbance factor is superimposed on the feature dimension of the real-time state data to generate a virtual anomaly data stream with concealment; Establish a sandbox testing area within the simulation environment of the digital twin to isolate and run virtual abnormal scenarios.
6. The food safety supervision method based on digital twins according to claim 5, characterized in that, The method further includes: Establish a credit assessment model for participants in the food production chain and quantify the historical compliance rate of each link; When a credit score falls below the industry benchmark, an enhanced monitoring mode is triggered. Increase the sampling frequency and feature granularity of IoT sensing devices under enhanced monitoring mode; Enhanced monitoring data will be stored separately and labeled as a high-risk entity dataset.
7. The food safety supervision method based on digital twins according to claim 6, characterized in that, The establishment of a credit assessment model for participants in the food production chain, quantifying the historical compliance rate of each link, specifically involves: Calculate the total number and severity level of abnormal events for each participant within a preset period; Calculate the ratio coefficient between the abnormal handling response time and the standard time limit; Dynamic credit weights are generated by integrating total numbers, grades, and ratio coefficients. Credit assessment scores are updated using an exponential smoothing algorithm based on a sliding time window.
8. A food safety supervision system based on digital twins, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the steps of any one of the methods described in claims 1 to 7.
Citation Information
Patent Citations
Intelligent remote early warning method and system for food risk prevention and control
CN120449016A
Medical equipment monitoring analysis system and method based on full life cycle
CN120705732A