Cold-chain internet-of-things data credibility determination method based on deep learning and pattern recognition
By performing timestamp correction and resampling alignment on cold chain IoT data, constructing an event-state time series graph and performing graph representation learning, the problems of time synchronization of multi-source time series data and identification of adversarial normal data are solved, and the reliable determination of cold chain IoT data is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 四川文理学院
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-10
AI Technical Summary
Existing cold chain IoT platforms suffer from time asynchrony caused by clock offsets and drifts in multi-source time-series data, inconsistent sampling frequencies, and network transmission delays. This makes accurate alignment difficult, and it is also difficult to identify adversarial normal data formed by supplementing or deleting abnormal segments, thus failing to effectively assess the authenticity and consistency of the data.
By performing timestamp correction and resampling alignment on multi-source time series data based on gateway reference time, an event-state time series graph is constructed and a time lag edge attribute is introduced. A time series graph neural network is used for graph representation learning to calculate cross-modal consistency scores, which are then fused with a prototype vector library to generate a credibility score for judgment.
It improves the accuracy of cross-source event correlation analysis, identifies adversarial normal data, and enables a comprehensive assessment of data authenticity, integrity, and cross-modal consistency, thereby enhancing the credibility of cold chain IoT data.
Smart Images

Figure REF-OBJ-1776241732555-000223 
Figure REF-OBJ-1776241732555-000224 
Figure REF-OBJ-1776241732555-000225
Abstract
Description
Technical Field
[0001] This invention relates to the field of IoT data processing in cold chain logistics, and in particular to a method for determining the reliability of cold chain IoT data based on deep learning and pattern recognition. Background Technology
[0002] To ensure the quality and safety of temperature-sensitive goods such as fresh food and pharmaceuticals, cold chain logistics typically deploys IoT terminals, including temperature sensors, humidity sensors, door magnetic sensors, positioning terminals, accelerometers, and refrigeration equipment controllers, in transport vehicles, insulated containers, or warehouses. The collected data is then uploaded to a platform via gateways or communication modules for monitoring, traceability, and compliance auditing. Existing cold chain IoT platforms generally offer functions such as data acquisition, curve display, threshold alarms, and report statistics. Furthermore, for complex scenarios, anomaly detection methods based on statistical features, rule engines, and machine learning and deep learning have emerged to identify situations such as temperature exceeding limits, sensor malfunctions, and abnormal equipment operation. To enhance data tamper resistance, some systems also incorporate mechanisms such as hash verification, message authentication codes, digital signatures, or chain-based evidence storage to support integrity verification during data transmission and storage.
[0003] However, in practical applications, the aforementioned existing technologies still have the following shortcomings: 1. Multi-source terminals often have clock skew and clock drift, and inconsistent sampling frequencies. Combined with network transmission delays and offline retransmission, it is difficult to accurately align multi-source time-series data on the same reference time axis, which makes cross-source correlation verification based on events such as door opening, docking, and cooling start-up and shutdown prone to inaccuracy.
[0004] 2. Existing alarms and anomaly detection mostly rely on thresholds or statistical anomaly features of a single sequence, making it difficult to identify situations where "the data appears normal but is semantically inconsistent with the transportation event," such as adversarial normal data formed through post-event recording, deletion of abnormal segments, replacement of logs, etc.
[0005] 3. Some integrity verification or evidence storage mechanisms focus on preventing tampering in the transmission and storage links, making it difficult to comprehensively evaluate the authenticity and consistency of data at the business semantic level, and thus making it difficult to output reliable quantification results for cold chain tasks.
[0006] Therefore, a reliable method for determining the credibility of cold chain IoT data is needed to address the shortcomings of existing technologies. Summary of the Invention
[0007] One objective of this invention is to propose a reliable data determination method for cold chain IoT based on deep learning and pattern recognition. This method addresses the problems in existing technologies where multi-source time-series data in cold chain tasks suffers from time asynchrony and alignment difficulties due to clock drift, sampling frequency differences, and network transmission delays, leading to inaccurate event correlation verification. It also addresses the issue that transport or operation stages may use methods such as adding or deleting abnormal segments or replacing logs to create adversarial normal data that is difficult to identify using threshold alarms or single anomaly detection. The invention proposes a method to perform timestamp correction on temperature, humidity, door sensor, positioning, acceleration, and refrigeration equipment operating condition data using the gateway reference time. This invention employs a technical solution that involves resampling and aligning data, extracting integrity features, identifying door opening, parking, and refrigeration start / stop events, and constructing an event state time series graph containing state nodes, event nodes, time-adjacent edges, and event-related edges with time lag attributes. The time series graph is then input into a time series graph neural network for graph representation learning and cross-modal consistency scores are calculated. Finally, the results are fused with similarity metrics from a prototype vector library to generate a credibility score and output a credibility category. This invention provides a comprehensive evaluation of data authenticity, integrity, and cross-modal consistency; distinguishes between normal and credible data; and enhances the ability to identify semantically inconsistent tampered data.
[0008] This invention provides a method for determining the trustworthiness of cold chain IoT data based on deep learning and pattern recognition, comprising: S1. Acquire multi-source time-series data corresponding to the same cold chain task, including temperature data, humidity data, door sensor data, positioning data, acceleration data, and refrigeration equipment operating condition data. Correct and align the timestamps of each data source based on a reference time axis to obtain an aligned dataset. S2. Identify events related to the cold chain task based on the aligned dataset to obtain an event sequence. S3. Construct an event-state time-series graph as the initial graph based on the aligned dataset and the event sequence. This graph consists of state nodes formed by each data source within a preset time window, event nodes formed by the event sequence, and time adjacency markers used to connect similar state nodes within adjacent time windows. The initial graph is fed into a time-series graph neural network model for graph representation learning to obtain the graph representation vector corresponding to the initial graph. The consistency score corresponding to the initial graph is calculated based on the event-related edges and their edge attributes. The graph representation vector is then compared with the prototype vector library to obtain the similarity result related to the trust category. The similarity result is fused with the consistency score to generate the trust score, and the trust judgment result including the trust category and the trust score is output.
[0009] Optionally, S1 includes: Acquire multi-source time-series data corresponding to the same cold chain transportation or cold chain warehousing task. This multi-source time-series data includes temperature data, humidity data, door sensor data, positioning data, acceleration data, and refrigeration equipment operating condition data. Extract timestamps, sampled values, and data source identifiers for each data record. Establish a time mapping relationship between each data source based on the gateway reference time as a reference time axis to estimate the time offset and clock drift parameters of each data source relative to the gateway reference time. Correct the timestamps based on the time offset and clock drift parameters. Resample each corrected data source according to a preset resampling period to obtain a resampled sequence. Impute missing values in the resampled sequence and calculate the missing ratio. Merge duplicate records in the resampled sequence and calculate the duplication ratio. Use the missing ratio and duplication ratio as integrity features. Perform dimensional unification and normalization processing on the sampled values of the resampled sequence. Output an aligned dataset. Furthermore, when acquiring the multi-source time-series data, verification information corresponding to each data record is also acquired. The verification information includes at least one of a hash chain value, a message authentication code, or a digital signature. The verification information is verified to obtain a verification result, and the verification result is used as part of the integrity feature.
[0010] Optionally, S2 includes: Using the aligned dataset as input, the state recognition is performed on the door magnetic data in the aligned dataset. When the door magnetic data switches from the closed state to the open state, the occurrence time of the opening event is determined, and when the door magnetic data switches from the open state to the closed state, the end time of the opening event is determined, thus obtaining an opening event that includes the occurrence time and the end time. A velocity sequence is calculated for the positioning data in the alignment dataset. When the velocity sequence is less than a preset velocity threshold for a continuous period of time not less than a preset duration threshold, a docking event is determined, and the start time and end time of the time period are respectively taken as the occurrence time and end time of the docking event. The operating condition data of the refrigeration equipment in the aligned dataset are used to identify the operating condition. When the refrigeration state switches from non-refrigeration to refrigeration, the occurrence time of the refrigeration start-stop event is determined, and when the refrigeration state switches from refrigeration to non-refrigeration, the end time of the refrigeration start-stop event is determined. The door opening event, the docking event, and the cooling start / stop event are combined in chronological order to form an event sequence.
[0011] Optionally, S3 includes: Using the aligned dataset and event sequence as input, the aligned dataset is divided into multiple preset time windows according to the preset resampling period; For each preset time window, statistical features and rate of change features of sampled values are extracted from temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data. The integrity features are combined with the statistical features of sampled values and the rate of change features to form node features. Based on the node features, temperature nodes, humidity nodes, door magnetic nodes, positioning nodes, acceleration nodes, and refrigeration equipment operating condition nodes are constructed in each preset time window. For each preset time window, events whose occurrence or end time falls within the preset time window are selected from the event sequence, and event nodes are constructed based on event type, occurrence time, and end time. Edges are constructed between nodes, where time-adjacent edges are used to connect nodes of the same type in two adjacent preset time windows, and event-related edges are used to connect event nodes and temperature nodes, humidity nodes, door magnetic nodes, positioning nodes, acceleration nodes, and refrigeration equipment condition nodes within the same preset time window. A time lag is set as an edge attribute for each event-related edge, and the time lag is determined by the difference between the occurrence time of the event node and the state change time of the corresponding state node within the preset associated time period. The output is an initial graph containing the nodes, node features, edges, and edge attributes.
[0012] Optionally, S4 includes: Using an initial graph as input, the node features of the initial graph are input into the node feature encoding module of the temporal graph neural network model to obtain node representations, and the edge attributes of the initial graph are input into the edge attribute encoding module of the temporal graph neural network model to obtain edge representations. Based on the node representations and edge representations, the temporal graph neural network model performs message passing and neighborhood aggregation along temporally adjacent edges and event-related edges in a graph neural network layer of a preset number of layers to update the node representations. Based on the updated node representations, the initial graph is aggregated at the graph level to obtain the graph representation vector corresponding to the initial graph. Based on the updated node representations, the event-related edges, and the edge attributes of the event-related edges, the edge consistency score corresponding to each event-related edge is calculated, and the edge consistency scores are aggregated to obtain the consistency score corresponding to the initial graph. Furthermore, the calculation of the consistency score includes: establishing a preset expected time lag interval or expected time lag distribution for different event types and different state node types, calculating the edge consistency score based on the degree of deviation between the time lag of each event-related edge and the corresponding expected time lag interval or expected time lag distribution, and then aggregating the edge consistency scores to obtain the consistency score. Furthermore, the temporal graph neural network model calculates the neighborhood contribution weight based on the attention mechanism during message passing and neighborhood aggregation. The neighborhood contribution weight is at least related to the edge type and the time lag corresponding to the edge attribute, and different parameter sets are used for message passing for time-adjacent edges and event-related edges.
[0013] Optionally, S5 includes: Using graph representation vectors and consistency scores as input, the prototype vectors corresponding to each trust category are read from the prototype vector library; The distance between the graph representation vector and each of the prototype vectors is calculated to obtain the distance value corresponding to each trust category, and the distance value is converted into a similarity score corresponding to each trust category. The similarity score and the consistency score are fused based on a preset weighting coefficient to obtain a credibility score; The credibility category is determined based on the credibility score, and a credibility determination result containing the credibility category and the credibility score is output. Furthermore, the prototype vector library is grouped and stored according to at least one task metadata of the cold chain task. The task metadata includes at least one of vehicle or container model, refrigeration unit model, cargo temperature zone, route or region. When performing distance measurement, prototype vectors are selected from the corresponding group according to the task metadata to participate in the distance measurement.
[0014] Optionally, the time-series graph neural network model and prototype vector library are obtained through the following training process: acquiring training multi-source time-series data with reliable category labels, wherein the training multi-source time-series data includes temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data; S1 is performed on the training multi-source time series data to obtain a training aligned dataset, and S2 is performed as input to obtain a training event sequence; Based on the training alignment dataset and the training event sequence, S3 is executed to obtain the initial training graph; A cross-modal consistency rule set is established, which is used to limit the response direction and response delay between the event nodes and state nodes corresponding to the event association edges in the initial training graph; The initial training graph is input into the time-series graph neural network model to be trained to obtain the training graph representation vector and the consistency score corresponding to the edge associated with the event. The training graph representation vector and the trustworthy category label are used to calculate the classification loss, and the cross-modal consistency constraint term is calculated based on the consistency score and the cross-modal consistency rule set. The classification loss and the cross-modal consistency constraint term are weighted to obtain the training loss function. The parameters of the time-series graph neural network model to be trained are updated according to the training loss function and iterated until a preset stopping condition is met, thereby obtaining the time-series graph neural network model; The initial training graph is input into the temporal graph neural network model to obtain the graph representation vector of each initial training graph. The graph representation vectors are then aggregated according to the trust category to generate the prototype vector corresponding to each trust category. Each prototype vector is stored as the prototype vector library.
[0015] The beneficial effects of this invention are: 1. This invention establishes a multi-source data time mapping relationship based on the gateway reference time, performs offset and clock drift correction on the timestamps of each data source, and combines resampling, missing and duplicate processing to achieve multi-source time series data alignment, reducing the impact of asynchrony caused by sampling frequency differences and network transmission delays, thereby improving the accuracy and stability of cross-source event correlation analysis.
[0016] 2. This invention constructs an event state sequence graph containing event nodes and multiple types of state nodes, and introduces the time lag representing the relationship between the event and the state response as an edge attribute in the event-related edges. It combines the sequence graph neural network for representation learning and calculates cross-modal consistency scores, which can identify adversarial normal data that appears normal on the surface but is inconsistent with events such as opening a door, parking, and refrigeration start-stop from the perspective of semantic consistency, thereby improving the ability to detect hidden tampering and semantic anomalies.
[0017] 3. This invention uses distance measurement between graph representation vectors and a trustworthy category prototype vector library to obtain similarity results, and integrates them with consistency scores to generate a trustworthiness score to output a trustworthy judgment result. Under the premise that "abnormal does not equal untrustworthy and normal does not equal trustworthy", it can comprehensively and quantitatively evaluate the authenticity, integrity and cross-modal consistency of data. Furthermore, it improves the generalization ability and judgment reliability under different vehicle models, aircraft types, temperature zones and route scenarios by using a prototype library grouped according to task metadata. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition, as proposed in this invention. Figure 2 A flowchart illustrating the event-state sequence diagram for step S3; Figure 3 This is a flowchart illustrating the process of learning the temporal graph neural network representation and calculating the consistency score in step S4. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figure 1 , Figure 2 , Figure 3 A method for determining the trustworthiness of cold chain IoT data based on deep learning and pattern recognition, comprising: S1. Acquire multi-source time-series data corresponding to the same cold chain task, including temperature data, humidity data, door sensor data, positioning data, acceleration data, and refrigeration equipment operating condition data. Correct and align the timestamps of each data source based on a reference time axis to obtain an aligned dataset. S2. Identify events related to the cold chain task based on the aligned dataset to obtain an event sequence. S3. Construct an event-state time-series graph as the initial graph based on the aligned dataset and the event sequence. This graph consists of state nodes formed by each data source within a preset time window, event nodes formed by the event sequence, and time adjacency markers used to connect similar state nodes within adjacent time windows. The initial graph is fed into a time-series graph neural network model for graph representation learning to obtain the graph representation vector corresponding to the initial graph. The consistency score corresponding to the initial graph is calculated based on the event-related edges and their edge attributes. The graph representation vector is then compared with the prototype vector library to obtain the similarity result related to the trust category. The similarity result is fused with the consistency score to generate the trust score, and the trust judgment result including the trust category and the trust score is output.
[0021] In this specific embodiment, S1 includes: The platform reads multi-source time-series data from the gateway-side data storage corresponding to the same cold chain transportation task or cold chain warehousing task. The multi-source time-series data includes temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data. Each data record contains a data source identifier, a timestamp, and a sampled value. The data source identifier is used to uniquely identify the sensor or controller terminal, the timestamp is the acquisition time generated by the terminal's local clock, and the sampled value is the measurement result of the corresponding physical quantity or state quantity. Simultaneously, the platform reads the verification information corresponding to each data record. The verification information consists of a hash chain value and a message authentication code. The hash chain value is obtained by iteratively calculating the concatenation result of the previous hash chain value and the current record payload using SHA-256. The message authentication code is obtained by calculating the current record payload using HMAC-SHA-256 based on the data source shared key. The platform performs hash chain continuity verification and message authentication code consistency verification on each record, encodes the verification results into binary values, marks them, and subsequently counts the verification failure rate as part of the integrity feature. The platform establishes a reference timeline based on the gateway's base time. This base time is obtained by synchronizing the gateway's local clock via NTP and is written into the reception time when the gateway receives each record. This creates a paired sample of "terminal local acquisition time and gateway reception time" for each record. For each data source identifier, the platform uses a linear time mapping model to establish a time mapping relationship and estimate the time offset and clock drift parameters. The linear time mapping model is as follows: ; in Indicates the data source The local timestamp is corrected to the corrected timestamp after being aligned with the gateway's reference timeline. Indicates data source The reported local timestamp Indicates data source Clock drift parameters relative to the gateway reference time axis Indicates data source Time offset relative to the gateway's reference time axis Indicates the data source identifier; The platform collects verified paired samples from each data source, including those received at the gateway time, and solves the problem using the least squares criterion. and To reduce the impact of network jitter on parameter estimation, outlier paired samples are removed after a residual threshold of 3 seconds. The solution is then recalculated. When the number of available paired samples from a data source is less than 10, [the following is omitted as the original text is incomplete and likely refers to a separate process]. Fixed at 1 and determined by the first available paired sample. To complete the parameter determination; The platform uses the obtained and The timestamps of all records in the data source are corrected to obtain a corrected timestamp sequence. The corrected records of each data source are then mapped onto a unified time grid at a preset resampling period of 60 seconds to form a resampling sequence. When multiple duplicate records exist in the same grid for continuous sampling values, the arithmetic mean is taken as the grid sampling value. When multiple duplicate records exist in the same grid for door magnet status and refrigeration equipment operating status, the grid status value is determined by the record that "last arrived and passed the verification". The platform calculates the ratio of the number of merged duplicate records to the number of original records as the duplication ratio to constitute the integrity feature. For rasters that are missing after resampling, continuous sampled values are linearly interpolated using the nearest non-missing rasters on both sides. Boundary missing values are filled forward or backward using the nearest non-missing rasters. State sampled values are filled by maintaining the nearest non-missing rasters. The platform calculates the ratio of the number of missing rasters to the total number of rasters as the missing ratio to form the integrity feature, and calculates the ratio of the number of failed verification records to the number of original records as the verification failure ratio to form the integrity feature. After resampling and missing data handling, the platform performs unit unification and normalization on the sampled values from each data source. Specifically, temperature is unified to degrees Celsius, humidity to relative humidity percentage, location to latitude and longitude, and velocity is simultaneously calculated for subsequent event recognition. Acceleration is also unified to... The operating conditions of door magnets and refrigeration equipment are unified into discrete state codes. Normalization uses the physical upper and lower limits of each physical quantity pre-fixed in the system configuration to linearly scale them to ensure that the feature scale is consistent between different tasks. The platform ultimately outputs an aligned dataset, which includes normalized resampled sequences of each data source under a unified time raster, corrected timestamp indices aligned with the time raster, data source identifiers, and integrity features consisting of missing proportions, duplicate proportions, and verification failure proportions.
[0022] In this specific embodiment, S2 includes: The platform takes an aligned dataset as input and performs event recognition window-by-window based on a unified temporal grid, wherein the unified temporal grid consists of a grid time sequence with a resampling period of 60 seconds. constitute, Indicates the first The start time of a time window Indicates the time window index. This indicates the index of the last time window corresponding to the end of the task; The platform reads the door magnetic state sequence from the aligned dataset. ,in , Indicates the door is closed. Indicating the door is open, the platform monitors the door to prevent momentary flipping caused by door magnetic vibration. Debouncing is performed, and a state transition is considered valid only if the new state is maintained for two consecutive time windows after the transition. In the debouncing sequence, when... and When The moment the door opening event occurred is determined, and the search continues backwards to find the first time the condition is met. and index And If the search reaches the end time of the door opening event, then... If the door closing switch does not occur, then Once the end time of the door opening event is determined, a door opening event record containing the event type, occurrence time, and end time is obtained; The platform reads positioning sequences from the alignment dataset. ,in Indicates latitude, Indicates longitude; the platform calculates velocity sequences based on adjacent time windows. It is used for docking event recognition, and its calculation formula is as follows: ; in Indicates from arrive The average speed and the unit is GeoDist This represents the geodetic distance calculated between two points on the Earth's surface based on the WGS-84 ellipsoid, with units of 1. and These represent the positioning coordinates of two adjacent time windows. This represents the time interval between adjacent time windows, set to 60 seconds. Indicates the time window index; The platform sets the speed threshold to And set the duration threshold to And based on this, the minimum continuous window number threshold is obtained. When continuous One or more adjacent time windows satisfy The start time corresponding to the continuous interval is determined as the occurrence time of the docking event, and the end time corresponding to the continuous interval is determined as the end time of the docking event. If the interval between continuous intervals is less than or equal to one time window and the interval window satisfies... The two consecutive intervals will be merged into a single docking event to avoid event fragmentation caused by short-term positioning jitter; The platform reads the operating status sequence of refrigeration equipment from the aligned dataset. ,in Indicates a non-cooling state. Indicates the cooling status; the platform is in The system uses the same two-window confirmation and de-shaking rules as the door sensor and identifies cooling start / stop events. When a [condition] occurs... and When The moment of occurrence of the cooling start-stop event is determined, and the search continues backward to find the first time that the event is satisfied. and index And The end time of the cooling start / stop event is determined; if the search reaches... If the switching does not stop, then The end time of this cooling start / stop event is determined; The platform uniformly encodes door opening events, docking events, and cooling start / stop events into event record triples (...). ), where type is the event type and its value set is Open door, park, start / stop cooling The time of occurrence and taken from , The end time and taken from , and according to The events are sorted in ascending order to form a sequence. When multiple event records have the same... The event sequence is arranged in a fixed order according to event type: door opening - docking - cooling start / stop, to ensure that the event sequence is unique under the same input.
[0023] In this specific embodiment, S3 includes: The platform takes the aligned dataset and event sequence as input and constructs an event state time sequence diagram as the initial graph. The platform divides the aligned dataset into multiple preset time windows with a resampling period of 60 seconds. The preset time windows are determined by the start time sequence of the time grid. Confirmed, among which Indicates the first The start time of a preset time window This indicates the preset time window index. This indicates the index of the last preset time window corresponding to this cold chain task; For each preset time window, the platform constructs status nodes for temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data within that time window. Each status node carries a node feature vector, which is obtained by concatenating integrity features, sampled value statistical features, and rate of change features in a fixed order. The integrity features are used to characterize the data quality of the data source within the time window and consist of a window missing marker, a window duplicate count, and a window verification failure count. The window missing marker indicates whether the resampled value of the time window is generated by interpolation. The window duplicate count records the number of duplicate records merged within the time window. The window verification failure count records the number of records that failed to verify the hash chain or message authentication code within the time window. The statistical characteristics of the sampled values are calculated for continuous data from all valid sampled values that fall within the time window after being corrected by timestamps, and include the mean, minimum, maximum and standard deviation. For state-type data, the statistical characteristics are calculated from the state values within the time window, and include the percentage of doors open or cooling and the number of state flips. The rate of change feature is obtained by dividing the difference between the mean of the current time window and the mean of the previous time window by 60 seconds for continuous data and is used to characterize the rate of change. For state-type data, it is obtained by a binary indicator of whether a state flip occurs in the current time window and is used to characterize state changes. For each preset time window, the platform selects event records whose occurrence or end time falls within the preset time window from the event sequence and constructs event nodes. The event node carries the event type, occurrence time, and end time as event node features. The event type value set is {door opening, docking, cooling start / stop} and is represented using unique thermal encoding. The occurrence time and end time are represented by the number of seconds relative to the task start time and are linearly normalized according to the total task duration. When the occurrence time and end time of an event record fall within the same preset time window, only one event node is constructed to avoid duplicate representation. The platform constructs edges between nodes. Time-adjacent edges are used to connect state nodes of the same type in two adjacent preset time windows and construct directed edges in the direction of time sequence, while simultaneously constructing reverse edges to support bidirectional message transmission. Event-related edges are used to connect event nodes in the same preset time window with all state nodes in that preset time window and construct directed edges in the direction from the event node to the state node, while simultaneously constructing reverse edges to support feedback modeling of state to events. The platform sets a time lag as an edge attribute for each event-related edge, and the platform fixes the preset association time period as [missing information]. And determine the state change time of the corresponding state node within this time period, where This indicates the event time used to calculate the response relationship for the event node. If the occurrence time of the event record corresponding to the event node falls within this preset time window, the occurrence time is taken; otherwise, the end time is taken. The state change time is also considered. For the gate magnetic node and the refrigeration equipment operating condition node, the moment of the first state reversal within the time period is taken. For the temperature node, the moment when the absolute value of the temperature difference between two adjacent grid cells is not less than a certain value within the time period is taken. For later grid times, the humidity node is selected when the absolute value of the humidity difference between two adjacent grids is not less than the first time within that time period. For later grid moments, the absolute value of the velocity difference between two adjacent grids is taken as the first time within that time period that the positioning node satisfies this condition. For later grid moments, for acceleration nodes, the absolute value of the difference in acceleration magnitude between two adjacent grids is taken as the first time within that time period that is not less than [a certain value]. The later raster time, when no change time satisfying the threshold condition is detected within that time period, will be... Fixed as This creates a calculable time lag, which is reflected as weak consistency in subsequent consistency scores. Time lag Depend on Confirmed, among which This represents the edge attribute of the event-related edge, with the unit being seconds. This indicates the time of state change of the corresponding state node within a preset associated time period, in seconds. Indicates the event time of the event node, with the unit being seconds; The platform outputs an initial graph containing all state nodes and event nodes, node feature vectors for each node, temporally adjacent edges and event-related edges, and time-lag edge attributes for each event-related edge.
[0024] In this specific embodiment, S4 includes: The platform takes an initial graph as input and performs forward inference on a temporal graph neural network model to obtain a graph representation vector and a consistency score, where the initial graph consists of a set of nodes. Edge set and and the time lag of the edge properties of event-related edges. constitute, This represents a set of time-adjacent edges that connect adjacent nodes of the same state within a preset time window. This represents a set of event-related edges that connect event nodes and status nodes within the same preset time window. This indicates the time lag corresponding to each event-related edge and continues from step S3. The definition is given in seconds; The platform denotes the node feature vector of each node as follows: ,in Represents the node index and The platform will handle all The data is uniformly organized into 16-dimensional fixed-length vectors and arranged in a fixed order of "completeness features, sampled value statistical features, rate of change features, and padding positions". Insufficient dimensions are padded with zeros to ensure that the input dimensions of different node types are consistent. The platform uses a node feature encoding module. Will Encoding as node representation ,in It is a two-layer fully connected network with a fixed layer width. The activation function of the first layer is Furthermore, the second layer has a linear output, and LayerNorm is performed after each fully connected layer to stabilize the representation distribution at different task scales; The platform uses an edge attribute encoding module. Encode the edge attributes of each edge into an edge representation. ,in Represents the edge index and Delay the time of the event-related edge. A 16-dimensional sine and cosine positional encoding is performed and concatenated with an 8-dimensional edge type embedding to form a 24-dimensional edge input vector. For time-adjacent edges, the time lag is fixed to 60 seconds and the same encoding method is used to form the edge input vector. It is a fully connected layer with a fixed layer width. ReLU activation is used to output a 32-dimensional edge representation. ; The platform will and Input the graph neural network layer of the temporal graph neural network model and perform three layers of message passing and neighborhood aggregation to obtain the updated node representation. Each layer employs a neighborhood contribution weight calculation based on an attention mechanism and applies it to... and Differentiated message delivery is achieved using different parameter sets. Specifically, at each layer, the model configures a set of linear transformation parameters and a set of attention scoring parameters for temporally adjacent edges, denoted as... Configure another set of linear transformation parameters and another set of attention scoring parameters for the event-related edges, and denote them as follows: ,in The representation layer index and the attention scoring input simultaneously include the source node representation, the target node representation, and the edge representation, so that the neighborhood contribution weight is at least related to the edge type and time lag. The attention adopts a 4-head multi-head mechanism with each head outputting a dimension of 32 and concatenating between heads to obtain a 128-dimensional update. The node update uses residual connection and executes LayerNorm after each layer update to ensure numerical stability under deep propagation. The platform obtains all nodes Then perform graph-level aggregation to obtain the graph representation vector. ,in Graph-level aggregation is achieved by concatenating the mean pooling vectors of event nodes and state nodes, followed by dimensionality reduction through a linear layer. Specifically, mean pooling is first performed on the event node set and the state node set to obtain two 128-dimensional vectors, which are then concatenated into a 256-dimensional vector, and then passed through a fully connected network. We obtain z to characterize the task-level representation of the cold chain task under the current initial graph; The platform is based on the updated node representation. Event-related edge set and its time lag To calculate the consistency score, the platform establishes expected time lag intervals for different event types and different state node types, and solidifies these intervals as lookup table parameters. ,in Indicates the event type and Open door, park, start / stop cooling Indicates the state node type and Temperature, humidity, door sensor, positioning, acceleration, cooling status and will Fixed setting: door open - door magnet Door opening - temperature Door opening - humidity Door opening - positioning Door opening - acceleration [0, 300], Door opening - cooling mode [0, 600], Parking - positioning [0, 60], Parking - acceleration [0, 60], Parking - door sensor [0, 600], Cooling start / stop - cooling mode [0, 60], Cooling start / stop - temperature [120, 900], Cooling start / stop - humidity Not in the above list Combined and unified selection ; The platform associates edges with each event. Calculate the edge consistency coefficient based on the degree of time lag deviation. And use the following formula: ; in Representing an edge The time lag consistency coefficient and its range is Represents an exponential function. This represents the function that takes the maximum value. Representing an edge Time lag and steps Output in seconds. Representing an edge The event type of the connected event node, Representing an edge The state node type of the connected state node. and These represent the event types as follows: And the state node type is The expected time lag is determined by the lower and upper bounds, in seconds. This represents the decay time constant of the deviation penalty and is fixed. ; The platform further calculates semantic matching coefficients based on the updated node representations. ,in Semantic scoring network MLP The concatenated vector of event node representation, state node representation, and edge representation is scored and normalized using Sigmoid to obtain the MLP. It is a two-layer fully connected network with a fixed layer width. The input dimension of 288 is obtained by concatenating the 128-dimensional event node representation, the 128-dimensional state node representation, and the 32-dimensional edge representation. The activation function of the first layer is... And the output of the second layer is mapped to via a Sigmoid function. To characterize the degree of semantic consistency between events and states in the representation space; The platform defines the edge consistency score of each event-related edge as follows: And for all event-related edges The arithmetic mean is used to obtain the consistency score corresponding to the initial graph. ,in Furthermore, the platform outputs a graph representation vector to characterize the overall consistency of the cold chain task in terms of event response timing and cross-modal semantics. and consistency score .
[0025] In this specific embodiment, S5 includes: The platform represents vectors using graphs. Consistency score It takes as input and performs a metric discrimination based on the prototype vector library to output a reliable judgment result; The platform reads the task metadata of the cold chain task from the cold chain task management table and generates a prototype grouping key. The task metadata consists of vehicle or container model, refrigeration unit model, cargo temperature zone, route or region, and grouping key. The grouping key is obtained by concatenating the above four metadata items in a fixed order and then hashing them to ensure that the grouping key is unique and indexable. The platform uses grouping keys in the prototype vector library. Retrieve Trustworthy Category Set The prototype vectors corresponding to each trust category are obtained. ,in Credible, Suspicious, Unreliable Each prototype vector It is a 128-dimensional vector, stored as float32, and written to the prototype vector library. Normalization, if no grouping key exists in the prototype vector library Then the fixed grouping key will be replaced with the global grouping key and the search will be performed again to ensure that the output is consistent; The platform represents the input graph as a vector. implement After normalization, for each trust category calculate and The Euclidean distance is calculated and converted into a similarity score. The similarity score is then compared with the consistency score. The credibility score for this credibility category is obtained by fusing data using fixed weights. The fusing and credibility score calculation uses the following formula: ; in Indicates trust category The corresponding credibility score and its range are: This represents the fusion weight coefficient and is fixed. Represents an exponential function. express Norm, This indicates that step S4 outputs and is processed... The normalized graph representation is a vector with a dimension of 128. The grouping key in the prototype vector library is And the trust category is The prototype vector with dimension 1 The similarity temperature coefficient is represented and is fixed. This represents the consistency score and its range is [value missing]. , This represents the prototype grouping key determined by the task metadata. Indicates a trustworthy category index and ; The platform is The system selects the trustworthy category with the highest trustworthiness score as the output trustworthy category and uses the highest trustworthiness score as the output trustworthiness score. When multiple trustworthy categories have the same trustworthiness score, they are selected in a fixed order of trustworthy-suspicious-untrustworthy to ensure that the output is definite. The final output contains the trustworthy category and the trustworthiness score as the trustworthiness judgment result.
[0026] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
[0027] This invention addresses the technical problems of "time asynchrony leading to inaccurate event correlation" and "human tampering transforming data into adversarial normal data that is difficult to identify" in multi-source time-series data of cold chain IoT. It combines time correction and alignment, event identification, event state time-series graph modeling, time-series graph neural network representation learning, cross-modal consistency scoring, and prototype library metric discrimination. First, it uses the gateway reference time to correct offsets and drifts in multi-source data and resamples and aligns it, reducing alignment errors caused by different sampling frequencies and transmission delays. Then, it extracts key events such as door opening, parking, and refrigeration start / stop from door magnets, positioning, and refrigeration conditions, and constructs a system containing state nodes and events. The event state sequence graph of the nodes enables explicit association between events and state responses within the graph structure. Subsequently, a task-level graph representation is learned through message passing along temporally adjacent edges and event-related edges via a temporal graph neural network. Simultaneously, a consistency score is calculated based on the time lag of event-related edges. Finally, the graph representation is compared with a trustworthy category prototype vector library to obtain similarity, and this similarity is fused with the consistency score to generate a trustworthiness score. This achieves a comprehensive evaluation of data authenticity, completeness, and cross-modal semantic consistency, outputting a trustworthy category and trustworthiness, avoiding equating "normal" with "trustworthy" or "abnormal" with "untrustworthy".
[0028] In terms of algorithm structure, this invention addresses the aforementioned technical problems by making improvements for cold chain scenarios: First, it introduces time lag as an edge attribute in event-related edges, and allows setting expected time lag intervals or distributions for different event types and state types, shifting consistency assessment from simple numerical out-of-bounds errors to semantic verification of whether "event occurrence and state response match," making it easier to identify adversarial normal data; Second, it introduces cross-modal consistency rules as training constraints into model training, subjecting the model to constraints of event response direction and time lag patterns while learning representations, improving robustness under clock drift, retransmission, and noise conditions; Third, it employs a prototype vector library grouped by task metadata and performs metric discrimination, enhancing generalization ability under varying scenarios such as different vehicle body models, refrigeration unit models, cargo temperature zones, and route areas, thereby achieving a more stable and reliable judgment effect.
Claims
1. A method for determining the reliability of cold chain IoT data based on deep learning and pattern recognition, characterized in that, include: S1. Obtain multi-source time-series data corresponding to the same cold chain task, including temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data. Correct and align the timestamps of each data source based on the reference time axis to obtain an aligned dataset. S2. Identify events related to cold chain tasks based on the aligned dataset to obtain event sequences; S3. Construct an event-state time sequence graph based on the aligned dataset and event sequence as the initial graph. The graph consists of state nodes formed by each data source within a preset time window, event nodes formed by the event sequence, time-adjacent edges used to connect similar state nodes within adjacent time windows, and event-related edges used to connect event nodes and state nodes. Set the time lag representing the relationship between event and state response time as the edge attribute for the event-related edges. S4. Input the initial graph into the temporal graph neural network model for graph representation learning to obtain the graph representation vector corresponding to the initial graph. Calculate the consistency score corresponding to the initial graph based on the event-related edges and their attributes. S5. Perform distance measurement between the graph representation vector and the prototype vector library to obtain similarity results related to the trust category. Merge the similarity results with the consistency score to generate a trust score. Output a trust judgment result including the trust category and the trust score.
2. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, S1 includes: Acquire multi-source time-series data corresponding to the same cold chain transportation task or cold chain warehousing task. The multi-source time-series data includes temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data. Extract the timestamp, sample value, and data source identifier for each data record. The time mapping relationship of each data source is established based on the gateway reference time as a reference time axis, so as to estimate the time offset and clock drift parameter of each data source relative to the gateway reference time, and the timestamp is corrected according to the time offset and clock drift parameter. The corrected data sources are resampled according to a preset resampling period to obtain a resampled sequence; missing values in the resampled sequence are imputed and the missing ratio is calculated; duplicate records in the resampled sequence are merged and the duplicate ratio is calculated; the missing ratio and the duplicate ratio are used as integrity features. The sampled values of the resampled sequence are subjected to dimension unification and normalization processing; Output aligned dataset.
3. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, S2 include: Using the aligned dataset as input, the state recognition is performed on the door magnetic data in the aligned dataset. When the door magnetic data switches from the closed state to the open state, the occurrence time of the opening event is determined, and when the door magnetic data switches from the open state to the closed state, the end time of the opening event is determined, thus obtaining an opening event that includes the occurrence time and the end time. A velocity sequence is calculated for the positioning data in the alignment dataset. When the velocity sequence is less than a preset velocity threshold for a continuous period of time not less than a preset duration threshold, a docking event is determined, and the start time and end time of the time period are respectively taken as the occurrence time and end time of the docking event. The operating condition data of the refrigeration equipment in the aligned dataset are used to identify the operating condition. When the refrigeration state switches from non-refrigeration to refrigeration, the occurrence time of the refrigeration start-stop event is determined, and when the refrigeration state switches from refrigeration to non-refrigeration, the end time of the refrigeration start-stop event is determined. The door opening event, the docking event, and the cooling start / stop event are combined in chronological order to form an event sequence.
4. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, S3 includes: Using the aligned dataset and event sequence as input, the aligned dataset is divided into multiple preset time windows according to the preset resampling period; For each preset time window, statistical features and rate of change features of sampled values are extracted from temperature data, humidity data, door magnetic data, positioning data, acceleration data, and refrigeration equipment operating condition data. The integrity features are combined with the statistical features of sampled values and the rate of change features to form node features. Based on the node features, temperature nodes, humidity nodes, door magnetic nodes, positioning nodes, acceleration nodes, and refrigeration equipment operating condition nodes are constructed in each preset time window. For each preset time window, events whose occurrence or end time falls within the preset time window are selected from the event sequence, and event nodes are constructed based on event type, occurrence time, and end time. Edges are constructed between nodes, where time-adjacent edges are used to connect nodes of the same type in two adjacent preset time windows, and event-related edges are used to connect event nodes and temperature nodes, humidity nodes, door magnetic nodes, positioning nodes, acceleration nodes, and refrigeration equipment condition nodes within the same preset time window. A time lag is set as an edge attribute for each event-related edge, and the time lag is determined by the difference between the occurrence time of the event node and the state change time of the corresponding state node within the preset associated time period. The output is an initial graph containing the nodes, node features, edges, and edge attributes.
5. The method for determining the reliability of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, S4 includes: Using an initial graph as input, the node features of the initial graph are input into the node feature encoding module of the temporal graph neural network model to obtain node representations, and the edge attributes of the initial graph are input into the edge attribute encoding module of the temporal graph neural network model to obtain edge representations. Based on the node representations and edge representations, the temporal graph neural network model performs message passing and neighborhood aggregation along temporally adjacent edges and event-related edges in a graph neural network layer of a preset number of layers to update the node representations. Based on the updated node representations, the initial graph is aggregated at the graph level to obtain the graph representation vector corresponding to the initial graph. Based on the updated node representations, the event-related edges, and the edge attributes of the event-related edges, the edge consistency score corresponding to each event-related edge is calculated, and the edge consistency scores are aggregated to obtain the consistency score corresponding to the initial graph.
6. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, S5 include: Using graph representation vectors and consistency scores as input, the prototype vectors corresponding to each trust category are read from the prototype vector library; The distance between the graph representation vector and each of the prototype vectors is calculated to obtain the distance value corresponding to each trust category, and the distance value is converted into a similarity score corresponding to each trust category. The similarity score and the consistency score are fused based on a preset weighting coefficient to obtain a credibility score; The credibility category is determined based on the credibility score, and a credibility determination result containing the credibility category and the credibility score is output.
7. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, The calculation of the consistency score includes: establishing a preset expected time lag interval or expected time lag distribution for different event types and different state node types, calculating the edge consistency score based on the deviation of the time lag of each event-related edge from the corresponding expected time lag interval or expected time lag distribution, and then aggregating the edge consistency scores to obtain the consistency score.
8. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 1, characterized in that, The prototype vector library is grouped and stored according to at least one task metadata of the cold chain task. The task metadata includes at least one of vehicle or container model, refrigeration unit model, cargo temperature zone, route or region. When performing distance measurement, prototype vectors are selected from the corresponding group according to the task metadata to participate in the distance measurement.
9. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 2, characterized in that, When acquiring the multi-source time-series data, verification information corresponding to each data record is also acquired. The verification information includes at least one of hash chain value, message authentication code or digital signature. The verification information is verified to obtain a verification result, and the verification result is used as part of the integrity feature.
10. The method for determining the credibility of cold chain IoT data based on deep learning and pattern recognition according to claim 5, characterized in that, The time-series graph neural network model calculates neighborhood contribution weights based on an attention mechanism during message passing and neighborhood aggregation. The neighborhood contribution weights are at least related to the edge type and the time lag corresponding to the edge attributes, and different parameter sets are used for message passing for time-adjacent edges and event-related edges.