Food safety online supervision platform and traceability method based on Internet of Things and block chain

An online monitoring platform combining the Internet of Things and blockchain can identify temperature control status and trajectory anomalies in cold chain transportation in real time, solving the problem of lagging traditional monitoring methods and achieving efficient traceability and risk management of the cold chain transportation process.

CN120851909AInactive Publication Date: 2025-10-28SICHUAN NANSHUI AGRI & ANIMAL HUSBANDRY TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511358260.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-10-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional food safety supervision methods are unable to identify abnormalities in temperature control status and transportation trajectory in real time during cold chain transportation, resulting in supervision lag and failure to detect risks in a timely manner, especially when refrigeration units are slow to respond or transportation routes are deviated.

Method used

An online food safety monitoring platform based on the Internet of Things and blockchain is adopted. Through environmental anomaly identification module, internal circulation failure identification module, trajectory deviation identification module, and abnormal time period cross-judgment module, combined with temperature and humidity data and GPS trajectory obtained by IoT sensors, it identifies cold storage environment anomalies, internal circulation failure and trajectory drift, generates joint anomaly verification fields, and constructs traceability datasets in chronological order, and uses blockchain for tamper-proof recording.

Benefits of technology

It enables real-time identification and verification of abnormal behaviors during cold chain transportation, improves the responsiveness and accuracy of food safety supervision, and enhances the comprehensive identification capability of environmental and trajectory out-of-control risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120851909A_ABST
    Figure CN120851909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of food traceability, in particular to a food safety online supervision platform and traceability method based on the Internet of Things and a block chain, and the platform comprises an environment abnormity recognition module, an internal circulation failure recognition module, a track offset recognition module, an abnormal time period cross judgment module and a transportation process traceability data construction module. According to the method, a time sequence structure is constructed through multi-point temperature and humidity information in a cold chain transportation scene, the collaborative abnormal state of a temperature control environment can be recognized, then in combination with response lag between cold machine starting time and temperature and humidity fluctuation, a GPS track in a transportation path is aligned with distance counting sensing information, the difference value change between the track and the physical mileage is extracted, and the real-time monitoring of the temperature and humidity environment is achieved. And carrying out fitting analysis on the continuous offset interval to identify potential path abnormity, and carrying out combined judgment on the offset degree and the cold control response ratio to realize identification, verification and task traceability of abnormal behaviors in the cold chain transportation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food traceability technology, and in particular to an online food safety monitoring platform and traceability method based on the Internet of Things and blockchain. Background Technology

[0002] The field of food traceability technology involves the comprehensive tracking and recording of information in all aspects of food production, processing, distribution, and sales, in order to achieve visualized, verifiable, and traceable management of information such as food source, flow, and quality and safety.

[0003] Traditional online food safety supervision refers to the unified management and inspection of data uploaded by food production and processing enterprises through centralized databases and manual or semi-automatic data collection methods in order to discover potential food safety hazards and problems.

[0004] Traditional food safety supervision relies on data uploaded by enterprises and centralized management for spot checks. However, this often fails to detect abnormal risks in a timely manner when data reporting is untimely or does not cover the transportation process. This is especially true in cold chain transportation, where changes in temperature control and transportation trajectory are highly dependent on on-site environmental conditions. Static data reported by enterprises themselves cannot dynamically reflect actual problems such as refrigeration unit operation or route deviations. For example, if a refrigeration unit experiences a delayed response but the enterprise does not proactively report it, traditional methods cannot effectively detect it. If a transport vehicle deviates or deviates during actual travel, the centralized platform, lacking mileage comparison and trajectory analysis mechanisms, also struggles to determine transportation compliance. This characteristic of delayed perception of key data changes and lack of identification of anomalies limits the effectiveness of the supervision process and its risk control capabilities in real-world scenarios. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing an online food safety monitoring platform and traceability method based on the Internet of Things and blockchain.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: An online food safety monitoring platform based on the Internet of Things and blockchain includes: The environmental anomaly identification module acquires temperature and humidity data of the cold chain transport cabin, judges the state of the cold storage environment inside the cabin based on the changes in temperature and humidity over time, and extracts cold storage environment anomaly fields. The internal circulation failure identification module obtains the time of occurrence of abnormal temperature and humidity in the abnormal field of the refrigeration environment and the start-up time of the cabin chiller, compares the lag interval between the two times, and identifies the internal circulation failure data based on the lag interval. The trajectory offset recognition module obtains the GPS trajectory coordinates of the vehicle during cold chain transportation, calculates the total mileage of the moving trajectory, compares it with the vehicle mileage output data, and filters the trajectory drift data. The abnormal time period cross-judgment module determines the overlap of abnormal situations in time based on the internal loop failure data and the trajectory drift data, verifies whether the transportation path and temperature control status are abnormal at the same time, and obtains the joint abnormality verification field. The transportation process traceability data construction module merges the joint anomaly verification fields in chronological order to construct an event sequence, and combines it with the transportation task number to construct a transportation link traceability dataset.

[0007] As a further embodiment of the present invention, the refrigeration environment anomaly field includes refrigeration status change information, anomaly field markers, and temperature and humidity change characteristics; the internal circulation failure data includes refrigeration unit response delay information, lag interval value, and internal circulation status anomaly type; the trajectory drift data includes trajectory coordinate offset, total mileage difference, and drift marker information; the joint anomaly verification field includes time coincidence determination result, path and temperature control joint anomaly type, and verification status identifier; and the transportation link traceability dataset includes event time series, anomaly verification field set, and transportation task number.

