Transportation agent intelligent cargo tracking method, device and equipment and storage medium

Through multi-source sensor data processing and deep learning technology, combined with the federal security tracking framework and spatio-temporal graph neural network model, the problems of insufficient accuracy, data silos and path planning in traditional cargo tracking methods are solved, and efficient and safe cargo is achieved transportation.

CN119398645AActive Publication Date: 2025-02-07SICHUAN CANGLAN HONGHAN SUPPLY CHAIN MANAGEMENT CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Traditional cargo tracking methods face problems such as signal occlusion, insufficient accuracy, massive data processing problems, contradictions in data privacy protection and information sharing, and static path planning cannot adapt to dynamic changes, resulting in low efficiency and reliability of cargo transportation, increasing operating costs and environment. burden.

Method used

Multi-source sensor data acquisition, time synchronization and Kalman filtering are used, feature extraction is combined with deep cargo tracking network, distributed model training is carried out based on the federal security tracking framework, multi-level anomaly detection and spatiotemporal graph neural network model for trajectory prediction and Multi-objective optimization.

Benefits of technology

It significantly improves the accuracy and reliability of cargo positioning, solves the data island problem, improves the safety and efficiency of cargo transportation, and achieves a comprehensive balance of transportation time, fuel consumption and cargo safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398645A_ABST
    Figure CN119398645A_ABST
Patent Text Reader

Abstract

The invention relates to a transportation agent intelligent cargo tracking method, device and equipment and a storage medium. The method comprises the following steps: carrying out multi-source sensor data acquisition on goods and a transport vehicle to obtain an original data set, and carrying out time synchronization and Kalman filtering processing to obtain a fused state vector; performing feature extraction through a deep cargo tracking network to obtain a feature vector; performing distributed model training based on the feature vectors to obtain a global cargo state detection model; inputting the collected real-time data set into a global cargo state detection model, and performing multi-stage anomaly detection processing to obtain an anomaly detection result; and performing trajectory prediction and multi-target optimization by using a space-time diagram neural network model according to an anomaly detection result and a historical transportation route to obtain a target transportation route. According to the embodiment of the invention, comprehensive goods tracking of multi-source data and dynamic optimization paths can be integrated to cope with complex and changeable logistics environments, and more accurate, safer and more efficient goods tracking services are provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cargo tracking, and in particular to an intelligent cargo tracking method, device, equipment and storage medium for a transport agent. Background Art

[0002] Traditional cargo tracking methods face many challenges and are unable to meet the increasingly complex logistics needs. Single positioning technologies such as GPS may experience signal obstruction or insufficient accuracy in certain environments, resulting in inaccurate or interrupted cargo location information. Secondly, the massive amount of data generated during large-scale cargo transportation is difficult to effectively process and utilize, and it is impossible to detect potential abnormalities and safety hazards in a timely manner.

[0003] In addition, the traditional centralized data processing method has a contradiction between data privacy protection and information sharing when facing a complex logistics network involving multiple parties. The data island problem between various transportation agents seriously hinders the improvement of overall logistics efficiency. At the same time, the static path planning method cannot adapt to dynamically changing traffic conditions and emergencies, and often leads to suboptimal transportation decisions. These problems not only affect the efficiency and reliability of cargo transportation, but also increase operating costs and environmental burdens. Summary of the invention

[0004] The main purpose of the present invention is to provide a method, device, equipment and storage medium for intelligent cargo tracking of a transport agent. The present invention can integrate multi-source data and comprehensive cargo tracking of dynamically optimized paths to cope with complex and changeable logistics environments and provide more accurate, safe and efficient cargo tracking services.

[0005] To achieve the above object, the present invention provides a method for intelligent cargo tracking by a transport agent, comprising the following steps: Collecting multi-source sensor data on goods and transport vehicles to obtain an original data set, and performing time synchronization and Kalman filtering on the original data set to obtain a fused state vector; Inputting the fused state vector into a deep cargo tracking network for feature extraction to obtain a feature vector encoding cargo state feature information; Based on the feature vector, a distributed model training is performed using a federated security tracking framework to obtain a global cargo status detection model; Inputting the collected real-time data set into the global cargo status detection model, performing multi-level anomaly detection processing, and obtaining anomaly detection results; According to 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.

[0006] The present invention also provides an intelligent cargo tracking device for a transport agent, comprising: The acquisition module is used to collect multi-source sensor data of goods and transport vehicles to obtain an original data set, and perform time synchronization and Kalman filtering on the original data set to obtain a fused state vector; An extraction module, used for inputting the fused state vector into a deep cargo tracking network for feature extraction to obtain a feature vector encoding cargo state feature information; A training module, used for performing distributed model training based on the feature vector using a federated security tracking framework to obtain a global cargo status detection model; A processing module, used to input the collected real-time data set 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 according to the anomaly detection results and historical transportation routes to obtain a target transportation route.

[0007] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0008] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0009] In summary, the technical solution provided by the present invention significantly improves the accuracy and reliability of cargo positioning by integrating multiple sensor data such as temperature, humidity, acceleration, air pressure, GPS, IMU, etc., combined with time synchronization and Kalman filter processing, and effectively solves the limitations of single positioning technology. The use of a deep cargo tracking network for feature extraction can effectively capture the complex spatiotemporal characteristics of the cargo state, and provide high-quality feature representation for subsequent anomaly detection and trajectory prediction. The distributed model training method based on the federal security tracking framework realizes the construction of a global cargo state detection model while protecting the data privacy of each transport agent, effectively solving the data island problem. Through multi-level anomaly detection mechanisms such as isolated forests, local anomaly factors and support vector machines, various abnormal situations can be discovered and accurately classified in a timely manner, greatly improving the safety of cargo transportation. Using a spatiotemporal graph neural network model for trajectory prediction and multi-objective optimization can dynamically adapt to complex traffic conditions and emergencies, and achieve a comprehensive balance between transportation time, fuel consumption and cargo safety. The present invention has good scalability, and can flexibly adjust model parameters and algorithm configurations according to actual needs, and is suitable for cargo transportation scenarios of different scales and types. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a schematic diagram of the steps of a method for intelligent cargo tracking by a transport agent in one embodiment of the present invention; Figure 2 It is a structural block diagram of an intelligent cargo tracking device for a transport agent in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0011] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0013] Reference Figure 1 This embodiment provides a method for intelligent cargo tracking by a transport agent, comprising the following steps: S1, collect multi-source sensor data of goods and transport vehicles to obtain the original data set, and perform time synchronization and Kalman filtering on the original data set to obtain the fused state vector; Among them, the temperature sensors, humidity sensors, acceleration sensors and air pressure sensors installed on the goods are used for data collection, and the temperature changes, humidity levels, movement status and air pressure information of the goods during transportation are collected in real time to obtain the goods status data. At the same time, the global positioning system (GPS) receiver, inertial measurement unit (IMU) and on-board diagnostic system (OBD) are installed on the transport vehicle. Through these devices, the vehicle's geographic location, speed, acceleration, attitude angle and mechanical status information are obtained to form vehicle location and status data. The communication link between the goods and the transport agent is established using low-power wide area network technology. Low-power wide area network technology has long-distance transmission, low power consumption and efficient data transmission capabilities. It can transmit data to the transport agent system in real time when the goods and vehicle status data change, ensuring the real-time and reliability of the data. In the process of data transmission, in order to reduce the network load and improve data processing efficiency, edge computing technology is introduced to process the data in real time during transmission. Edge computing processing includes data cleaning, outlier detection, and data compression. Data cleaning removes redundant and erroneous data, outlier detection detects mutations or abnormalities in the data, and data compression reduces the amount of transmitted data to obtain preprocessed data. The collected cargo status data, vehicle location and status data are standardized with the preprocessed data. Data of different types and sources are converted into a unified format and dimension for subsequent processing and fusion to form the original data set. The original data set is synchronized in time to ensure that the data collected by each sensor can be accurately aligned on the time axis and accurately reflect the status of the cargo and vehicle at the same time point. The Kalman filter algorithm is applied to filter the synchronized data. Kalman filtering is a recursive filtering algorithm that can effectively utilize the dynamic model of the system and the statistical characteristics of measurement noise to smooth and optimize the data, reduce the impact of sensor noise, and finally obtain the fused state vector.

