A method for real-time monitoring of temperature throughout the whole cold chain transportation based on Internet of Things
Patent Information
- Application Number
- CN202611248723.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]有鉴于此,本发明提供一种基于物联网的冷链运输全程温度实时监控的方法,能够解决现有技术中存在冷链运输车厢内部货物堆叠遮蔽区域温度异常无法被稀疏传感器有效检测、且单一模型难以适配多货物类型热学特性导致预测精度不足的技术问题
[0025]This invention addresses the technical challenges of insufficient prediction accuracy caused by the inability of sparse sensors to effectively detect temperature anomalies in the obscured areas of stacked goods inside cold chain transport vehicles, and the difficulty of adapting a single model to the thermal characteristics of various cargo types. It combines a finite element thermodynamic interpolation model with a sparse gated expert routing spatiotemporally heterogeneous temperature sensing model and introduces a meta-learning cross-domain adaptive transfer mechanism. The finite element thermodynamic interpolation model uses sparse measured temperature points as boundary conditions and expands the spatially discrete points into a continuous full-field temperature distribution by solving the heat conduction equation. This mechanism compensates for the inherent spatial resolution limitations of physical sensors, allowing for explicit modeling of the temperature state in obscured areas. The sparse gated expert routing mechanism dynamically activates corresponding expert sub-networks based on the thermal characteristics of the cargo type. Combined with the meta-learning cross-domain adaptive transfer mechanism, it achieves rapid domain adaptation with few samples, ensuring that the model's predictions for cargo with different thermal characteristics converge to the physically feasible region. In summary, the present invention solves the technical problems mentioned in the background art, such as the inability of sparse sensors to effectively detect abnormal temperatures in the stacked and shielded areas inside cold chain transport vehicles, and the difficulty of a single model to adapt to the thermal characteristics of multiple types of goods, resulting in insufficient prediction accuracy.
Smart Images

