Intelligent remote early warning method and system for food risk prevention and control
By deploying lightweight blockchain terminals and digital twin technologies in food supply chain nodes, data silos and dynamic early warning problems in food safety risk prevention and control are solved, real-time monitoring and efficient response of the entire chain are achieved, and the identification accuracy and response speed of food safety risks are improved.
Patent Information
- Application Number
- CN202510671289.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prevention and control of food safety risks, the prevention and control of existing technologies have problems such as insufficient detection timeliness, limited monitoring coverage, serious data silos, insufficient cross-link data integration capabilities, lack of dynamic early warning mechanisms, and low cross-subject information sharing efficiency, making it difficult to achieve full-chain risk tracking and intelligent early warning.
Deploy lightweight blockchain edge terminals at food supply chain nodes, collect environmental parameters and operation records, filter high-trustworthy data through data conflict entropy value, generate block feature chains and remotely encrypt and transmit them to the cloud prevention and control system, use spatiotemporal and spatial coupling network to calculate risk, space-time coupling degree, integrate food pollution data to generate dynamic mixed risk index, build food digital twin simulate risk diffusion paths, output prevention and control strategy candidate sets, and trigger differentiated encryption instructions through smart contracts, aggregate early warning response data for federated learning to reverse the risk source.
Realize real-time monitoring and dynamic early warning of food safety risks in the whole chain, improve risk identification accuracy and response efficiency, break the data island, support hierarchical early warning and automated disposal, reduce the incidence of recall incidents and resource waste, and build a smart food safety governance system.
Smart Images