[0014] Among them, the timestamp of each data point in the original data set is extracted to obtain the time mark of each data point and form a timestamp sequence. The corresponding relationship of each data point on the time axis is determined by the timestamp sequence. Based on the extracted timestamp sequence, the original data set is linearly interpolated to obtain a synchronized data set. Linear interpolation can fill the time interval gaps in the data acquisition process and align different sensor data to a unified time scale, so that all data points in the synchronized data set are comparable on the same time scale. The global positioning system data (GPS data) and inertial measurement unit data (IMU data) in the synchronized data set are data registered, and the spatiotemporal information from different sources is effectively matched and fused to obtain an accurate initial state vector. The registration process needs to consider the consistency of GPS data and IMU data in the spatial coordinate system and time dimension, and an algorithm based on coordinate transformation and time alignment is used to eliminate the system error between sensors. The obtained initial state vector contains information such as the position, speed and posture of the vehicle at a certain moment. The initial state vector is input into the preset Kalman filter model for state prediction. Kalman filtering is a state estimation algorithm that predicts the future state of a system by using the state transition model and measurement model of the system. The state prediction process is based on the state estimate at the previous moment and the dynamic model of the system. The predicted state vector obtained describes the estimated state of the vehicle at the current moment. Based on the predicted state vector and the observed data in the synchronized data set, the weight of the state update is determined by calculating the Kalman gain matrix. The Kalman gain matrix is ​​to find an optimal weighting coefficient between the predicted state and the observed data, which can minimize the mean square error of the state estimation. The observation residual, that is, the deviation between the observed data and the predicted state, is calculated, and the observation residual is multiplied by the Kalman gain matrix to obtain the correction amount, and then the predicted state vector is updated to obtain the posterior state vector. The posterior state vector is fused with the cargo state data in the synchronized data set. The cargo state data includes information such as temperature, humidity, acceleration and air pressure, which can reflect the current state of the cargo. Through data fusion technology, the vehicle state information and the cargo state information are integrated to obtain a more comprehensive integrated state vector. The integrated state vector is input into the preset data smoother for noise suppression. Data smoothers usually use low-pass filtering or adaptive filtering to eliminate high-frequency noise and short-term fluctuations in the state vector to obtain a smoother and more accurate fused state vector.

[0015] S2, input the fused state vector into the deep cargo tracking network for feature extraction to obtain a feature vector encoding the cargo status feature information; Specifically, the fused state vector is input into the one-dimensional convolution layer in the deep cargo tracking network for processing. The one-dimensional convolution layer is used to extract local temporal features. The one-dimensional convolution layer consists of three one-dimensional convolution sublayers, each of which has a different number of output channels, namely 64, 128 and 256, and the size of the convolution kernel is 5, the step size is 1, and the padding mode is set to 2. This setting can ensure that the input data does not lose boundary information during the convolution process, and at the same time, the local temporal features in the input state vector are extracted through the convolution operation to generate the initial feature map. The initial feature map is subjected to the maximum pooling operation, and the feature map is downsampled. The main purpose of the maximum pooling operation is to reduce the spatial dimension of the feature map, reduce the amount of data while retaining significant features. The settings of the maximum pooling layer include a pooling kernel size of 2 and a step size of 2, which means that when the pooling operation slides on the input feature map, the maximum value is taken every two elements to obtain the downsampled feature map. The downsampled feature map is input into the long short-term memory network layer (LSTM) for temporal dependency modeling. The LSTM network layer can capture long-term dependencies and is suitable for processing time series data. The long short-term memory network layer consists of two layers of bidirectional LSTM, with 512 hidden units in each layer. The bidirectional LSTM considers the dependencies between the time series and the past and future at the same time, so that the network can learn time series features from two directions. After being processed by two layers of bidirectional LSTM, the obtained time series feature vector can effectively encode the time series dependencies of state changes during cargo transportation. The self-attention mechanism is applied to the time series feature vector for processing. The self-attention mechanism determines the importance of each time series feature in the entire sequence by calculating the attention weight matrix. The self-attention mechanism layer includes a query matrix, a key matrix, and a value matrix, each of which has a dimension of 512x512. The attention mechanism calculates the importance weight of each time series feature to other features by the inner product of the query matrix and the key matrix, and then applies these weights to the value matrix to obtain the weighted time series feature vector. The weighted time series feature vector is input into the multi-head attention layer for multi-scale feature extraction. The multi-head attention mechanism consists of 8 attention heads, each with a dimension of 64. This structure can independently model the temporal features at different scales and contexts, and extract more diverse feature representations. After being processed by the multi-head attention layer, a multi-head attention feature vector is obtained. Based on the multi-head attention feature vector, residual connection and layer normalization are performed. Residual connection directly adds the input to the output, which helps to alleviate the gradient vanishing problem in deep networks, while layer normalization normalizes the features to maintain the stability of the feature distribution and obtain a normalized feature vector. The normalized feature vector is input into the feedforward neural network layer for nonlinear transformation. The feedforward neural network layer consists of two fully connected layers, with 2048 neurons in the first layer and 512 neurons in the second layer, and the activation function uses ReLU.The first layer expands the feature space by a large number of neurons, while the second layer compresses the feature space by reducing the number of neurons. At the same time, the ReLU activation function increases the nonlinear ability, so that the network can better fit the complex feature relationship. The transformed feature vector is dropout to avoid overfitting. The dropout operation randomly discards a part of neurons, so that the network can learn more robust feature representation during training and obtain a regularized feature vector. The regularized feature vector is input into the fully connected layer for feature dimension reduction and fusion. The fully connected layer has a linear transformation with an input dimension of 512 and an output dimension of 256. The high-dimensional feature vector is mapped to a low-dimensional space to retain the most important feature information while reducing the computational complexity and storage space requirements. The softmax activation function is applied to the low-dimensional feature vector after dimensionality reduction for feature normalization. Softmax can map each element of the feature vector to between (0,1), and the sum of all elements is 1, forming a probability distribution. Through the normalization operation, the final feature vector can accurately encode the feature information of the cargo status.

[0016] S3, based on the feature vector, uses the federated security tracking framework to perform distributed model training to obtain a global cargo status detection model; It should be noted that the transport agents participating in the training are divided into multiple federated learning clients. Each client represents an independent transport agent node, which stores local data and feature vectors, including the cargo status information, vehicle location data, and feature vectors extracted by the deep cargo tracking network. The data is stored locally to protect data privacy, and there is no need to upload the original data to the central server, reducing the risk of data leakage. In the initial stage of distributed training, a global cargo status detection model is initialized on the central server. The 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, respectively, and the activation function of each layer is ReLU. These shared layers are used to share information among all clients and extract global cargo status features. At the same time, the private layer includes two fully connected layers with 64 and 32 neurons, respectively, and the activation function is Sigmoid. The private layer is used to process the unique data of each client so that it can better adapt to the local data characteristics of each client while ensuring the consistency of the global model. The central server distributes the shared layer parameters of the global cargo status detection model to all clients. After each client receives the initial parameters of the shared layer, it updates the model in combination with the local data and feature vector. In terms of data privacy protection, in order to prevent the local feature vector from being inferred to real information during the training process, the local feature vector of each client is differentially private. The differential privacy processing method adopts the method of adding Laplace noise, and the noise parameter ε is set to 0.1. In this way, the privacy-preserving feature vector adds a certain degree of randomness on the basis of the original feature vector, thereby effectively protecting the privacy of the original data while maintaining the validity of the feature vector. The client inputs the privacy-preserving feature vector into the local model, performs forward propagation calculation, and obtains the local prediction result. The local prediction result represents the cargo status or transportation situation predicted by each client based on its own data and features. Based on the local prediction result and the client's local label data, the client calculates the loss function, which reflects the gap between the prediction result and the actual situation. The back propagation algorithm is used to update the local model parameters. Through back propagation, the shared layer and private layer parameters in the local model are updated to form an updated local model. In order to integrate the model information of each client globally, each client securely aggregates the shared layer parameters of the updated local model. Secure aggregation uses encryption to aggregate shared layer parameters without exposing the true 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 the distributed training process, individual clients may have abnormal parameters due to data quality problems or other reasons. If they are not eliminated, the effect of the global model will be affected. The central server performs anomaly detection on the updated global model. By comparing the model update amount of each client and the change trend of the global model, the abnormal updates that obviously deviate from the normal range are eliminated to obtain the optimized global model. The whole process is repeated between the central server and each client. From distributing the shared layer parameters of the global model to the client, to local training of each client, to securely aggregating the shared layer parameters and updating the global model, this series of steps will be repeated until the model converges or reaches the preset number of iterations. Model convergence means that the performance of the global cargo status detection model has stabilized. After the training is completed, the final global cargo status detection model can effectively reflect the state changes of the cargo during transportation, and has strong generalization ability, and can be applied in a variety of transportation scenarios.