[0008] As a further aspect of the present invention, the environmental anomaly identification module includes: The temperature and humidity acquisition submodule acquires temperature and relative humidity data from multiple environmental sensing nodes within the cold chain transport cabin through IoT sensors embedded in the cold chain transport equipment. It constructs a time series structure based on the node number and corresponding time record to generate node time-series temperature and humidity data groups. The difference determination submodule calculates the temperature and humidity difference between adjacent nodes based on the data of multiple nodes at the same time point in the node time-series temperature and humidity data group, calls the wind speed data after the chiller starts up for corresponding time comparison, and filters the multi-parameter collaborative section. The field generation submodule extracts the corresponding wind speed records, temperature and humidity difference values, and original acquisition time from the multi-parameter collaborative section, combines them into structured abnormal record entries, and generates a cold storage environment abnormal field.

[0009] As a further aspect of the present invention, the inner loop failure identification module includes: The lag time calculation submodule obtains the time point of the maximum temperature and humidity change recorded in the cold storage environment anomaly field, as well as the refrigeration unit start-up command time of the transportation task corresponding to the target time point, and uses the cross-correlation function to calculate the delay between the refrigeration unit start-up signal sequence and the temperature and humidity fluctuation response sequence to generate the lag calculation result. The wind speed threshold comparison submodule extracts wind speed monitoring data within the corresponding time period based on the delay time of the lag calculation result, compares it with the set wind speed discrimination threshold one by one, filters out delay records where the wind speed exceeds the discrimination threshold, and obtains the wind speed lag confirmation section. The failure field construction submodule, based on the wind speed lag confirmation section, combines and constructs structural values ​​representing the disconnect between the chiller response and environmental changes, generating internal circulation failure data.

[0010] As a further aspect of the present invention, the trajectory offset recognition module includes: The trajectory mileage calculation submodule obtains the GPS trajectory coordinates of the vehicle per second during the cold chain transportation process, arranges them in chronological order, calculates the Havelsin distance between adjacent coordinate points, adds up all distances to form the total trajectory mileage, and records the cumulative trajectory changes in segments per second to generate a time-segmented trajectory mileage sequence. The mileage difference fitting submodule acquires the mileage value output by the vehicle mileage sensor every second and accumulates it second by second. It aligns the timestamp with the time-segmented trajectory mileage sequence at the second level, calculates the difference sequence between the two sets of mileage values, calls the local weighted regression algorithm to fit the difference sequence, extracts continuous abnormal offset areas, and obtains the difference deviation fitting segment. The offset field construction submodule generates trajectory drift data based on the deviation magnitude, duration, and deviation interval index position of the difference from the fitted segment.

[0011] As a further aspect of the present invention, the abnormal time period crossover determination module includes: The time segment comparison submodule obtains the time fields of the trajectory drift data and the inner loop failure data and performs cross-judgment to filter out interval segments that overlap in time, adds a unified index number to the overlapping segments, and generates an index set of abnormal time overlapping segments. The offset lag calculation submodule extracts the cumulative mileage value of vehicles and the task path planning value in the corresponding segment according to the abnormal time overlap segment index set, calculates the distance offset percentage between the two, and extracts the chiller delay value and chiller continuous running time of the target segment, calculates the time ratio between the two, and obtains the path offset rate and lag ratio combination set. The verification field construction submodule combines the path offset rate, cold control lag rate, and overlapping segment time index recorded in the set based on the path offset rate and lag ratio, and constructs a numerical field describing the coupling characteristics of the abnormal state to generate a joint anomaly verification field.

[0012] As a further aspect of the present invention, the transportation process traceability data construction module includes: The event sorting and extraction submodule obtains all record entries in the joint anomaly verification field, extracts the corresponding timestamp information, sorts all field data in chronological order, and generates a time series event group. The task identifier merging submodule merges and organizes event sequences with the same task number into a group of data based on each record in the time series event group, binds the task tag and time index, and obtains the task sequence belonging field set; The dataset generation submodule converts the task sequence attribution field set into standardized JSON text, generates a corresponding SHA-256 hash digest for the text content, binds the digest with the task number and writes it into the blockchain network as an immutable record identifier, thereby generating a traceability dataset for the transportation process.

[0013] The method for online food safety supervision and traceability based on the Internet of Things (IoT) and blockchain, which is executed on the aforementioned online food safety supervision platform based on IoT and blockchain, includes the following steps: S1: Obtain temperature and humidity data of the cold chain transport cabin, determine the state of the cold storage environment inside the cabin based on the changes in temperature and humidity over time, and extract the cold storage environment anomaly field. S2: Obtain the time of occurrence of abnormal temperature and humidity and the start-up time of the cabin chiller in the abnormal field of the cold storage environment, compare the lag interval between the two times, and identify the internal circulation failure data based on the lag interval; S3: Obtain the GPS trajectory coordinates of the vehicle during cold chain transportation, calculate the total mileage of the movement trajectory, compare it with the vehicle mileage output data, and filter the trajectory drift data; S4: Based on the internal circulation failure data and the trajectory drift data, determine the overlap of abnormal situations in time, verify whether the transportation path and temperature control status are abnormal at the same time, and obtain the joint abnormality verification field. S5: Merge the joint anomaly verification fields in chronological order to construct an event sequence, and combine them with the transportation task number to construct a transportation process traceability dataset.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, a time-series structure is constructed using multi-point temperature and humidity information in cold chain transportation scenarios. By further comparing wind speed data with temperature and humidity differences, collaborative abnormal states of the temperature-controlled environment can be identified. Combined with the response lag between chiller start-up time and temperature and humidity fluctuations, chiller response hysteresis features are extracted, and the chiller delay range is confirmed based on wind speed thresholds. Simultaneously, GPS trajectories and odometer sensor information in the transportation path are aligned to extract the difference between the trajectory and physical mileage. Fitting analysis is performed on continuous offset intervals to identify potential path anomalies. Based on this, the time intervals of temperature control delay and path offset are cross-compared. By combining the degree of offset and the chiller control response ratio, a joint anomaly criterion of time overlap and feature coupling is established. Finally, the time-series joint anomaly data is bound to transportation task identifiers for structured organization. This enables the identification, verification, and task tracing of abnormal behaviors during cold chain transportation, enhances the comprehensive identification capability of environmental and trajectory loss-of-control risks during transportation, and improves the timeliness, accuracy, and reliability of food safety supervision in the transportation process. Attached Figure Description

