Intelligent cargo tracking methods, devices, equipment and storage media for transport agents

By combining multi-source sensor data processing and deep learning with a federated security tracking framework, the problems of positioning accuracy and data silos in traditional cargo tracking methods in complex logistics environments are solved, achieving efficient and secure cargo tracking and route optimization.

CN119398645BActive Publication Date: 2025-11-14SICHUAN CANGLAN HONGHAN SUPPLY CHAIN MANAGEMENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411468051.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-11-14
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

Traditional cargo tracking methods suffer from problems such as insufficient positioning accuracy, data silos, inability of static route planning to adapt to dynamic changes, and contradictions between data privacy protection and information sharing in complex logistics environments, which affect transportation efficiency and safety.

Method used

By acquiring data from multiple sensor sources, synchronizing time, and processing it with Kalman filtering, combined with a deep cargo tracking network and a federated security tracking framework, feature extraction and distributed model training are performed. Spatiotemporal graph neural networks are then used for trajectory prediction and multi-objective optimization to achieve anomaly detection and path optimization.

Benefits of technology

It improves the accuracy and reliability of cargo positioning, solves the problem of data silos, promptly detects anomalies, dynamically adapts to traffic conditions, and achieves a balance between transportation time, fuel consumption, and cargo safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398645B_ABST
    Figure CN119398645B_ABST
Patent Text Reader

Abstract

This invention relates to a method, apparatus, device, and storage medium for intelligent cargo tracking in transportation agency. The method involves: acquiring multi-source sensor data from cargo and transport vehicles to obtain a raw dataset, which is then time-synchronized and Kalman filtered to obtain a fused state vector; extracting features using a deep cargo tracking network to obtain a feature vector; training a distributed model based on the feature vector to obtain a global cargo state detection model; inputting the acquired real-time dataset into the global cargo state detection model for multi-level anomaly detection processing to obtain anomaly detection results; and using a spatiotemporal graph neural network model to perform trajectory prediction and multi-objective optimization based on the anomaly detection results and historical transport routes to obtain the target transport route. The implementation of this invention enables comprehensive cargo tracking that integrates multi-source data and dynamically optimized paths to cope with complex and ever-changing logistics environments, providing more accurate, safe, and efficient cargo tracking services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cargo tracking technology, and in particular to a smart cargo tracking method, apparatus, equipment, and storage medium for transport agents. Background Technology

[0002] Traditional cargo tracking methods face numerous challenges and struggle to meet increasingly complex logistics demands. Single positioning technologies like GPS may experience signal obstruction or insufficient accuracy in certain environments, leading to inaccurate or interrupted cargo location information. Secondly, the massive amounts of data generated during large-scale cargo transportation are difficult to process and utilize effectively, hindering the timely detection of potential anomalies and security risks.

[0003] Furthermore, traditional centralized data processing methods face a conflict between data privacy protection and information sharing when dealing with complex logistics networks involving multiple parties. Data silos between various transport agents severely hinder the improvement of overall logistics efficiency. Meanwhile, static route planning methods cannot adapt to dynamically changing traffic conditions and unforeseen events, often leading to suboptimal transport decisions. These problems not only affect the efficiency and reliability of freight transport but also increase operating costs and environmental burden. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, device, and storage medium for intelligent cargo tracking in transportation agency. This invention can integrate multi-source data and dynamically optimized routes for comprehensive cargo tracking, in order to cope with complex and ever-changing logistics environments and provide more accurate, safe, and efficient cargo tracking services.

[0005] To achieve the above objectives, the present invention provides a smart cargo tracking method for transportation agents, comprising the following steps:

[0006] Multi-source sensor data is collected from goods and transport vehicles to obtain a raw dataset. The raw dataset is then time-synchronized and Kalman filtered to obtain a fused state vector.

[0007] The fused state vector is input into a deep cargo tracking network for feature extraction to obtain a feature vector that encodes cargo state feature information.

[0008] Based on the aforementioned feature vectors, a distributed model is trained using a federal security tracking framework to obtain a global cargo status detection model.

[0009] The collected real-time dataset is input into the global cargo status detection model to perform multi-level anomaly detection processing and obtain anomaly detection results.

[0010] Based on the anomaly detection results and historical transportation routes, a spatiotemporal graph neural network model is used to perform trajectory prediction and multi-objective optimization to obtain the target transportation route.

[0011] The present invention also provides a smart cargo tracking device for transportation agents, comprising:

[0012] The acquisition module is used to acquire multi-source sensor data of goods and transport vehicles to obtain a raw dataset, and to perform time synchronization and Kalman filtering on the raw dataset to obtain a fused state vector.

[0013] The extraction module is used to input the fused state vector into the deep cargo tracking network for feature extraction, thereby obtaining a feature vector that encodes cargo state feature information;

[0014] The training module is used to train a distributed model based on the feature vector using a federated security tracking framework to obtain a global cargo status detection model.

[0015] The processing module is used to input the collected real-time dataset into the global cargo status detection model, perform multi-level anomaly detection processing, and obtain anomaly detection results;

[0016] The optimization module is used to perform trajectory prediction and multi-objective optimization using a spatiotemporal graph neural network model based on the anomaly detection results and historical transportation routes, to obtain the target transportation route.

[0017] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.

[0018] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described above.

[0019] In summary, the technical solution provided by this invention significantly improves the accuracy and reliability of cargo positioning by integrating data from multiple sensors such as temperature, humidity, acceleration, air pressure, GPS, and IMU, combined with time synchronization and Kalman filtering, effectively overcoming the limitations of single positioning technologies. The use of a deep cargo tracking network for feature extraction effectively captures the complex spatiotemporal features of cargo status, providing high-quality feature representations for subsequent anomaly detection and trajectory prediction. The distributed model training method based on a federated secure tracking framework enables the joint construction of a global cargo status detection model while protecting the data privacy of each transport agent, effectively solving the data silo problem. Through multi-level anomaly detection mechanisms such as isolated forests, local anomaly factors, and support vector machines, various anomalies can be detected and accurately classified in a timely manner, greatly improving the safety of cargo transportation. The use of a spatiotemporal graph neural network model for trajectory prediction and multi-objective optimization can dynamically adapt to complex traffic conditions and emergencies, achieving a comprehensive balance between transportation time, fuel consumption, and cargo safety. This invention has good scalability, allowing for flexible adjustment of model parameters and algorithm configurations according to actual needs, making it suitable for cargo transportation scenarios of different scales and types. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the steps of a smart cargo tracking method for transport agents in one embodiment of the present invention;

[0021] Figure 2 This is a structural block diagram of a smart cargo tracking device for transportation agents according to an embodiment of the present invention;

[0022] Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0023] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

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

[0025] Reference Figure 1 This embodiment provides a smart cargo tracking method for transportation agents, including the following steps:

[0026] S1: Collect multi-source sensor data from goods and transport vehicles to obtain the raw dataset, and perform time synchronization and Kalman filtering on the raw dataset to obtain the fused state vector;

[0027] The system incorporates temperature, humidity, acceleration, and barometric pressure sensors installed on the cargo to collect data in real time, tracking temperature changes, humidity levels, motion status, and barometric pressure during transport to obtain cargo status data. Simultaneously, a Global Positioning System (GPS) receiver, Inertial Measurement Unit (IMU), and On-Board Diagnostics (OBD) system are installed on the transport vehicle to acquire information such as the vehicle's geographical location, speed, acceleration, attitude angle, and mechanical status, forming vehicle position and status data. A communication link between the cargo and the transport agent is established using Low-Power Wide-Area Network (LPWAN) technology. LWAN technology offers long-distance transmission, low power consumption, and high-efficiency data transmission capabilities, enabling real-time data transmission to the transport agent system as cargo and vehicle status data change, ensuring data timeliness and reliability. To reduce network load and improve data processing efficiency during data transmission, edge computing technology is introduced to process the transmitted data in real time. Edge computing processing includes data cleaning, outlier detection, and data compression. Data cleaning removes redundant and erroneous data, outlier detection identifies sudden changes or anomalies, and data compression reduces the amount of data transmitted, resulting in preprocessed data. The collected cargo status data, vehicle location and status data are then standardized along with the preprocessed data. Data of different types and sources are converted into a unified format and dimension to facilitate subsequent processing and fusion, forming the original dataset. The original dataset undergoes time synchronization to ensure precise alignment of data collected by various sensors on the timeline, accurately reflecting the status of cargo and vehicles at the same point in time. A Kalman filter algorithm is applied to filter the synchronized data. Kalman filtering is a recursive filtering algorithm that effectively utilizes the system's dynamic model and the statistical characteristics of measurement noise to smooth and optimize data estimation, reducing the impact of sensor noise, and ultimately obtaining the fused state vector.