[0017] S4, inputting the collected real-time data set into the global cargo status detection model, performing multi-level anomaly detection processing, and obtaining anomaly detection results; Specifically, the collected real-time data set is preprocessed, including data cleaning, standardization and normalization. Data cleaning is used to remove noise, duplicate values ​​and missing values ​​to ensure the quality of data. Then standardization is performed to convert data with different features into a unified scale to eliminate dimensional differences. The standardized data is normalized to map the data to the interval [0,1] to improve the sensitivity and stability of the model to the data. After the preprocessing operation, the obtained real-time data set is input into the shared layer of the global cargo status detection model to extract the shared feature vector, which contains the global cargo status information. The shared feature vector is input into the private layer for personalized feature extraction to obtain the private feature vector. The private feature vector mainly reflects the unique data pattern of individual clients. The weighted summation method is used to fuse the shared feature vector and the private feature vector in a ratio of 7:3 to obtain the fused feature vector. The fused feature vector is input into the isolation forest algorithm for primary anomaly detection. The isolation forest calculates the degree of isolation of each data point by constructing multiple random trees to obtain the primary anomaly score. The number of trees is set to 100 and the sampling size is set to 256. The data is judged to be abnormal according to the primary anomaly score. For the data points marked as abnormal, secondary anomaly detection is performed to further determine the degree of abnormality. Secondary anomaly detection is based on a more complex combination of features to obtain a secondary anomaly score. The secondary anomaly score is input into the support vector machine classifier for refined classification to obtain anomaly type labels. The support vector machine uses the radial basis kernel function, and the penalty parameter C is set to 1.0. In this way, different types of anomalies are distinguished and specific anomaly labels are assigned to each data point. Cluster analysis is performed on the obtained anomaly type labels to identify abnormal pattern clusters in the data. Abnormal pattern clusters reveal the inherent connection between different anomalies. Based on the abnormal pattern clusters and the preset risk level matrix, the comprehensive risk score is calculated. The risk level matrix is ​​used to define the risk level of different abnormal patterns. By combining the abnormal pattern clusters and risk levels, the comprehensive risk score of each pattern cluster is calculated. The comprehensive risk score is used as the result of multi-level anomaly detection to provide a reference for risk management in the cargo transportation process and help decision makers take corresponding measures to reduce transportation risks.

[0018] S5, based on the anomaly detection results and historical transportation routes, uses the spatiotemporal graph neural network model to perform trajectory prediction and multi-objective optimization to obtain the target transportation route.

[0019] Among them, the historical transportation routes are spatiotemporally encoded. The road network is represented as a graph structure, where nodes represent intersections and edges represent road sections. The graph structure effectively captures the topological relationship in the transportation network. Through this representation, an initialized spatiotemporal graph is constructed, which contains spatial information and can model the dynamic changes in the transportation process in combination with the time dimension. The anomaly detection results are embedded into the spatiotemporal graph as attributes. The anomaly detection results are represented as the attributes of nodes and edges, such as accidents that occurred on a certain road section, abnormal cargo status, etc. This information is embedded into the nodes and edges of the spatiotemporal graph to obtain an attribute-enhanced spatiotemporal graph. The attribute-enhanced spatiotemporal graph better reflects the actual situation in the transportation process. The attribute-enhanced spatiotemporal graph is subjected to graph convolution operation, and ChebNet is used for feature extraction. ChebNet is a graph convolution network based on Chebyshev polynomials. It extracts local spatial features by performing feature aggregation on neighborhood nodes through polynomial filters on the graph. The polynomial order of ChebNet is set to 3, which means that the model can capture the spatial dependency between third-order neighbor nodes and obtain richer local spatial features. The local spatial features are input into the graph attention layer to calculate the attention weights between nodes. The graph attention layer can capture global correlation features by dynamically adjusting the weight relationship between nodes. In a complex traffic network, the road sections and intersections that have the greatest impact on the current transportation task are identified to provide a basis for subsequent trajectory prediction. The global correlation features are subjected to temporal convolution operations, and dilated convolutions are used to model long-term dependencies. Dilated convolutions can effectively model data with long time spans by introducing intervals in the convolution kernel, extract time series features, and reflect the changing trends and periodicity in the time dimension during transportation. The time series features are input into the gated recurrent unit (GRU) for sequence prediction. GRU is a recurrent neural network structure suitable for sequence data, which can effectively handle the gradient vanishing problem in long sequences. Through the learning of time series features by GRU, the initial trajectory prediction results are obtained, which reflect the transportation route and state change trend of the goods under given conditions. Based on the initial trajectory prediction results, a multi-objective optimization problem is constructed. The objective function includes transportation time, fuel consumption, and cargo safety. The three objectives work together to evaluate the advantages and disadvantages of different transportation routes. Transportation time reflects the efficiency of the route, fuel consumption is related to transportation costs and environmental impact, and cargo safety is directly related to risk control during transportation. After constructing the optimization objective function, the particle swarm optimization algorithm is used to solve it. Particle swarm optimization is an optimization algorithm based on swarm intelligence. It searches for the optimal solution in the solution space by simulating the foraging behavior of bird flocks. Each candidate solution is regarded as a particle, and the particle continuously adjusts its position to find the optimal solution. In this way, a set of candidate transportation routes is obtained. In order to screen out the optimal transportation route, the set of candidate transportation routes is Pareto non-dominated sorted.Pareto non-dominated sorting is a multi-objective optimization sorting method that can classify all candidate solutions according to whether they are dominated by other solutions. The solutions in the non-dominated solution set are those that are no worse than other solutions in any objective, and these solutions achieve a balance between different objectives. The solution with the best comprehensive performance is selected from the non-dominated solution set as the target transportation route.

[0020] In one example, multi-source sensor data is collected on cargo and transport vehicles to obtain raw data sets, and the raw data sets are time-synchronized and Kalman filtered to obtain a fused state vector, including: data collection from temperature sensors, humidity sensors, acceleration sensors, and air pressure sensors installed on cargo to obtain cargo status data; data collection from global positioning system receivers, inertial measurement units, and on-board diagnostic systems installed on transport vehicles to obtain vehicle position and status data; low-power wide area network technology is used to establish a communication link between cargo and transport agents to transmit data in real time to obtain real-time transmission data; edge computing is performed on real-time transmission data, including data cleaning, outlier detection, and data compression to obtain pre-processed data; cargo status data, vehicle position and status data, and pre-processed data are subjected to data standardization to obtain the raw data set; and the raw data set is time-synchronized and Kalman filtered to obtain the fused state vector.