[0015] Figure 1 This is a platform flowchart of the present invention; Figure 2 This is a flowchart of the environmental anomaly identification module of the present invention; Figure 3 This is a flowchart of the internal loop failure identification module of the present invention; Figure 4 This is a flowchart of the trajectory offset recognition module of the present invention; Figure 5 This is a flowchart of the abnormal time period cross-determination module of the present invention; Figure 6 This is a flowchart of the transportation process traceability data construction module of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0018] See also Figure 1 This invention provides a technical solution: an online food safety monitoring platform based on the Internet of Things and blockchain, comprising: The environmental anomaly identification module acquires temperature and humidity data of the cold chain transport cabin, judges the state of the cold storage environment inside the cabin based on the changes in temperature and humidity over time, and extracts cold storage environment anomaly fields. The internal circulation failure identification module obtains the time of occurrence of abnormal temperature and humidity in the abnormal field of refrigeration environment and the start time of the cabin chiller, compares the lag interval between the two times, and identifies internal circulation failure data based on the lag interval. The trajectory offset recognition module obtains the GPS trajectory coordinates of the vehicle during cold chain transportation, calculates the total mileage of the moving trajectory, compares it with the vehicle mileage output data, and filters the trajectory drift data. The abnormal period cross-judgment module determines the overlap of abnormal situations in time based on the internal loop failure data and trajectory drift data, verifies whether the transportation path and temperature control status are abnormal at the same time, and obtains the joint abnormality verification field. The transportation process traceability data construction module merges the joint anomaly verification fields in chronological order to construct an event sequence, and combines it with the transportation task number to construct a transportation link traceability dataset. The refrigeration environment anomaly fields include refrigeration status change information, anomaly field markers, and temperature and humidity change characteristics. The internal circulation failure data includes refrigeration unit response delay information, lag interval values, and internal circulation status anomaly types. The trajectory drift data includes trajectory coordinate offset, total mileage difference, and drift marker information. The joint anomaly verification fields include time coincidence determination results, path and temperature control joint anomaly types, and verification status identifiers. The transportation link traceability dataset includes event time series, anomaly verification field set, and transportation task number.

[0019] See also Figure 2 The environmental anomaly detection module includes: The temperature and humidity acquisition submodule acquires temperature and relative humidity data from multiple environmental sensing nodes within the cold chain transport cabin through IoT sensors embedded in the cold chain transport equipment. It constructs a time series structure based on the node number and corresponding time record to generate node time-series temperature and humidity data groups. By using IoT sensors embedded in cold chain transportation equipment, temperature and relative humidity data are acquired from multiple environmental sensing nodes within the cold chain transport compartment. Each node is assigned a unique number, such as N1, N2, and N3, and data is recorded according to the collection timestamp. For example, at 06:00, N1 is collected with a temperature of 2.3°C and humidity of 65%, and at 06:05, N2 is collected with a temperature of 2.7°C and humidity of 67%. The data collected by all nodes at different times are constructed into a two-dimensional time series table indexed by the node number. During the construction process, the time granularity must be consistent. If the collection period is 5 minutes, then the time axis... The data points are 06:00, 06:05, 06:10, etc., and missing data points are filled in using interpolation algorithms (such as linear interpolation). For example, if N2 is not collected at 06:10, its value is linearly predicted using data between 06:05 and 06:15 to ensure that all nodes have temperature and humidity records at the same time point. Then, the time series structure of each node is constructed into node time series temperature and humidity data groups according to time-temperature and humidity key-value pairs, such as N1→[(06:00, 2.3, 65%), (06:05, 2.4, 66%)...], finally forming a complete node-time dimension data structure.

[0020] The difference determination submodule calculates the temperature and humidity difference between adjacent nodes based on the data of multiple nodes at the same time point in the node time-series temperature and humidity data group, calls the wind speed data after the chiller starts up for corresponding time comparison, and filters the multi-parameter collaborative section. Based on data from multiple nodes at the same time point in the node-series temperature and humidity data set, select any two spatially adjacent nodes, such as N1 and N2. At time 06:10, record temperatures of 2.6°C and 3.2°C, and humidity of 66% and 69%, respectively. Calculate the temperature difference as 3.2 - 2.6 = 0.6°C and the humidity difference as 69 - 66 = 3%. Set the system to record wind speed data as a minute-by-minute wind speed change curve after the chiller starts up. For example, if the wind speed at 06:10 is 1.5 m / s, then... The values ​​are paired and compared with the corresponding time points of temperature and humidity difference to filter out the segments where the wind speed changes significantly (e.g., wind speed change rate > 0.5 m / s) and the temperature and humidity difference is greater than the set difference threshold. The difference threshold can be set as temperature difference ≥ 0.5°C and humidity difference ≥ 3%. If a certain time point meets the conditions of wind speed 1.8 m / s, temperature difference 0.7°C, and humidity difference 3.5%, then that time point is a multi-parameter collaborative segment that meets the conditions. The data of the entire time axis are processed in sequence to obtain the set of all time periods that meet the conditions.