[0028] The process involves extracting timestamps from each data point in the original dataset to form a timestamp sequence. This sequence is used to determine the correspondence of each data point on the time axis. Based on the extracted timestamp sequence, linear interpolation is performed on the original dataset to obtain a synchronized dataset. Linear interpolation fills in time gaps during data acquisition, aligning data from different sensors to a unified time scale, ensuring comparability of all data points in the synchronized dataset at the same time scale. Data registration is then performed on the Global Positioning System (GPS) data and Inertial Measurement Unit (IMU) data in the synchronized dataset, effectively matching and fusing spatiotemporal information from different sources to obtain an accurate initial state vector. The registration process considers the consistency of GPS and IMU data in spatial coordinate systems and time dimensions, employing algorithms based on coordinate transformation and time alignment to eliminate systematic errors between sensors. The resulting initial state vector contains information such as the vehicle's position, velocity, and attitude at a given moment. This initial state vector is then input into a pre-defined Kalman filter model for state prediction. Kalman filtering is a state estimation algorithm that predicts the future state of a system by utilizing its state transition model and measurement model. The state prediction process is based on the state estimate from the previous moment and the system's dynamic model, resulting in a predicted state vector describing the estimated state of the vehicle at the current moment. Based on the predicted state vector and observation data from the synchronous dataset, the weights for state updates are determined by calculating the Kalman gain matrix. The Kalman gain matrix finds an optimal weighting coefficient between the predicted state and the observation data, minimizing the mean square error of the state estimation. The observation residual, i.e., the deviation between the observed data and the predicted state, is calculated and multiplied by the Kalman gain matrix to obtain a correction, which is then used to update the predicted state vector, resulting in the posterior state vector. The posterior state vector is then fused with cargo state data from the synchronous dataset. Cargo state data includes information such as temperature, humidity, acceleration, and air pressure, reflecting the current state of the cargo. Through data fusion technology, vehicle state information and cargo state information are comprehensively processed to obtain a more comprehensive integrated state vector. The integrated state vector is then input into a preset data smoother for noise suppression. Data smoothers typically employ low-pass filtering or adaptive filtering to eliminate high-frequency noise and short-term fluctuations in the state vector, resulting in a smoother and more accurate fused state vector.

[0029] S2, input the fused state vector into the deep cargo tracking network for feature extraction to obtain a feature vector that encodes cargo state feature information;

[0030] Specifically, the fused state vector is input into a one-dimensional convolutional layer in the deep cargo tracking network for processing. This one-dimensional convolutional layer is used to extract local temporal features. The one-dimensional convolutional layer consists of three one-dimensional convolutional sub-layers, each with a different number of output channels: 64, 128, and 256. All sub-layers have a kernel size of 5, a stride of 1, and a padding setting of 2. This setting ensures that boundary information is not lost during convolution, while simultaneously extracting local temporal features from the input state vector through convolution operations to generate an initial feature map. Max pooling is then performed on the initial feature map to downsample it. The main purpose of max pooling is to reduce the spatial dimensionality of the feature map, reducing the amount of data while preserving salient features. The max pooling layer is configured with a kernel size of 2 and a stride of 2, meaning that as the pooling operation slides across the input feature map, it takes the maximum value every two elements, resulting in a downsampled feature map. The downsampled feature map is then input into a Long Short-Term Memory (LSTM) network layer for temporal dependency modeling. LSTM networks can capture long-term dependencies, making them suitable for processing time series data. The Long Short-Term Memory (LSTM) network layer consists of two bidirectional LSTM layers, each with 512 hidden units. The bidirectional LSTM considers both sequential dependencies in the time series, allowing the network to learn temporal features from two directions. After processing by the two bidirectional LSTM layers, the resulting temporal feature vector effectively encodes the temporal dependencies of state changes during cargo transportation. A self-attention mechanism is then applied to the temporal feature vector. This mechanism calculates the importance of each temporal feature in the entire sequence by computing an attention weight matrix. The self-attention layer includes a query matrix, a key matrix, and a value matrix, each with a dimension of 512x512. The attention mechanism calculates the importance weight of each temporal feature to other features through the inner product of the query and key matrices, and then applies these weights to the value matrix to obtain a weighted temporal feature vector. The weighted temporal feature vector is then input into a multi-head attention layer for multi-scale feature extraction. The multi-head attention mechanism consists of eight attention heads, each with a dimension of 64. This structure enables independent modeling of temporal features at different scales and in different contexts, extracting more diverse feature representations. After processing by the multi-head attention layer, a multi-head attention feature vector is obtained. Based on the multi-head attention feature vector, residual connections and layer normalization are performed. Residual connections directly add the input to the output, helping to alleviate the gradient vanishing problem in deep networks, while layer normalization normalizes the features, maintaining the stability of the feature distribution and obtaining a normalized feature vector. The normalized feature vector is then input into a feedforward neural network layer for nonlinear transformation. The feedforward neural network layer consists of two fully connected layers: the first layer has 2048 neurons, and the second layer has 512 neurons, with ReLU activation function.The first layer expands the feature space with a large number of neurons, while the second layer compresses the feature space by reducing the number of neurons. The ReLU activation function adds non-linearity, enabling the network to better fit complex feature relationships. Dropout is applied to the transformed feature vector to avoid overfitting. Dropout randomly discards a portion of neurons, allowing the network to learn more robust feature representations during training, resulting in a regularized feature vector. This regularized feature vector is then input into a fully connected layer for feature dimensionality reduction and fusion. The fully connected layer is a linear transformation with an input dimension of 512 and an output dimension of 256. Mapping the high-dimensional feature vector to a low-dimensional space preserves the most important feature information while reducing computational complexity and storage requirements. The softmax activation function is then applied to the dimensionality-reduced low-dimensional feature vector for feature normalization. Softmax maps each element of the feature vector to the range (0,1), with the sum of all elements being 1, forming a probability distribution. Through normalization, the final feature vector accurately encodes the feature information of the cargo's state.

[0031] S3, based on feature vectors, uses a federated security tracking framework to perform distributed model training to obtain a global cargo status detection model;

[0032] It's important to note that the transportation agents participating in the training are divided into multiple federated learning clients. Each client represents an independent transportation agent node, storing its local data and feature vectors. This data includes cargo status information collected by the client, vehicle location data, and feature vectors extracted by the deep cargo tracking network. Storing data locally protects data privacy and reduces the risk of data leakage by eliminating the need to upload raw data to a central server. In the initial phase of distributed training, a global cargo status detection model is initialized on the central server. This model consists of two parts: a shared layer and a private layer. The shared layer consists of three fully connected layers with 512, 256, and 128 neurons, each with a ReLU activation function. These shared layers are used to share information among all clients and extract global cargo status features. The private layer consists of two fully connected layers with 64 and 32 neurons, each with a Sigmoid activation function. The private layer handles the specific data of each client, ensuring the consistency of the global model while better adapting to the local data characteristics of each client. The central server distributes the shared layer parameters of the global cargo status detection model to all clients. After receiving the initial parameters of the shared layer, each client updates its model by combining local data and feature vectors. To protect data privacy, differential privacy processing is applied to each client's local feature vectors to prevent the inference of real information during training. This differential privacy processing method uses Laplace noise with a noise parameter ε set to 0.1. This adds randomness to the original feature vectors, effectively protecting the privacy of the original data while maintaining the validity of the feature vectors. The client inputs the privacy-protected feature vectors into its local model for forward propagation, obtaining the local prediction result. The local prediction result represents each client's prediction of the cargo status or transportation situation based on its own data and features. Based on the local prediction result and the client's local label data, the client calculates a loss function, which reflects the difference between the prediction and the actual situation. Backpropagation is used to update the local model parameters. Through backpropagation, the parameters of both the shared and private layers in the local model are updated, forming the updated local model. To integrate the model information from each client globally, each client securely aggregates the shared layer parameters of its updated local model. Secure aggregation employs an encrypted method to aggregate shared layer parameters without exposing the actual parameters of each client. The aggregated shared layer parameters reflect the shared information of each client. The central server receives the aggregated shared layer parameters and uses them to update the shared layer of the global cargo status detection model. After the global model is updated, anomaly detection is performed.During distributed training, individual clients may update parameters abnormally due to data quality issues or other reasons. If these abnormal updates are not removed, they will affect the performance of the global model. The central server performs anomaly detection on the updated global model. By comparing the model update amounts from each client with the trend of the global model's changes, it removes abnormal updates that significantly deviate from the normal range, resulting in an optimized global model. This entire process is repeated between the central server and each client. From distributing the shared layer parameters of the global model to the clients, to each client performing local training, and then to securely aggregating the shared layer parameters and updating the global model, this series of steps is continuously executed until the model converges or reaches the preset number of iterations. Model convergence means that the performance of the global cargo state detection model has stabilized. After training, the final global cargo state detection model can effectively reflect the state changes of cargo during transportation and has strong generalization ability, making it applicable in various transportation scenarios.