[0021] In this example, data is collected from the temperature sensors, humidity sensors, acceleration sensors, and air pressure sensors installed on the cargo, and the environmental information and movement status of the cargo during transportation are collected in real time. The temperature sensor is used to monitor the temperature changes in the environment where the cargo is located to ensure that the cargo is transported under suitable temperature conditions; the humidity sensor is used to monitor the environmental humidity to prevent the cargo from being damp or over-dried; the acceleration sensor is used to detect the vibration of the cargo during transportation to determine whether there is severe shaking or collision; the air pressure sensor is used to measure the air pressure changes at the location of the cargo. At the same time, data is collected from the global positioning system receiver, inertial measurement unit, and on-board diagnostic system installed on the transport vehicle to obtain vehicle position and status data. The GPS receiver provides the vehicle's precise location, speed, and driving trajectory information to help the transport agent understand the vehicle's driving route in real time. The inertial measurement unit provides the vehicle's dynamic posture by measuring the vehicle's acceleration, angular velocity, and other information, such as whether it brakes suddenly or turns sharply, to evaluate the safety during transportation. The on-board diagnostic system obtains the vehicle's mechanical status information, such as the engine's operating status and fuel consumption, to help the transport agent understand the health of the vehicle. The communication link is established using low-power wide area network technology. Low-power wide area network technology has the characteristics of long distance, low power consumption and efficient transmission, which is suitable for data transmission requirements during long-distance transportation. Through this communication link, the sensor data on the goods and vehicles can be transmitted to the background system of the transport agent in real time to realize real-time monitoring of the status of the goods and vehicles. Edge computing is performed on the real-time transmission data, including data cleaning, outlier detection and data compression. The purpose of data cleaning is to remove noise and invalid data from the sensor data. Outlier detection is used to find and mark those data points that deviate greatly from the normal state, which indicate that the status of the goods or the vehicle is abnormal. Data compression is to reduce the amount of data and improve transmission efficiency. After edge computing processing, pre-processed data is formed. Data standardization is performed on the cargo status data, vehicle location and status data, and pre-processed data. Data from different sources and different scales are converted to the same standard range, so that various types of data are comparable in subsequent processing, and the original data set is obtained. Time synchronization and Kalman filtering are performed on the original data set. The purpose of time synchronization is to ensure that data from different sensors can be aligned on the same time axis. Through methods such as interpolation or resampling, the timestamps of different data sources are aligned to obtain a time-synchronized data set. The Kalman filter algorithm is applied to process the time-synchronized data set 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 the system by using the system model and measurement noise characteristics in a dynamic system. The state update formula of Kalman filtering is as follows: ; in, Indicates the current time The estimated value of the state, It was the moment before The predicted state value of is the Kalman gain matrix, is the observed value at the current moment, is the observation matrix. Kalman gain matrix The calculation formula is: ; in, is the covariance matrix of the predicted state, is the covariance matrix of the observation noise. The Kalman gain matrix determines the current observation value The weight in the state update. Through the above formula, the state estimate of the system is continuously updated, making the state estimate closer to the actual state of the system. In order to better describe the dynamic change of the state, the state transition equation is used to predict the state at the next moment: ; in, is the state transition matrix, which describes the system from the current moment Until the next moment Through the above state update and prediction process, the state estimation value is continuously corrected, so that the final state vector has higher accuracy and reliability. The state vector processed by Kalman filter is a fused state vector, which integrates the cargo state data, vehicle location and state data, and real-time transmission data processed by edge computing.

[0022] In one example, the original data set is subjected to time synchronization and Kalman filtering to obtain a fused state vector, including: extracting the timestamp of each data point in the original data set to obtain a timestamp sequence, and based on the timestamp sequence, performing linear interpolation processing on the original data set to obtain a synchronized data set; performing data alignment on the global positioning system data and the inertial measurement unit data in the synchronized data set to obtain an initial state vector, and inputting the initial state vector into a preset Kalman filter model to perform state prediction to obtain a predicted state vector; calculating the Kalman gain matrix based on the predicted state vector and the observed data in the synchronized data set, and updating the predicted state vector according to the Kalman gain matrix and the observed residual to obtain a posterior state vector; performing data fusion on the posterior state vector and the cargo state data in the synchronized data set to obtain a comprehensive state vector, and inputting the comprehensive state vector into a preset data smoother to perform noise suppression processing to obtain a fused state vector.

[0023] In this example, the timestamp of each data point is separated from all sensor data to construct a timestamp sequence. Assume that the original data set consists of data from multiple different sensors, including global positioning system (GPS) data, inertial measurement unit (IMU) data, temperature, humidity, acceleration, and air pressure sensor data. Since the data sampling frequency of different sensors may be different, the timestamps of each data point are not completely consistent. The timestamp is extracted from the data of each sensor to form a unified timestamp sequence. Assume that the timestamp sequence is , where each Represents a timestamp in the data set. Based on the timestamp sequence, the original data set is linearly interpolated. Linear interpolation can fill in the missing data points between different time points, making the data more continuous on the time axis. Suppose a sensor is at time and Data was collected at each time and , while When there is missing data at a certain moment, linear interpolation is calculated using the following formula Data at the moment: ; in, Indicated in The interpolated data at time, and They are and The known data at the time, Represents the time interval. Through this method, a synchronized data set of all sensors at each timestamp is obtained to ensure that the data of different sensors are aligned on the time axis. Data alignment is performed on the global positioning system (GPS) data and inertial measurement unit (IMU) data in the synchronized data set. GPS data usually includes the vehicle's location information, such as latitude, longitude and altitude, while IMU data contains the vehicle's acceleration and angular velocity information, such as three-axis acceleration and angular velocity. The purpose of data alignment is to combine data from these two different sources to obtain the vehicle's initial state vector. Assume that the initial state vector is ,in is the position of the vehicle, is the speed of the vehicle, are the roll angle, pitch angle, and yaw angle of the vehicle. These information are combined to form a complete description of the vehicle's state at a certain moment. Input into the preset Kalman filter model for state prediction. Kalman filtering is a linear state estimation method that can predict and update the state of the system using the system's state transfer equation and measurement equation. The prediction process of Kalman filtering is described by the following state transfer equation: ; in, Indicates at time The predicted state vector is is the state transition matrix, describing the system from Time has come The state changes at all times, It's time The estimated value of the state, is the control matrix, which represents the influence of the control input on the system state, is the control input, such as acceleration or steering wheel angle. Through the state transition equation, predict the vehicle at time The predicted state vector Compare with the observations in the synchronized dataset and calculate the Kalman gain matrix The Kalman gain matrix determines the weight of the observation data in the state update, and the calculation formula is: ; in, is the covariance matrix of the predicted state vector, which represents the uncertainty of the predicted state, is the observation matrix, which maps the state vector to the observation space, is the covariance matrix of the observation noise, which represents the uncertainty of the observation data. Kalman gain matrix Used to balance the weights of predicted states and observed data. Using the Kalman gain matrix and the observed residuals , update the predicted state vector to obtain the posterior state vector: ; in, is the updated posterior state vector, It's time The updated state vector combines the predicted state and the current observed data, which can more accurately reflect the actual state of the vehicle. The posterior state vector is fused with the cargo state data in the synchronized data set. The cargo state data includes information such as temperature, humidity, acceleration, and air pressure, which together with the vehicle state information constitute a comprehensive state vector. Assume that the comprehensive state vector is ,in is the temperature, is humidity, is the triaxial acceleration, It's air pressure.

[0024] 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 feature information, including: inputting the fused state vector into a one-dimensional convolution layer of the deep cargo tracking network to extract local time features to obtain an initial feature map; the one-dimensional convolution layer includes: 3 one-dimensional convolution sublayers, each sublayer has a convolution kernel size of 5, a step size of 1, a padding of 2, and output channels of 64, 128, and 256 respectively; performing a maximum pooling operation on the initial feature map to obtain a downsampled feature map; the maximum pooling layer includes: a pooling kernel size of 2, and a step size of 2; inputting the downsampled feature map into a long short-term memory network layer to perform temporal dependency modeling to obtain a temporal feature vector; the long short-term memory network layer includes: 2 layers of bidirectional LSTM, with 512 hidden units; performing a self-attention mechanism on the temporal feature vector, calculating an attention weight matrix, and obtaining a weighted temporal feature vector; the self-attention mechanism layer includes: a query matrix, a key matrix, and a value matrix, each of which has a dimension of 512x512; input the weighted time series feature vector 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; perform residual connection and layer normalization on the multi-head attention feature vector to obtain a normalized feature vector, and input the normalized feature vector into the feedforward neural network layer for nonlinear transformation to obtain a transformed feature vector; the feedforward neural network layer includes: 2 fully connected layers, the number of neurons in the first layer is 2048, the number of neurons in the second layer is 512, and the activation function is ReLU; perform dropout operation on the transformed feature vector to obtain a regularized feature vector, and input the regularized feature vector into the fully connected layer for feature dimensionality reduction and fusion to obtain a low-dimensional feature vector; the fully connected layer has a linear transformation with an input dimension of 512 and an output dimension of 256; apply the softmax activation function to the low-dimensional feature vector, perform feature normalization, and obtain a feature vector encoding the characteristic information of the cargo status.