[0021] The field generation submodule extracts the corresponding wind speed records, temperature and humidity difference values ​​and original collection time from the multi-parameter collaborative section, combines them into structured abnormal record entries, and generates the cold storage environment abnormal field. Extract the corresponding wind speed records, temperature and humidity difference values, and original acquisition time from the multi-parameter collaborative section. Based on the time point 06:10, the wind speed is 1.8 m / s, the temperature difference is 0.7°C, and the humidity difference is 3.5%. Combine these three sets of data to form a structured field entry, namely (time: 06:10, wind speed: 1.8 m / s, temperature difference: 0.7°C, humidity difference: 3.5%). Iterate through all time points that meet the multi-parameter collaborative conditions and output them in sequence as a set of structured abnormal record entries. Then define this as a list of abnormal fields in the cold storage environment.

[0022] See also Figure 3 The internal circulation failure detection module includes: The lag time calculation submodule obtains the time point of maximum temperature and humidity change recorded in the cold storage environment anomaly field, as well as the refrigeration unit start-up command time of the transportation task corresponding to the target time point. It uses a cross-correlation function to calculate the delay between the refrigeration unit start-up signal sequence and the temperature and humidity fluctuation response sequence, and generates the lag calculation result. The system response delay is estimated by comparing the time difference between the chiller start-up signal and the temperature and humidity fluctuation response. First, the time point of maximum temperature and humidity change in the refrigeration environment anomaly field is extracted. Assuming that the temperature at refrigeration compartment node N1 is 3.5°C and humidity is 75% at 07:00, and it changes to 1.8°C and humidity is 62% at 08:00, then the temperature change is... Humidity changes as The time of 08:00 was recorded as the point of maximum temperature and humidity response. The transport task log records the chiller start-up time as 07:30, recorded as... Subsequently, a chiller signal sequence was constructed with a sampling period of 5 minutes. ,satisfy: ;in, : Indicates a point in time The chiller start signal value is a dimensionless binary signal with a value of 0 or 1. : These are the time points in the system where sampling is performed at fixed time steps (5 minutes); This indicates the cold start time, for example, 07:30 here, corresponding to the 7th sampling position in the time series. (Example construction) The sequence is: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], indicating that the cold start occurred at 07:30.

[0023] Before constructing the temperature and humidity response sequence, it is necessary to analyze the temperature changes separately. With humidity changes Normalization is performed to unify its physical dimensions, as follows: ; in, : Normalized temperature response value (unitless, range [0, 1]); Time point Temperature change relative to the previous sampling time point, in °C; : Historical maximum and minimum temperature changes (unit: °C).

[0024] ; in, Normalized humidity response value (unitless); Time point The humidity change relative to the previous sampling time point, expressed in % %. : Historical maximum and minimum humidity changes (in %).

[0025] Taking a time point of 07:40 as an example, the temperature at the previous time point (07:35) was 3.0°C and the humidity was 70%. At this time point, the temperature and humidity change to 2.7°C and 75%. Then: ; .

[0026] set up , , , Substituting the values ​​into the calculation, we get: ; .

[0027] Then, the two normalization results are combined according to their weights into a unified dimensionless index: ; in, Time point Temperature and humidity synthesis response index (unitless); Temperature response weight, with a value range of [0, 1]; Humidity response weight, satisfying The setting is based on the principle that the factor most sensitive to temperature fluctuations in actual refrigerated temperature control should be given a higher weight. In cold chain scenarios, temperature fluctuations typically have a more significant impact on the quality of refrigerated goods, therefore, the weighting is set accordingly. , This reflects a temperature-dominant, humidity-secondary influence pattern. Substitute the aforementioned normalized value into the equation: .

[0028] This allows the construction of a complete response sequence. For example: [0.05, 0.12, 0.22, 0.35, 0.45, 0.39, 0.30, 0.20, 0.15], then cross-correlate it with the chiller signal sequence to obtain the lag time, defined as: ; in, : Refrigeration unit signals and response indicators in lag time (Unit: cross-correlation value at each sampling time point); : Indicates the lag step size, such as This indicates a delay of 3 sampling time points, i.e. minute; : The chiller signal at the time point The value can be 0 or 1; Temperature and humidity response occurs after the chiller signal. The values ​​at each sampling time point are used to compare the hysteresis response.

[0029] set up , hour, ,and ,but: , Calculate in the same way , traverse all possible Take the maximum value: .

[0030] If the maximum value corresponds to The response lag time is: ; The 15-minute lag time is the output of the lag time calculation submodule.

[0031] The wind speed threshold comparison submodule extracts wind speed monitoring data within the corresponding time period based on the delay time of the lag calculation results, compares it with the set wind speed discrimination threshold one by one, filters out delay records where the wind speed exceeds the discrimination threshold, and obtains the wind speed lag confirmation section. The delay time value output by the lag time calculation submodule is used. For example, if the delay time is 15 minutes, the comparison interval is determined by extending 15 minutes forward from the chiller start-up time of 07:30 to 07:45. Wind speed data from all sampling points within this time period is extracted from the environmental monitoring records. For example, if one data point is taken every 5 minutes, there are 3 data points in total: wind speed of 1.6 m / s at 07:35, 2.2 m / s at 07:40, and 2.6 m / s at 07:45. The wind speed discrimination threshold is set to 2.0 m / s. Each sampling point's wind speed is compared against this threshold. The comparison rule is defined as follows: if the wind speed at a certain moment is greater than or equal to the threshold... This is recorded as a behavior with excessively high hysteresis response, wind speed threshold. The setting method can be based on the rated operating capacity of the transport vehicle's fan and the statistical settings of its normal stability range. For example, based on the statistics of nearly 100 stable samples, it is found that the wind speed of the transport container fluctuates between 1.2 and 1.8 m / s, which is considered a normal range. Therefore, a safety boundary threshold of 2.0 m / s is set upwards as the critical line for the system to judge abnormal wind speed surges. The delay interval exceeding this threshold is then marked as the wind speed lag confirmation section. In this example, the wind speeds at 07:40 and 07:45 are 2.2 and 2.6 m / s, respectively, both exceeding the threshold and are recorded as lag confirmation points. The final wind speed lag confirmation section is 07:40–07:45.