[0033] S4. Input the collected real-time dataset into the global cargo status detection model to perform multi-level anomaly detection processing and obtain anomaly detection results.

[0034] Specifically, the collected real-time dataset undergoes preprocessing, including data cleaning, standardization, and normalization. Data cleaning removes noise, duplicate values, and missing values ​​to ensure data quality. Standardization then converts data with different characteristics to a uniform scale to eliminate dimensional differences. Normalization maps the standardized data to the [0,1] interval to improve the model's sensitivity and stability. After preprocessing, the resulting real-time dataset is input into the shared layer of the global cargo status detection model to extract shared feature vectors, which contain global cargo status information. These shared feature vectors are then input into the private layer for personalized feature extraction, resulting in private feature vectors. These private feature vectors primarily reflect the unique data patterns of individual clients. A weighted summation method is used to fuse the shared and private feature vectors in a 7:3 ratio, yielding a fused feature vector. This fused feature vector is then input into the Isolation Forest algorithm for primary anomaly detection. The Isolation Forest algorithm constructs multiple random trees to calculate the isolation level of each data point, resulting in a primary anomaly score. The number of trees is set to 100, and the sampling size is 256. Based on the initial anomaly score, data anomalies are determined. For data points marked as anomalous, secondary anomaly detection is performed to further determine the degree of anomaly. Secondary anomaly detection, based on more complex feature combinations, yields secondary anomaly scores. These scores are then input into a support vector machine (SVM) classifier for refined classification, resulting in anomaly type labels. The SVM employs a radial basis function kernel with a penalty parameter C set to 1.0. This method distinguishes different types of anomalies and assigns a specific anomaly label to each data point. Cluster analysis is then performed on the obtained anomaly type labels to identify clusters of anomaly patterns in the data. These anomaly pattern clusters reveal the inherent relationships between different anomalies. Based on the anomaly pattern clusters and a pre-defined risk level matrix, a comprehensive risk score is calculated. The risk level matrix defines the risk level of different anomaly patterns. By combining the anomaly pattern clusters and risk levels, a comprehensive risk score for each pattern cluster is calculated. The comprehensive risk score, as the result of multi-level anomaly detection, provides a reference for risk management during cargo transportation, helping decision-makers take appropriate measures to reduce transportation risks.

[0035] S5. Based on the anomaly detection results and historical transportation routes, a spatiotemporal graph neural network model is used to perform trajectory prediction and multi-objective optimization to obtain the target transportation route.

[0036] The process involves spatiotemporal encoding of historical transportation routes. The road network is represented as a graph structure, where nodes represent intersections and edges represent road segments. This graph structure effectively captures the topological relationships within the transportation network. This representation constructs an initial spatiotemporal graph containing spatial information and capable of modeling dynamic changes during transportation by incorporating a temporal dimension. Anomaly detection results are embedded as attributes into the spatiotemporal graph. These results are represented as attributes of nodes and edges, such as an accident occurring on a road segment or abnormal cargo status. This information is embedded into the nodes and edges of the spatiotemporal graph, resulting in an attribute-enhanced spatiotemporal graph. This attribute-enhanced graph better reflects the actual situation during transportation. Graph convolution operations are performed on the attribute-enhanced spatiotemporal graph, and ChebNet is used for feature extraction. ChebNet is a graph convolutional network based on Chebyshev multinomials, which aggregates features from neighboring nodes using multinomial filters on the graph to extract local spatial features. ChebNet's multinomial order is set to 3, meaning the model can capture spatial dependencies between third-order neighbor nodes, obtaining richer local spatial features. Local spatial features are input into the graph attention layer to calculate attention weights between nodes. The graph attention layer can capture global correlation features by dynamically adjusting the weight relationships between nodes. In complex traffic networks, it identifies the road segments and intersections that have the greatest impact on the current transportation task, providing a basis for subsequent trajectory prediction. Temporal convolution operations are performed on the global correlation features, using dilated convolution to model long-term dependencies. Dilated convolution can effectively model data with long time spans by introducing intervals into the convolution kernel, extracting temporal features that reflect the changing trends and periodicity of the transportation process over time. The temporal features are then input into a gated recurrent unit (GRU) for sequence prediction. GRU is a recurrent neural network structure suitable for sequential data, effectively handling the gradient vanishing problem in long sequences. Through learning the temporal features using GRU, an initial trajectory prediction result is obtained, reflecting the transportation route and state change trends of goods under given conditions. Based on the initial trajectory prediction result, a multi-objective optimization problem is constructed. The objective functions include transportation time, fuel consumption, and cargo safety; these three objectives work together to evaluate the advantages and disadvantages of different transportation routes. Transportation time reflects route efficiency, fuel consumption relates to transportation costs and environmental impact, and cargo safety is directly related to risk control during transportation. A particle swarm optimization (PSO) algorithm is used to solve the objective function after it has been constructed. PSO is a swarm intelligence-based optimization algorithm that searches for the optimal solution in the solution space by simulating the foraging behavior of a flock of birds. Each candidate solution is treated as a particle, which continuously adjusts its position to find the optimal solution. In this way, a set of candidate transportation routes is obtained. To select the optimal transportation route, the set of candidate transportation routes is sorted using Pareto non-dominated sorting.Pareto non-dominated sorting is a multi-objective optimization sorting method that categorizes all candidate solutions based on whether they are dominated by other solutions. Solutions in the non-dominated solution set are those that are no worse than other solutions in any objective, achieving a balance among different objectives. The solution with the best overall performance from the non-dominated solution set is selected as the objective transportation route.

[0037] In one example, multi-source sensor data is collected from the cargo and transport vehicle to obtain a raw dataset. The raw dataset is then time-synchronized and Kalman filtered to obtain a fused state vector. This includes: collecting data from temperature, humidity, acceleration, and barometric pressure sensors installed on the cargo to obtain cargo status data; collecting data from the GPS receiver, inertial measurement unit, and on-board diagnostic system installed on the transport vehicle to obtain vehicle position and status data; establishing a communication link between the cargo and the transport agent using low-power wide-area network (LPWAN) technology for real-time data transmission to obtain real-time transmitted data; performing edge computing processing on the real-time transmitted data, including data cleaning, outlier detection, and data compression, to obtain preprocessed data; standardizing the cargo status data, vehicle position and status data, and preprocessed data to obtain the original dataset; and performing time synchronization and Kalman filtering on the original dataset to obtain the fused state vector.

[0038] In this example, temperature, humidity, acceleration, and barometric pressure sensors installed on the cargo collect data in real time, monitoring the cargo's environmental information and motion status during transportation. Temperature sensors monitor temperature changes in the cargo's environment to ensure transport under suitable conditions; humidity sensors monitor ambient humidity to prevent excessive moisture or dryness; acceleration sensors detect vibrations during transport to determine if severe shaking or collisions have occurred; and barometric pressure sensors measure air pressure changes at the cargo's location. Simultaneously, data is collected from the GPS receiver, inertial measurement unit (IMU), and on-board diagnostic system installed on the transport vehicle to obtain vehicle position and status data. The GPS receiver provides precise vehicle location, speed, and trajectory information, helping the transport agent monitor the vehicle's route in real time. The IMU measures vehicle acceleration and angular velocity to provide dynamic attitude data, such as whether there has been sudden braking or sharp turns, assessing safety during transport. The on-board diagnostic system acquires mechanical status information, such as engine operating status and fuel consumption, helping the transport agent understand the vehicle's health. A communication link is established using low-power wide-area network (LPWAN) technology. Low-power wide-area network (LPWAN) technology features long-distance, low-power, and high-efficiency transmission, making it suitable for data transmission needs in long-distance transportation. Through this communication link, sensor data from goods and vehicles can be transmitted in real-time to the transportation agent's backend system, enabling real-time monitoring of goods and vehicle status. Edge computing processing is performed on the real-time transmitted data, including data cleaning, outlier detection, and data compression. Data cleaning removes noise and invalid data from the sensor data. Outlier detection identifies and marks data points that deviate significantly from normal conditions, indicating anomalies in the goods or vehicle status. Data compression reduces data volume and improves transmission efficiency. After edge computing processing, preprocessed data is generated. The goods status data, vehicle location and status data, and preprocessed data are then standardized. Data from different sources and scales are converted to the same standard range, ensuring comparability in subsequent processing and yielding the original dataset. Time synchronization and Kalman filtering are then applied to the original dataset. Time synchronization ensures that data from different sensors are aligned on the same timeline. Timestamps from different data sources are aligned using interpolation or resampling methods, resulting in a time-synchronized dataset. The Kalman filter algorithm is applied to process the time-synchronized dataset to eliminate measurement noise and improve the accuracy of state estimation. Kalman filtering is a recursive state estimation algorithm that can estimate the true state of a dynamic system using the system model and measurement noise characteristics. The state update formula for Kalman filtering is as follows:

[0039] ;

[0040] in, Indicates the current time State estimates, It was the previous moment The predicted state value, It is the Kalman gain matrix. These are the observations at the current moment. It is the observation matrix. Kalman gain matrix. The calculation formula is:

[0041] ;

[0042] in, It is the covariance matrix of the predicted state. This is the covariance matrix of the observation noise. The Kalman gain matrix determines the current observation value. Weights in state updates. Using the above formula, the system's state estimate is continuously updated, making the state estimate closer to the system's true state. To better describe the dynamic changes in state, a state transition equation is used to predict the state at the next moment:

[0043] ;

[0044] in, It is the state transition matrix, which describes the system from the current time step... To the next moment The state changes are continuously refined through the aforementioned state update and prediction process, resulting in a final state vector with higher accuracy and reliability. The state vector after Kalman filtering is the fused state vector, which integrates cargo state data, vehicle location and state data, and real-time transmission data processed by edge computing.

[0045] In one example, time synchronization and Kalman filtering are performed on the original dataset to obtain a fused state vector. This includes: extracting timestamps from each data point in the original dataset to obtain a timestamp sequence, and performing linear interpolation on the original dataset based on the timestamp sequence to obtain a synchronized dataset; registering the GPS data and inertial measurement unit data in the synchronized dataset to obtain an initial state vector, and inputting the initial state vector into a preset Kalman filter model for state prediction to obtain a predicted state vector; calculating the Kalman gain matrix based on the predicted state vector and the observation data in the synchronized dataset, and updating the predicted state vector according to the Kalman gain matrix and the observation residuals to obtain a posterior state vector; fusing the posterior state vector and the cargo state data in the synchronized dataset to obtain a comprehensive state vector, and inputting the comprehensive state vector into a preset data smoother for noise suppression to obtain the fused state vector.

[0046] In this example, the timestamps of each data point are extracted from all sensor data to construct a timestamp sequence. Assume the original dataset consists of data from multiple different sensors, including GPS data, IMU data, and data from sensors for temperature, humidity, acceleration, and barometric pressure. Since the sampling frequencies of different sensors may differ, the timestamps of each data point are not entirely consistent. The timestamps are extracted from the data of each sensor to form a unified timestamp sequence. Assume the timestamp sequence is... Each of them This represents a timestamp in the dataset. Linear interpolation is performed on the original dataset based on the timestamp sequence. Linear interpolation fills in missing data points between different time points, making the data more continuous along the time axis. Suppose a sensor... and Data was collected at different times. and , and For time-varying data, linear interpolation is calculated using the following formula. Data at any given time:

[0047] ;

[0048] in, Indicates in Interpolated data at time points, and They are and Known data at time, This represents the time interval. Using this method, a synchronized dataset of all sensors at each timestamp is obtained, ensuring that the data from different sensors are aligned on the time axis. Data registration is performed on the Global Positioning System (GPS) data and Inertial Measurement Unit (IMU) data in the synchronized dataset. GPS data typically includes vehicle position information, such as latitude, longitude, and altitude, while IMU data contains vehicle acceleration and angular velocity information, such as three-axis acceleration and angular velocity. The purpose of data registration is to combine data from these two different sources to obtain the vehicle's initial state vector. Assume the initial state vector is... ,in It is the location of the vehicle. It is the speed of the vehicle. These are the vehicle's roll angle, pitch angle, and yaw angle, respectively. This information, combined, constitutes a complete state description of the vehicle at a given moment. The initial state vector... The input is fed into a pre-defined Kalman filter model for state prediction. Kalman filtering is a linear state estimation method that uses the system's state transition equations and measurement equations to predict and update the system's state. The prediction process of Kalman filtering is described by the following state transition equation:

[0049] ;

[0050] in, Indicates at time The predicted state vector, It is the state transition matrix, describing the system from state transition to state transition. Time's up Changes in state at any given moment It is a moment State estimates, It is the control matrix, which represents the effect of control inputs on the system state. These are control inputs, such as acceleration or steering wheel angle. The state transition equation is used to predict the vehicle's position at each time step. The state vector. The predicted state vector. The Kalman gain matrix is ​​calculated by comparing it with the observation data in the synchronous dataset. The Kalman gain matrix determines the weight of the observed data in the state update, and its calculation formula is as follows:

[0051] ;

[0052] in, It is the covariance matrix of the predicted state vector, representing the uncertainty of the predicted state. It is the observation matrix, which maps the state vector to the observation space. This is the covariance matrix of the observation noise, representing the uncertainty of the observation data. Kalman gain matrix. Used to balance the weights of predicted states and observed data. Utilizing the Kalman gain matrix. and observation residuals The predicted state vector is updated to obtain the posterior state vector:

[0053] ;

[0054] in, It is the updated posterior state vector. It is a moment The updated state vector combines the predicted state with the current observation data, providing a more accurate reflection of the vehicle's actual state. The posterior state vector is then fused with cargo state data from the synchronous dataset. This cargo state data includes information such as temperature, humidity, acceleration, and air pressure; this data, along with the vehicle state information, forms a comprehensive state vector. Assume the comprehensive state vector is... ,in It's temperature. It's humidity. It is triaxial acceleration. It's air pressure.

[0055] In one example, the fused state vector is input into a deep cargo tracking network for feature extraction to obtain a feature vector encoding cargo state information. This includes: inputting the fused state vector into a one-dimensional convolutional layer of the deep cargo tracking network for local temporal feature extraction to obtain an initial feature map; the one-dimensional convolutional layer consists of three one-dimensional convolutional sub-layers, each with a kernel size of 5, a stride of 1, padding of 2, and output channels of 64, 128, and 256 respectively; performing max pooling on the initial feature map to obtain a downsampled feature map; the max pooling layer consists of a pooling kernel size of 2 and a stride of 2; inputting the downsampled feature map into a long short-term memory (LSTM) network layer for temporal dependency modeling to obtain a temporal feature vector; the LSTM network layer consists of two bidirectional LSTM layers with 512 hidden units; processing the temporal feature vector using a self-attention mechanism to calculate the attention weight matrix to obtain a weighted temporal feature vector; the self-attention mechanism layer includes a query matrix, a key matrix, and a value matrix, each with a dimension of [missing information]. The multi-head attention layer (512x512) is used to input the weighted temporal feature vector for multi-scale feature extraction, resulting in a multi-head attention feature vector. The multi-head attention layer consists of eight attention heads, each with a dimension of 64. Residual connections and layer normalization are applied to the multi-head attention feature vector to obtain a normalized feature vector. This normalized feature vector is then input into a feedforward neural network layer for nonlinear transformation, yielding a transformed feature vector. The feedforward neural network layer consists of two fully connected layers: the first layer has 2048 neurons, and the second layer has 512 neurons, with ReLU activation. Dropout is applied to the transformed feature vector to obtain a regularized feature vector. This regularized feature vector is then input into the fully connected layer for feature dimensionality reduction and fusion, resulting in a low-dimensional feature vector. The fully connected layer has an input dimension of 512 and an output dimension of 256, undergoing a linear transformation. A softmax activation function is applied to the low-dimensional feature vector for feature normalization, resulting in a feature vector encoding cargo state information.

[0056] In this example, the fused state vector is input into a one-dimensional convolutional layer in a deep cargo tracking network to extract local temporal features. While the information in the state vector is continuous in the temporal dimension, the changes between different states are often non-linear. Using a one-dimensional convolutional network can effectively extract local features from these time-series data. The one-dimensional convolutional layer contains three one-dimensional convolutional sub-layers, each with a kernel size of 5, a stride of 1, and padding of 2. These parameter settings allow the convolutional operation to cover a longer time window while maintaining the same sequence length for both input and output. A kernel size of 5 means that each convolutional operation considers the state at the current time point and the two time points before and after it, enabling the extraction of richer local temporal features. Padding of 2 ensures that the output time series length remains consistent with the input, preventing shortening due to boundary effects. The three convolutional sub-layers have 64, 128, and 256 output channels, respectively, indicating that each sub-layer can extract 64, 128, and 256 different feature maps. The gradually increasing number of output channels captures increasingly complex temporal features. After processing by a one-dimensional convolutional layer, an initial feature map is obtained, which retains the local temporal dependencies of the input state vector. To reduce the dimensionality and redundant information of the feature map, max pooling is performed on the initial feature map. Max pooling is a downsampling method that replaces the information of a local region with the maximum value, effectively reducing the amount of data while retaining salient features. The max pooling layer has a kernel size of 2 and a stride of 2, and the pooling operation slides two time steps at a time, halving the size of the output feature map. The downsampled feature map is then input into a Long Short-Term Memory (LSTM) network layer for temporal dependency modeling. LSTM is a recurrent neural network (RNN) structure capable of handling long-term dependencies, suitable for modeling time series data. Two bidirectional LSTM layers are used, with 512 hidden units in each layer. Bidirectional LSTM can simultaneously consider the context of the time series, that is, it considers not only the influence of past states on the present but also the reverse influence of future states. This allows the temporal feature vector to comprehensively reflect the dynamic change patterns in the time series data. Suppose that at a certain point in time, the state changes of goods have strong contextual dependencies; for example, a rapid change in temperature may be related to a change in acceleration. Bidirectional LSTM captures this complex relationship, thus extracting a more meaningful temporal feature vector. The temporal feature vector is input into a self-attention mechanism layer to calculate the dependencies between different time points in the sequence, and the weights are dynamically adjusted to focus on important time points. The self-attention mechanism includes a query matrix, a key matrix, and a value matrix, each with a dimension of 512x512. Let the query matrix be... The key matrix is The value matrix is The formula for calculating attention weights is:

[0057] ;

[0058] in, The dimension of the key vector is 512. The formula first calculates... and The dot product, then divided by After normalization, the softmax function is applied to obtain the attention weight matrix, which represents the similarity between different time points in the sequence. Then, the attention weight matrix and the value matrix are... Multiplying these results in a weighted temporal feature vector. An attention mechanism adaptively identifies the most relevant time points throughout the time series, and their features are weighted and aggregated to obtain a more focused feature representation. This weighted temporal feature vector is then input into a multi-head attention layer for multi-scale feature extraction. The multi-head attention layer consists of eight attention heads, each with a dimension of 64. The formula for the multi-head attention mechanism is as follows:

[0059] ;

[0060] in, Attention It is the weight matrix of different attention heads. This is the output weight matrix. Multi-head attention mechanisms can extract diverse features from different subspaces and concatenate them to capture multi-scale correlation features of time series. To avoid gradient vanishing and model degradation, residual connections and layer normalization are applied to the multi-head attention feature vectors. Residual connections directly add the input and output, effectively alleviating the gradient vanishing problem in deep networks. Layer normalization normalizes each feature vector, enabling the model to converge more stably during training, resulting in normalized feature vectors. These normalized feature vectors are then input into a feedforward neural network layer for non-linear transformation. The feedforward neural network layer consists of two fully connected layers: the first layer has 2048 neurons, and the second layer has 512 neurons, with the ReLU activation function. The ReLU activation function is defined as follows:

[0061] ;

[0062] Negative input values ​​are truncated to zero, introducing nonlinearity and increasing the model's expressive power. After this nonlinear transformation, a transformed feature vector is obtained. To prevent overfitting, dropout is performed on the transformed feature vector, randomly setting the output of some neurons to zero, thus improving the model's generalization ability and yielding a regularized feature vector. This regularized feature vector is then input into a fully connected layer for feature dimensionality reduction and fusion. The fully connected layer has an input dimension of 512 and an output dimension of 256. A linear transformation reduces the high-dimensional feature vector to a lower-dimensional space, as shown in the following formula:

[0063] ;

[0064] in, It is a low-dimensional feature vector. It is a weight matrix. It is the input regularized feature vector. This is the bias term. Through linear transformation, the dimensionality of the features is reduced, retaining the most important feature information. The softmax activation function is applied to the low-dimensional feature vector for feature normalization. The softmax function transforms the input feature vector into a probability distribution, where each element's value is between 0 and 1, and the sum of all elements is 1. The formula is as follows:

[0065] ;

[0066] in, It is the th in the eigenvector One element, It is a natural constant. After being normalized by softmax, a feature vector encoding the cargo status information is obtained.

[0067] In one example, a global cargo status detection model is trained using a federated security tracking framework based on feature vectors. The process includes: S1: Dividing the participating transport agents into multiple federated learning clients, each client storing local data and feature vectors; S2: Initializing the global cargo status detection model on a central server. This model includes a shared layer and a private layer. The shared layer consists of three fully connected layers with 512, 256, and 128 neurons, using ReLU activation; the private layer consists of two fully connected layers with 64 and 32 neurons, using Sigmoid activation; S3: Distributing the shared layer parameters of the global cargo status detection model to all clients; S4: Performing differential privacy processing on the local feature vectors of each client to obtain privacy-preserving feature vectors. The processing involves adding Laplacian noise, with the noise parameter ε set to 0.1; S5: Input the privacy-preserving feature vector into the client's local model, perform forward propagation calculation, and obtain the local prediction result; S6: Calculate the loss function based on the local prediction result and the client's local label data, and update the local model parameters using the backpropagation algorithm to obtain the updated local model; S7: Securely aggregate the shared layer parameters of the updated local model to obtain the aggregated shared layer parameters; S8: Send the aggregated shared layer parameters to the central server to update the shared layer of the global cargo status detection model; S9: Perform anomaly detection on the updated global cargo status detection model, remove abnormal updates, and obtain the optimized global model; S10: Repeat steps S3 to S9 until the model converges or reaches the preset number of iterations to obtain the global cargo status detection model.

[0068] In this example, the transportation agents participating in the training are divided into multiple federated learning clients. Each client represents a transportation agent node, storing and managing local cargo status data and feature vectors. This data includes information such as temperature, humidity, location, and vehicle status during transportation. Each client's data is private and cannot be directly shared with other clients. This partitioning method enables federated learning to achieve joint training of models without centralized data storage, protecting the data privacy of each transportation agent. In the initial stage of the federated learning framework, a global cargo status detection model is initialized on the central server. This model consists of two parts: a shared layer and a private layer. The shared layer is used to extract common features from the data of all clients, while the private layer performs feature extraction and processing on the personalized data of each client. The shared layer consists of three fully connected layers with 512, 256, and 128 neurons, respectively, each using the ReLU activation function. The expression for the ReLU activation function is as follows:

[0069] ;

[0070] in, This represents the activation value of the input neuron. The ReLU activation function effectively introduces non-linearity and maintains consistency between input and output on the positive half-axis, thereby enhancing the model's expressive power. The shared layer helps extract common features among all clients, such as cargo status and general patterns during transportation. The private layer consists of two fully connected layers with 64 and 32 neurons respectively, using the Sigmoid activation function. The expression for the Sigmoid activation function is as follows:

[0071] ;

[0072] The Sigmoid function maps input values ​​to the range [0,1] and interprets the output as a probability. This design allows the private layer to better handle the unique data features of each client, such as the cargo status change patterns of a transport agent under specific conditions. Through this structure, the private layer can capture the unique details of each client without being interfered with by data from other clients. After initialization, the central server distributes the shared layer parameters of the global cargo status detection model to all clients. Each client, after receiving the initial parameters of the shared layer, trains its model using its own local data and feature vectors. Since each client's data is private, directly using this data for training carries the risk of data leakage; therefore, differential privacy processing is applied to the local feature vectors. Differential privacy processing involves adding noise to the feature vectors to mask the true information of the original data. Specifically, a Laplace noise mechanism is used, with the following formula:

[0073] ;

[0074] in, Represents the original feature vector. It is a noise vector that follows a Laplace distribution, and its probability density function is:

[0075] ;

[0076] in, This is a noise parameter, indicating the strength of privacy protection. (Setting) This means the noise level is moderate, effectively masking the original data without excessively interfering with the model's training performance. Differential privacy processing yields privacy-preserving feature vectors. This involves adding random noise to each original feature value to protect data privacy. The privacy-preserving feature vector is then input into the client's local model for forward propagation calculations to obtain the local prediction result. The forward propagation process involves sequentially passing the input data through each layer of the model, progressively calculating the model's output. Assume the parameters of the local model are... The local prediction results are expressed as follows:

[0077] ;

[0078] in, These are the predictions from the local model. This represents the forward propagation function of the model. These are the model parameters. The forward propagation process maps the input feature vector to the output value of the cargo state detection. Based on local prediction results... and local tag data on the client Calculate the loss function. The loss function reflects the difference between the model's predicted values ​​and the actual values. The loss function uses the mean squared error, and its formula is as follows:

[0079] ;

[0080] in, Indicates the number of samples. It is the first The predicted value for each sample, It is the first The true labels of each sample. By minimizing the loss function... Find the parameters that make the predicted value as close as possible to the true value. After calculating the loss function, the client uses backpropagation to update the parameters of the local model. Backpropagation updates the parameters by calculating the gradient of the loss function with respect to the model parameters and then updating the parameters along the negative direction of the gradient. The update formula for gradient descent is as follows:

[0081] '

[0082] in, These are the updated model parameters. It's the learning rate, which controls the step size for updating parameters. It is the loss function relative to the parameters The gradient. Through multiple iterations, the model parameters... The process will gradually optimize to minimize the loss function. After each client completes its local model update, it sends the updated shared layer parameters to the central server. To protect client privacy, a secure aggregation technique is used to aggregate the shared layer parameters. Secure aggregation performs a weighted average of all client parameters without exposing the specific parameters of each client. Assume the client... The shared layer parameters are The parameters of the aggregated shared layer are:

[0083] ;

[0084] in, This indicates the number of clients participating in the training. These are the aggregated shared layer parameters. The aggregated shared layer parameters are sent to the central server to update the shared layer parameters of the global cargo status detection model. After the shared layer parameters are updated, the central server performs anomaly detection on the global model, identifying and removing abnormal client updates, such as those caused by data quality issues or malicious attacks. Anomaly detection is performed using statistical methods, such as detecting deviations in parameter updates or judging through model performance metrics. If there are no abnormal updates, or after removing abnormal updates, the resulting global model is used for the next training round. Steps S3 to S9 are repeated until the model converges or reaches the preset number of iterations. Model convergence means that the loss function no longer decreases significantly, and the model performance tends to stabilize. The resulting global cargo status detection model can effectively integrate data features from various clients, possessing better generalization ability and higher detection accuracy.

[0085] In one example, the collected real-time dataset is input into a global cargo status detection model for multi-level anomaly detection processing to obtain anomaly detection results. This includes: preprocessing the collected real-time dataset, including data cleaning, standardization, and normalization, to obtain a preprocessed real-time dataset; inputting the preprocessed real-time dataset into the shared layer of the global cargo status detection model for feature extraction to obtain a shared feature vector; inputting the shared feature vector into the private layer of the global cargo status detection model for personalized feature extraction to obtain a private feature vector; and fusing the shared and private feature vectors using a weighted summation method with a weight ratio of 7:3 to obtain a fused feature vector; and then... The feature vector is input into a preset isolated forest algorithm for primary anomaly detection, yielding a primary anomaly score. The number of trees in the isolated forest algorithm is set to 100, and the sampling size is set to 256. Anomaly judgment is performed based on the primary anomaly score to obtain a primary anomaly label. Secondary anomaly detection is then performed on the labeled data points to obtain a secondary anomaly score. The secondary anomaly score is input into a support vector machine classifier for refined classification, yielding anomaly type labels. The support vector machine uses a radial basis function kernel function, and the penalty parameter C is set to 1.0. Cluster analysis is performed on the anomaly type labels to obtain anomaly pattern clusters. Based on the anomaly pattern clusters and a preset risk level matrix, a comprehensive risk score is calculated to obtain the anomaly detection result.

[0086] In this example, the collected real-time dataset is preprocessed, including data cleaning, standardization, and normalization. Data cleaning removes noise, missing values, and outliers to ensure data quality. For example, during cargo transportation, temperature sensors may occasionally produce abnormally high readings due to sensor malfunctions; these readings need to be removed during cleaning. Standardization ensures that the values ​​of each feature are distributed within a relatively concentrated range, which is helpful for subsequent model training and feature extraction. The standardized data is then normalized to map to the [0,1] interval. After normalization, the data is mapped to the same range, preventing certain features from dominating the model due to excessively large value ranges. The preprocessed real-time dataset is then input into the shared layer of the global cargo state detection model for feature extraction. The shared layer consists of three fully connected layers, each with 512, 256, and 128 neurons, respectively. The shared layer is used to extract common cargo state features, such as the changing trends and relationships of features like temperature, humidity, and acceleration. The output of each fully connected layer is represented as follows:

[0087] ;

[0088] in, It is the first The output feature vector of the layer, It is the first The weight matrix of the layer, It is the first The input feature vector of the layer, It is a bias term. This is the activation function, typically the ReLU function. Through multiple nonlinear transformations in the shared layer, common features of the global cargo state are extracted, resulting in a shared feature vector. This shared feature vector is then input into the private layer of the global cargo state detection model for personalized feature extraction. The private layer consists of two fully connected layers with 64 and 32 neurons respectively, using the Sigmoid activation function. The private layer's role is to extract personalized features from the data of each client, such as feature change patterns under specific environments or cargo types. The output of the private layer is represented as:

[0089] ;

[0090] in, It is the first of the private layers The layer outputs a feature vector. It is a weight matrix. It is the output feature vector of the shared layer. It is a bias term. It is the Sigmoid activation function. The private feature vector output by the private layer contains unique cargo state features for each client. The shared and private feature vectors are then fused. Feature fusion uses a weighted summation method, summing the two feature vectors in a 7:3 weighted ratio. The formula for calculating the fused feature vector is:

[0091] ;

[0092] in, This represents the fused feature vector. They are shared feature vectors. These are private feature vectors. The resulting fused feature vector contains both global common features and individual features, better describing the overall state of the goods. The fused feature vector is then input into a pre-defined Isolation Forest algorithm for primary anomaly detection. Isolation Forest is an unsupervised anomaly detection algorithm that determines the degree of isolation of samples by constructing multiple random trees. The number of trees in the Isolation Forest algorithm is set to 100, and the sampling size is set to 256. The scoring formula for Isolation Forest is as follows:

[0093] ;

[0094] in, It is the input feature vector. This is the expected path length, representing the average segmentation depth of the feature vector within the tree. This is a standardization factor related to sample size, used to normalize scores. The algorithm determines whether a sample is an anomalous by calculating its isolation level. The output of the Isolation Forest is a primary anomaly score; a higher score indicates a sample is more likely to be anomalous. Based on the primary anomaly score, a threshold is set to determine whether a sample is anomalous, resulting in a primary anomaly label. Secondary anomaly detection is performed on the labeled data points. Secondary anomaly detection uses more complex models and feature combinations to finely identify anomalous patterns, resulting in a secondary anomaly score. The secondary anomaly score is then input into a Support Vector Machine (SVM) classifier for refined classification. A Support Vector Machine is a supervised classification method that classifies samples into different categories by finding the hyperplane with the maximum margin. The classification decision function of a Support Vector Machine is expressed as:

[0095] ;

[0096] in, It is a weight vector. It is a feature mapping function, used to map input features to a high-dimensional space. It is a bias term. Radial basis function (RBF) is used for feature mapping, and the penalty parameter... Set to 1.0 to balance the generalization ability and accuracy of the classifier. SVM can finely classify secondary anomaly scores into different anomaly type labels. Cluster analysis is performed on the anomaly type labels, aggregating similar anomaly type labels together to form multiple anomaly pattern clusters. Assuming the density-based DBSCAN clustering algorithm is used, it can find sufficiently dense sample clusters within a given radius, thus aggregating anomaly samples together to obtain different anomaly pattern clusters. Based on the anomaly pattern clusters and a preset risk level matrix, the comprehensive risk score for each pattern cluster is calculated. The comprehensive risk score is calculated using a weighted summation method, as shown in the following formula:

[0097] ;

[0098] in, This represents the overall risk score. It is the number of abnormal pattern clusters. These are the weights of each pattern cluster, reflecting their importance in risk assessment. This represents the risk level of the pattern cluster. The final anomaly detection result is obtained in this way.

[0099] In one example, based on anomaly detection results and historical transportation routes, a spatiotemporal graph neural network model is used for trajectory prediction and multi-objective optimization to obtain the target transportation route. This includes: spatiotemporally encoding the historical transportation routes to represent the road network as a graph structure, resulting in an initialized spatiotemporal graph; in the spatiotemporal graph, nodes represent intersections and edges represent road segments; embedding anomaly detection results as attributes of nodes and edges into the spatiotemporal graph to obtain an attribute-enhanced spatiotemporal graph; performing graph convolution operations on the attribute-enhanced spatiotemporal graph; using ChebNet for feature extraction to obtain local spatial features; setting the polynomial order of ChebNet to 3; and inputting the local spatial features into a graph attention layer to compute node... Attention weights are assigned between nodes to obtain global correlation features. Temporal convolution is then performed on these global correlation features, and dilated convolution is used to model long-term dependencies, resulting in temporal features. These temporal features are then input into a gated recurrent unit for sequence prediction to obtain initial trajectory prediction results. Based on these initial trajectory prediction results, a multi-objective optimization problem is constructed, with objective functions including transportation time, fuel consumption, and cargo safety, resulting in an optimization objective function. The particle swarm optimization algorithm is used to solve the optimization objective function, yielding a set of candidate transportation routes. This set of candidate routes is then subjected to Pareto non-dominated sorting to obtain a non-dominated solution set. Finally, the solution with the best overall performance from the non-dominated solution set is selected as the target transportation route.