[0025] In this example, the fused state vector is input into the one-dimensional convolution layer in the deep cargo tracking network to extract local temporal features. The information in the state vector is continuous in the time dimension, but the changes between different states are often nonlinear. Using a one-dimensional convolutional network can effectively extract local features from these time series data. In the one-dimensional convolutional layer, there are three one-dimensional convolutional sublayers, each with a convolution kernel size of 5, a step size of 1, and a padding of 2. The setting of parameters enables the convolution operation to cover a longer time window while keeping the sequence length of the input and output the same. The convolution kernel size of 5 means that each convolution operation will consider the state of the current time point and the two time points before and after it, and can extract richer local temporal features. The padding of 2 ensures that the length of the time series output after the convolution operation is consistent with the input and will not be shortened due to boundary effects. The number of output channels of these three convolutional sublayers is 64, 128, and 256, respectively, which means that each sublayer can extract 64, 128, and 256 different feature maps. The gradually increasing number of output channels can capture more and more complex temporal features. After being processed by the one-dimensional convolution layer, the initial feature map is obtained, which retains the local time dependency of the input state vector. In order to reduce the dimension and redundant information of the feature map, the initial feature map is subjected to the maximum pooling operation. Maximum pooling is a downsampling method that effectively reduces the amount of data while retaining significant features by taking the maximum value in a local area to replace the information in the area. The pooling kernel size of the maximum pooling layer is 2, and the step size is 2. The pooling operation slides two time steps each time, and the size of the output feature map is halved. The downsampled feature map is input into the long short-term memory network (LSTM) layer for temporal dependency modeling. LSTM is a recurrent neural network (RNN) structure that can handle long-term dependencies and is suitable for modeling time series data. Two layers of bidirectional LSTM are used, and the number of hidden units in each layer is 512. Bidirectional LSTM can simultaneously consider the contextual information of the time series, that is, it not only considers the impact of the past state on the current state, but also considers the reverse impact of the future state. This enables the time series feature vector to fully reflect the dynamic change pattern in the time series data. Assume that at a certain point in time, the change in the state of the goods has a strong contextual dependency. For example, a sharp change in temperature may be related to a change in acceleration. The bidirectional LSTM captures this complex relationship and extracts a more meaningful time series feature vector. The time series feature vector is input into the self-attention mechanism layer to calculate the dependencies between each time point in the sequence and focus on important time points by dynamically adjusting the weights. The self-attention mechanism includes a query matrix, a key matrix, and a value matrix. The dimension of each matrix is ​​512x512. Let the query matrix be , the bond matrix is , the value matrix is , the calculation formula of attention weight is: ; in, represents the dimension of the key vector, which is 512. The formula first calculates and The dot product of Normalize it and finally apply the softmax function to get the attention weight matrix, which represents the similarity between each time point in the sequence. Then add the attention weight matrix to the value matrix Multiply them together to get the weighted time series feature vector. The attention mechanism adaptively finds the most relevant time point in the entire time series, and weights and aggregates its features to obtain a more focused feature representation. The weighted time series feature vector is input into the multi-head attention layer for multi-scale feature extraction. The multi-head attention layer includes 8 attention heads, each with a dimension of 64. The formula of the multi-head attention mechanism is as follows: ; in, Attention is the weight matrix of different attention heads, is the output weight matrix. The multi-head attention mechanism can extract diverse features from different subspaces and splice them together to capture the multi-scale correlation features of the time series. In order to avoid the problems of gradient vanishing and model degradation, the multi-head attention feature vectors are residually connected and layer normalized. The residual connection directly adds the input and output, which effectively alleviates the problem of gradient vanishing in deep networks. Layer normalization normalizes each feature vector so that the model can converge more stably during training and obtain a normalized feature vector. The normalized feature vector is input into the feedforward neural network layer for nonlinear transformation. The feedforward neural network layer consists of two fully connected layers. The number of neurons in the first layer is 2048, and the second layer is 512. The activation function is ReLU. The ReLU activation function is defined as follows: ; The negative input values ​​are truncated to zero, thereby introducing nonlinear factors and increasing the expressive power of the model. After the nonlinear transformation, the transformed feature vector is obtained. In order to prevent the model from overfitting, the transformed feature vector is subjected to a dropout operation, that is, the output of a part of the neurons is randomly set to zero, thereby improving the generalization ability of the model and obtaining a regularized feature vector. The regularized feature vector is input into the fully connected layer for feature dimensionality reduction and fusion. The input dimension of the fully connected layer is 512, and the output dimension is 256. The high-dimensional feature vector is reduced to a low-dimensional space through linear transformation. The formula is as follows: ; in, is a low-dimensional feature vector, is the weight matrix, is the normalized feature vector of the input, is the bias term. Through linear transformation, the dimension of the feature is reduced and the most important feature information is retained. The softmax activation function is applied to the low-dimensional feature vector for feature normalization. The softmax function converts the input feature vector into a probability distribution, where the value of each element is between 0 and 1, and the sum of all elements is 1. The formula is as follows: ; in, is the first feature vector elements, is a natural constant, and through softmax normalization processing, a feature vector encoding the characteristic information of the cargo status is obtained.

[0026] In one example, based on feature vectors, a federated security tracking framework is used to perform distributed model training to obtain a global cargo status detection model, including: S1: dividing the transport agents participating in the training into multiple federated learning clients, each client saves local data and feature vectors; S2: initializing 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 3 fully connected layers, the number of neurons is 512, 256, and 128 respectively, and the activation function is ReLU; the private layer includes 2 fully connected layers, the number of neurons is 64 and 32 respectively, and the activation function is Sigmoid; 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 vector of each client to obtain a privacy-preserving feature vector; differential privacy The processing is to add Laplace noise, and the noise parameter ε is set to 0.1; S5: input the privacy protection feature vector into the client 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 local label data, and use the back propagation algorithm to update the local model parameters 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, eliminate 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.

[0027] In this example, the transport agents participating in the training are divided into multiple federated learning clients. Each client represents a transport agent node, which stores and manages local cargo status data and feature vectors. These data include information such as temperature, humidity, location, and vehicle status during transportation. The data of each client is private and cannot be directly shared with other clients. This division method enables federated learning to achieve joint training of models without centrally storing data, protecting the data privacy of each transport agent. In the initial stage of the federated learning framework, a global cargo status detection model is initialized on the central server, which consists of two parts: a shared layer and a private layer. The shared layer is used to extract common features of all client data, while the private layer performs feature extraction and processing for the personalized data of each client. The shared layer consists of three fully connected layers with 512, 256, and 128 neurons respectively, and each layer uses the ReLU activation function. The expression of the ReLU activation function is as follows: ; in, Represents the input neuron activation value. The ReLU activation function can effectively introduce nonlinear factors and maintain the consistency of input and output on the positive semi-axis, thereby enhancing the expressiveness of the model. The setting of the shared layer helps to extract common features between all clients, such as the status of goods and general patterns during transportation. The private layer consists of two fully connected layers with 64 and 32 neurons respectively, and the activation function is Sigmoid. The expression of the Sigmoid activation function is as follows: ; The Sigmoid function maps the input value to [0,1] and interprets the output as a probability. This design enables the private layer to better handle data features unique to each client, such as the cargo status change pattern of a transport agent in a specific environment. With this structure, the private layer can capture detailed features unique to each client without being interfered with by other client data. After initialization, 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 trains the model based on its own local data and feature vectors. Since the data of each client is private, there is a risk of data leakage if these data are used directly for training, so differential privacy processing is performed on the local feature vectors. The differential privacy processing method is to add noise to the feature vector to mask the true information of the original data. Specifically, the Laplace noise mechanism is used, and the formula is as follows: ; in, represents the original feature vector, is a noise vector that follows the Laplace distribution, and its probability density function is: ; in, is a noise parameter, which indicates the strength of privacy protection. , which means that the scale of the noise is moderate, which can effectively cover the original data without excessively interfering with the training effect of the model. Through differential privacy processing, the privacy protection feature vector is obtained , that is, random noise is superimposed on each original eigenvalue to protect the privacy of the data. The privacy-preserving eigenvector is input into the local model of the client, and the forward propagation calculation is performed to obtain the local prediction result. The forward propagation process is to pass the input data through each layer of the model in sequence and gradually calculate the output of the model. Assume that the parameters of the local model are , the local prediction result is expressed as: ; in, is the prediction of the local model, represents the forward propagation function of the model, is the parameter of the model. The forward propagation process can map the input feature vector to the output value of the cargo status detection. Based on the local prediction results And the local tag data of the client Calculate the loss function. The loss function reflects the gap between the model's predicted value and the actual value. The loss function uses the mean square error, and its formula is as follows: ; in, represents the number of samples, It is The predicted value of samples, It is The true labels of samples. By minimizing the loss function , find the parameters that make the predicted value as close to the true value as possible After calculating the loss function, the client uses the back propagation algorithm to update the parameters of the local model. The back propagation algorithm calculates the gradient of the loss function relative to the model parameters and updates the parameters along the negative direction of the gradient. The update formula of gradient descent is as follows: ' in, are the updated model parameters, is the learning rate, which controls the step size of parameter updates, is the loss function with respect to the parameters Through multiple iterations, the model parameters It will gradually optimize to minimize the loss function. When each client completes the update of the local model, it sends the updated shared layer parameters to the central server. In order to protect the privacy of each client, the shared layer parameters are aggregated using secure aggregation technology. Secure aggregation performs weighted average of the parameters of all clients without exposing the specific parameters of each client. Assume that the client The shared layer parameters are , the parameters of the shared layer after aggregation are: ; in, Indicates the number of clients participating in the training, is the aggregated shared layer parameter. 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 to find and eliminate those abnormal client updates, such as abnormal parameter updates caused by data quality issues or malicious attacks. Anomaly detection is performed through statistical methods, such as detecting deviations in parameter updates or judging through model performance indicators. If there is no abnormal update, or after eliminating the abnormal update, the obtained global model is used for the next training round. Repeat the above steps from S3 to S9 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 be stable. The obtained global cargo status detection model can effectively integrate the data features of each client, and has better generalization ability and higher detection accuracy.