[0032] The failure field construction submodule, based on the wind speed lag confirmation section, combines and constructs structural values ​​representing the disconnect between the chiller response and environmental changes, generating internal circulation failure data; Based on the output wind speed lag confirmation segment data, the relevant time points, corresponding wind speed values, and lag time are structurally combined to form an inner loop failure data record entry. For example, the wind speed lag segment is 07:40–07:45, the wind speed records are 2.2 m / s and 2.6 m / s, and the corresponding lag time is 15 minutes. The field construction format is defined as (cooler start time: 07:30, lag segment start and end time: 07:40–07:45, wind speed sequence: [2.2, 2.6] m / s, lag: 15 minutes). The construction rule is: each segment uses the cooler start time, wind speed sequence, delay range, and segment range index to generate an independent structure item, ultimately forming a set of failure field data used to identify cooler operation that did not promptly trigger environmental temperature and humidity fluctuations.

[0033] See also Figure 4 The trajectory offset recognition module includes: The trajectory mileage calculation submodule obtains the GPS trajectory coordinates of the vehicle per second during the cold chain transportation process, arranges them in chronological order, calculates the Havelsin distance between adjacent coordinate points, adds up all distances to form the total trajectory mileage, and records the cumulative trajectory changes in segments per second to generate a time-segmented trajectory mileage sequence. The system acquires GPS trajectory coordinates recorded by vehicles every second during cold chain transportation. The coordinates are arranged in timestamp order to form a complete trajectory path data stream. The spherical distance (Havocian distance) between each pair of adjacent coordinate points is calculated to obtain the ground movement distance between the two points. This process is executed at 1-second intervals, iterating through the GPS data pairs every second. During the calculation, the latitude and longitude of the previous moment and the current moment are used to calculate the ground distance. For example, if the vehicle's position at 07:00:01 is at latitude and longitude A, and its position at 07:00:02 is at latitude and longitude B, then the spherical arc distance between A and B is calculated. Let's assume... 2.1 meters, and the ground distance of adjacent coordinate points is calculated sequentially every second. The total mileage of the vehicle's trajectory during transportation is obtained by summing all the single-segment distance values. For example, if the vehicle records 300 trajectory points in 5 minutes, the total path distance is calculated second by second and accumulated to 935 meters. At the same time, the distance increment of each second segment is also recorded sequentially as a trajectory increment sequence. For example, the vehicle moves 2.1 meters in the 2nd second compared to the 1st second, and moves 3.5 meters in the 3rd second compared to the 2nd second. This constructs a complete record of the cumulative trajectory change every second, and generates a time-segmented trajectory mileage sequence according to the time number, which serves as a reference baseline for subsequent alignment with the vehicle's odometer sensor data.

[0034] The mileage difference fitting submodule acquires the mileage value output by the vehicle mileage sensor every second and accumulates it second by second. It aligns the timestamp with the time-segmented trajectory mileage sequence at the second level, calculates the difference sequence between the two sets of mileage values, calls the local weighted regression algorithm to fit the difference sequence, extracts continuous abnormal offset areas, and obtains the difference deviation fitting segment. Based on the time-segmented trajectory mileage sequence, and combined with the second-by-second mileage values ​​output by the vehicle's odometer sensor, the data is aligned at the second level, and the difference between the two is calculated. First, the raw output values ​​of the odometer sensor per second are extracted from the vehicle controller and accumulated chronologically to form the vehicle's own cumulative mileage sequence. For example, if the vehicle starts recording at 07:00:00, outputting 0.9 meters, 1.1 meters, 0.8 meters, etc. per second, the total sensor mileage value accumulated over 5 minutes is 930 meters. Then, using a unified timestamp as a benchmark, the data is aligned with the trajectory sequence to establish second-level data pairs. This means that each time point simultaneously possesses both the sensor mileage value and the calculated trajectory value. The calculation method is to take the difference between the two per second. For example, if the calculated trajectory value is 2.3 meters and the sensor value is 2.0 meters at a certain moment, the difference is... The system constructs a complete difference sequence second by second, based on the meter value. For example, if the consecutive differences within a 10-second segment are 0.2 meters, 0.3 meters, 0.4 meters, 0.5 meters, 0.7 meters, 0.6 meters, 0.5 meters, 0.4 meters, 0.3 meters, and 0.2 meters, it can be seen that this segment has a continuous offset trend. To extract similar abnormal segments, the system calls a locally weighted regression algorithm to perform curve fitting on the entire difference sequence. In the fitting process, the difference at each time point is used as the observed variable, and a weighted average is applied to the samples several seconds to the left and right of the center point using a local window approach. Its general form is as follows: ; in, Time point The locally weighted fitting value (unit: meters) is a calculation result that smooths the original difference sequence and identifies abnormal trends by assigning different weights to the difference data around a certain time point and performing a weighted average. This method takes a certain time point as the center, selects a certain number of time point difference data within a few seconds before and after that point, and assigns different weights according to their distance from the center point. The closer the weight is to the center point, the larger it is, reflecting its enhanced representativeness of the current time point. The smoothed fitting value for that time point is then obtained by weighted averaging. The purpose of locally weighted fitting is to weaken the interference of random fluctuations on the difference judgment and highlight the trend characteristics of persistent deviations, thereby more effectively identifying areas of abnormal trajectory drift. This fitted value is used as an observation variable to construct a smooth curve, which is compared with the original difference sequence to ultimately identify and extract potential abnormal segments. Time point The original difference value (unit: meters) is the difference between the GPS track distance and the sensor distance. Time point For the center point Fitting weights; : Window width, representing the width relative to the center point Based on this, take values ​​forward and backward respectively. A point in time; : indicates from the first Seconds to the In seconds The purpose of this method is to construct a fitted value with a weighted average within a window, centered on the center point, thereby filtering out discontinuous noise.