[0100] In this example, historical transportation route data is spatiotemporally encoded, and the road network is represented as a graph structure to initialize the spatiotemporal graph. In the spatiotemporal graph, each node represents an intersection, and the edges between nodes represent road segments connecting the intersections. Each intersection is represented by geographic coordinates, and nodes are defined as follows: ,in and They represent the first The longitude and latitude of each intersection. Each side... Indicates intersection and The weights of road segments are determined by attributes such as road length, travel time, or historical accident probability. Anomaly detection results are embedded as attributes of nodes and edges into the spatiotemporal graph, forming an attribute-enhanced spatiotemporal graph. For example, if a cargo overheating incident has occurred on a certain road segment, this anomaly information is included as one of the attribute values ​​of that edge, indicating a certain risk in transporting cold chain goods on that road. Let the attributes of the nodes be... , representing a node All attributes and features, such as road traffic conditions, traffic light duration, etc., and the attributes of the edges are... , indicating edge The attributes and features of the road network are analyzed, including road length and historical accident rates. This results in an attribute-enhanced spatiotemporal graph that more comprehensively reflects the characteristics of the road network. Graph convolution is then applied to the attribute-enhanced spatiotemporal graph. Graph convolution is a technique for feature extraction from graph-structured data. It extracts local spatial features by aggregating features within the node's neighborhood. ChebNet (Chebyshev Network) is used for graph convolution. ChebNet's characteristic is that it approximates the graph convolution operation using Chebyshev polynomials, which efficiently captures local features in the graph structure. ChebNet sets the polynomial order to 3, meaning that during graph convolution, the features of a node are related not only to its direct neighbors but also to its second- and third-order neighbors. The feature extraction formula for ChebNet is as follows:

[0101] ;

[0102] in, Represents a node In the The feature vector of the layer, It is the first The coefficients of the Chebyshev polynomial, It is a Chebyshev polynomial. It is the Laplace matrix of the graph. It is a node The initial feature vector is obtained. In this way, the neighborhood information of each node is aggregated to extract local features containing spatial dependencies. These local spatial features are then input into the graph attention layer to calculate the attention weights between nodes. The graph attention layer can dynamically assign weights to each node through a self-attention mechanism, thereby focusing on the nodes most important to the current task. Let the query matrix, key matrix, and value matrix be respectively... and The formula for calculating the attention weights between nodes is:

[0103] ;

[0104] in, , and These are the weights of the query matrix, key matrix, and value matrix, respectively. This is the dimension of the key matrix. By calculating attention weights, global association features between nodes are obtained, enabling the model to capture dependencies between distant nodes. Temporal convolution operations are performed on the global association features, using dilated convolution to model long-term dependencies. Dilated convolution, by introducing a gap into the convolution kernel, captures information over a longer time span without increasing parameters. Let the dilation rate of the dilated convolution be... The kernel size is The formula for calculating dilated convolution is as follows:

[0105] ;

[0106] in, It is a moment The convolution output, The input sequence at time... The value, It is the first convolution kernel Each weight is used. Effective long-term dependency modeling is performed on the time series to obtain temporal features. These features are then input into a gated recurrent unit (GRU) for sequence prediction. GRU is an improved recurrent neural network that maintains information continuity and avoids the vanishing gradient problem when processing long sequences. The state update formula for GRU is as follows:

[0107] ;

[0108] in, It is a moment The hidden state, It's an update gate. Let be a candidate hidden state, and © denote element-wise multiplication. GRU can update the state based on historical information and the current input to obtain the initial trajectory prediction result. Based on the initial trajectory prediction result, a multi-objective optimization problem is constructed. Let the objective function be:

[0109] ;

[0110] in, These are transportation routes that need optimization. Indicates the transportation time. Indicates fuel consumption. Indicates the safety of the goods. These are the weighting coefficients. The objective is to minimize transportation time and fuel consumption while maximizing cargo safety. A multi-objective optimization method is used to balance different transportation demands. The particle swarm optimization algorithm is used to solve the objective function. The particle swarm optimization algorithm simulates the foraging process of a flock of birds; each candidate solution is treated as a particle. The particles adjust their positions based on their own experience and the experience of the group, ultimately finding the globally optimal solution. The particle update formula is as follows:

[0111] ;

[0112] ;

[0113] in, It is a particle In the Speed ​​at the next iteration It is the position of the particle. It is the best position in the history of the particle. It is the globally optimal position. It is inertial weight. It is the acceleration constant. These are random numbers. Through multiple iterations, the particle swarm gradually approaches the global optimum, ultimately yielding a set of candidate transportation routes. The candidate transportation route set is then subjected to Pareto non-dominated sorting. Pareto non-dominated sorting is a multi-objective optimization method that sorts all candidate solutions according to whether they are dominated by other solutions. Let the candidate solution set be... If the solution None of the objective values ​​are better than the solution Then it is called quilt Dominance. The non-dominated solution set contains solutions that are not dominated by any other solution for any objective. The solution with the best overall performance is selected from the non-dominated solution set as the objective transportation route. Optimal overall performance means achieving the best balance between transportation time, fuel consumption, and cargo safety; this route effectively improves transportation efficiency, reduces costs, and ensures cargo safety.

[0114] Reference Figure 2 This embodiment provides a smart cargo tracking device for transportation agents, including:

[0115] Acquisition module 1 is used to acquire multi-source sensor data of goods and transport vehicles to obtain raw datasets, and to perform time synchronization and Kalman filtering on the raw datasets to obtain fused state vectors.

[0116] Extraction module 2 is used to input the fused state vector into the deep cargo tracking network for feature extraction, and obtain a feature vector that encodes cargo state feature information;

[0117] Training module 3 is used to train a distributed model based on feature vectors using a federated security tracking framework to obtain a global cargo status detection model.

[0118] Processing module 4 is used to input the collected real-time dataset into the global cargo status detection model, perform multi-level anomaly detection processing, and obtain anomaly detection results;

[0119] Optimization module 5 is used to perform trajectory prediction and multi-objective optimization based on anomaly detection results and historical transportation routes using a spatiotemporal graph neural network model to obtain the target transportation route.

[0120] In this embodiment, the specific implementation of each unit in the above device embodiment is described in the above method embodiment, and will not be repeated here.

[0121] Reference Figure 3 This invention also provides a computer device, which can be a server, and its internal structure can be as follows: Figure 3 As shown, the computer device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores the data corresponding to this embodiment. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.

[0122] Those skilled in the art will understand that Figure 3 The structures shown are merely block diagrams of some structures related to the present invention and do not constitute a limitation on the computer devices on which the present invention is applied.

[0123] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0124] In summary, this invention proposes an intelligent cargo tracking method for transportation agents. By integrating data from multiple sensors such as temperature, humidity, acceleration, air pressure, GPS, and IMU, combined with time synchronization and Kalman filtering, it significantly improves the accuracy and reliability of cargo positioning, effectively overcoming the limitations of single positioning technologies. The use of a deep cargo tracking network for feature extraction effectively captures the complex spatiotemporal features of cargo status, providing high-quality feature representations for subsequent anomaly detection and trajectory prediction. The distributed model training method based on a federated secure tracking framework enables the joint construction of a global cargo status detection model while protecting the data privacy of each transportation agent, effectively solving the data silo problem. Through multi-level anomaly detection mechanisms such as isolated forests, local anomaly factors, and support vector machines, various anomalies can be detected and accurately classified in a timely manner, greatly improving the safety of cargo transportation. The use of a spatiotemporal graph neural network model for trajectory prediction and multi-objective optimization can dynamically adapt to complex traffic conditions and emergencies, achieving a comprehensive balance between transportation time, fuel consumption, and cargo safety. This invention has good scalability, allowing flexible adjustment of model parameters and algorithm configurations according to actual needs, and is applicable to cargo transportation scenarios of different scales and types.

[0125] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0126] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0127] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A smart cargo tracking method for transportation agents, characterized in that, Includes the following steps: Multi-source sensor data is collected from goods and transport vehicles to obtain a raw dataset. The raw dataset is then time-synchronized and Kalman filtered to obtain a fused state vector. The fused state vector is input into a deep cargo tracking network for feature extraction to obtain a feature vector that encodes cargo state feature information. Based on the aforementioned feature vectors, a distributed model is trained using a federal security tracking framework to obtain a global cargo status detection model. The collected real-time dataset is input into the global cargo status detection model to perform multi-level anomaly detection processing and obtain anomaly detection results. Based on the anomaly detection results and historical transportation routes, a spatiotemporal graph neural network model is used for trajectory prediction and multi-objective optimization to obtain the target transportation route. Specifically, this includes: spatiotemporally encoding the historical transportation routes to represent the road network as a graph structure, resulting in an initialized spatiotemporal graph; in this spatiotemporal graph, nodes represent intersections and edges represent road segments; embedding the anomaly detection results as attributes of nodes and edges into the spatiotemporal graph to obtain an attribute-enhanced spatiotemporal graph; performing graph convolution on the attribute-enhanced spatiotemporal graph; and using ChebNet for feature extraction to obtain local spatial features; setting the polynomial order of ChebNet to 3; and inputting the local spatial features into a graph attention layer to calculate the inter-node attention relationships. Attention weights are used to obtain global correlation features, and temporal convolution is performed on these global correlation features. Dilated convolution is used to model long-term dependencies, resulting in temporal features. These temporal features are then input into a gated recurrent unit for sequence prediction to obtain initial trajectory prediction results. Based on these initial trajectory prediction results, a multi-objective optimization problem is constructed, with objective functions including transportation time, fuel consumption, and cargo safety, resulting in an optimization objective function. The particle swarm optimization algorithm is used to solve the optimization objective function, resulting in a set of candidate transportation routes. The candidate transportation routes are then sorted using Pareto non-dominated sorting to obtain a non-dominated solution set. Finally, the solution with the best overall performance from the non-dominated solution set is selected as the target transportation route.