[0028] In one example, the collected real-time data set is input into a global cargo status detection model, and multi-level anomaly detection processing is performed to obtain an anomaly detection result, including: preprocessing the collected real-time data set, including data cleaning, standardization and normalization, to obtain a preprocessed real-time data set, and inputting the preprocessed real-time data set into a shared layer of the global cargo status detection model to extract features and obtain a shared feature vector; inputting the shared feature vector into a private layer of the global cargo status detection model to extract personalized features and obtain a private feature vector; and performing feature fusion on the shared feature vector and the private feature vector, using a weighted summation method with a weight ratio of 7:3 to obtain a fused feature vector; and The feature vector is input into the preset isolation forest algorithm to perform primary anomaly detection and obtain a primary anomaly score. The number of trees of the isolation 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 abnormal to obtain a secondary anomaly score. The secondary anomaly score is input into the support vector machine classifier for refined classification to obtain anomaly type labels. The support vector machine uses a radial basis 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, and based on the anomaly pattern clusters and the preset risk level matrix, the comprehensive risk score is calculated to obtain the anomaly detection result.

[0029] In this example, the collected real-time data set is preprocessed, including data cleaning, standardization and normalization. Data cleaning is to remove noise, missing values ​​and outliers in the data to ensure the quality of the data. For example, during the transportation of goods, the temperature sensor may occasionally produce abnormally high readings due to sensor failure, and these readings need to be eliminated during the cleaning process. The data is standardized so that the values ​​of each feature data are distributed in a relatively concentrated range, which is helpful for subsequent model training and feature extraction. The standardized data is mapped to the [0,1] interval through normalization. After normalization, the data is mapped to the same range to avoid some features from dominating the model due to their large value range. The preprocessed real-time data set is input into the shared layer of the global cargo status detection model for feature extraction. The shared layer includes three fully connected layers, each with 512, 256 and 128 neurons respectively. The shared layer is used to extract common cargo status features, such as the changing trends and relationships of temperature, humidity, acceleration and other features. The output of each fully connected layer is represented as: ; in, It is The output feature vector of the layer, It is The weight matrix of the layer, It is The input feature vector of the layer, is the bias term, is an activation function, usually a ReLU function. Through the multi-layer nonlinear transformation of the shared layer, the common features of the global cargo status are extracted 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. The private layer consists of two fully connected layers, with 64 and 32 neurons respectively, and the activation function is Sigmoid. The function of the private layer is to extract personalized features from the data of each client, such as the feature change pattern under certain special environments or specific types of goods. The output of the private layer is expressed as: ; in, It is the private layer The layer outputs a feature vector, is the weight matrix, is the output feature vector of the shared layer, is the bias term, is the Sigmoid activation function. The private feature vector output by the private layer contains the unique cargo status features of each client. The shared feature vector and the private feature vector are fused. The feature fusion adopts the weighted summation method, and the two features are weighted summed in a ratio of 7:3. The calculation formula of the fused feature vector is: ; in, represents the fused feature vector, is the shared eigenvector, is a private feature vector. The obtained fused feature vector contains both global common features and personalized features, which can better describe the comprehensive status of the goods. The fused feature vector is input into the preset 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 of the isolation forest algorithm is set to 100, and the sampling size is set to 256. The scoring formula of the isolation forest is as follows: ; in, is the input feature vector, is the expected value of the path length, which represents the average segmentation depth of the feature vector in the tree, is a normalization factor related to the sample size and is used to normalize the score. The algorithm determines whether each sample is an abnormal sample by calculating the degree of isolation. The output of the isolation forest is the primary anomaly score, and the higher the score, the more likely the sample is abnormal. Based on the primary anomaly score, a threshold is set to determine whether the sample is abnormal and obtain the primary anomaly label. Secondary anomaly detection is performed on the data points marked as abnormal. Secondary anomaly detection uses more complex models and feature combinations to finely identify abnormal patterns and obtain secondary anomaly scores. The secondary anomaly score is input into the support vector machine (SVM) classifier for refined classification. Support vector machine is a supervised classification method that divides samples into different categories by finding the hyperplane with the maximum margin. The classification decision function of the support vector machine is expressed as: ; in, is the weight vector, is a feature mapping function used to map input features to a high-dimensional space. is the bias term. The radial basis kernel 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 the secondary anomaly scores into different anomaly type labels. Cluster analysis is performed on the anomaly type labels. Cluster analysis aggregates similar anomaly type labels together to form multiple anomaly pattern clusters. Assuming that the density-based DBSCAN clustering algorithm is used, it is possible to find sample clusters with a high enough density within a given radius, so as to aggregate the abnormal samples together to obtain different anomaly pattern clusters. Based on the abnormal pattern clusters and the preset risk level matrix, the comprehensive risk score of each pattern cluster is calculated. The comprehensive risk score is calculated by the weighted summation method, and the formula is as follows: ; in, represents the comprehensive risk score, is the number of abnormal pattern clusters, is the weight of each pattern cluster, reflecting its importance in risk assessment, is the risk level of the pattern cluster. In this way, the final anomaly detection result is obtained.

[0030] In one example, 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 a target transportation route, including: spatiotemporal encoding of the historical transportation routes, representing the road network as a graph structure, and obtaining an initialized spatiotemporal graph; in the spatiotemporal graph, nodes represent intersections and edges represent road segments; anomaly detection results are used as attributes of nodes and edges, embedded in the spatiotemporal graph, and an attribute-enhanced spatiotemporal graph is obtained, and a graph convolution operation is performed on the attribute-enhanced spatiotemporal graph, and ChebNet is used for feature extraction to obtain local spatial features; the polynomial order of ChebNet is set to 3; the local spatial features are input into the graph attention layer, and the node is calculated. The attention weights between the nodes are used to obtain the global correlation features, and the global correlation features are subjected to time convolution operation. The dilated convolution is used to model the long-term dependency and obtain the time series features. The time series features are input into the gated recurrent unit for sequence prediction to obtain the initial trajectory prediction results. Based on the initial trajectory prediction results, a multi-objective optimization problem is constructed. The objective function includes transportation time, fuel consumption and cargo safety to obtain the optimization objective function. The particle swarm optimization algorithm is used to solve the optimization objective function to obtain a set of candidate transportation routes. The candidate transportation routes are subjected to Pareto non-dominated sorting to obtain a non-dominated solution set. The solution with the best comprehensive performance is selected from the non-dominated solution set as the target transportation route.