[0035] Regarding weight The basis for the setting: The weight values ​​determine the degree of influence of each point in the window on the fitting result of the center point. Generally, time points closer to the center point have higher weights, reflecting their stronger representativeness of the local trend. Weights are often set using linear decreasing weights or a Gaussian kernel function. Taking a linear approach as an example, if the center point... At the 30th second, the window width is Then: weight : Center point, maximum weight; adjacent points The nearest point edge point This setting reflects the principle that "the closer to the center point, the greater the contribution." In practical engineering, the weight settings can be adjusted in conjunction with parameters such as system noise level and time synchronization error sensitivity. If the data noise is large, the weight of edge points can be appropriately reduced to enhance the smoothing effect. If a strong instantaneous response capability is required, the window can be narrowed or the weight of the intermediate points can be increased.

[0036] Let the difference between these 7 points be: , , , , , , ,but: .

[0037] The local fit value at this moment is approximately 0.561 meters, significantly lower than the original difference at the center point. This indicates that the point may be the offset peak. The sliding window continues to advance along the time series. Repeating the above calculation for all points can yield a smooth fitting curve. After the fitting is completed, the residual of the fitting curve and the original difference curve is calculated point by point. The system sets the judgment rule that the residual value exceeds 0.25 meters and the continuous time exceeds 8 seconds, which is an abnormal segment. For example, if the continuous residual from the 110th to the 125th second in a certain segment is greater than 0.3 meters, then this 15-second interval is recorded as the difference deviation from the fitting segment, and the maximum difference, average difference, start and end time, etc. in the segment are extracted to form the offset data structure.

[0038] The offset field construction submodule generates trajectory drift data based on the deviation magnitude, duration, and deviation interval index position of the difference from the fitted segment; Based on the analysis results of the deviation from the fitted segment, key feature parameters of each offset segment are extracted, including the maximum deviation amplitude, average deviation value, total duration, and index position in the entire data. These parameters are then combined according to a preset field template to generate structured description entries, forming the trajectory drift data output. For example, a segment from 110 to 125 seconds is a deviation segment with a duration of 16 seconds, a maximum deviation of 0.42 meters, an average deviation of 0.35 meters, and a starting index position of 110. The corresponding constructed field content is (offset start time: 110 seconds, offset duration: 16 seconds, maximum deviation: 0.42m, average deviation: 0.35m). Record entries are automatically generated according to the parameters of each abnormal offset segment, forming a trajectory drift dataset. The system supports time series analysis of all offset fields or joint comparison with other sensor fields.

[0039] Please see Figure 5 The abnormal time period cross-determination module includes: The time segment comparison submodule obtains the time fields of trajectory drift data and inner loop failure data respectively, performs cross-judgment, filters interval segments with overlapping time, adds a unified index number to the overlapping segments, and generates an index set of abnormal time overlapping segments. The system retrieves the time field content recorded in the trajectory drift data and the inner loop failure data, and performs cross-checking on the start and end time segments of the two datasets in seconds. It then filters out overlapping intervals where the two types of data intersect in the time dimension. For example, if the trajectory drift segment is from 07:15:30 to 07:15:45 and the inner loop failure segment is from 07:15:40 to 07:15:55, the system determines that these two data segments have a time overlap, with the intersection interval being from 07:15:40 to 07:15:45, thus confirming it as a time overlap segment. The system assigns a unique index number to each overlap segment, such as marking it as IDX001. After processing all data segment pairs sequentially and unifying the numbering of all valid cross segments, it generates an index set of abnormal time overlap segments containing the indexes of all time intersection intervals.

[0040] The offset lag calculation submodule extracts the cumulative mileage value of vehicles and the task path planning value in the corresponding segment based on the index set of overlapping abnormal time segments, calculates the distance offset percentage between the two, and extracts the chiller delay value and chiller continuous running time of the target segment, calculates the time ratio between the two, and obtains the combination set of path offset rate and lag ratio. For each segment index in the time overlap segment index set, extract the cumulative mileage value and the original route planning value for vehicles within that segment. Compare the displacement difference between the two and convert it into a distance offset percentage. For example, if the cumulative mileage of a vehicle within a segment IDX001 is 26 meters and the corresponding route planning length is 30 meters, then the offset percentage is... This indicates that the vehicle's operating path for this segment is 13.3% missing compared to the planned path. Subsequently, the chiller delay time and chiller continuous operating time are extracted from this segment and compared. For example, if the chiller takes 8 minutes to trigger an effective temperature and humidity response after startup in this segment, and the chiller's continuous operating time for the entire segment is 12 minutes, then the chiller lag time ratio is... Finally, the path offset rate and the chiller lag ratio are combined into a set of values ​​and recorded under the current index. The system will generate a set of path offset rate and lag ratio combinations for each time index segment.

[0041] The verification field construction submodule combines the path offset rate, cold control lag rate and overlapping segment time index recorded in the centrally recorded path offset rate and lag ratio to construct a numerical field describing the coupling characteristics of the abnormal state, and generates a joint anomaly verification field. Based on the combination of path offset rate and chiller lag rate, and combined with the time segment index, three data items are read simultaneously for each time index segment: path offset rate, chiller lag ratio, and index segment number. A unified structure entry is constructed to describe the coupling relationship of various anomalies. For example, if a record in index IDX001 has a path offset rate of 13.3%, a chiller lag rate of 66.7%, and a time segment number of IDX001, then the field construction result is (index: IDX001, path offset rate: 13.3%, lag rate: 66.7%). All records are uniformly organized in chronological order to generate a joint anomaly verification field set.