2. The intelligent cargo tracking method for transportation agents according to claim 1, characterized in that, The process involves acquiring multi-source sensor data from goods and transport vehicles to obtain a raw dataset, followed by time synchronization and Kalman filtering of the raw dataset to obtain a fused state vector, including: Data is collected from the temperature, humidity, acceleration, and barometric pressure sensors installed on the cargo to obtain cargo status data; Data is collected from the GPS receiver, inertial measurement unit, and on-board diagnostic system installed on the transport vehicle to obtain vehicle position and status data; A communication link between cargo and transportation agents is established using low-power wide-area network (LPWAN) technology to enable real-time data transmission and obtain real-time data. Edge computing processing is performed on the real-time transmitted data, including data cleaning, outlier detection, and data compression, to obtain preprocessed data; The cargo status data, the vehicle location and status data, and the preprocessed data are standardized to obtain the original dataset. The original dataset is time-synchronized and Kalman filtered to obtain the fused state vector.

3. The intelligent cargo tracking method for transportation agents according to claim 2, characterized in that, The process of performing time synchronization and Kalman filtering on the original dataset to obtain the fused state vector includes: Timestamps are extracted from each data point in the original dataset to obtain a timestamp sequence. Based on the timestamp sequence, linear interpolation is performed on the original dataset to obtain a synchronized dataset. Data registration is performed on the GPS data and inertial measurement unit data in the synchronized dataset to obtain an initial state vector. The initial state vector is then input into a preset Kalman filter model to perform state prediction and obtain a predicted state vector. Based on the predicted state vector and the observation data in the synchronous dataset, the Kalman gain matrix is ​​calculated, and the predicted state vector is updated according to the Kalman gain matrix and the observation residuals to obtain the posterior state vector. The posterior state vector and the cargo state data in the synchronous dataset are fused to obtain a comprehensive state vector. The comprehensive state vector is then input into a preset data smoother for noise suppression to obtain the fused state vector.

4. The intelligent cargo tracking method for transportation agents according to claim 1, characterized in that, The process of inputting the fused state vector into a deep cargo tracking network for feature extraction to obtain a feature vector encoding cargo state feature information includes: The fused state vector is input into a one-dimensional convolutional layer of the deep cargo tracking network to extract local temporal features and obtain an initial feature map. The one-dimensional convolutional layer includes three one-dimensional convolutional sub-layers, each with a kernel size of 5, a stride of 1, padding of 2, and output channels of 64, 128, and 256, respectively. Max pooling is performed on the initial feature map to obtain a downsampled feature map; the max pooling layer includes a pooling kernel size of 2 and a stride of 2; The downsampled feature map is input into a long short-term memory network layer to perform temporal dependency modeling and obtain a temporal feature vector; the long short-term memory network layer includes: 2 bidirectional LSTM layers with 512 hidden units; The time-series feature vector is processed by a self-attention mechanism to calculate the attention weight matrix and obtain a weighted time-series feature vector. The self-attention mechanism layer includes a query matrix, a key matrix, and a value matrix, each with a dimension of 512x512. The weighted temporal feature vector is input into the multi-head attention layer for multi-scale feature extraction to obtain the multi-head attention feature vector; the multi-head attention layer includes 8 attention heads, each with a dimension of 64; The multi-head attention feature vector is subjected to residual connection and layer normalization to obtain a normalized feature vector. The normalized feature vector is then input into a feedforward neural network layer and subjected to nonlinear transformation to obtain a transformed feature vector. The feedforward neural network layer includes two fully connected layers: the first layer has 2048 neurons and the second layer has 512 neurons, with ReLU as the activation function. The transformed feature vector is subjected to a dropout operation to obtain a regularized feature vector, which is then input into a fully connected layer for feature dimensionality reduction and fusion to obtain a low-dimensional feature vector; the fully connected layer is a linear transformation with an input dimension of 512 and an output dimension of 256. The softmax activation function is applied to the low-dimensional feature vector to perform feature normalization processing, resulting in a feature vector that encodes the cargo status feature information.

5. The intelligent cargo tracking method for transportation agents according to claim 1, characterized in that, The process of training a global cargo status detection model using a federated security tracking framework based on the feature vectors includes: S1: Divide the transport agents participating in the training into multiple federated learning clients, with each client storing local data and feature vectors; S2: Initialize the global cargo status detection model on the central server. The global cargo status detection model includes a shared layer and a private layer. The shared layer includes three fully connected layers with 512, 256, and 128 neurons, respectively, and the activation function is ReLU. The private layer includes two fully connected layers with 64 and 32 neurons, respectively, and the activation function is Sigmoid. S3: Distribute the shared layer parameters of the global cargo status detection model to all clients; S4: Perform differential privacy processing on the local feature vector of each client to obtain a privacy-preserving feature vector; the differential privacy processing is to add Laplace noise, and the noise parameter ε is set to 0.1; S5: Input the privacy-preserving feature vector into the client's local model, perform forward propagation calculation, and obtain the local prediction result; S6: Calculate the loss function based on the local prediction results and the client's local label data, and update the local model parameters using the backpropagation algorithm to obtain the updated local model; S7: Perform secure aggregation on the shared layer parameters of the updated local model to obtain the aggregated shared layer parameters; S8: Send the aggregated shared layer parameters to the central server to update the shared layer of the global cargo status detection model; S9: Perform anomaly detection on the updated global cargo status detection model, remove abnormal updates, and obtain the optimized global model; S10: Repeat steps S3 to S9 until the model converges or the preset number of iterations is reached to obtain the global cargo status detection model.

6. The intelligent cargo tracking method for transportation agents according to claim 5, characterized in that, The process involves inputting the collected real-time dataset into the global cargo status detection model for multi-level anomaly detection processing to obtain anomaly detection results, including: The collected real-time dataset is preprocessed, including data cleaning, standardization and normalization, to obtain a preprocessed real-time dataset. The preprocessed real-time dataset is then input into the shared layer of the global cargo status detection model for feature extraction to obtain a shared feature vector. The shared feature vector is input into the private layer of the global cargo status detection model for personalized feature extraction to obtain a private feature vector. The shared feature vector and the private feature vector are then fused using a weighted summation method with a weight ratio of 7:3 to obtain a fused feature vector. The fused feature vector is input into a preset isolated forest algorithm to perform primary anomaly detection and obtain a primary anomaly score; the number of trees in the isolated forest algorithm is set to 100, and the sampling size is set to 256. Anomaly judgment is performed based on the primary anomaly score to obtain a primary anomaly label, and secondary anomaly detection is performed on the data points marked as anomalies to obtain a secondary anomaly score; The secondary anomaly scores are input into a support vector machine classifier for refined classification to obtain anomaly type labels; the support vector machine uses a radial basis function kernel function, and the penalty parameter C is set to 1.0; Cluster analysis is performed on the abnormal type labels to obtain abnormal pattern clusters. Based on the abnormal pattern clusters and the preset risk level matrix, a comprehensive risk score is calculated to obtain the abnormal detection result.

7. A smart cargo tracking device for transportation agents, characterized in that, The apparatus for implementing the method according to any one of claims 1 to 6, comprising: The acquisition module is used to acquire multi-source sensor data of goods and transport vehicles to obtain a raw dataset, and to perform time synchronization and Kalman filtering on the raw dataset to obtain a fused state vector. The extraction module is used to input the fused state vector into the deep cargo tracking network for feature extraction, thereby obtaining a feature vector that encodes cargo state feature information; The training module is used to train a distributed model based on the feature vector using a federated security tracking framework to obtain a global cargo status detection model. The processing module is used to input the collected real-time dataset into the global cargo status detection model, perform multi-level anomaly detection processing, and obtain anomaly detection results; The optimization module is used to perform trajectory prediction and multi-objective optimization using a spatiotemporal graph neural network model based on the anomaly detection results and historical transportation routes, to obtain the target transportation route.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-level anomaly detection method based on exponential smoothing and integrated learning model

    CN104794192A

  • Cargo abnormity monitoring method and device, electronic equipment and storage medium

    CN113762862A

  • Industrial Internet of Things management system and method for express logistics transportation

    CN118586805A