[0031] In this example, the 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 the road segments connecting the intersections. Each intersection is represented by geographic coordinates, and the node ,in and Respectively represent The longitude and latitude of each intersection. Indicates intersection and The weight of the road segment between is the length of the road, the travel time of the road, or the probability of accidents in history. The anomaly detection results are embedded in the space-time graph as the attributes of the nodes and edges to form an attribute-enhanced space-time graph. Assuming that a cargo overheating event has occurred on a certain road, then this anomaly information is used as one of the attribute values ​​of the edge, indicating that this road has certain risks when transporting cold chain goods. Let the attribute of the node be , indicating a node All attribute features of , such as road traffic conditions, traffic light duration, etc., the attributes of the edge are , indicating the edge Attribute features, including road length, historical accident rate, etc. In this way, an attribute-enhanced spatiotemporal graph is obtained, which can more comprehensively reflect the characteristics of the road network. Graph convolution operation is performed on the attribute-enhanced spatiotemporal graph. Graph convolution is a technology that can extract features on graph structured data. It extracts local spatial features by aggregating features within the node neighborhood. Use ChebNet (Chebyshev network) for graph convolution. The feature of ChebNet is that it uses Chebyshev polynomials on the graph to approximate graph convolution operations, which can efficiently capture local features in the graph structure. The polynomial order of ChebNet is set to 3, which means that during the graph convolution process, the characteristics of the node are not only related to its direct neighbor nodes, but also to the second-order and third-order neighbor nodes. The feature extraction formula of ChebNet is as follows: ; in, Representation Node In the The feature vector of the layer, It is The coefficients of the Chebyshev polynomials of order, are Chebyshev polynomials, is the Laplacian matrix of the graph, Is a node In this way, the neighborhood information of each node is aggregated to extract local features containing spatial dependencies. The local spatial features are 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 the self-attention mechanism, thereby focusing on the most important nodes for the current task. Let the query matrix, key matrix and value matrix be and , the calculation formula of attention weight between nodes is: ; in, , and are the weights of the query matrix, key matrix, and value matrix, respectively. is the dimension of the key matrix. By calculating the attention weights, we get the global correlation features between nodes, so that the model can capture the dependencies between distant nodes. We perform temporal convolution on the global correlation features and use dilated convolution to model long-term dependencies. Dilated convolution introduces intervals in the convolution kernel to capture information over a longer time span without increasing parameters. We assume that the dilation rate of dilated convolution is , the convolution kernel size is , the calculation formula of the dilated convolution is as follows: ; in, It's time The convolution output of is the input sequence at time The value of is the convolution kernel weights. Effective long-term dependency modeling is performed on the time series to obtain time series features. The time series features are input into the gated recurrent unit (GRU) for sequence prediction. GRU is an improved recurrent neural network that can maintain information continuity when processing long sequences and avoid the gradient vanishing problem. The state update formula of GRU is as follows: ; in, It's time The hidden state of It is the update gate. is a candidate hidden state, and © represents element-wise multiplication. GRU can update the state based on historical information and 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: ; in, is the transport route to be optimized, Indicates the transportation time, Indicates fuel consumption, Indicates cargo safety. are weight coefficients respectively. The goal is to minimize transportation time and fuel consumption while maximizing cargo safety. Through multi-objective optimization methods, different transportation needs are balanced. The particle swarm optimization algorithm is used to solve the optimization objective function. The particle swarm optimization algorithm simulates the foraging process of bird flocks. Each candidate solution is regarded as a particle. The particle adjusts its position according to its own experience and the experience of the group, and finally finds the global optimal solution. The particle update formula is as follows: ; ; in, It is a particle In the The speed at the iteration, is the position of the particle, is the historical optimal position of the particle, is the global optimal position, is the inertia weight, is the acceleration constant, is a random number. Through multiple iterations, the particle swarm gradually approaches the global optimal solution, and finally obtains a set of candidate transportation routes. Pareto non-dominated sorting is performed on the candidate transportation route set. 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 All objective values ​​of are not better than the solution , then it is called quilt Domination. The non-dominated solution set contains solutions that are not dominated by other solutions in all objectives. The solution with the best comprehensive performance is selected from the non-dominated solution set as the target transportation route. The best comprehensive 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.

[0032] Reference Figure 2 This embodiment provides an intelligent cargo tracking device for a transport agent, comprising: Acquisition module 1 is used to collect multi-source sensor data of goods and transport vehicles to obtain original data sets, and perform time synchronization and Kalman filtering on the original data sets to obtain a fused state vector; Extraction module 2, used for inputting the fused state vector into the deep cargo tracking network for feature extraction, and obtaining a feature vector encoding cargo state feature information; Training module 3, used to perform distributed model training based on feature vectors using the federated security tracking framework to obtain a global cargo status detection model; Processing module 4, used to input the collected real-time data set into the global cargo status detection model, perform multi-level anomaly detection processing, and obtain anomaly detection results; The optimization module 5 is used to perform trajectory prediction and multi-objective optimization using a spatiotemporal graph neural network model according to the anomaly detection results and historical transportation routes to obtain a target transportation route.

[0033] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.

[0034] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0035] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0036] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0037] In summary, an intelligent cargo tracking method for a transport agent is proposed in the embodiment of the present invention. By integrating multiple sensor data such as temperature, humidity, acceleration, air pressure, GPS, IMU, etc., combined with time synchronization and Kalman filter processing, the accuracy and reliability of cargo positioning are significantly improved, and the limitations of a single positioning technology are effectively solved. The use of a deep cargo tracking network for feature extraction can effectively capture the complex spatiotemporal characteristics of the cargo state, and provide high-quality feature representation for subsequent anomaly detection and trajectory prediction. The distributed model training method based on the federated security tracking framework realizes the construction of a global cargo state detection model while protecting the data privacy of each transport agent, effectively solving the data island problem. Through multi-level anomaly detection mechanisms such as isolated forests, local anomaly factors and support vector machines, various abnormal situations can be discovered and accurately classified in a timely manner, greatly improving the safety of cargo transportation. Using a spatiotemporal graph neural network model for trajectory prediction and multi-objective optimization can dynamically adapt to complex traffic conditions and emergencies, and achieve a comprehensive balance between transportation time, fuel consumption and cargo safety. The present invention has good scalability, and can flexibly adjust model parameters and algorithm configurations according to actual needs, and is suitable for cargo transportation scenarios of different scales and types.

[0038] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0039] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0040] 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 structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for intelligent cargo tracking by a transport agent, characterized in that: The following steps are involved: Collecting multi-source sensor data on goods and transport vehicles to obtain an original data set, and performing time synchronization and Kalman filtering on the original data set to obtain a fused state vector; Inputting the fused state vector into a deep cargo tracking network for feature extraction to obtain a feature vector encoding cargo state feature information; Based on the feature vector, a distributed model training is performed using a federated security tracking framework to obtain a global cargo status detection model; Inputting the collected real-time data set into the global cargo status detection model, performing multi-level anomaly detection processing, and obtaining anomaly detection results; According to 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.

2. The intelligent cargo tracking method for transport agents according to claim 1, characterized in that: The multi-source sensor data collection of the cargo and the transport vehicle is performed to obtain the original data set, and the original data set is subjected to time synchronization and Kalman filtering processing to obtain the fused state vector, including: Collect data from the temperature sensors, humidity sensors, acceleration sensors and air pressure sensors installed on the cargo to obtain cargo status data; Collect data from the global positioning system receiver, inertial measurement unit and on-board diagnostic system installed on the transport vehicle to obtain vehicle location and status data; Use low-power wide area network technology to establish a communication link between the goods and the transport agent, transmit data in real time, and obtain real-time transmission data; Performing edge computing processing on the real-time transmission data, including data cleaning, outlier detection and data compression, to obtain pre-processed data; Performing data standardization processing on the cargo status data, the vehicle location and status data, and the preprocessed data to obtain an original data set; The original data set is subjected to time synchronization and Kalman filtering processing to obtain a fused state vector.