Figure CN120449016A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to technical fields such as big data analysis, the Internet of Things and remote communication technology, and in particular to an intelligent remote early warning method for food risk prevention and control. Background Art
[0002] With the expansion and globalization of the food supply chain, the complexity and multidimensionality of food safety risk prevention and control have significantly increased. Traditional regulatory models primarily rely on manual sampling and testing, laboratory physical and chemical analysis, and post-event traceability, resulting in issues such as insufficient timeliness and limited monitoring coverage. While some companies have introduced IoT devices to collect basic environmental data, most systems focus solely on a single process and lack cross-sector data integration capabilities, making it difficult to track risks across the entire food supply chain, from raw materials to end consumers. Furthermore, traditional early warning mechanisms generally employ fixed thresholds, which are insufficiently predictive of complex risk factors such as the dynamic proliferation of microorganisms and the migration of chemical contaminants, resulting in significant false positives and omissions. Data silos also exist within the industry, and data collaboration mechanisms across production, logistics, and regulatory processes are underdeveloped. This results in inefficient cross-sector information sharing, directly impacting risk response speed. While research has explored the application of big data analytics, key technical limitations remain in areas such as real-time processing of multi-source, heterogeneous data, dynamic risk modeling, and coordinated optimization of edge computing and cloud platforms. These limitations hinder the dynamic perception and intelligent early warning of risks throughout the food lifecycle. This technological gap urgently needs to be addressed through innovative approaches to build a more forward-looking food safety prevention and control system. Summary of the Invention
[0003] An intelligent remote early warning method and system for food risk prevention and control, comprising:
[0004] S1. Deploy lightweight blockchain edge terminals at food supply chain nodes to collect environmental parameters and operation records, calculate data conflict entropy values to screen highly reliable data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system.
[0005] S2. Based on the block feature chain data, the spatiotemporal graph convolutional network is used to calculate the spatiotemporal coupling of risk, and the food contamination data is integrated to generate a dynamic hybrid risk index;
[0006] S3. Build a food digital twin, input the hybrid risk index, calculate the cross-modal propagation coefficient, simulate the risk diffusion path, and output a candidate set of prevention and control strategies;
[0007] S4. Generate warning level confidence intervals based on the candidate set of prevention and control strategies. Exceeding limit events trigger the smart contract warning chain and send differentiated encrypted instructions.
[0008] S5. Aggregate early warning response data, use federated learning to calculate the global risk attenuation gradient, reverse the source of risk and correct the blockchain weight and digital twin parameters.
[0009] The above-mentioned intelligent remote early warning method for food risk prevention and control includes deploying lightweight blockchain edge terminals at food supply chain nodes, collecting environmental parameters and operation records, calculating data conflict entropy values to screen highly reliable data, generating a block feature chain, and remotely encrypting and transmitting it to a cloud-based prevention and control system. The method includes the following sub-steps:
[0010] Deploy the lightweight blockchain edge terminal at the planting, processing, warehousing and transportation nodes of the food supply chain, and configure multi-source sensors to collect temperature, humidity, operation timestamps and responsible person information;
[0011] Perform hash check and time series alignment on the collected data, calculate the information entropy difference of each data block, and eliminate low-credibility data whose conflict entropy value exceeds the preset threshold;
[0012] The filtered data is encapsulated into a block feature chain according to the supply chain flow, and then encrypted and transmitted in segments to the cloud-based prevention and control system.
[0013] The above-mentioned intelligent remote early warning method for food risk prevention and control, based on blockchain feature chain data, uses a spatiotemporal graph convolutional network to calculate the spatiotemporal coupling of risk, and integrates food contamination data to generate a dynamic hybrid risk index, includes the following sub-steps:
[0014] Extract timestamps, geographic locations, and operation event labels from the block feature chain to construct a spatiotemporal correlation matrix;
[0015] The dynamic hybrid risk index is input into the digital twin to calculate the cross-modal influence coefficient of temperature and humidity gradient and operation interval on risk propagation;
[0016] A dynamic hybrid risk index is generated based on the nonlinear relationship between coupling degree and pollution concentration, and high-risk hotspots are marked.
[0017] The intelligent remote early warning method for food risk prevention and control described above includes the following sub-steps: constructing a food digital twin, inputting a hybrid risk index, calculating a cross-modal propagation coefficient, simulating the risk diffusion path, and outputting a candidate set of prevention and control strategies:
[0018] The digital twin is constructed based on the physical properties and historical risk data of all links in the supply chain, and loaded with an environmental parameter simulation engine and a pathogen diffusion model;
[0019] The dynamic hybrid risk index is input into the digital twin to calculate the cross-modal influence coefficient of temperature and humidity gradient and operation interval on risk propagation;
[0020] The Monte Carlo method is used to simulate the risk diffusion path and generate a candidate set of prevention and control strategies including isolation scope, disinfection priority and traceability path.
[0021] The intelligent remote early warning method for food risk prevention and control described above, wherein a warning level confidence interval is generated based on a candidate set of prevention and control strategies, and an over-limit event triggers a smart contract early warning chain and sends a differentiated encrypted instruction, includes the following sub-steps:
[0022] The warning level confidence interval is divided according to the risk coverage and impact duration of the prevention and control strategy candidate set, and three thresholds of red, orange and yellow are set;
[0023] When the detection indicator exceeds the threshold, the smart contract warning chain is triggered, and the encrypted instruction template is matched according to the risk type and a digital signature is attached;
[0024] Differentiated instructions are sent to the supervisory terminals and emergency equipment of the corresponding nodes through private blockchain channels, and the warning status is updated to the feature chain simultaneously.
[0025] The intelligent remote early warning method for food risk prevention and control described above, wherein when a detection indicator exceeds a threshold, a smart contract early warning chain is triggered, an encrypted instruction template is matched according to the risk type, and a digital signature is attached, includes the following sub-steps:
[0026] Analyze the risk index growth rate of three consecutive time windows in the block feature chain;
[0027] When the growth rate exceeds 2 times the historical standard deviation for the same period and the number of associated nodes is ≥5, it is determined to be a cross-regional transmission event and a red alert is activated.
[0028] The intelligent remote early warning method for food risk prevention and control described above, wherein early warning response data is aggregated, a global risk attenuation gradient is calculated using federated learning, the risk source is inferred, and blockchain weights and digital twin parameters are corrected, includes the following sub-steps:
[0029] Collect the response delay data and handling result feedback of each node to the warning instructions to build a federated learning dataset;
[0030] The global risk attenuation gradient is calculated using a distributed gradient descent algorithm, identifying nodes with response efficiency lower than the preset standard as candidate risk sources;
[0031] The weight coefficient of the node data in the block feature chain is adjusted according to the gradient back-inference results, and the pathogen diffusion rate parameters of the digital twin are optimized.
[0032] An intelligent remote early warning system for food risk prevention and control, comprising:
[0033] Blockchain trusted collection module: Deploy lightweight blockchain edge terminals at food supply chain nodes to collect environmental parameters and operation records, calculate data conflict entropy values to screen highly trusted data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system;
[0034] Spatiotemporal risk modeling module: Based on blockchain feature chain data, the spatiotemporal graph convolutional network is used to calculate the spatiotemporal coupling of risks, and food contamination data is integrated to generate a dynamic hybrid risk index;
[0035] Digital twin decision module: Builds a digital twin of food, calculates the cross-modal propagation coefficient after inputting the hybrid risk index, simulates the risk diffusion path, and outputs a candidate set of prevention and control strategies;
[0036] Intelligent early warning execution module: Generates warning level confidence intervals based on the candidate set of prevention and control strategies. Exceeding limit events trigger the smart contract early warning chain and send differentiated encrypted instructions;
[0037] Federated learning correction module: Aggregates early warning response data, uses federated learning to calculate the global risk attenuation gradient, reversely infers the source of risk and corrects blockchain weights and digital twin parameters.
[0038] A computer storage medium, comprising: at least one memory and at least one processor;
[0039] a memory for storing one or more program instructions;
[0040] A processor is used to run one or more program instructions to execute any of the above-mentioned intelligent remote early warning methods for food risk prevention and control.
[0041] The beneficial effects achieved by the present invention are as follows:
[0042] The present invention achieves a systematic improvement in the ability to prevent and control food safety risks through technological innovation. First, an Internet of Things perception network covering the entire chain of food production, processing, storage, transportation and sales is constructed, and multi-source sensors are used to collect environmental parameters, logistics trajectories and product status data in real time. In combination with blockchain technology, an unalterable data traceability chain is established, which effectively solves the problems of data fragmentation and information islands in traditional supervision. Secondly, the dynamic risk assessment model based on deep learning integrates the microbial growth prediction algorithm, the pollutant migration law analysis module and the real-time environmental parameters, realizing the transition from a single threshold judgment to a multi-dimensional risk coupling analysis, which significantly improves the accuracy of early warning. Through the collaborative mechanism of edge computing nodes and cloud-based intelligent platforms, the system can complete data cleaning, feature extraction and risk assessment within a millisecond response time. Compared with the traditional manual sampling mode, the timeliness of risk discovery is improved by two orders of magnitude.
[0043] The system also supports tiered early warnings and automated disposition instructions. When abnormal cold chain temperatures are detected, it simultaneously triggers coordinated responses, including logistics route optimization, inventory scheduling, and notification to regulatory authorities. By establishing standardized data interfaces and a multi-party collaborative platform, the data barriers between manufacturers, testing agencies, and regulatory authorities are broken down, fostering a shared risk management framework. In practical applications, this system has reduced the incidence of food recalls and minimized the waste of resources caused by excessive sampling, providing core technical support for building a smart food safety governance system. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0045] Figure 1 This is a flow chart of an intelligent remote early warning method for food risk prevention and control provided in an embodiment of the present application.
[0046] Figure 2 This is a schematic diagram of an intelligent remote early warning system for food risk prevention and control provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0048] Example 1
[0049] like Figure 1 As shown, the embodiment of the present application provides an intelligent remote early warning method for food risk prevention and control, including:
[0050] Step S1: Deploy lightweight blockchain edge terminals at food supply chain nodes, collect environmental parameters and operation records, calculate data conflict entropy values to screen highly reliable data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system. This specifically includes the following sub-steps:
[0051] Step S11: Deploy the lightweight blockchain edge terminal at the planting, processing, warehousing and transportation nodes of the food supply chain, and configure multi-source sensors to collect temperature, humidity, operation timestamps and responsible person information;
[0052] Lightweight blockchain edge terminals are installed at food supply chain nodes such as plantations, processing plants, storage warehouses, and transport vehicles. Each terminal integrates multi-source sensor modules, including temperature and humidity sensors, NFC / RFID readers, and operation recorders. These sensors collect environmental data and operational events at a preset frequency and link them to the identity of the responsible individual through biometric recognition or digital signature modules. These terminals establish communication links with neighboring nodes and the cloud via a low-power wide area network (LPWAN), ensuring real-time data and network fault tolerance.
[0053] Step S12: Perform hash check and time series alignment on the collected data, calculate the information entropy difference of each data block, and eliminate low-credibility data whose conflict entropy value exceeds a preset threshold;
[0054] The edge terminal performs hash verification on each piece of collected raw data, uses a hash algorithm to generate a data fingerprint, compares it with the real-time calculation results, and discards inconsistent and abnormal data. Multi-node data is timestamped according to a unified clock source to ensure the logical coherence of the event sequence. By statistically analyzing the distribution characteristics of the same batch of data at different nodes, the following formula is used to calculate the information entropy difference to quantify the probability of data conflict:
[0055]
[0056] Among them, D AB represents the entropy value of multi-node data conflict; n represents the number of data samples involved in the calculation; i represents the index of the summation operation, ranging from 1 to n; x i represents the i-th data sample value of node A; y i The i-th data sample value of node B; μ A represents the mean of all data samples of node A; μ B represents the mean of all data samples of node B; σ A Represents the standard deviation of all data samples of node A; σ B represents the standard deviation of all data samples of node B; Represents the variance of node A data, which is the standard deviation σ A the square of Represents the variance of node B data, which is the standard deviation σ B The square of ; log2(·) represents the logarithm operation with base 2, which is often used to measure the amount of information in fields such as information theory; Indicates taking and The smaller value in is used as the denominator to normalize the variance difference between the two nodes, so that the calculation results of this part reflect the relative degree of difference.
[0057] Set dynamic thresholds to automatically filter low-credibility data that exceeds the threshold and trigger alarms, retaining abnormal logs for manual review.
[0058] Step S13: Encapsulate the filtered data into a block feature chain according to the supply chain flow, encrypt it and transmit it in segments to the cloud prevention and control system;
[0059] The filtered data is encapsulated into a chain structure based on the supply chain sequence and geographic flow. Each data block contains the hash value of the current node, the hash pointer of the previous node, and encrypted metadata. The data segmentation strategy is dynamically adjusted based on network bandwidth. A data packet is generated every 50 records accumulated or when the data reaches 10MB. A CRC checksum is appended and the data is uploaded to the cloud in fragments via the HTTPS protocol. After receiving the data, the cloud-based prevention and control system reassembles the data chain, verifies the hash continuity and the validity of the digital signature, and finally writes the complete feature chain to the blockchain ledger and synchronizes it with the associated cross-chain audit node.
[0060] Step S2: Based on the block feature chain data, the spatiotemporal graph convolutional network is used to calculate the spatiotemporal coupling of risk, and the food contamination data is integrated to generate a dynamic hybrid risk index, which specifically includes the following sub-steps:
[0061] Step S21: extract the timestamp, geographic location, and operation event label from the block feature chain and construct a spatiotemporal correlation matrix;
[0062] The timestamp, geolocation code, and operation event label of each node are parsed from the blockchain feature chain. Each supply chain node is abstracted as a dynamic vertex in a spatiotemporal graph, with vertex attributes including time series state and spatial coordinates. Based on time window slices, the strength of spatiotemporal interactions between nodes is calculated, including physical proximity, event correlation, and environmental parameter similarity. A spatiotemporal correlation matrix is constructed using a graph database. The matrix elements are normalized to eliminate dimensionality and then injected into the adjacency matrix structure of a graph convolutional network for subsequent feature extraction.
[0063] Step S22: input the dynamic hybrid risk index into the digital twin, and calculate the cross-modal influence coefficient of the temperature and humidity gradient and the operation interval on the risk propagation;
[0064] The dynamic hybrid risk index is mapped to the virtual sensing layer of the digital twin, driving the cross-modal influence coefficient calculation engine. The temperature and humidity gradient field is generated into a spatially continuous distribution model using a cubic spline interpolation algorithm, quantifying the contribution of environmental parameter differences between adjacent nodes to microbial reproduction rates. The operation interval data is converted into a risk propagation inhibition coefficient using a time decay function and convolved with the gradient field:
[0065]
[0066] Among them, C(x,t) represents the result of the cross-modal convolution operation at the space-time coordinate (x,t); x represents the coordinate variable in the spatial dimension; t represents the current time point; t′ represents the time variable in the integration; Δt time interval represents the time span involved in the integration; Ω represents the range of the integration operation in the spatial dimension; x′ represents the value within the spatial region Ω, which is used for integration in the spatial dimension; G(x′,t′) represents a function related to time t′ and space x′; γ represents an attenuation coefficient used to control the degree of attenuation over time tt′; R op (x′, t′) represents the operation response function related to time t′ and space x′; Represents R op The rate of change in spatial dimensions.
[0067] The coefficient weights are dynamically adjusted through the feedback control module of the digital twin, and the results are input into the boundary conditions of the pathogen diffusion model to simulate the risk propagation path in the supply chain topology.
[0068] Step S23: Generate a dynamic hybrid risk index based on the nonlinear relationship between the coupling degree and the pollution concentration, and mark high-risk hotspot areas;
[0069] Based on spatiotemporal coupling and real-time pollution concentrations, a nonlinear fusion function is used to generate a dynamic hybrid risk index. The index value shows a saturated growth trend with the product of coupling and pollution concentration. Geographic fencing technology is used to divide the supply chain network into geographic grid cells. A spatial interpolation algorithm is used to fill in the risk index of unmonitored areas. The risk deviation of each grid cell is calculated based on historical baseline data. A density clustering algorithm is used to identify high-risk hotspots with deviations exceeding three standard deviations. Supply chain maps are overlaid on a GIS platform, and risk levels are annotated in the form of heat maps. A traceability path map of high-risk nodes is also generated for the decision-making system to access.
[0070] Step S3: Build a food digital twin, input the hybrid risk index, calculate the cross-modal propagation coefficient, simulate the risk diffusion path, and output a candidate set of prevention and control strategies. This specifically includes the following sub-steps:
[0071] Step S31: construct the digital twin based on the physical properties and historical risk data of all links in the supply chain, and load the environmental parameter simulation engine and pathogen diffusion model;
[0072] A high-precision food digital twin is constructed based on the physical properties of supply chain nodes and a historical risk event database recorded in the blockchain feature chain. 3D laser scanning and 3D modeling tools are used to reconstruct the geometric structure of the entire supply chain, integrating a multi-physics simulation engine and pathogen diffusion model. Historical data is injected into the twin through time alignment to calibrate model parameters, and multi-threaded parallel simulation is supported to improve computational efficiency.
[0073] Step S32: input the dynamic hybrid risk index into the digital twin, and calculate the cross-modal influence coefficient of the temperature and humidity gradient and the operation interval on the risk propagation;
[0074] The dynamic hybrid risk index is mapped to the digital twin's virtual sensor network, driving the cross-modal propagation coefficient calculation module. The temperature and humidity gradient field is generated into a continuous distribution surface using the Kriging spatial interpolation algorithm, quantifying the contribution of environmental parameter differences between adjacent nodes to pathogen survival. Operation interval data is converted into a risk suppression factor using a time decay function. This is then subjected to spatiotemporal convolution with the gradient field to output a cross-modal influence coefficient matrix. The weight distribution is dynamically adjusted through the digital twin's adaptive control interface, and the coefficient matrix is input into the boundary conditions of the pathogen diffusion model to simulate the risk propagation path and concentration accumulation effects along the supply chain topology.
[0075] Step S33: Using the Monte Carlo method to simulate the risk diffusion path, generate a candidate set of prevention and control strategies including isolation scope, disinfection priority, and traceability path;
[0076] Initial conditions for the Monte Carlo simulation were set within the digital twin, and 100,000 diffusion path samples were randomly generated based on the risk propagation coefficient matrix. The spatial coverage of the paths, the exposure frequency of key nodes, and the cumulative pollution concentration were statistically analyzed. A spectral clustering algorithm was used to classify the path patterns:
[0077]
[0078] Among them, d(Path a ,Path b ) represents the path Path a and Path b The distance between a and Path b Represent two different paths respectively; m represents the number of feature points or sampling points corresponding to the comparison on the path; i represents the index variable of the summation, ranging from 1 to m; x a,i and x b,i Respectively represent the path Path a and Path b The coordinate value of the i-th point in the space dimension; t a,i and t b,i Respectively represent the path Path a and Path b The coordinate value of the i-th point in the time dimension; σ x represents the scaling factor in the spatial dimension; σ t Represents the scaling factor in the time dimension.
[0079] Common features are extracted to generate a candidate set of prevention and control strategies, including isolation scope, disinfection priority, and traceability path. A multi-objective optimization algorithm is used to balance strategy execution costs and risk mitigation efficiency, ultimately outputting a 3D visualization interface and strategy feasibility report.
[0080] Step S4: Generate a warning level confidence interval based on the candidate set of prevention and control strategies. The over-limit event triggers the smart contract warning chain and sends a differentiated encryption instruction. The specific steps include the following:
[0081] Step S41: Divide the warning level confidence interval according to the risk coverage and impact duration of the prevention and control strategy candidate set, and set the red, orange, and yellow thresholds;
[0082] Based on the geographic coverage radius and estimated impact duration of each strategy in the candidate set of prevention and control strategies, the data distribution of similar scenarios in the historical risk event database was extracted from the block feature chain, and quantile statistics were used to divide the warning level confidence interval. Red warnings correspond to high-risk scenarios in the upper quartile of coverage and with an impact duration exceeding 2 standard deviations of the historical mean. Orange warnings are for sub-high-risk scenarios between the median and 75th percentile and 1-2 standard deviations. Yellow warnings are for low-risk scenarios below the median. Dynamic threshold calibration calculates the latest quantile value through a sliding time window and automatically adjusts the interval boundaries based on seasonal factors to ensure that warning sensitivity adapts to environmental changes.
[0083] Step S42: When the detection indicator exceeds the threshold, the smart contract warning chain is triggered, and the encrypted instruction template is matched according to the risk type and a digital signature is attached;
[0084] (1) Analyze the risk index growth rate of three consecutive time windows in the block feature chain;
[0085] We analyze the risk index series for three consecutive time windows from the metadata layer of the blockchain feature chain. After eliminating clock offset errors using a time alignment algorithm, we use a linear regression model to calculate the exponential slope within each window as the growth rate. We then take a weighted average of the slopes of the three windows to obtain a composite growth rate indicator. Historical data for the same period is retrieved from the on-chain time series database, and the mean and standard deviation of the growth rate for the corresponding period are calculated to establish a dynamic baseline.
[0086] (2) When the growth rate exceeds 2 times the historical standard deviation for the same period and the number of associated nodes is ≥5, it is determined to be a cross-regional transmission event and a red alert is activated;
[0087] When the combined growth rate exceeds two standard deviations from the baseline, the smart contract calls the graph database to query for nodes associated with goods flow, environmental parameters, or personnel intersections during that period, and counts the number of associated nodes. If the number of nodes is ≥5 and spread across two or more geographic regions, it is considered a cross-regional transmission event. The contract activates the red alert process, binding the event characteristics to a pre-compiled smart contract address, triggering the multi-signature verification process to generate an encrypted instruction transaction.
[0088] Step S43: Send differentiated instructions to the supervisory terminal and emergency equipment of the corresponding node through the private blockchain channel, and synchronously update the warning status to the feature chain;
[0089] Warning instructions are transmitted via a permissioned channel on a private blockchain, using the nationally recognized SM9 algorithm for identity-based encryption. Differentiated decryption keys are generated based on the node's role. The instructions are Base64-encoded and embedded in the blockchain transaction payload. This information is then pushed to the corresponding node's IoT gateway via the lightweight MQTT protocol. The gateway decrypts the information, activates the emergency equipment, and submits a hash of the instruction execution status to the blockchain. After verifying state consistency through the PBFT consensus mechanism, each node updates the warning activation flag and timestamp increments to the metadata block in the feature chain's header, achieving full chain-wide state synchronization and audit traceability.
[0090] Step S5: Aggregate early warning response data, use federated learning to calculate the global risk attenuation gradient, infer the risk source, and correct the blockchain weight and digital twin parameters. Specifically, it includes the following sub-steps:
[0091] Step S51: Collect response delay data and handling result feedback of each node to the warning instruction to construct a federated learning dataset;
[0092] The federated learning agent module deployed at each node captures real-time data on response delays and action results for early warning instructions. Edge computing devices cleanse and standardize the raw data. Differential privacy techniques are used to desensitize node identity information, converting the data into a structured vector containing time series features, operation type labels, and environmental indicators. This data is then encrypted and uploaded to the federated learning coordination server via a secure aggregation protocol. The server partitions data into subsets based on supply chain links, constructing a cross-domain federated dataset while maintaining the physical isolation of local data to ensure privacy compliance.
[0093] Step S52: Calculate the global risk attenuation gradient using a distributed gradient descent algorithm, and identify nodes whose response efficiency is lower than a preset standard as risk source candidates;
[0094] The federated learning coordination server initiates a distributed training task, and each node's local model calculates the local gradient of risk attenuation based on the historical response efficiency baseline:
[0095]
[0096] in, represents the local gradient at node i; N represents the number of summation items; k represents the index of the number of treatments, ranging from 1 to N; Indicates the partial derivative of the model parameter θ; represents the actual risk attenuation rate after the kth disposal, which is the value obtained by actual observation; represents the theoretical decay rate after the kth treatment predicted by the digital twin; Var(R pred ) represents the predicted value R pred The variance reflects the degree of dispersion of the predicted value; γ represents the smoothing factor; λ represents the L2 regularization coefficient; It represents the square of the L2 norm of the model parameter θ. By penalizing larger parameter values, the model parameters are distributed more evenly and the model is prevented from overfitting.
[0097] Gradient ciphertext is uploaded to a central server using homomorphic encryption. After aggregating global gradients, the server uses a formula to calculate the risk attenuation gradient field, identifying node regions where gradients are significantly below a preset standard. Graph neural networks are then used to analyze the topological influence of nodes, screen out inefficient nodes, and calculate their probabilistic contribution as risk sources. A candidate list is generated and linked to the metadata layer of the blockchain traceability feature chain for subsequent weight correction.
[0098] Step S53: Adjust the weight coefficient of the node data in the block feature chain according to the gradient back-inference result, and optimize the pathogen diffusion rate parameter of the digital twin;
[0099] Based on the probability weights of risk sources, the credibility coefficients of node data in the block feature chain are dynamically adjusted. The voting weights of nodes on the chain are updated through a consensus mechanism to suppress the spread of low-quality data. Simultaneously, the gradient back-calculation results are injected into the digital twin's parameter optimizer. The actual risk attenuation curve is compared with the simulated predictions, and an adaptive particle swarm algorithm is used to iteratively correct the pathogen diffusion rate parameters. The optimized twin parameters are verified across nodes and synchronized to the entire chain, triggering incremental training of the candidate set of prevention and control strategies and model version upgrades.
[0100] Example 2
[0101] like Figure 2 As shown, the second embodiment of the present application provides an intelligent remote early warning system for food risk prevention and control, including:
[0102] Blockchain Trusted Collection Module 21: Deploy lightweight blockchain edge terminals at food supply chain nodes to collect environmental parameters and operation records, calculate data conflict entropy values to filter highly trusted data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system. This module includes the following submodules:
[0103] Multi-source data acquisition submodule 211: deploying the lightweight blockchain edge terminal at the planting, processing, warehousing and transportation nodes of the food supply chain, and configuring multi-source sensors to collect temperature, humidity, operation timestamps and responsible person information;
[0104] Lightweight blockchain edge terminals are deployed at every stage of the food supply chain, including planting, processing, warehousing, and transportation. These terminals incorporate multiple sensors, including high-precision temperature and humidity sensors, optical recognition components, and near-field communication units, for real-time collection of ambient temperature, relative humidity, operation timestamps, and responsible personnel identity information. The terminals employ an adaptive sampling strategy, dynamically adjusting data collection frequency based on environmental parameters, such as automatically increasing temperature monitoring frequency in high-temperature environments. Furthermore, the terminals incorporate redundant data storage units, caching 72 hours of raw data in the event of network anomalies to ensure data continuity. All sensor data is instantly appended with the terminal's unique digital signature and geolocation tag upon collection.
[0105] Trusted data screening submodule 212: performs hash verification and time series alignment on the collected data, calculates the information entropy difference of each data block, and eliminates low-trusted data whose conflict entropy value exceeds a preset threshold;
[0106] Before data is uploaded, a double-layer hash check is first performed. The SHA-256 algorithm is used to generate a digest value for the original data. This digest value is then compared with the terminal's pre-stored reference hash, and data packets that fail the check are eliminated. Subsequently, a time series alignment operation is performed on the multi-node data. The dynamic time warping algorithm is used to eliminate clock drift errors between devices and ensure the temporal logic consistency of the cross-node event chain. For the aligned data set, the information entropy difference calculation method is used to evaluate the probability of conflict between data blocks:
[0107]
[0108] Among them, D AB represents the entropy value of multi-node data conflict; n represents the number of data samples involved in the calculation; i represents the index of the summation operation, ranging from 1 to n; x i represents the i-th data sample value of node A; y i The i-th data sample value of node B; μ A represents the mean of all data samples of node A; μ B represents the mean of all data samples of node B; σ A Represents the standard deviation of all data samples of node A; σ B represents the standard deviation of all data samples of node B; Represents the variance of node A data, which is the standard deviation σ A the square of Represents the variance of node B data, which is the standard deviation σ BThe square of ; log2(·) represents the logarithm operation with base 2, which is often used to measure the amount of information in fields such as information theory; Indicates taking and The smaller value in is used as the denominator to normalize the variance difference between the two nodes, so that the calculation results of this part reflect the relative degree of difference.
[0109] The system uses a sliding window mechanism to analyze the entropy fluctuation characteristics of upstream and downstream data in the supply chain frame by frame. The system presets a dynamic entropy threshold model. When the entropy value of a data block deviates from the mean of the same batch of data by more than 3 times the standard deviation, it is automatically marked as low-trust data and triggers a second manual review process.
[0110] Blockchain packaging and transmission submodule 213: encapsulates the filtered data into a block feature chain according to the supply chain flow, encrypts it and transmits it in segments to the cloud prevention and control system;
[0111] The filtered data is reorganized into a structured feature chain based on supply chain business flows. Each data unit contains the current node hash pointer, the upstream node feature value, and the smart contract trigger condition. The feature chain is encrypted block by block using the national SM4 algorithm, with each encrypted block appended with an initialization vector generated by quantum random numbers. The transmission process uses an adaptive sharding strategy, splitting the feature chain into variable-sized packets ranging from 128KB to 1MB based on real-time network bandwidth. These packets are sent synchronously to the cloud via a multi-path concurrent transmission protocol. Each packet is embedded with a self-destruct command code; if it is not fully received by the cloud within 15 minutes, a local erase is initiated. Upon receipt, the cloud-based prevention and control system verifies the packet integrity using a reverse hash tree and reconstructs the original block feature chain.
[0112] Spatiotemporal risk modeling module 22: Based on the blockchain feature chain data, the spatiotemporal graph convolutional network is used to calculate the spatiotemporal coupling of risk, and the food contamination data is integrated to generate a dynamic hybrid risk index. It includes the following submodules:
[0113] Spatiotemporal correlation modeling submodule 221: extracting timestamps, geographic locations, and operation event labels from the block feature chain and constructing a spatiotemporal correlation matrix;
[0114] The structured data stream is parsed from the distributed nodes of the blockchain feature chain, and the timestamp information of each operation event is extracted and converted to a unified time zone standard time. At the same time, the geographic location described in the text is converted into longitude and latitude coordinates through geocoding services. A time dimension index is constructed based on the order of the timestamps. A spatial grid code is generated by combining the longitude and latitude coordinates, and operation events with the same grid code are clustered. Operation event labels are identified and standardized using natural language processing technology. Ultimately, the time series, spatial grid, and event type labels are mapped into a three-dimensional tensor structure. Sparse matrix compression technology is used to construct a spatiotemporal correlation matrix. Each element in the matrix represents the frequency and correlation strength of a certain type of operation event within a specific spatiotemporal unit.
[0115] Risk coupling calculation submodule 222: inputs the dynamic hybrid risk index into the digital twin, and calculates the cross-modal influence coefficient of temperature and humidity gradient and operation interval on risk propagation;
[0116] A multi-physics field coupling model is established within the digital twin, converting the gradient data collected by the temperature and humidity sensors into continuous spatiotemporal field data. Time alignment technology is used to spatially and temporally align the operation interval data with the physical field data. Differential equations are used to describe the microbial proliferation dynamics, and a transfer function model is constructed between thermodynamic parameters and operation events. The operation interval data is converted into a risk propagation inhibition coefficient using a time decay function and then convolved with the gradient field:
[0117]
[0118] Among them, C(x,t) represents the result of the cross-modal convolution operation at the space-time coordinate (x,t); x represents the coordinate variable in the spatial dimension; t represents the current time point; t′ represents the time variable in the integration; Δt time interval represents the time span involved in the integration; Ω represents the range of the integration operation in the spatial dimension; x′ represents the value within the spatial region Ω, which is used for integration in the spatial dimension; G(x′,t′) represents a function related to time t′ and space x′; γ represents an attenuation coefficient used to control the degree of attenuation over time tt′; R op (x′, t′) represents the operation response function related to time t′ and space x′; Represents R op The rate of change in spatial dimensions.
[0119] The Monte Carlo method is used to simulate the risk propagation path under different temperature and humidity combinations, and the sensitivity analysis algorithm is used to quantify the contribution of each gradient parameter to the pollution diffusion rate, and finally a cross-modal influence coefficient map with spatiotemporal resolution is output.
[0120] Dynamic risk index generation submodule 223: generates a dynamic hybrid risk index based on the nonlinear relationship between coupling degree and pollution concentration, and marks high-risk hotspot areas;
[0121] A nonlinear regression model based on machine learning was established to fuse the spatiotemporal coupling data with laboratory pollution concentration data. The weight coefficients of different risk factors were dynamically adjusted through an attention mechanism. A sliding time window mechanism was used to process real-time data streams. Within each time window, the global risk value was normalized and the local spatial derivative was calculated. The risk distribution surface was generated using kernel density estimation. An adaptive threshold judgment mechanism was established to trigger an alert when the index value exceeded a preset multiple of the historical baseline standard deviation. Computer vision technology was used to coordinate the risk heat map with the geographic information system. The boundaries of high-risk areas were automatically outlined using an edge detection algorithm, ultimately generating a visual risk situation map with color gradient markings.
[0122] Digital Twin Decision Module 23: Constructs a digital twin of food, calculates the cross-modal propagation coefficient after inputting the hybrid risk index, simulates the risk diffusion path, and outputs a candidate set of prevention and control strategies. It includes the following submodules:
[0123] Digital twin construction submodule 231: constructs the digital twin based on the physical properties and historical risk data of all links in the supply chain, and loads the environmental parameter simulation engine and pathogen diffusion model;
[0124] IoT sensors collect physical property data from all aspects of the food supply chain, including raw material processing, warehousing, transportation, and sales. This includes ambient temperature and humidity, equipment operating parameters, operator movement patterns, and frequency of contact with goods. This data is also integrated with risk data such as microbial contamination and chemical residues from a historical food safety incident database. 3D modeling tools are used to construct a virtual twin that maps 1:1 to the physical space, overlaying real-time data streams with historical data within the twin model. A computational fluid dynamics-based environmental parameter simulation engine is loaded to dynamically simulate temperature and humidity gradients and air flow patterns at different spatial locations. An FDA-approved pathogen diffusion model is also integrated.
[0125] Cross-modal impact simulation submodule 232: inputs the dynamic hybrid risk index into the digital twin, and calculates the cross-modal impact coefficient of the temperature and humidity gradient and the operation interval on the risk propagation;
[0126] Receive input from the risk monitoring module as a dynamic hybrid risk index, which integrates multi-dimensional parameters such as the degree of abnormality of physical and chemical indicators, microbial detection rate, and deviation from operating specifications. Activate the spatiotemporal correlation analysis engine in the digital twin and construct a correlation matrix between the temperature change rate and the surface contact frequency for typical scenarios such as cold chain interruption and cross-contamination. Calculate the phase change critical point of the risk factor under different temperature and humidity combinations through multi-physics field coupling simulation, and quantify the impact weight of the permeability of packaging materials on the cross-media transmission of risks. Use a formula to calculate the exponential decay relationship between the operation interval length and the survival rate of pathogens on the equipment surface, and ultimately output a comprehensive impact coefficient covering the three modes of physical contact, airborne transmission, and cold chain migration.
[0127] Prevention and control strategy generation submodule 233: uses the Monte Carlo method to simulate the risk diffusion path and generate a candidate set of prevention and control strategies including isolation scope, disinfection priority and traceability path;
[0128] In the digital twin environment, the initial condition parameter set for the Monte Carlo simulation was set, including variables such as the confidence interval for the pollution source location, peak personnel flow periods, and discrete values for the equipment cleaning cycle. A parallel computing engine was launched to perform 10,000 random sampling simulations, tracking the diffusion trajectory of risk particles in three-dimensional space and constructing a probability heat map. Three levels of isolation and warning areas were automatically divided according to risk concentration thresholds, and a formula was used to calculate the cost-benefit ratio of different disinfection solutions to determine priority:
[0129]
[0130] Among them, d(Path a ,Path b ) represents the path Path a and Path b The distance between a and Path b Represent two different paths respectively; m represents the number of feature points or sampling points corresponding to the comparison on the path; i represents the index variable of the summation, ranging from 1 to m; x a,i and x b,i Respectively represent the path Path a and Path b The coordinate value of the i-th point in the space dimension; t a,i and t b,i Respectively represent the path Path a and Path b The coordinate value of the i-th point in the time dimension; σ x represents the scaling factor in the spatial dimension; σ t Represents the scaling factor in the time dimension.
[0131] Combined with graph neural networks to analyze the topological structure between supply chain nodes, a traceability path plan with minimum blocking cost is generated, and the final output is a set of prevention and control strategies that include emergency response time prediction and resource optimization configuration recommendations.
[0132] Intelligent early warning execution module 24: Generates early warning level confidence intervals based on the candidate set of prevention and control strategies. Exceeding limit events trigger the smart contract early warning chain and send differentiated encrypted instructions. It includes the following submodules:
[0133] Warning level classification submodule 241: divides the warning level confidence interval according to the risk coverage and impact duration of the prevention and control strategy candidate set, and sets the red, orange, and yellow thresholds;
[0134] Based on the risk coverage and impact duration of the candidate set of prevention and control strategies, the confidence interval boundaries are dynamically adjusted in combination with historical risk event data. By analyzing the geographical distribution density of the risk coverage and the number of affected nodes, the intensity of risk diffusion is quantified; at the same time, the potential chain effects of the risk duration on each link in the supply chain are evaluated, and a multidimensional time series model is established. The system compares real-time monitoring data with preset baseline parameters and uses a sliding window mechanism to update the red, orange, and yellow thresholds. The red threshold corresponds to cross-regional cascading risk scenarios, the orange threshold is associated with the risk of local industrial chain disruption, and the yellow threshold is for single-node exceedance events. The threshold setting process introduces expert evaluation weight coefficients, and the confidence interval accuracy is optimized through a combination of offline training and online fine-tuning.
[0135] Smart contract trigger submodule 242: When the detection indicator exceeds the threshold, the smart contract early warning chain is triggered, and the encrypted instruction template is matched according to the risk type and a digital signature is attached;
[0136] (1) Analyze the risk index growth rate of three consecutive time windows in the block feature chain;
[0137] To analyze the growth rate of the risk index in the blockchain feature chain, the system divides time windows into pre-set time windows. By traversing the historical risk monitoring dataset stored in the blockchain ledger, the system extracts the original risk index values within the three most recent consecutive time windows. A year-on-year calculation is performed on the data from adjacent windows to determine the rate of change of the risk index between each window. The calculated results are then written to the blockchain's distributed ledger node via a chained encrypted channel.
[0138] (2) When the growth rate exceeds 2 times the historical standard deviation for the same period and the number of associated nodes is ≥5, it is determined to be a cross-regional transmission event and a red alert is activated;
[0139] The system retrieves historical data from the same period over the past three years to construct a time series model, and calculates the standard deviation of the risk index fluctuations for the corresponding time period through the statistical analysis module. When the real-time detected risk index growth rate exceeds twice the standard deviation value, the associated network topology analysis engine is triggered to identify node clusters with data anomalies and business associations based on the blockchain node geographic location metadata and supply chain relationship map. If the threshold conditions of geographical distribution spanning more than three administrative regions and the number of associated nodes reaching five nodes are met at the same time, a red alert event proposal is submitted to the blockchain consensus network. After consensus confirmation by more than half of the verification nodes, an encrypted early warning message with a timestamp is automatically pushed to the regulatory agency, and a cross-chain transaction is initiated to lock the relevant food distribution channels.
[0140] Early warning instruction distribution submodule 243: Sends differentiated instructions to the supervisory terminal and emergency equipment of the corresponding node through the private blockchain channel, and simultaneously updates the early warning status to the feature chain;
[0141] After generating differentiated instructions, the system establishes point-to-point encrypted communication via a private blockchain channel and distributes them to target monitoring terminals using a hierarchical permission control mechanism. The instruction content is dynamically encrypted according to the warning level. Red warning instructions utilize quantum key distribution technology, orange warning instructions utilize the national encryption algorithm SM4, and yellow warning instructions utilize standard AES encryption. When emergency equipment receives instructions, it must verify the validity of the digital signature and timestamp through a lightweight blockchain client and simultaneously write the device's response status to a new block in the feature chain. The feature chain update process utilizes an improved practical Byzantine fault-tolerant algorithm, ensuring real-time synchronization while achieving consistent synchronization of warning status across the entire network. Supervisory nodes can verify the authenticity of on-chain data using zero-knowledge proof technology without exposing the original monitoring information.
[0142] Federated Learning Correction Module 25: Aggregates early warning response data, uses federated learning to calculate the global risk attenuation gradient, infers the source of risk, and corrects blockchain weights and digital twin parameters. It includes the following submodules:
[0143] Federated learning data aggregation submodule 251: collects response delay data of each node to the warning instruction and the processing result feedback to construct a federated learning data set;
[0144] Through the lightweight agent program deployed on each monitoring node, the response delay timestamp and disposal operation log of the node after receiving the early warning instruction are captured in real time. The data is divided into time windows and the node geographic location code and device fingerprint information are attached. The sensitive fields are anonymized using differential privacy technology. The secure multi-party computing protocol is used to complete data cleaning and format standardization at the edge gateway. Finally, the cross-chain transaction is triggered by the blockchain smart contract to synchronize the pre-processed federated learning dataset to the cloud federated server, forming an encrypted training sample library containing node response feature vectors and disposal effect labels.
[0145] Risk attenuation and source identification submodule 252: Calculates the global risk attenuation gradient through a distributed gradient descent algorithm and identifies nodes whose response efficiency is lower than a preset standard as risk source candidates;
[0146] Based on the risk propagation dynamics model initialized by the federated server, an asynchronous parallel computing architecture is used to distribute the model parameters to each participating node. The momentum factor is introduced to accelerate convergence when the node calculates the gradient update amount using historical response data. The local model of each node calculates the local gradient of risk attenuation based on the historical response efficiency baseline:
[0147]
[0148] in, represents the local gradient at node i; N represents the number of summation items; k represents the index of the number of treatments, ranging from 1 to N; Indicates the partial derivative of the model parameter θ; represents the actual risk attenuation rate after the kth disposal, which is the value obtained by actual observation; represents the theoretical decay rate after the kth treatment predicted by the digital twin; Var(R pred ) represents the predicted value R pred The variance reflects the degree of dispersion of the predicted value; γ represents the smoothing factor; λ represents the L2 regularization coefficient; It represents the square of the L2 norm of the model parameter θ. By penalizing larger parameter values, the model parameters are distributed more evenly and the model is prevented from overfitting.
[0149] The cloud aggregator adopts an adaptive learning rate adjustment strategy when fusing the gradients of each node through a weighted average algorithm. When using the gradient back propagation algorithm to trace the risk propagation path, it combines the node topology relationship diagram to calculate the path probability. The sliding window mechanism is used to evaluate the response efficiency to count the task completion rate of the node within the specified time threshold. When the node efficiency index is lower than the industry benchmark value and the gradient contribution deviates from the mean by two standard deviations for three consecutive monitoring cycles, it is automatically marked as a candidate risk source.
[0150] Model parameter optimization submodule 253: adjusts the weight coefficient of the node data in the block feature chain according to the gradient back-inference results, and optimizes the pathogen diffusion rate parameters of the digital twin;
[0151] Based on the node contribution ranking table obtained by risk gradient inversion, the voting weight coefficient of each node is dynamically adjusted in the consensus mechanism of the block feature chain, and a linear penalty function is implemented for nodes with high response delay to reduce their weight ratio. At the same time, when using the backpropagation algorithm to optimize the pathogen diffusion model of the digital twin, the adaptive particle filter algorithm is introduced when reconstructing the pathogen migration path in the virtual twin space by coupling the environmental temperature and humidity sensor data with the logistics path information. The Bayesian optimization method is used to perform multi-objective parameter adjustment on the diffusion rate parameter. After each parameter update, the improvement in model prediction accuracy is verified through Monte Carlo simulation. When the accuracy improvement does not reach the preset threshold after three consecutive iterations, the parameter rollback mechanism is automatically triggered.
[0152] Corresponding to the above embodiment, an embodiment of the present invention provides a computer storage medium, comprising: at least one memory and at least one processor;
[0153] The memory is used to store one or more program instructions;
[0154] a processor, configured to run one or more program instructions to execute an intelligent remote early warning method for food risk prevention and control;
[0155] Corresponding to the above embodiments, an embodiment of the present invention provides a computer-readable storage medium, which contains one or more program instructions, and the one or more program instructions are used by a processor to execute an intelligent remote early warning method for food risk prevention and control.
[0156] The embodiments disclosed in the present invention provide a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are run on a computer, the computer executes the above-mentioned intelligent remote early warning method for food risk prevention and control.
[0157] In the embodiments of the present invention, the processor may be an integrated circuit chip having signal processing capabilities. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0158] The methods, steps, and logic diagrams disclosed in the embodiments of the present invention can be implemented or executed. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software modules can be located in a storage medium such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers, which are well-known in the art. The processor reads the information from the storage medium and, in conjunction with its hardware, completes the steps of the aforementioned method.
[0159] The storage medium may be a memory and may be, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.
[0160] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
[0161] Volatile memory may be random access memory (RAM), which is used as an external cache memory. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM).
[0162] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0163] Those skilled in the art will appreciate that in one or more of the above examples, the functions described herein can be implemented using a combination of hardware and software. When software is used, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media includes any medium that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0164] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, and improvements made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. An intelligent remote early warning method for food risk prevention and control, characterized in that: include: S1. Deploy lightweight blockchain edge terminals at food supply chain nodes to collect environmental parameters and operation records, calculate data conflict entropy values to screen highly reliable data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system. S2. Based on the block feature chain data, the spatiotemporal graph convolutional network is used to calculate the spatiotemporal coupling of risk, and the food contamination data is integrated to generate a dynamic hybrid risk index; S3. Build a food digital twin, input the hybrid risk index, calculate the cross-modal propagation coefficient, simulate the risk diffusion path, and output a candidate set of prevention and control strategies; S4. Generate warning level confidence intervals based on the candidate set of prevention and control strategies. Exceeding limit events trigger the smart contract warning chain and send differentiated encrypted instructions. S5. Aggregate early warning response data, use federated learning to calculate the global risk attenuation gradient, reverse the source of risk and correct the blockchain weight and digital twin parameters.
2. The intelligent remote early warning method for food risk prevention and control according to claim 1 is characterized in that: Deploy lightweight blockchain edge terminals at food supply chain nodes to collect environmental parameters and operation records, calculate data conflict entropy values to screen highly reliable data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system. This process includes the following sub-steps: Deploy the lightweight blockchain edge terminal at the planting, processing, warehousing and transportation nodes of the food supply chain, and configure multi-source sensors to collect temperature, humidity, operation timestamps and responsible person information; Perform hash check and time series alignment on the collected data, calculate the information entropy difference of each data block, and eliminate low-credibility data whose conflict entropy value exceeds the preset threshold; The filtered data is encapsulated into a block feature chain according to the supply chain flow, and then encrypted and transmitted in segments to the cloud-based prevention and control system.
3. The intelligent remote early warning method for food risk prevention and control according to claim 1 is characterized in that: Based on the blockchain feature chain data, the spatiotemporal coupling of risk is calculated using a spatiotemporal graph convolutional network, and the food contamination data is integrated to generate a dynamic hybrid risk index, which includes the following sub-steps: Extract timestamps, geographic locations, and operation event labels from the block feature chain to construct a spatiotemporal correlation matrix; The dynamic hybrid risk index is input into the digital twin to calculate the cross-modal influence coefficient of temperature and humidity gradient and operation interval on risk propagation; A dynamic hybrid risk index is generated based on the nonlinear relationship between coupling degree and pollution concentration, and high-risk hotspots are marked.
4. The intelligent remote early warning method for food risk prevention and control according to claim 1 is characterized in that: Constructing a food digital twin, inputting a hybrid risk index, calculating the cross-modal propagation coefficient, simulating the risk diffusion path, and outputting a candidate set of prevention and control strategies includes the following sub-steps: The digital twin is constructed based on the physical properties and historical risk data of all links in the supply chain, and loaded with an environmental parameter simulation engine and a pathogen diffusion model; The dynamic hybrid risk index is input into the digital twin to calculate the cross-modal influence coefficient of temperature and humidity gradient and operation interval on risk propagation; The Monte Carlo method is used to simulate the risk diffusion path and generate a candidate set of prevention and control strategies including isolation scope, disinfection priority and traceability path.
5. The intelligent remote early warning method for food risk prevention and control according to claim 1 is characterized in that: Based on the candidate set of prevention and control strategies, a warning level confidence interval is generated. The over-limit event triggers the smart contract warning chain and sends a differentiated encryption instruction, including the following sub-steps: The warning level confidence interval is divided according to the risk coverage and impact duration of the prevention and control strategy candidate set, and three thresholds of red, orange and yellow are set; When the detection indicator exceeds the threshold, the smart contract warning chain is triggered, and the encrypted instruction template is matched according to the risk type and a digital signature is attached; Differentiated instructions are sent to the supervisory terminals and emergency equipment of the corresponding nodes through private blockchain channels, and the warning status is updated to the feature chain simultaneously.
6. The intelligent remote early warning method for food risk prevention and control according to claim 5, characterized in that: When the detection indicator exceeds the threshold, the smart contract warning chain is triggered. The encrypted instruction template is matched according to the risk type and a digital signature is attached. The following sub-steps are included: Analyze the risk index growth rate of three consecutive time windows in the block feature chain; When the growth rate exceeds 2 times the historical standard deviation for the same period and the number of associated nodes is ≥5, it is determined to be a cross-regional transmission event and a red alert is activated.
7. The intelligent remote early warning method for food risk prevention and control according to claim 1 is characterized in that: Aggregate early warning response data, use federated learning to calculate the global risk attenuation gradient, reverse the risk source, and correct the blockchain weight and digital twin parameters, including the following sub-steps: Collect the response delay data and handling result feedback of each node to the warning instructions to build a federated learning dataset; The global risk attenuation gradient is calculated using a distributed gradient descent algorithm, identifying nodes with response efficiency lower than the preset standard as candidate risk sources; The weight coefficient of the node data in the block feature chain is adjusted according to the gradient back-inference results, and the pathogen diffusion rate parameters of the digital twin are optimized.
8. An intelligent remote early warning system for food risk prevention and control, characterized in that: include: Blockchain trusted collection module: Deploy lightweight blockchain edge terminals at food supply chain nodes to collect environmental parameters and operation records, calculate data conflict entropy values to screen highly trusted data, generate block feature chains, and remotely encrypt and transmit them to the cloud-based prevention and control system; Spatiotemporal risk modeling module: Based on blockchain feature chain data, the spatiotemporal graph convolutional network is used to calculate the spatiotemporal coupling of risks, and food contamination data is integrated to generate a dynamic hybrid risk index; Digital twin decision module: Builds a digital twin of food, calculates the cross-modal propagation coefficient after inputting the hybrid risk index, simulates the risk diffusion path, and outputs a candidate set of prevention and control strategies; Intelligent early warning execution module: Generates warning level confidence intervals based on the candidate set of prevention and control strategies. Exceeding limit events trigger the smart contract early warning chain and send differentiated encrypted instructions; Federated learning correction module: Aggregates early warning response data, uses federated learning to calculate the global risk attenuation gradient, reversely infers the source of risk and corrects blockchain weights and digital twin parameters.
9. A computer storage medium, characterized in that include: at least one memory and at least one processor; a memory for storing one or more program instructions; A processor, configured to run one or more program instructions to execute an intelligent remote early warning method for food risk prevention and control as described in any one of claims 1 to 7.
Citation Information
Cited By
User real-name information protection method and system oriented to competition reservation software
CN120832690A
Food safety supervision system and method based on digital twinning
CN121032233A
A food safety supervision system and method based on digital twinning
CN121032233B
Safety early warning method and system based on food safety inspection data
CN121073494A
Terminal data security processing method and system
CN121126325A