Figure CN122924437A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cold chain technology, and more specifically, relates to a method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things. Background Technology
[0002] Temperature monitoring throughout the cold chain transportation process is a core technological link in ensuring the quality of temperature-sensitive goods such as fresh produce, pharmaceuticals, and frozen products. Current technologies typically deploy several discrete temperature sensor nodes inside the vehicle compartment, process the collected data using a time-series prediction model, and upload alerts via a cloud platform. However, in actual transportation conditions with densely stacked goods, physical sensors can only cover a limited number of spatial points, creating temperature monitoring blind spots in large areas obscured by cargo. Furthermore, due to the significant differences in thermal characteristics among different types of goods such as fresh produce, pharmaceuticals, and frozen products, single time-series prediction models lack generalization ability across different cargo types, making it difficult to accurately model the temperature change patterns of various cargo types. In existing technologies, the inherent limitations of sparse sensor spatial distribution and the insufficient ability of general prediction models to represent the thermal differences among multiple cargo types result in temperature anomalies in obscured areas inside the vehicle compartment not being detected in a timely manner, and the model prediction results exhibit systematic biases across different cargo types. In other words, existing technologies have technical problems such as the inability to effectively detect abnormal temperatures in the stacked and shielded areas inside cold chain transport vehicles by sparse sensors, and the difficulty of adapting a single model to the thermal characteristics of multiple types of goods, resulting in insufficient prediction accuracy. Summary of the Invention
[0003] In view of this, the present invention provides a method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things, which can solve the technical problems in the prior art where abnormal temperature in the stacked and obscured areas inside the cold chain transportation compartment cannot be effectively detected by sparse sensors, and a single model is difficult to adapt to the thermal characteristics of multiple types of goods, resulting in insufficient prediction accuracy.
[0004] This invention is implemented as follows: This invention provides a method for real-time temperature monitoring throughout the entire cold chain transportation process based on the Internet of Things, comprising the following steps:
[0005] A sparse sensor node array is deployed inside the cold chain transport compartment to collect temperature, humidity, vibration acceleration and global positioning coordinate data. The raw sampled data is pre-filtered by an adaptive exponential decay sliding window Kalman fusion algorithm to output a posterior state estimation vector.
[0006] Using filtered sparse measured temperature points as boundary conditions, a virtual sensor grid is constructed based on the finite element thermodynamic interpolation model to invert the temperature distribution throughout the carriage and cover the blind spot temperature anomaly detection in the cargo stacking and shielding area.
[0007] The posterior state estimation vector is input into the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model. After the orthogonal decoupling module eliminates the linear correlation between channels, the gated routing layer activates the expert sub-network based on the current temperature deviation residual and outputs the full temperature prediction sequence.
[0008] For different types of goods, a meta-learning cross-domain adaptive transfer mechanism is adopted to quickly adjust the internal parameters of the spatiotemporally heterogeneous temperature sensing model of sparse gating expert routing using task embedding vectors, requiring only a small number of new scene samples to complete domain adaptation.
[0009] When processing multi-sensor data streams in parallel, a functional concurrent programming paradigm based on immutable data structures is adopted, combined with read-write lock separation and memory barrier instructions to eliminate multi-threaded shared state contention.
[0010] Based on the comparison results between the temperature prediction sequence and the set threshold, a graded early warning command is triggered, and the temperature distribution of the entire venue, the activation status of experts, and the early warning records are simultaneously uploaded to the cloud monitoring platform.
[0011] Specifically, the adaptive exponential decay sliding window Kalman fusion algorithm is as follows: the state vector is initialized to the sensor's first reading, and the covariance matrix is initialized to the identity matrix multiplied by the empirical noise variance; upon arrival of each new observation, the process noise covariance is dynamically adjusted according to the time interval; the Kalman prediction step is executed to calculate the predicted state and the predicted covariance; an adaptive exponential decay weight is introduced to calculate the weighted average of the current observation and several historical observations; the innovation term in the Kalman update step is corrected with the weighted average, and the a priori state estimation is completed.
[0012] Wherein, the exponential decay coefficient in the adaptive exponential decay weight Estimated from the current rate of temperature change Adaptive adjustment: when When the rate of rapid change is not lower than the threshold, Take the smaller value; when When below the rapid rate of change threshold, Take the larger value.
[0013] The posterior state estimation vector is directly used as the input feature of the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model gating network. The gating score is scaled by the absolute value of the filtered temperature residual, realizing the linkage between physical filtering and neural routing.
[0014] The finite element thermodynamic interpolation model uses the geometry of the carriage, the stacking distribution of goods, and the boundary cooling power as input parameters. It uses the finite element method to mesh the internal space of the carriage, and uses sparse measured temperature points as Dirichlet boundary conditions to solve the steady-state or transient heat conduction equations and output the full-field temperature distribution matrix.
[0015] The orthogonal decoupling module performs singular value decomposition on the input covariance matrix, extracts the first few principal component directions as decoupling basis, and projects each feature channel to a mutually orthogonal subspace.
[0016] The gated routing layer is a lightweight two-layer fully connected structure with an output dimension equal to the number of experts. After the upper-side suppression operation, only the indexes of the experts with the highest scores are retained, and the routing coefficients of the remaining experts are hard-set to zero. When the temperature deviation residual exceeds the warning residual threshold, the gated score of the expert sub-network that handles the abnormal state is forcibly increased.
[0017] Each expert subnetwork consists of locally asymmetric gated recurrent units, with the forward state update step size being three times the backward feedback step size. The outputs of each expert are weighted, summed, and fused before entering a multi-level residual dense jump module. The output of each hidden layer is directly injected into deep nodes at distances of 2, 4, and 8 layers through a cross-layer jump connection matrix.
[0018] The loss function adds a gated load balancing penalty term and a temperature physical conservation constraint term to the standard mean square error. The temperature physical conservation constraint term requires that the rate of temperature change between adjacent time points predicted by the network does not exceed the maximum cooling physical rate of the refrigeration equipment. The maximum cooling physical rate is calculated based on the cargo hold volume and the rated power of the refrigeration unit.
[0019] The core of the meta-learning cross-domain adaptive transfer mechanism is as follows: during the meta-training phase, multiple known cargo types are used as a task set, and the training model learns the meta-parameter initialization points that are sensitive to the task distribution; the task embedding vector is generated by mapping a small number of new scene support samples through the encoder network, and serves as an auxiliary input of the gating routing layer to guide the expert activation distribution to shift towards the thermal characteristics of the new cargo type.
[0020] The sparse gating expert routing model designs an expert activation elastic adjustment function within the spatiotemporal heterogeneous temperature sensing model. It obtains a comprehensive state index by weighted summation of the mean residual of the current batch's overall temperature deviation, the current value of the gating load balancing penalty term, and the current operating power utilization rate of the refrigeration equipment. The number of activated experts is dynamically adjusted based on the interval in which the comprehensive state index is located.
[0021] Specifically, when the comprehensive state index is lower than the low state threshold, the number of activated experts is the minimum activation number; when the comprehensive state index is between the low state threshold and the medium state threshold, the number of activated experts is the medium activation number; and when the comprehensive state index is not lower than the medium state threshold, the number of activated experts is the maximum activation number.
[0022] In the aforementioned functional concurrent programming paradigm, the processing threads of multi-sensor data streams do not share mutable states, and the data objects operated by each thread cannot be changed during their lifecycle; the read-write lock separation mechanism ensures that multiple read threads do not block when concurrently accessing the shared memory buffer; and memory barrier instructions enforce the globally visible order of memory operations at the processor microarchitecture level.
[0023] The training dataset of the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model covers historical cold chain transportation sensor records for three types of goods: fresh produce, pharmaceuticals, and frozen products. The effective sampling time series length for each type of goods is not less than the minimum sampling time threshold. After the original data is filtered by an adaptive exponential decay sliding window Kalman fusion algorithm, a full-field temperature distribution label is generated using a finite element thermodynamic interpolation model. The dataset is divided into three sets: training set, validation set, and test set.
[0024] Among them, empirical noise variance The range is 0.01 to 0.5. Rapid rate of change threshold The range is 0.05 to 0.3. ; Grid cell size ranges from 5 to 20 cm; Early warning residual threshold The range is 1.0 to 3.0. Low state threshold The range is 0.2 to 0.4, which is the mid-state threshold. The range is 0.5 to 0.7; minimum activation quantity value The range is 1 to 2, representing a medium activation value. The range is 3 to 4, with a maximum activation value. The range is 5 to 8; the minimum sampling duration threshold is 720 hours; and the node spacing of the sparse sensor node array ranges from 0.5 to 2.0 meters.
[0025] This invention addresses the technical challenges of insufficient prediction accuracy caused by the inability of sparse sensors to effectively detect temperature anomalies in the obscured areas of stacked goods inside cold chain transport vehicles, and the difficulty of adapting a single model to the thermal characteristics of various cargo types. It combines a finite element thermodynamic interpolation model with a sparse gated expert routing spatiotemporally heterogeneous temperature sensing model and introduces a meta-learning cross-domain adaptive transfer mechanism. The finite element thermodynamic interpolation model uses sparse measured temperature points as boundary conditions and expands the spatially discrete points into a continuous full-field temperature distribution by solving the heat conduction equation. This mechanism compensates for the inherent spatial resolution limitations of physical sensors, allowing for explicit modeling of the temperature state in obscured areas. The sparse gated expert routing mechanism dynamically activates corresponding expert sub-networks based on the thermal characteristics of the cargo type. Combined with the meta-learning cross-domain adaptive transfer mechanism, it achieves rapid domain adaptation with few samples, ensuring that the model's predictions for cargo with different thermal characteristics converge to the physically feasible region. In summary, the present invention solves the technical problems mentioned in the background art, such as the inability of sparse sensors to effectively detect abnormal temperatures in the stacked and shielded areas inside cold chain transport vehicles, and the difficulty of a single model to adapt to the thermal characteristics of multiple types of goods, resulting in insufficient prediction accuracy. Attached Figure Description
[0026] Figure 1 This is a flowchart of the method of the present invention.
[0027] Figure 2 This is a finite element inversion result of the temperature distribution throughout the interior of the train carriage.
[0028] Figure 3 This is a graph showing the trend of the number of experts activated as a function of temperature deviation from the residual.
[0029] Figure 4 This is a graph showing the relationship between the number of concurrent threads and data processing latency in a functional concurrent programming paradigm. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0031] like Figure 1 The diagram shown is a flowchart of a method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things, provided by this invention. This method includes the following steps:
[0032] S01. Deploy a sparse sensor node array inside the cold chain transport compartment to collect temperature, humidity, vibration acceleration and global positioning coordinate data. The raw sampled data is pre-filtered by an adaptive exponential decay sliding window Kalman fusion algorithm to output a posterior state estimation vector as the input feature for subsequent steps.
[0033] S02. Using the filtered sparse measured temperature points as boundary conditions, a virtual sensor grid is constructed based on the finite element thermodynamic interpolation model to invert the temperature distribution throughout the interior of the carriage and cover the blind spot temperature anomaly detection in the cargo stacking and shielding area.
[0034] S03. Input the posterior state estimation vector into the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model. After the orthogonal decoupling module eliminates the linear correlation between channels, the gated routing layer activates the expert sub-network based on the current temperature deviation residual and outputs the full temperature prediction sequence.
[0035] S04. For different types of goods, a meta-learning cross-domain adaptive transfer mechanism is adopted. The internal parameters of the sparse gating expert routing spatiotemporal heterogeneous temperature sensing model are quickly adjusted by task embedding vectors. Only a small number of new scene samples are needed to complete the domain adaptation, covering scenarios with different thermal characteristics such as fresh food, medicine, and frozen products.
[0036] S05. When processing multi-sensor data streams in parallel, a functional concurrent programming paradigm based on immutable data structures is adopted, combined with read-write lock separation and memory barrier instructions to eliminate multi-threaded shared state contention and ensure the determinism and consistency of temperature data stream processing under a multi-core processor architecture.
[0037] S06. Based on the comparison results between the temperature prediction sequence and the set threshold, trigger the graded early warning command, and simultaneously upload the temperature distribution of the entire venue, the expert activation status and the early warning record to the cloud monitoring platform to complete the closed loop of temperature monitoring throughout the process.
[0038] The recommended node spacing of the sparse sensor node array is 0.5 to 2.0 m. The specific value is determined through multiple experimental statistical analyses of the blind zone miss rate under different spacings, with the miss rate being lower than the upper limit set by the engineering as the convergence criterion.
[0039] The adaptive exponentially decaying sliding window Kalman fusion algorithm is intrinsically nested within the pre-feature filtering layer of the gated routing mechanism in the spatiotemporally heterogeneous temperature sensing model of the sparse gated expert routing. The algorithm execution flow is as follows: the state vector is initialized to the sensor's first reading, and the covariance matrix is initialized to the identity matrix multiplied by the empirical noise variance. , The recommended range is 0.01 to 0.5. The variance is estimated from historical static calibration experimental data. For each new observation, the process noise covariance is dynamically adjusted based on the time interval; the longer the time interval, the greater the process noise. A Kalman prediction step is executed to calculate the predicted state and prediction covariance. An adaptive exponential decay weight is introduced to calculate the weighted mean of the current observation and several historical observations, with the weights calculated according to the exponential decay coefficient. attenuation, Estimated from the current rate of temperature change Adaptive adjustment: when hour, Take a smaller value to accelerate decay and reduce historical interference; when hour, Take a larger value to enhance the historical smoothing effect. The recommended range is 0.05–0.3. The method is determined through experimental measurement and distribution analysis of the refrigeration start-up and shutdown processes of different cargo types. The innovative terms in the Kalman update step are corrected using a weighted mean, followed by a post-hoc state estimation. The filtered state vector is directly used as the input feature of the sparse gated expert routing spatiotemporally heterogeneous temperature sensing model gating network. The gating score is scaled by the absolute value of the filtered temperature residual, realizing the linkage between physical filtering and neural routing. The adaptive exponential decay sliding window Kalman fusion algorithm dynamically adjusts the process noise and historical observation weights, enabling the filter to have high response capability during rapid temperature changes and strong noise suppression capability during stable temperature periods. The residual output of the physical filtering layer directly drives the expert activation priority of the gating routing, forming a collaborative mechanism of physical constraints and data-driven approaches between the sensing and inference layers, fundamentally improving the detection sensitivity and prediction stability under abnormal conditions.
[0040] The finite element thermodynamic interpolation model uses the car body geometry, cargo stacking distribution, and boundary cooling power as input parameters. It employs the finite element method to mesh the interior space of the car body, with a suggested mesh element size range of 5–20 cm, determined through experimental analysis of the convergence of interpolation errors under different element sizes. Using sparse measured temperature points as Dirichlet boundary conditions, it solves the steady-state or transient heat conduction equations, outputting a global temperature distribution matrix. The temperature estimate of each mesh node in the virtual sensor mesh is the finite element solution result, covering cargo stacking obstruction areas inaccessible to single-point physical sensors, thus eliminating the systematic missed detection of blind-zone temperature anomalies at the system architecture level. This model, by explicitly modeling the local temperature gradient in areas where convection heat transfer is hindered, compensates for the inherent spatial resolution limitations of single-point sensors, achieving a global characterization of the thermodynamic state inside the car body.
[0041] The sparse gated expert routing spatiotemporal heterogeneous temperature sensing model is based on deep learning and has the following structure: The input layer receives a three-dimensional tensor with the shape of batch number multiplied by time step multiplied by feature dimension. The feature dimension covers heterogeneous channels such as temperature, humidity, vibration acceleration, and global positioning coordinates. The pre-orthogonal decoupling module performs singular value decomposition on the input covariance matrix, extracts the first few principal component directions as decoupling basis, projects each feature channel to mutually orthogonal subspaces, eliminates linear correlation between channels, and ensures that the subsequent expert network receives an input representation with maximum information density. The routing layer is a lightweight two-layer fully connected structure with an output dimension equal to the number of experts. After the upper suppression operation, only the indexes of the highest-scoring experts are retained, and the routing coefficients of the remaining experts are hard-set to zero. The absolute residual of the current cargo hold temperature deviating from the set value is directly embedded into the routing layer as a scaling factor for the gated routing. When the residual exceeds the warning threshold... At that time, the gating score of the expert subnetwork that handles abnormal states is forcibly increased. The recommended range is 1.0 to 3.0. The cold chain standard requirements for different types of goods and the experimental temperature drift were statistically analyzed to determine the network structure. Each expert subnetwork consists of locally asymmetric gated loop units, with the forward state update step size being three times the backward feedback step size. The outputs of each expert are weighted, summed, and fused before entering a multi-level residual dense jump module. The output of each hidden layer is directly injected into deep nodes at distances of 2, 4, and 8 layers through a cross-layer jump connection matrix, forming a multi-span dense residual graph. The loss function is based on the standard mean square error, with the addition of a gated load balancing penalty term and a temperature physical conservation constraint term. The conservation constraint requires that the rate of temperature change between adjacent time points predicted by the network does not exceed the maximum cooling physical rate of the refrigeration equipment. , Based on cargo hold volume With the rated power of the refrigeration unit Parameter calculation, the calculation formula is: ,in The coefficient of performance (COP) is the cooling efficiency coefficient. The air density inside the cargo hold. The specific heat capacity of air at constant pressure is used as the rate, which is embedded as a Lagrange multiplier in the loss function as a hard constraint. The entire network activates only about 20% of the expert parameters in a single forward inference, thus simplifying computational resources. The connection weights between neurons are dynamically adjusted based on the average gating score of each expert subnetwork in historical batches. The step size of the weight gradient update between neurons in expert subnetworks with low scores is reduced to avoid wasting resources on inactive experts. The memory allocation of feature maps between layers is prioritized based on the activation frequency of each span in the cross-layer skip connection matrix, with feature maps corresponding to spans with high activation frequencies residing in memory first. The batch memory allocation for data loops is dynamically adjusted based on the effective information entropy of the heterogeneous channels in the current batch. Memory blocks corresponding to channels with low information entropy are reused between batches to reduce redundant memory usage. The sparse gating expert routing spatiotemporal heterogeneous temperature sensing model, through the collaborative design of sparse activation and physical constraints, maintains lightweight and efficient inference characteristics under normal conditions and automatically switches to a high-precision expert-first activation mode under abnormal conditions. The physical conservation constraint explicitly embeds the thermodynamic limit of the refrigeration equipment into the loss function, enabling the model predictions to converge within the physically feasible region, fundamentally eliminating the risk of physical uninterpretability of data-driven models in cold chain scenarios.
[0042] The steps for establishing the training dataset for the sparse gating expert routing spatiotemporal heterogeneous temperature sensing model specifically include: collecting historical cold chain transportation sensor records covering three categories of goods: fresh produce, pharmaceuticals, and frozen products. The effective sampling time series length for each category of goods is recommended to be no less than 720. The original data is filtered using the adaptive exponential decay sliding window Kalman fusion algorithm. Based on the filtered data, the corresponding full-field temperature distribution labels are generated using the finite element thermodynamic interpolation model. The training set, validation set, and test set are divided into an 8:1:1 ratio. For scenarios with few samples, such as pharmaceutical goods, a meta-learning cross-domain adaptive transfer mechanism is used to generate augmented samples to ensure a balanced sample size for each type of goods. The specific steps for training the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model include: optimizing the algorithm based on the AdamW optimizer, with an initial learning rate suggested to be within a certain range. ~ The training process employs a learning rate warm-up and cosine annealing strategy for scheduling. The recommended batch size range is 32–128, determined experimentally through a balance between memory usage and gradient variance. After each training round, the gating load balancing penalty and the temperature conservation constraint violation rate are calculated on the validation set, and training stops when both meet the convergence criterion. In the few-sample adaptation stage of the meta-learning cross-domain adaptive transfer mechanism, only 5–20 time-series samples are needed for each new cargo type, and the model's internal parameters are quickly adjusted through a gradient meta-update step.
[0043] The meta-learning cross-domain adaptive transfer mechanism updates the model's meta-parameters using task embedding vectors, enabling the model to quickly adapt to the thermal characteristics of new cargo types with the support of a small number of new scene samples. Its core principle is as follows: During the meta-training phase, multiple known cargo types are used as a task set. The model learns a meta-parameter initialization point sensitive to task distribution, allowing convergence to a local optimum of the new task with only a few gradient steps from this initialization point. The task embedding vector is generated by mapping a small number of new scene support samples through the encoder network, serving as auxiliary input to the gating routing layer and guiding the expert activation distribution to shift towards the thermal characteristics of the new cargo type. This mechanism allows the model to handle new cargo types other than fresh produce, pharmaceuticals, and frozen products without needing to re-collect large-scale labeled data, significantly reducing the data cost of cross-domain transfer and fundamentally solving the problem of insufficient generalization ability of a single model in multi-cargo type scenarios.
[0044] In the aforementioned functional concurrent programming paradigm, the processing threads of multi-sensor data streams do not share mutable states, and the data objects operated on by each thread cannot be changed during their lifecycle. The read-write lock separation mechanism ensures that multiple read threads do not block when concurrently accessing the shared memory buffer, and other threads are suspended and wait during the exclusive lock period of the write thread. The memory barrier instruction enforces the globally visible order of memory operations at the processor microarchitecture level, eliminating nondeterministic errors caused by cache inconsistency failures in multi-core processors. The above three mechanisms work together to ensure the reproducibility of the parallel temperature data stream processing results.
[0045] The above-side suppression operation refers to: for all expert score vectors output by the gating network, only the scores corresponding to the several experts with the largest values are retained, and the routing coefficients of the remaining experts are directly set to zero, thereby achieving sparse activation.
[0046] The locally asymmetric gated loop unit refers to a unit that, based on the standard gated loop unit, sets the forward state update time step parameter to three times the reverse feedback time step parameter, so that the unit has a sensitive forward response and a stable reverse memory when processing rapidly changing temperature sequences, taking into account both real-time tracking capability and long-term stability.
[0047] The multi-span dense residual map refers to the following: In the multi-level residual dense jump module, the output feature map of each hidden layer is injected into deep nodes with a distance of 2, 4 and 8 layers respectively through the cross-layer jump connection matrix, forming a dense directed connection structure with multiple receptive field spans, so that the deep nodes can simultaneously fuse historical temperature features at different time scales.
[0048] The temperature physical conservation constraint term refers to the addition of a Lagrange multiplier penalty to the loss function, which requires that the absolute value of the difference between the predicted temperatures of adjacent time points in the model output does not exceed the product of the maximum cooling physical rate of the refrigeration equipment and the sampling time interval. The penalty term corresponding to the predicted sample that violates this constraint is non-zero and is backpropagated to the network weights, forcing the model to learn a physically feasible temperature change trajectory.
[0049] The gating load balancing penalty term refers to adding a regularization term to the loss function to measure the uniformity of the number of activations of each expert sub-network in a training batch. When a certain expert is over-activated while the other experts are rarely activated, the value of this term increases, driving the model to tend to make balanced use of the computing power of each expert sub-network during the training process.
[0050] Specifically, an expert activation elastic adjustment function is designed in the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model. This parameter is used to dynamically adjust the number of activated users in each expert subnetwork based on the current monitoring status. . Calculated based on the following three data points: the mean residual temperature deviation of the entire current batch. Current value of gating load balancing penalty item Current operating power utilization rate of refrigeration equipment The three factors are weighted and summed to obtain the comprehensive state index. The weight , , Based on regression analysis of historical operating data, the suggested initial ranges are 0.4–0.6, 0.2–0.4, and 0.1–0.3; when hour, Take the minimum number of activations To maintain basic monitoring with minimal computational overhead; when hour, Take a moderate number of activations Balancing accuracy and efficiency; when hour, Take the maximum number of activations Prioritize ensuring prediction accuracy in high-temperature risk scenarios. and The recommended ranges are 0.2–0.4 and 0.5–0.7, respectively, determined through multiple comparative experiments on accuracy and computational resource consumption under different cold chain transportation scenarios. , , The recommended ranges are 1-2, 3-4, and 5-8, respectively. The specific values are determined through a combination of expert ablation experiments and memory usage tests.
[0051] As an optional implementation, this solution also provides a computer-based system implementation, forming an IoT-based real-time temperature monitoring system for the entire cold chain transportation process. The system is equipped with a readable storage medium that stores program instructions. When the program instructions are run on the computer, they execute all the steps of the above method, including sparse sensor node array data acquisition, adaptive exponential decay sliding window Kalman fusion algorithm pre-filtering, finite element thermodynamic interpolation model full-field temperature inversion, sparse gated expert routing spatiotemporal heterogeneous temperature sensing model prediction, meta-learning cross-domain adaptive migration mechanism domain adaptation, functional concurrent programming paradigm multi-threaded stream processing, and cloud monitoring platform early warning uploading, among other functional modules.
[0052] The specific implementation of step S01 is as follows: A sparse sensor node array is deployed inside the cold chain transport vehicle according to a node spacing of 0.5–2.0 m. Each node synchronously collects four types of heterogeneous data: temperature, humidity, vibration acceleration, and global positioning coordinates, forming a multi-channel raw time-series data stream. The raw data is pre-filtered using an adaptive exponential decay sliding window Kalman fusion algorithm. This algorithm initializes the state vector with the first sensor reading and the covariance matrix with the identity matrix multiplied by the empirical noise variance. The value ranges from 0.01 to 0.5. Upon arrival of each new observation, the algorithm dynamically amplifies the process noise covariance based on the current sampling time interval; the longer the time interval, the greater the process noise. Subsequently, a Kalman prediction step is performed to obtain the predicted state and prediction covariance. The algorithm introduces adaptive exponentially decaying weights to calculate the weighted average of several historical observations, with the weights calculated according to an exponential decay coefficient. Attenuation. When the current estimated rate of temperature change... Not lower than the rapid rate of change threshold (Range: 0.05–0.3) )hour, Take a smaller value to reduce historical interference; when Below hour, A larger value is chosen to enhance the smoothing effect. The innovative term of the Kalman update step is corrected with a weighted mean, and the posterior state estimation is completed, outputting the posterior state estimation vector for use in subsequent steps. The absolute value of the filtered temperature residual is directly used as the gating routing scaling factor, realizing the linkage between the physical filtering layer and the neural network routing layer.
[0053] The specific implementation of step S02 is as follows: Using the sparse measured temperature points output in step S01 as boundary conditions, a finite element thermodynamic interpolation model is established. This model takes the geometry of the carriage, the cargo stacking distribution, and the boundary cooling power as inputs. The finite element method is used to mesh the three-dimensional space inside the carriage. The recommended mesh element size is 5–20 cm, with specific values determined through interpolation error convergence experiments. Dirichlet boundary conditions are applied to the sparse measured temperature points. The steady-state or transient heat conduction equation is solved according to the transportation conditions, outputting a temperature distribution matrix covering the entire carriage. The temperature estimate of each node in the virtual sensor mesh is the finite element solution result. The physical basis for this is that the heat conduction equation has a unique solution under given boundary conditions. Therefore, the temperature state in the cargo stacking obscured area can be obtained through numerical solution, thereby eliminating the inherent spatial resolution defects of single-point sensors and achieving global coverage of temperature anomalies in blind areas.
[0054] The specific implementation of step S03 is as follows: The input layer of the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model receives a three-dimensional tensor with the shape of batch number multiplied by time step size multiplied by feature dimension. The feature dimension covers heterogeneous channels such as temperature, humidity, vibration acceleration, and global positioning coordinates. The pre-orthogonal decoupling module performs singular value decomposition on the input covariance matrix, extracts the first few principal component directions as the decoupling basis, and projects each feature channel to mutually orthogonal subspaces to eliminate linear correlation between channels. The gated routing layer is a lightweight two-layer fully connected structure with an output dimension equal to the number of experts. After the upper-side suppression operation, only the indexes of the highest-scoring experts are retained, and the routing coefficients of the remaining experts are hard-set to zero. When the temperature deviation residual exceeds the warning residual threshold... (Range from 1.0 to 3.0) When an anomaly occurs, the gating score of the expert subnetwork handling the anomaly is forcibly increased. Each expert subnetwork consists of locally asymmetric gated recurrent units, with a forward state update step size three times the backward feedback step size, making the unit sensitive to forward response and stable to backward memory when handling rapidly changing temperature sequences. The outputs of each expert are weighted, summed, and fused before entering a multi-level residual dense jump module. Each hidden layer output is injected into deep nodes at distances of 2, 4, and 8 layers through a cross-layer jump connection matrix, forming a multi-span dense residual graph. The loss function adds a gating load balancing penalty term and a temperature physical conservation constraint term to the mean square error. The conservation constraint requires that the predicted temperature change rate between adjacent time steps does not exceed the maximum cooling physical rate of the refrigeration equipment. Samples that violate the constraints are backpropagated to the network weights via Lagrange multipliers. In a single forward inference iteration, only about 20% of the expert parameters are activated, thus conserving computational resources.
[0055] The specific implementation of step S04 is as follows: During the meta-training phase, the meta-learning cross-domain adaptive transfer mechanism uses multiple known product types, such as fresh produce, pharmaceuticals, and frozen products, as the task set. The model learns meta-parameter initialization points sensitive to task distribution, enabling it to converge to a local optimum for the new task with only a few gradient steps from these initialization points. When encountering a new product type, 5-20 temporal support samples are collected from that type and mapped through the encoder network to generate task embedding vectors. These vectors serve as auxiliary inputs to the gating routing layer, guiding the expert activation distribution to shift towards the thermal characteristics of the new product type. The gradient meta-update step rapidly adjusts the model's internal parameters, achieving domain adaptation without requiring the re-collection of large-scale labeled data.
[0056] The specific implementation of step S05 is as follows: When processing multi-sensor data streams in parallel, a functional concurrent programming paradigm based on immutable data structures is adopted. The data objects operated on by each processing thread are immutable throughout their lifecycle, and threads do not share mutable states, eliminating race conditions from the source. The read-write lock separation mechanism allows multiple read threads to concurrently access the shared memory buffer without blocking each other, while other threads are suspended and waiting during the exclusive lock period of the write thread. Memory barrier instructions enforce the globally visible order of memory operations at the processor microarchitecture level, eliminating nondeterministic errors caused by cache coherency failures in multi-core processors and ensuring the reproducibility of parallel temperature data stream processing results.
[0057] The specific implementation of step S06 is as follows: The full-process temperature prediction sequence output in step S03 is compared with the temperature setting threshold corresponding to each cargo type on a time-by-time basis, and a graded early warning command is triggered according to the deviation magnitude. The early warning level is divided into three levels: prompt, warning, and alarm, corresponding to different response priorities. The full-field temperature distribution matrix, expert activation status records, and early warning logs are synchronously uploaded to the cloud monitoring platform through an encrypted communication protocol. The platform completes persistent data storage and visualization, forming a complete closed loop for full-process temperature monitoring.
[0058] It should be noted that the key technologies of this invention include: the finite element thermodynamic interpolation model, by combining the numerical solution of the heat conduction equation with sparse measured boundary conditions, expands spatial discrete points into a continuous full-field temperature distribution, filling the perception gap of single-point sensors in shaded areas from the perspective of physical mechanism, which cannot be achieved by traditional sensor redundancy deployment or interpolation methods; the sparse gating expert routing mechanism, through the residual-driven dynamic expert activation and the collaborative embedding of physical conservation constraints, enables the model to maintain lightweight inference under normal conditions and automatically switch to a high-precision mode under abnormal conditions, and the prediction results converge within the thermodynamic feasible domain, overcoming the dual defects of traditional time series models in terms of accuracy degradation and physical uninterpretability under abnormal conditions; the meta-learning cross-domain adaptive transfer mechanism, through the learning of meta-parameter initialization points and the auxiliary routing of task embedding vectors, enables the model to complete the thermal characteristic adaptation across cargo types with a very small number of new samples, breaking the bottleneck of insufficient generalization ability of single models in multi-cargo type scenarios. The three key technologies work together to form a complete technical loop from full-field spatial perception and accurate temporal prediction to cross-type adaptation. Compared with the traditional solution of a single sensor plus a general prediction model, it has achieved a fundamental breakthrough in both spatial coverage integrity and multi-type adaptability.
[0059] It should be noted that in situations where the types of goods transported within the carriage frequently change, and the number of available labeled samples is extremely limited after each change, the model faces a severe problem of limited-sample cross-domain generalization failure. Specifically, when transporting goods changes from fresh produce to pharmaceuticals, the two types of goods differ by orders of magnitude in heat capacity, thermal conductivity, and refrigeration response characteristics. This leads to a significant shift between the parameter distribution of the original model and the thermal statistical characteristics of the new scenario, causing a sharp increase in prediction error in the initial stage of the switch, and a severe decrease in the timeliness and accuracy of temperature warnings. The root cause of this technical problem is that the parameters of the neural network converge to the thermal characteristic distribution of historical goods types during the training phase, and the local geometry of its weight space is highly coupled with the gradient direction of the training task. When a new type of goods is introduced, the distance between the original parameter initialization point and the local optimum of the loss surface of the new task is large. Standard gradient descent, supported by a limited number of samples, is prone to getting stuck in flat regions or saddle points, making it difficult to complete effective parameter transfer within a finite number of steps. The common solution to this technical problem is to use transfer learning to fine-tune the pre-trained model. However, standard fine-tuning methods require accumulating a sufficient number of labeled samples on new cargo types to allow the loss function to converge to an acceptable range. In actual cold chain transportation scenarios, historical transportation data for new cargo types is often extremely scarce, especially for high-value pharmaceutical goods, which have low batch frequency and small sample sizes per batch. This makes standard fine-tuning methods difficult to meet engineering requirements in terms of data acquisition cost and timeliness. Furthermore, if the fine-tuning learning rate is set too high, it can lead to catastrophic forgetting of existing knowledge of the known types, causing a significant degradation in model accuracy when switching back to the original cargo type. This invention effectively solves this technical problem. The meta-learning cross-domain adaptive transfer mechanism drives the model parameters to converge to a meta-initialization point that is globally sensitive to the task distribution through multi-task gradient aggregation during the meta-training stage. This initialization point is located near the geometric center of the local optimum of the loss surface for each task in the parameter space, possessing an intrinsic ability to quickly adapt to any new task. When a new cargo type arrives, only 5 to 20 supporting samples are needed to advance the parameters from the meta-initialization point to the local optimum of the new task through a few steps of gradient meta-update, resulting in a short and accurate transfer path. Meanwhile, the task embedding vector encodes the thermal statistical features of the new cargo type into a low-dimensional vector, which serves as an auxiliary input to the gated routing layer. This directly guides the expert activation distribution to shift towards the thermal characteristics of the new cargo type, enabling the routing decision itself to adapt to new types and further reducing the sample size and gradient steps required for model adaptation. This mechanism works synergistically at both the parameter initialization and routing guidance levels, allowing the model to achieve high-quality cross-domain transfer with a very small number of new scenario samples. This fundamentally overcomes the dual shortcomings of standard fine-tuning methods, namely, difficulty in convergence and catastrophic forgetting in scenarios with few samples.
[0060] Specifically, the principle of this invention is as follows: This invention can solve the above-mentioned technical problems, and its principle lies in the following synergistic technical aspects. First, the adaptive exponential decay sliding window Kalman fusion algorithm dynamically adjusts the process noise covariance and historical observation weights, enabling the pre-filter to have high response capability during rapid temperature changes and strong noise suppression capability during stable phases, outputting a high-quality posterior state estimation vector as the input feature of the subsequent model, thus ensuring data quality from the source. Second, the finite element thermodynamic interpolation model takes the geometry of the carriage, the cargo stacking distribution, and the boundary cooling power as inputs, and uses the finite element method to mesh the internal space of the carriage. It solves the heat conduction equation using sparse measured temperature points as Dirichlet boundary conditions, outputting a virtual sensor temperature distribution matrix covering the entire field. The physical basis of this process is that the heat conduction equation has a unique solution under given boundary conditions. Therefore, even if there are no physical sensors inside, as long as the boundary temperature is known, the temperature distribution of the shielded area can be obtained through numerical solution, thereby eliminating the blind spot detection problem at the system architecture level. Third, the sparse gated expert routing spatiotemporally heterogeneous temperature sensing model eliminates linear correlations between heterogeneous feature channels through an orthogonal decoupling module, improving input information density. The gated routing layer dynamically activates the corresponding expert sub-network based on the current temperature deviation residual, enabling the model to maintain lightweight inference under normal conditions and automatically switch to a high-precision expert-first activation mode under abnormal conditions. Temperature physical conservation constraints are embedded in the loss function, forcing the model's predictions to converge within the thermodynamic limits of the refrigeration equipment, eliminating the risk of uninterpretability in physical scenarios for purely data-driven models. Fourth, the meta-learning cross-domain adaptive transfer mechanism learns meta-parameter initialization points sensitive to task distribution during the meta-training phase, allowing the model to quickly adapt to the domain with only a small number of new cargo type samples through gradient meta-updates, fundamentally solving the problem of insufficient generalization ability of a single model in multi-cargo type scenarios. Fifth, the functional concurrent programming paradigm, combined with read-write lock separation and memory barrier instructions, ensures deterministic processing of multi-sensor data streams under a multi-core processor architecture, avoiding data consistency failures caused by shared state contention. The above-mentioned steps logically form a complete closed loop from data acquisition, spatial completion, feature extraction, predictive reasoning to domain adaptation. The output of each step serves as the input of the next step, and the technical path has inherent causal self-consistency. Therefore, the solution of this invention can effectively solve the aforementioned technical problem.
[0061] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0062] The specific implementation of step S01 is as follows: a sparse sensor node array is deployed inside the cold chain transport compartment with a node spacing of 0.5 to 2.0 m. Each node synchronously collects temperature, humidity, vibration acceleration, and global positioning coordinate data to form the original observation vector. The execution flow of the adaptive exponential decay sliding window Kalman fusion algorithm is as follows.
[0063] Initialization phase, state vector Take the initial sensor readings and the covariance matrix. ,in The empirical noise variance is recommended to be within the range of 0.01 to 0.5. The variance was obtained from historical static calibration experiments. It is an identity matrix.
[0064] In the prediction step, process noise covariance Based on adjacent sampling time intervals Dynamic adjustment, the formula is expressed as follows:
[0065] ;
[0066] In the formula, The noise intensity factor of the basic process, in units of Obtained from experimental calibration For the first The sampling time interval is expressed in seconds. For the first Step-by-step noise covariance matrix, in units of Predicted state Predicting covariance ,in For the first The state transition matrix is determined by the prior thermodynamic model of the carriage. For the first The posterior state estimation vector is given by step. For the first The posterior covariance matrix, For the first Predict the covariance matrix step by step.
[0067] During the adaptive exponential decay weighting calculation phase, the current temperature change rate estimate is... It is obtained by the ratio of the temperature difference between adjacent moments to the time interval, in units of... Attenuation coefficient The adaptive adjustment rules are as follows:
[0068] ;
[0069] In the formula, For the rapid change phase, the attenuation coefficient is relatively small. For the relatively large attenuation coefficient during the steady-state phase, both are dimensionless scalars and satisfy the following conditions: Thresholds are defined for the stages of rapid and slow change, with units of 1. The recommended range is 0.05–0.3. The value was determined through experimental measurements and distribution analysis of the refrigeration start-up and shutdown processes for different cargo types. The weighted average of several historical observations is:
[0070] ;
[0071] In the formula, For the first Step observations, in units of K The length of the sliding window is a positive integer. Index of historical steps within the window This is a weighted average, with units of K. The innovation term is corrected by replacing the original observations, and the a priori state is estimated. With posterior covariance The standard Kalman update outputs the posterior state estimate vector. The absolute value of the temperature residual output from the physical filter layer serves as the input feature for subsequent steps. The expert activation priority of directly driving gated routing, where Set the temperature value in Kelvin to enable the linkage between physical filtering and neural routing.
[0072] The specific implementation of step S02 is as follows: Using the geometry of the carriage, the cargo stacking distribution, and the boundary cooling power as inputs, a finite element mesh is created within the carriage's interior space. The recommended mesh element size is 5–20 cm, determined through experimental analysis of the convergence of interpolation errors under different element sizes. Using sparse measured temperature points as Dirichlet boundary conditions, the steady-state or transient heat conduction equations are solved, outputting the overall temperature distribution matrix. ,in , , These represent the number of grid nodes in the three spatial directions, respectively. The unit for each element is K. The local temperature gradient in the obstructed area of the cargo stack due to impeded convection heat transfer is explicitly modeled, covering blind spots that physical sensors cannot reach, thus achieving global temperature distribution inversion.
[0073] The specific implementation of step S03 is as follows: The posterior state estimation vector is input into the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model. The input layer receives a shape of... The three-dimensional tensor, in which For batch quantity, For time step, For feature dimensions.
[0074] The pre-orthogonal decoupling module decouples the input covariance matrix. The singular value decomposition is performed, and the formula is expressed as follows:
[0075] ;
[0076] In the formula, It is a left singular vector matrix. It is a singular value diagonal matrix. It is a right singular vector matrix. Take the first... Principal component direction, extraction The former Columns form the projection matrix , input feature matrix Projecting onto an orthogonal subspace yields the decoupling characteristics:
[0077] ;
[0078] In the formula, For the decoupled feature tensor, The number of principal components to be retained is a positive integer, satisfying... .
[0079] The gated routing layer outputs an expert score vector. , Given the total number of experts, the upper-side suppression operation only retains the highest-scoring expert. One expert index, the rest of the routing coefficients are set to zero. Current cargo hold temperature deviates from residual. Its absolute value Embedded as a scaling factor in the routing layer, when At that time, the gating score of the expert subnetwork for handling abnormal states was forcibly increased. To provide early warning of temperature deviations from the threshold, the unit is K, and the recommended range is 1.0 to 3.0 K, which is determined by the cold chain standard requirements for different types of goods and statistical analysis of experimental temperature drift.
[0080] Each expert subnetwork consists of locally asymmetric gated recurrent units, with a forward state update step size three times that of the backward feedback step size. This ensures that the units have a sensitive forward response and stable backward memory when processing rapidly changing temperature sequences, balancing real-time tracking capability with long-term stability. The weighted summation of the expert outputs is then fed into a multi-span dense residual map module. The output of each hidden layer is injected into deep nodes at distances of 2, 4, and 8 layers, forming a dense directed connection structure with multiple receptive fields. This allows the deep nodes to simultaneously integrate historical temperature features from different time scales.
[0081] The loss function includes a mean squared error term, a gated load balancing penalty term, and a temperature conservation constraint term. The temperature conservation constraint requires that the predicted temperature change rate between adjacent time steps does not exceed the maximum cooling rate of the refrigeration equipment. The formula for its calculation is:
[0082] ;
[0083] In the formula, The coefficient of performance is a dimensionless refrigeration efficiency. The rated power of the refrigeration unit is expressed in watts (W). This refers to the air density inside the cargo hold, in units of... , This refers to the specific heat capacity of air at constant pressure, in units of... , This refers to the cargo hold volume, in units of... , Units are Conservation constraints are embedded in the loss function as Lagrange multipliers. A penalty term corresponding to a violation of the constraint is non-zero and backpropagated to the network weights. The gated load balancing penalty term measures the uniformity of the number of times each expert is activated within a training batch. When an expert is overactivated, this term increases, driving the balancing to utilize each expert's sub-network.
[0084] Experts activate elastic adjustment function Based on the comprehensive state index Dynamically adjust activation quantity parameters The formula for calculating the comprehensive state index is:
[0085] ;
[0086] In the formula, This represents the average residual temperature deviation across the entire batch, in Kelvin (K). The value of the current gated load balancing penalty term is a dimensionless scalar. The current operating power utilization rate of the refrigeration equipment is a dimensionless scalar quantity, ranging from 0 to 1. for The corresponding dimensionless weighting coefficients, in units of , Dimensionless weighted coefficients , , Based on regression analysis of historical operating data, the suggested initial range is 0.4–0.6. 0.2~0.4, 0.1~0.3 It is a dimensionless comprehensive state index. Based on... The segmentation rules, when hour Pick ,when hour Pick ,when hour Pick ,in The recommended range is 0.2–0.4. The recommended range is 0.5 to 0.7. The recommended range is 1 to 2. The recommended range is 3 to 4. The recommended range is 5 to 8, which is determined by a combination of ablation experiments and memory usage tests.
[0087] The specific implementation of step S04 is as follows: In the meta-training stage, the cross-domain adaptive transfer mechanism uses multiple known cargo types as a task set. The model is trained at the meta-parameter initialization points that are sensitive to task distribution, so that it can converge to the local optimum of the new task with only a few gradient steps. The task embedding vector is generated by mapping a small number of new scene support samples through the encoder network. It serves as the auxiliary input of the gating routing layer, guiding the expert activation distribution to shift towards the thermal characteristics of the new cargo type. Each new cargo type only requires 5 to 20 time-series samples. The internal parameters of the model are quickly adjusted through the gradient meta-update step, covering scenarios with different thermal characteristics such as fresh food, pharmaceuticals, and frozen products.
[0088] The specific implementation of step S05 is as follows: the processing threads of the multi-sensor data stream do not share mutable states, and the data objects operated by each thread cannot be changed during their lifecycle; the read-write lock separation mechanism ensures that multiple read threads do not block when concurrently accessing the shared memory buffer, and the other threads are suspended and wait during the exclusive lock period of the write thread; the memory barrier instruction forces the global visible order of memory operations at the processor microarchitecture level, eliminating nondeterministic errors caused by cache consistency failures in multi-core processors. The three mechanisms work together to ensure the reproducibility of the parallel temperature data stream processing results.
[0089] The specific implementation of step S06 is as follows: compare the entire temperature prediction sequence with a set threshold, trigger a graded early warning command, and display the temperature distribution across the entire field. The activation status of experts and early warning records are simultaneously uploaded to the cloud monitoring platform to complete the closed-loop temperature monitoring process.
[0090] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0091] This embodiment uses a road transport task of a batch of refrigerated pharmaceutical goods as an example to verify the complete execution process of the method of the present invention. The effective internal volume of the transport vehicle is... The rated cooling capacity is 3500W, and the cooling efficiency coefficient is... Take 0.72, the air density inside the carriage Take 1.25 Specific heat capacity of air at constant pressure Take 1005 The maximum cooling physical rate is thus calculated. Approximately 0.112 This value is embedded in the loss function as the upper bound of the temperature physical conservation constraint. The goods are lyophilized powder injections, requiring the temperature inside the compartment to be maintained between 2 and 8°C. The upper limit of the temperature setting threshold is 8°C, and the warning residual threshold is... Take 2.0 .
[0092] In step S01, 24 sensor nodes are arranged at 1.0m intervals along the longitudinal, transverse, and vertical directions inside the carriage, forming a sparse sensor node array. Each node is spaced at 1... The sampling rate synchronously acquires temperature, relative humidity, triaxial vibration acceleration, and global positioning coordinates. The raw sampled data is directly fed into an adaptive exponential decay sliding window Kalman fusion algorithm for pre-filtering. Empirical noise variance. Based on historical static calibration experiments, the value was set to 0.05. Rapid rate of change threshold Based on the measurement results of the cooling start-stop experiment, the value was set to 0.12. At the moment the refrigeration unit starts up, the rate of temperature change is approximately 0.18. ,Exceed The algorithm automatically The adjustment is reduced to improve response speed and effectively track the rapid temperature drop process; during the temperature stabilization phase, the rate of change is approximately 0.02. lower than The algorithm will Increasing the value enhances the historical smoothing effect and improves noise suppression. The filtered posterior state estimation vector, along with the absolute value of the temperature residual, is passed to subsequent steps.
[0093] In step S02, a finite element thermodynamic interpolation model is established using the 24 temperature measurements filtered in step S01 as Dirichlet boundary conditions. Inside the carriage, goods are densely stacked along both side walls, with a central aisle approximately 0.4m wide. The cargo-obscured area accounts for about 68% of the total volume of the carriage, making direct measurement impossible with single-point sensors. The mesh is generated using uniform hexahedral elements of 10cm, resulting in approximately 180,000 mesh nodes. Based on the temperature change rate during transportation, the transient heat conduction equation is solved, outputting a temperature distribution matrix covering the entire field. Figure 2 As shown, the overall temperature distribution inversion results indicate that there is a locally elevated temperature area in the central part of the cargo stacking and shielding area, with an estimated maximum temperature of 9.3℃, exceeding the set upper limit by 1.3℃. The reading of the nearest physical sensor was only 7.8°C, which is below the warning threshold. This indicates that relying solely on physical sensors is insufficient to detect the temperature anomaly in this area. In this case, the full-field inversion of the finite element model played a crucial role.
[0094] In step S03, the posterior state estimation vector is input into the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model. The specific structure of this model is as follows: the input layer receives a three-dimensional tensor of shape (32, 60, 8), with a batch size of 32, a time window of 60 steps, and a feature dimension of 8 (containing 8 channels: temperature, humidity, triaxial vibration acceleration components, and latitude and longitude coordinates). A pre-orthogonal decoupling module performs singular value decomposition on the input covariance matrix, extracting the first 6 principal component directions as the decoupling basis, projecting the 8-dimensional features into a 6-dimensional orthogonal subspace representation, and eliminating the linear correlation between humidity and temperature and vibration acceleration components. The gated routing layer is a two-layer fully connected network with a hidden layer dimension of 32 and an output dimension of 8 (corresponding to 8 expert subnetworks). The highest-scoring model is retained after an upper-side suppression operation. One expert. The comprehensive state index in this embodiment. The weights are set to , , Parameters for the number of experts activated in accordance with The range dynamically switches between three levels: 2, 3, and 6, with a low state threshold. Set to 0.3, the threshold for the middle state. The value is 0.6. After detecting that the temperature in the shielded area is too high, Rising to 1.8 , The calculated result is 0.71, which exceeds... Trigger the maximum number of activations The gating score of the expert subnetwork handling abnormal states is forcibly increased, and the model switches to high-precision inference mode. Each expert subnetwork consists of 4 layers of locally asymmetric gated recurrent units stacked together, with a forward time step parameter of 3 and a back-feedback time step parameter of 1. The weighted summation of each expert's output enters a multi-level residual dense jump module with 8 hidden layers. Cross-layer jump connections cover the intervals of 2, 4, and 8 layers, respectively. The loss function includes a mean squared error term, a gating load balancing penalty term, and a temperature physical conservation constraint term, with an upper bound of 0.112 for the conservation constraint. .like Figure 3As shown, during the normal operation of the chiller unit, as the temperature deviation of the shaded area increases from the residual, the number of experts activated by the gated routing layer gradually increases from 2 to 6. The number of activated experts and the temperature residual show a monotonically positive correlation. This trend reflects the physical driving logic of the sparse activation mechanism: the larger the residual, the more complex the abnormal features, and the more expert sub-networks are needed for collaborative processing, so that the prediction accuracy can be fully guaranteed under abnormal conditions.
[0095] In step S04, the cargo type in this embodiment is pharmaceuticals, which falls under the category of a few-sample scenario. The meta-learning cross-domain adaptive transfer mechanism extracts 12 time-series samples from historical pharmaceutical transportation records as a support set. These samples are then used by the encoder network to generate a task embedding vector with a dimension of 16, which serves as the auxiliary input to the gating routing layer. Through a 5-step gradient meta-update, the model's internal parameters are rapidly adjusted, and the root mean square error of the adapted model on the pharmaceutical validation set is reduced to 0.31. Compared to directly using an unadapted fresh produce model (root mean square error of 0.89), The prediction accuracy improved significantly, validating the effectiveness of cross-domain adaptation with few samples. The partition ratio of the training dataset is shown in Table 1.
[0096] Table 1. Statistics on the Partitioning of Training Datasets
[0097]
[0098] In step S05, the 24 sensor data streams are processed in parallel on a quad-core processor, using a functional concurrent programming paradigm based on immutable data structures. Each sensor data stream corresponds to an independent processing thread; threads do not share any mutable state, and data objects cannot be modified after creation. A read-write lock separation mechanism ensures that concurrent reading of the shared memory buffer by multiple threads does not cause blocking; while the write thread has exclusive access, other read threads are suspended and waiting. Memory barrier instructions ensure that the cache write-back order of each core is consistent with the program logic order. Figure 4 As shown, under 4-core parallel processing conditions, as the number of concurrent threads increases from 1 to 24, the overall data processing latency remains within a stable range, and no latency jitter caused by race conditions occurs, verifying the effectiveness of the functional concurrent programming paradigm in eliminating multi-threaded shared state race conditions.
[0099] In step S06, based on the full-process temperature prediction sequence output in step S03, this embodiment detects that the predicted temperature value of the sheltered area continuously exceeds the upper limit of 8°C in the 4th hour of transportation, triggering a level 3 alarm. The warning command is uploaded to the cloud monitoring platform via an encrypted communication protocol. The overall temperature distribution matrix, expert activation status, and warning records are all persistently stored. The temperature prediction errors during key periods of the transportation process are shown in Table 2.
[0100] Table 2. Statistical table of root mean square error of temperature prediction for each time period
[0101]
[0102] As can be observed from Table 2, during the transition from normal to abnormal temperature conditions, the number of activated experts increases with the increase of the deviation residual, while the root mean square error of prediction does not increase significantly due to the state transition, remaining at 0.34. The technical reason for this trend is as follows: the gated residual scaling mechanism directly maps the filtering residuals of physical sensors to expert activation priorities, enabling the model to instantly call more expert subnetworks to participate in prediction when it senses an increase in temperature deviation, thus compensating for the decrease in prediction accuracy caused by insufficient parameter capacity in traditional single models under abnormal conditions; the physical conservation constraint ensures that the predicted temperature change rate never exceeds... This constrains the rationality of the prediction sequence from the perspective of physical feasibility, and avoids the generation of physically unexplainable extreme prediction values by the data-driven model under abnormal conditions.
[0103] The equivalent neural network structure that can replace the sparse gated expert routing spatiotemporally heterogeneous temperature sensing model in the main scheme of this invention is as follows. Alternative structure one is a combination of a temporal convolutional network and a hybrid expert structure: the input three-dimensional tensor is processed by the causal convolutional layers of the temporal convolutional network to extract local temporal features; the receptive fields of multiple dilated causal convolutional layers cover different time scales; the output feature sequence is distributed to each expert sub-network via a fully connected gated network; the weighted fusion of the expert outputs is followed by residual connections to output the predicted sequence; the loss function and feature extraction dimension of this structure are consistent with the main scheme, the input is a three-dimensional tensor (batch, time step, feature dimension), and the output is a temperature prediction sequence. This is an equivalent replacement that can be implemented by those skilled in the art without creative effort. The second alternative structure is a combination of a multi-head self-attention mechanism and a hybrid expert structure: the input 3D tensor is positionally encoded and then enters the multi-head self-attention layer. Each attention head extracts the dependencies between different time steps in parallel. The attention output is mapped by a feedforward network and used as the input of the gated routing layer. The gated routing layer activates the corresponding expert sub-network based on the temperature deviation residual. The outputs of each expert are weighted and summed, and then normalized by the layer to output the prediction result. This structure also uses a composite loss function of mean square error plus physical conservation constraints, and the input and output data flow is completely consistent with the main scheme.
[0104] It should be noted that the variables involved in this invention are explained in detail in Table 3.
[0105] Table 3. Variable Explanation Table
[0106]
[0107] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things, characterized in that, Includes the following steps: A sparse sensor node array is deployed inside the cold chain transport compartment to collect temperature, humidity, vibration acceleration and global positioning coordinate data. The raw sampled data is pre-filtered by an adaptive exponential decay sliding window Kalman fusion algorithm to output a posterior state estimation vector. Using filtered sparse measured temperature points as boundary conditions, a virtual sensor grid is constructed based on the finite element thermodynamic interpolation model to invert the temperature distribution throughout the carriage and cover the blind spot temperature anomaly detection in the cargo stacking and shielding area. The posterior state estimation vector is input into the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model. After the orthogonal decoupling module eliminates the linear correlation between channels, the gated routing layer activates the expert sub-network based on the current temperature deviation residual and outputs the full temperature prediction sequence. For different types of goods, a meta-learning cross-domain adaptive transfer mechanism is adopted to quickly adjust the internal parameters of the spatiotemporally heterogeneous temperature sensing model of sparse gating expert routing using task embedding vectors, requiring only a small number of new scene samples to complete domain adaptation. When processing multi-sensor data streams in parallel, a functional concurrent programming paradigm based on immutable data structures is adopted, combined with read-write lock separation and memory barrier instructions to eliminate multi-threaded shared state contention. Based on the comparison results between the temperature prediction sequence and the set threshold, a graded early warning command is triggered, and the temperature distribution of the entire venue, the activation status of experts, and the early warning records are simultaneously uploaded to the cloud monitoring platform.
2. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 1, characterized in that, The adaptive exponential decay sliding window Kalman fusion algorithm specifically involves: initializing the state vector to the sensor's first reading and initializing the covariance matrix to the identity matrix multiplied by the empirical noise variance; dynamically adjusting the process noise covariance based on the time interval when each new observation arrives; executing the Kalman prediction step to calculate the predicted state and predicted covariance; introducing adaptive exponential decay weights to calculate the weighted average of the current observation and several historical observations; correcting the innovation term in the Kalman update step with the weighted average and then performing the a priori state estimation.
3. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 2, characterized in that, The exponential decay coefficient in the adaptive exponential decay weight Estimated from the current rate of temperature change Adaptive adjustment: when When it is not lower than the rapid change rate threshold, Take the smaller value; when When below the rapid rate of change threshold, Take the larger value.
4. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 3, characterized in that, The posterior state estimation vector is directly used as the input feature of the sparse gated expert routing spatiotemporal heterogeneous temperature sensing model gating network. The gating score is scaled by the absolute value of the filtered temperature residual, realizing the linkage between physical filtering and neural routing.
5. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 4, characterized in that, The finite element thermodynamic interpolation model takes the geometry of the carriage, the stacking distribution of the cargo, and the boundary cooling power as input parameters. It uses the finite element method to mesh the internal space of the carriage, and uses sparse measured temperature points as Dirichlet boundary conditions to solve the steady-state or transient heat conduction equations and output the full-field temperature distribution matrix.
6. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 5, characterized in that, The orthogonal decoupling module performs singular value decomposition on the input covariance matrix, extracts the first few principal component directions as the decoupling basis, and projects each feature channel to a mutually orthogonal subspace.
7. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 6, characterized in that, The gated routing layer is a lightweight two-layer fully connected structure with an output dimension equal to the number of experts. After the upper-side suppression operation, only the indexes of the highest-scoring experts are retained, and the routing coefficients of the remaining experts are hard-set to zero. When the temperature deviation residual exceeds the warning residual threshold, the gated score of the expert sub-network that handles the abnormal state is forcibly increased.
8. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 7, characterized in that, Each expert subnetwork consists of locally asymmetric gated recurrent units, with the forward state update step size being 3 times the backward feedback step size. The outputs of each expert are weighted, summed, and fused before entering a multi-level residual dense jump module. The output of each hidden layer is directly injected into deep nodes at distances of 2, 4, and 8 layers through a cross-layer jump connection matrix.
9. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 8, characterized in that, The loss function adds a gated load balancing penalty term and a temperature physical conservation constraint term to the standard mean square error. The temperature physical conservation constraint term requires that the rate of temperature change between adjacent time points predicted by the network does not exceed the maximum cooling physical rate of the refrigeration equipment. The maximum cooling physical rate is calculated based on the cargo hold volume and the rated power of the refrigeration unit.
10. The method for real-time temperature monitoring throughout the cold chain transportation process based on the Internet of Things as described in claim 9, characterized in that, The core of the meta-learning cross-domain adaptive transfer mechanism is: in the meta-training stage, multiple known cargo types are used as a task set, and the training model learns the meta-parameter initialization points that are sensitive to task distribution. The task embedding vector is generated by mapping a small number of new scene support samples through the encoder network. It serves as an auxiliary input to the gating routing layer, guiding the expert activation distribution to shift towards the thermal characteristics of the new cargo type.