3. The intelligent cargo tracking method for transport agents according to claim 2, characterized in that: The performing time synchronization and Kalman filtering on the original data set to obtain a fused state vector includes: Extracting a timestamp from each data point in the original data set to obtain a timestamp sequence, and performing linear interpolation processing on the original data set based on the timestamp sequence to obtain a synchronized data set; Performing data registration on the global positioning system data and the inertial measurement unit data in the synchronous data set to obtain an initial state vector, and inputting the initial state vector into a preset Kalman filter model to perform state prediction to obtain a predicted state vector; Based on the predicted state vector and the observation data in the synchronized data set, a Kalman gain matrix is ​​calculated, and according to the Kalman gain matrix and the observation residual, the predicted state vector is updated to obtain a posterior state vector; The posterior state vector and the cargo state data in the synchronous data set are subjected to data fusion to obtain a comprehensive state vector, and the comprehensive state vector is input into a preset data smoother to perform noise suppression processing to obtain a fused state vector.

4. The intelligent cargo tracking method for transport agents according to claim 1, characterized in that: The step 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 comprises: Input the fused state vector into the one-dimensional convolution layer of the deep cargo tracking network to extract local time features and obtain an initial feature map; the one-dimensional convolution layer includes: 3 one-dimensional convolution sublayers, each sublayer has a convolution kernel size of 5, a step size of 1, a padding of 2, and output channel numbers of 64, 128, and 256 respectively; Performing a maximum pooling operation on the initial feature map to obtain a downsampled feature map; the maximum pooling layer includes: a pooling kernel size of 2 and a step size of 2; The downsampled feature map is input into the long short-term memory network layer to perform time series dependency modeling to obtain a time series feature vector; the long short-term memory network layer includes: 2 layers of bidirectional LSTM, and the number of hidden units is 512; The time series feature vector is processed by a self-attention mechanism, and an attention weight matrix is ​​calculated to obtain a weighted time series feature vector; the self-attention mechanism layer includes: a query matrix, a key matrix, and a value matrix, and the dimension of each matrix is ​​512x512; Input the weighted temporal feature vector into a multi-head attention layer to perform multi-scale feature extraction to obtain a multi-head attention feature vector; the multi-head attention layer includes: 8 attention heads, each with a dimension of 64; Performing residual connection and layer normalization processing on the multi-head attention feature vector to obtain a normalized feature vector, and inputting the normalized feature vector into a feedforward neural network layer for nonlinear transformation to obtain a transformed feature vector; the feedforward neural network layer includes: 2 fully connected layers, the number of neurons in the first layer is 2048, the number of neurons in the second layer is 512, and the activation function is ReLU; Performing a dropout operation on the transformed feature vector to obtain a regularized feature vector, and inputting the regularized feature vector into a fully connected layer to perform feature dimension reduction and fusion to obtain a low-dimensional feature vector; the fully connected layer has a linear transformation with an input dimension of 512 and an output dimension of 256; A softmax activation function is applied to the low-dimensional feature vector to perform feature normalization processing to obtain a feature vector encoding the feature information of the cargo status.

5. The intelligent cargo tracking method for transport agents according to claim 1, characterized in that: Based on the feature vector, the distributed model training is performed using the federated security tracking framework to obtain a global cargo status detection model, including: S1: The transport agents participating in the training are divided into multiple federated learning clients, each of which stores local data and feature vectors; S2: Initialize a global cargo status detection model on a central server, wherein the global cargo status detection model includes a shared layer and a private layer; the shared layer includes three fully connected layers, the number of neurons is 512, 256, and 128, and the activation function is ReLU; the private layer includes two fully connected layers, the number of neurons is 64 and 32, 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 local model, perform forward propagation calculation, and obtain a local prediction result; S6: Calculate the loss function based on the local prediction result and the local label data of the client, and use the back propagation algorithm to update the local model parameters to obtain an updated local model; S7: securely aggregate the shared layer parameters of the updated local model to obtain aggregated shared layer parameters; S8: sending 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 an optimized global model; S10: Repeat steps S3 to S9 until the model converges or reaches a preset number of iterations, thereby obtaining a global cargo status detection model.

6. The intelligent cargo tracking method for transport agents according to claim 5, characterized in that: The collected real-time data set is input into the global cargo status detection model to perform multi-level anomaly detection processing to obtain anomaly detection results, including: Preprocessing the collected real-time data set, including data cleaning, standardization and normalization, to obtain a preprocessed real-time data set, and inputting the preprocessed real-time data set into the shared layer of the global cargo status detection model to extract features and obtain a shared feature vector; Input the shared feature vector into the private layer of the global cargo status detection model, perform personalized feature extraction, obtain a private feature vector, and perform feature fusion on the shared feature vector and the private feature vector, 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 isolation forest algorithm to perform primary anomaly detection and obtain a primary anomaly score; the number of trees of the isolation 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 mark, and secondary anomaly detection is performed on the data points marked as abnormal to obtain a secondary anomaly score; The secondary anomaly score is input into a support vector machine classifier for refined classification to obtain an anomaly type label; the support vector machine uses a radial basis 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, and based on the abnormal pattern clusters and a preset risk level matrix, a comprehensive risk score is calculated to obtain an abnormal detection result.

7. The intelligent cargo tracking method for transport agents according to claim 1, characterized in that: According to the anomaly detection results and the historical transportation routes, trajectory prediction and multi-objective optimization are performed using a spatiotemporal graph neural network model to obtain a target transportation route, including: Performing spatiotemporal encoding on historical transport routes, representing the road network as a graph structure, and obtaining an initialized spatiotemporal graph; in the spatiotemporal graph, nodes represent intersections, and edges represent road segments; The anomaly detection results are used as attributes of nodes and edges, embedded in the space-time graph to obtain an attribute-enhanced space-time graph, and a graph convolution operation is performed on the attribute-enhanced space-time graph, and ChebNet is used to extract features to obtain local spatial features; the polynomial order of the ChebNet is set to 3; Input the local spatial features into the graph attention layer, calculate the attention weights between nodes, obtain the global correlation features, perform a temporal convolution operation on the global correlation features, use a dilated convolution to model long-term dependencies, and obtain a temporal feature; Input the time series features into a gated recurrent unit to perform sequence prediction to obtain an initial trajectory prediction result, and based on the initial trajectory prediction result, construct a multi-objective optimization problem, where the objective function includes transportation time, fuel consumption, and cargo safety, to obtain an optimized objective function; The optimization objective function is solved using a particle swarm optimization algorithm to obtain a set of candidate transportation routes, the set of candidate transportation routes is Pareto non-dominated sorted to obtain a non-dominated solution set, and a solution with the best comprehensive performance is selected from the non-dominated solution set as the target transportation route.

8. An intelligent cargo tracking device for a transport agent, characterized in that: For implementing the steps of the method according to any one of claims 1 to 7, the device comprises: The acquisition module is used to collect multi-source sensor data of goods and transport vehicles to obtain an original data set, and perform time synchronization and Kalman filtering on the original data set to obtain a fused state vector; An extraction module, used for inputting the fused state vector into a deep cargo tracking network for feature extraction to obtain a feature vector encoding cargo state feature information; A training module, used for performing distributed model training based on the feature vector using a federated security tracking framework to obtain a global cargo status detection model; A processing module, used to input the collected real-time data set 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 according to the anomaly detection results and historical transportation routes to obtain a target transportation route.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

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

  • Intelligent networked vehicle lane changing decision modeling method based on space-time diagram neural network

    CN114170789A

  • Logistics transportation optimization method and system based on Internet of Things

    CN118171980A

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

    CN118586805A

Cited By

  • AGV storage robot motion trajectory tracking control method and system

    CN119645047A

  • RFID intelligent label positioning and tracking printing method and system

    CN120045632A

  • Logistics vehicle carbon emission optimization method, system and device based on multi-target cooperation and storage medium

    CN120317645A

  • Generation method, detection method, device and equipment of data anomaly detection model

    CN120387124A

  • Carrying object safety detection management system and method based on Internet of Things

    CN120524307A