[0042] See also Figure 6 The data construction module for tracing the transportation process includes: The event sorting and extraction submodule retrieves all record entries from the joint anomaly verification field, extracts the corresponding timestamp information, sorts all field data in chronological order, and generates a time series event group. The system retrieves all record entries from the joint anomaly verification field, extracts the timestamp field information from each entry, sorts them according to the actual time sequence of the events, and organizes all anomaly field entries into a new time series event group based on their chronological order. For example, if there are three records that occurred at 07:10:30, 07:05:15, and 07:08:20 respectively, the system will reorder them according to the time field to 07:05:15, 07:08:20, and 07:10:30, forming an ordered anomaly event linked list. Each record position corresponds to a new time series index number, and they are arranged sequentially according to the number.

[0043] The task identifier merging submodule merges event sequences with the same task number into a group of data based on each record in the time series event group, binds task tags and time indexes, and obtains the task sequence belonging field set; The time-series event group generated by the event sorting and extraction submodule is used as input. The task number field of each record is parsed and processed. All event entries under the same task number are merged into a set of data. For example, if there are 15 records in the sequence event group, there are 5 events with task number T20250625001, 3 events with task number T20250625003, and the remaining 7 events belong to other tasks. The system will automatically organize the 5 events with task number T20250625001 into a task event set, bind the task number T20250625001 with its corresponding time index and event content, and obtain the task sequence attribution field set. Each item in this field set indicates the task number, the time sequence number range of the included events, the number of events, and a summary of the exception type.

[0044] The dataset generation submodule converts the task sequence attribution field set into standardized JSON text, generates a corresponding SHA-256 hash digest for the text content, binds the digest with the task number and writes it into the blockchain network as an immutable record identifier, and generates a traceability dataset for the transportation process. The task sequence attribution field set output by the task identifier merging submodule is converted into a JSON format text file that conforms to the standard structure requirements. The JSON content includes task number, event time index range, number of events, event field details, etc. The system performs hash processing on this text content and generates digest information for the JSON text using the SHA-256 digest algorithm. For example, the digest value generated by a certain task attribution field text is a hash string of length 64 characters. This digest is bound to the original task number and written to a preset blockchain network node to form a tamper-proof structure identifier at the task level. The system records the hash digest and timestamp as permanent evidence, and finally forms a traceability dataset for the transportation process, ensuring that the task data is verifiable and traceable on the chain. This is suitable for business scenarios such as quality tracking and compliance verification throughout the entire life cycle of cold chain transportation.

[0045] The online food safety monitoring and traceability method based on the Internet of Things (IoT) and blockchain is implemented on the aforementioned online food safety monitoring platform based on IoT and blockchain, and includes the following steps: S1: Obtain temperature and humidity data of the cold chain transport cabin, determine the state of the cold storage environment inside the cabin based on the changes in temperature and humidity over time, and extract the cold storage environment anomaly field. S2: Obtain the time of occurrence of abnormal temperature and humidity in the abnormal field of cold storage environment and the start-up time of the cabin chiller, compare the lag interval between the two times, and identify the internal circulation failure data based on the lag interval; S3: Obtain the GPS trajectory coordinates of the vehicle during cold chain transportation, calculate the total mileage of the movement trajectory, compare it with the vehicle mileage output data, and filter the trajectory drift data; S4: Based on the internal circulation failure data and trajectory drift data, determine the overlap of abnormal situations in time, verify whether the transportation path and temperature control status are abnormal at the same time, and obtain the joint abnormality verification field. S5: Merge the joint anomaly verification fields in chronological order to construct an event sequence, and combine them with the transportation task number to construct a transportation process traceability dataset.

[0046] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A food safety online monitoring platform based on the Internet of Things and blockchain, characterized in that: The platform includes: The environmental anomaly identification module acquires temperature and humidity data of the cold chain transport cabin, judges the state of the cold storage environment inside the cabin based on the changes in temperature and humidity over time, and extracts cold storage environment anomaly fields. The internal circulation failure identification module obtains the time of occurrence of abnormal temperature and humidity in the abnormal field of the refrigeration environment and the start-up time of the cabin chiller, compares the lag interval between the two times, and identifies the internal circulation failure data based on the lag interval. The trajectory offset recognition module obtains the GPS trajectory coordinates of the vehicle during cold chain transportation, calculates the total mileage of the moving trajectory, compares it with the vehicle mileage output data, and filters the trajectory drift data. The abnormal time period cross-judgment module determines the overlap of abnormal situations in time based on the internal loop failure data and the trajectory drift data, verifies whether the transportation path and temperature control status are abnormal at the same time, and obtains the joint abnormality verification field. The transportation process traceability data construction module merges the joint anomaly verification fields in chronological order to construct an event sequence, and combines it with the transportation task number to construct a transportation link traceability dataset.

2. The online food safety supervision platform based on the Internet of Things and blockchain according to claim 1, characterized in that, The refrigeration environment anomaly field includes refrigeration status change information, anomaly field markers, and temperature and humidity change characteristics. The internal circulation failure data includes refrigeration unit response delay information, lag interval value, and internal circulation status anomaly type. The trajectory drift data includes trajectory coordinate offset, total mileage difference, and drift marker information. The joint anomaly verification field includes time coincidence determination result, path and temperature control joint anomaly type, and verification status identifier. The transportation link traceability dataset includes event time series, anomaly verification field set, and transportation task number.

3. The online food safety supervision platform based on the Internet of Things and blockchain as described in claim 1, characterized in that, The environmental anomaly identification module includes: The temperature and humidity acquisition submodule acquires temperature and relative humidity data from multiple environmental sensing nodes within the cold chain transport cabin through IoT sensors embedded in the cold chain transport equipment. It constructs a time series structure based on the node number and corresponding time record to generate node time-series temperature and humidity data groups. The difference determination submodule calculates the temperature and humidity difference between adjacent nodes based on the data of multiple nodes at the same time point in the node time-series temperature and humidity data group, calls the wind speed data after the chiller starts up for corresponding time comparison, and filters the multi-parameter collaborative section. The field generation submodule extracts the corresponding wind speed records, temperature and humidity difference values, and original acquisition time from the multi-parameter collaborative section, combines them into structured abnormal record entries, and generates a cold storage environment abnormal field.

4. The online food safety supervision platform based on the Internet of Things and blockchain according to claim 3, characterized in that, The internal circulation failure identification module includes: The lag time calculation submodule obtains the time point of the maximum temperature and humidity change recorded in the cold storage environment anomaly field, as well as the refrigeration unit start-up command time of the transportation task corresponding to the target time point, and uses the cross-correlation function to calculate the delay between the refrigeration unit start-up signal sequence and the temperature and humidity fluctuation response sequence to generate the lag calculation result. The wind speed threshold comparison submodule extracts wind speed monitoring data within the corresponding time period based on the delay time of the lag calculation result, compares it with the set wind speed discrimination threshold one by one, filters out delay records where the wind speed exceeds the discrimination threshold, and obtains the wind speed lag confirmation section. The failure field construction submodule, based on the wind speed lag confirmation section, combines and constructs structural values ​​representing the disconnect between the chiller response and environmental changes, generating internal circulation failure data.

5. The online food safety supervision platform based on the Internet of Things and blockchain according to claim 4, characterized in that, The trajectory offset recognition module includes: The trajectory mileage calculation submodule obtains the GPS trajectory coordinates of the vehicle per second during the cold chain transportation process, arranges them in chronological order, calculates the Havelsin distance between adjacent coordinate points, adds up all distances to form the total trajectory mileage, and records the cumulative trajectory changes in segments per second to generate a time-segmented trajectory mileage sequence. The mileage difference fitting submodule acquires the mileage value output by the vehicle mileage sensor every second and accumulates it second by second. It aligns the timestamp with the time-segmented trajectory mileage sequence at the second level, calculates the difference sequence between the two sets of mileage values, calls the local weighted regression algorithm to fit the difference sequence, extracts continuous abnormal offset areas, and obtains the difference deviation fitting segment. The offset field construction submodule generates trajectory drift data based on the deviation magnitude, duration, and deviation interval index position of the difference from the fitted segment.

6. The online food safety supervision platform based on the Internet of Things and blockchain according to claim 5, characterized in that, The abnormal time period cross-determination module includes: The time segment comparison submodule obtains the time fields of the trajectory drift data and the inner loop failure data and performs cross-judgment to filter out interval segments that overlap in time, adds a unified index number to the overlapping segments, and generates an index set of abnormal time overlapping segments. The offset lag calculation submodule extracts the cumulative mileage value of vehicles and the task path planning value in the corresponding segment according to the abnormal time overlap segment index set, calculates the distance offset percentage between the two, and extracts the chiller delay value and chiller continuous running time of the target segment, calculates the time ratio between the two, and obtains the path offset rate and lag ratio combination set. The verification field construction submodule combines the path offset rate, cold control lag rate, and overlapping segment time index recorded in the set based on the path offset rate and lag ratio, and constructs a numerical field describing the coupling characteristics of the abnormal state to generate a joint anomaly verification field.

7. The online food safety supervision platform based on the Internet of Things and blockchain according to claim 6, characterized in that, The transportation process traceability data construction module includes: The event sorting and extraction submodule obtains all record entries in the joint anomaly verification field, extracts the corresponding timestamp information, sorts all field data in chronological order, and generates a time series event group. The task identifier merging submodule merges and organizes event sequences with the same task number into a group of data based on each record in the time series event group, binds the task tag and time index, and obtains the task sequence belonging field set; The dataset generation submodule converts the task sequence attribution field set into standardized JSON text, generates a corresponding SHA-256 hash digest for the text content, binds the digest with the task number and writes it into the blockchain network as an immutable record identifier, thereby generating a traceability dataset for the transportation process.

8. A method for online supervision and traceability of food safety based on the Internet of Things and blockchain, characterized in that, The implementation of the online food safety supervision platform based on the Internet of Things and blockchain according to any one of claims 1-7 includes the following steps: S1: Obtain temperature and humidity data of the cold chain transport cabin, determine the state of the cold storage environment inside the cabin based on the changes in temperature and humidity over time, and extract the cold storage environment anomaly field. S2: Obtain the time of occurrence of abnormal temperature and humidity and the start-up time of the cabin chiller in the abnormal field of the cold storage environment, compare the lag interval between the two times, and identify the internal circulation failure data based on the lag interval; S3: Obtain the GPS trajectory coordinates of the vehicle during cold chain transportation, calculate the total mileage of the movement trajectory, compare it with the vehicle mileage output data, and filter the trajectory drift data; S4: Based on the internal circulation failure data and the trajectory drift data, determine the overlap of abnormal situations in time, verify whether the transportation path and temperature control status are abnormal at the same time, and obtain the joint abnormality verification field. S5: Merge the joint anomaly verification fields in chronological order to construct an event sequence, and combine them with the transportation task number to construct a transportation process traceability dataset.

Citation Information

Cited By

  • Transportation supervision system and method based on position and bayonet track comparison

    CN121961372A

  • Logistics information dynamic tracking method and device, equipment and storage medium

    CN122089189A

  • Methods, devices, equipment and storage media for dynamic tracking of logistics information

    CN122089189B