A truck overload discrimination method based on artificial intelligence technology
By constructing an AI-based overload detection method, utilizing truck driving information data and a convolutional neural network model, the problems of trucks taking detours and high costs in existing technologies have been solved, achieving efficient and accurate overload detection and improving law enforcement efficiency and detection accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2023-06-26
- Publication Date
- 2026-05-12
AI Technical Summary
Existing overload detection methods suffer from problems such as trucks taking detours, limited monitoring range, and low detection efficiency. Furthermore, vehicle-mounted weighing methods are costly and difficult to promote.
An AI-based overload detection method is adopted. By collecting truck driving information data, an overload detection convolutional neural network model is constructed. Spatial and channel attention modules are used to improve the model's feature extraction ability from truck driving trajectory images. Combined with the ResNet backbone network, overload detection is performed, achieving efficient and accurate detection without the need for additional weighing devices.
It achieves rapid and accurate identification of overloaded trucks, improves law enforcement efficiency, has low detection costs, and achieves a prediction accuracy rate of 92.2%, with a recall rate and a precision rate of 93.8% and 92.7%, respectively.
Smart Images

Figure CN116798009B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology applications, and in particular to a method for detecting overloaded trucks. Background Technology
[0002] Currently, the most common methods for identifying overloaded vehicles include two main approaches: weight measurement at control points and manual inspection. Weight measurement at control points is problematic because these points are fixed, allowing trucks to deliberately take detours. Manual inspection, on the other hand, requires law enforcement officers to randomly inspect trucks one by one at key traffic arteries or intersections, resulting in a limited monitoring range and low efficiency, making it unsuitable for current needs. Therefore, a fast and accurate method for identifying overloaded vehicles is urgently needed to improve the enforcement efficiency of relevant departments.
[0003] To address this issue, scholars both domestically and internationally have conducted extensive research and achieved fruitful results. Based on the detection principle, these methods can be categorized into fixed-point weighing and vehicle-mounted weighing methods. The research focus of fixed-point weighing methods is primarily on dynamic weighing. When an overloaded vehicle passes through the weighing device, its weight is automatically recorded, and the overload status is determined. This method significantly improves weighing efficiency but cannot solve the problem of trucks taking detours. Vehicle-mounted weighing methods measure vehicle weight and determine overload status by installing sensors on the truck. While this method can monitor vehicle load in real time, it requires the installation of measuring devices on the vehicle, which are expensive and difficult to implement. Artificial intelligence (AI) technology has strong generalization capabilities. After training with datasets, it can effectively extract data features and make accurate judgments unaffected by subjective factors. Therefore, AI technology can be used to improve the efficiency and accuracy of overload detection. Summary of the Invention
[0004] This invention aims to solve existing problems by proposing a truck overload detection method based on artificial intelligence technology. This method boasts high detection accuracy, fast detection speed, and low detection cost, eliminating the need for additional weighing devices and significantly improving the efficiency of truck overload detection. The specific technical solution is as follows:
[0005] A method for detecting overloaded trucks based on artificial intelligence technology includes the following steps:
[0006] (1) Collect truck driving information data to obtain raw data files, including three fields: driving time, speed and location. Among them, trucks include overloaded trucks and trucks without overloading behavior.
[0007] (2) Organize and optimize the original data files to obtain driving information data for each truck;
[0008] (3) The driving information data of a single truck is converted into a truck driving trajectory image, as follows:
[0009] 1) Select the actual geographical area of the truck's driving trajectory;
[0010] 2) Draw a point map of the truck's driving trajectory based on longitude and latitude;
[0011] 3) Set the resolution of the generated truck trajectory image and divide the truck trajectory point map into pixel grid blocks;
[0012] 4) Convert the number of trajectory points in each pixel of the truck trajectory point image after pixel grid segmentation into grayscale values to obtain the truck trajectory image;
[0013] (4) Construct a truck overload dataset using all truck driving trajectory images, which includes two categories: overloaded and not overloaded;
[0014] (5) Build an overload discrimination convolutional neural network model, select the backbone network, and add a spatial attention module and a channel attention module on this basis to make the network pay more attention to the effective information in the truck driving trajectory image. The input of the overload discrimination convolutional neural network model is the truck driving trajectory image.
[0015] (6) Model training.
[0016] Further, in step (2), the original data file is organized and optimized to obtain the driving information data of each truck. The method is as follows: the original truck driving information data is sorted according to the driving time and license plate number to obtain the driving information data of each truck; the Savitzky Golay smoothing method and differential filter are selected to filter the data; the cubic spline interpolation algorithm is selected to interpolate and optimize the driving information data of each truck to obtain driving information data with equal time intervals.
[0017] Furthermore, in step (5), an overloaded discriminative convolutional neural network model is built using ResNet as the backbone network.
[0018] Furthermore, in step (5), the network processing flow is as follows:
[0019] 1) The input image of the truck's trajectory is processed through a convolutional layer to obtain the initial feature map F;
[0020] 2) The initial feature map F is processed sequentially through two Residual modules, one channel attention module, and one spatial attention module to obtain a feature map F1 with both spatial and channel attention characteristics;
[0021] 3) F1 is processed by two residual modules, one channel attention module, and one spatial attention module to obtain a feature map F2 with a smaller scale than F1;
[0022] 4) F2 is processed by two residual modules, one channel attention module, and one spatial attention module to obtain a feature map F3 with a smaller scale than F2;
[0023] 5) Feature map F3 is processed by two residual modules to obtain the final feature map F4 used for discrimination;
[0024] 6) The feature map F4 is processed by an average pooling layer and a fully connected layer to obtain the final discrimination result and output it. The output discrimination result is the predicted probability value of the two classes: overload and non-overload.
[0025] Further, the method of step (6) is as follows: select the cross-entropy loss function, use the stochastic gradient descent algorithm to train the model, and save the network model with the minimum loss during the training process. Attached Figure Description
[0026] Figure 1 Flowchart of an AI-based overload detection method
[0027] Figure 2 Example diagram of data preprocessing process
[0028] Figure 3 Example image of a data source file for truck driving information
[0029] Figure 4 The diagram shows the structure of a convolutional neural network model for an AI-based overload discrimination method.
[0030] Figure 5 Schematic diagram of the channel attention module structure
[0031] Figure 6 Schematic diagram of the spatial attention module structure Detailed Implementation
[0032] The invention will be further described below with reference to the accompanying drawings, such as... Figure 1 As shown, this invention processes and analyzes driving information data collected by the truck's onboard satellite positioning device to ultimately determine if the truck is overloaded. The truck driving information data used is collected over the past 24 hours prior to the detection, with each piece of information including three fields: driving time, speed, and location. The data collection interval is 30 seconds. The specific steps are as follows:
[0033] (1) Collect driving information data from the satellite positioning devices on multiple trucks to obtain raw data files, such as... Figure 2As shown, each piece of information in the original data file includes three fields: travel time, speed, and location, with a size of approximately 117GB. The travel times of the trucks are distributed from 00:00 on November 1, 2022 to 24:00 on November 30, 2022. Among them, there are approximately 150,000 overloaded trucks and approximately 340,000 trucks without overloading.
[0034] (2) The original data files are organized and optimized. First, the original truck driving data are sorted according to driving time and license plate number to obtain driving information data for each truck. Then, Savitzky Golay smoothing method and differential filter are selected to filter the data to solve the noise problem caused by sensor positioning error and data transmission fluctuation in the driving information data. Finally, cubic spline interpolation algorithm is selected to interpolate and optimize the driving information data to obtain driving information data with equal time intervals.
[0035] (3) Convert the driving data file of a single truck into a truck driving trajectory image. The steps are as follows:
[0036] 5) Select the actual geographical area of the truck driving trajectory image. In this invention, the trucks in Tianjin are taken as the research object. The latitude and longitude range of the selected actual geographical area is 116.6°-118.2° east longitude and 38.6°-40.2° north latitude.
[0037] 6) Select longitude as the horizontal axis and latitude as the vertical axis to draw a point map of the truck's driving trajectory;
[0038] 7) Set the resolution of the generated truck trajectory image to 500×500, and divide the truck trajectory point image into pixel grid blocks;
[0039] 8) Convert the number of trajectory points in each pixel of the truck's trajectory point image after pixel grid segmentation into grayscale values. The conversion formula is as follows:
[0040]
[0041] in:
[0042]
[0043]
[0044] In the formula, g i,j Represents pixel grid m i,j The gray value at p x Let x represent the x-th coordinate point, and f(*) be the function that determines the pixel position of the coordinate point (if p...). x In pixel grid m i,j(If the value is 1, it is 0 otherwise), T(*) is a conversion function used to map the number of driving trajectory points in a single pixel grid to the range [0,255].
[0045] (4) Construct a truck overload dataset using all truck driving trajectory images. It includes two categories: overloaded and non-overloaded, with 150,225 overloaded trucks and 341,776 non-overloaded trucks.
[0046] (5) An overload discrimination convolutional neural network model was constructed, using ResNet as the backbone network. Spatial attention and channel attention modules were added to make the network focus more on effective information in the truck's trajectory image and ignore other invalid information, thereby improving the model's overload discrimination ability. The input to the overload discrimination convolutional neural network model is the truck's trajectory image. The network processing flow is as follows:
[0047] 1) The input image of the truck's trajectory is processed through a convolutional layer to obtain the initial feature map F;
[0048] 2) The initial feature map is obtained after being processed by two Residual modules in sequence. After processing by a channel attention module and a spatial attention module, a feature map F1 with dual spatial and channel attention characteristics is obtained;
[0049] 3) F1 is obtained after being processed by two Residual modules. The feature map F2 is obtained by processing through a channel attention module and a spatial attention module;
[0050] 4) F2 is obtained after being processed by two Residual modules. The feature map F3 is obtained by processing through a channel attention module and a spatial attention module;
[0051] 5) Feature map F3 is processed by two residual modules to obtain the final feature map F4 used for discrimination;
[0052] 6) Feature map F4 is processed by an average pooling layer and a fully connected layer to obtain the final discrimination result and output. The output discrimination result is the predicted probability value of overload and non-overload classes.
[0053] The Residual module is well-known in the industry, and the structure of the channel attention module is as follows: Figure 5 As shown, the input to the channel attention module is the feature map output by the Residual module (e.g., The feature map is processed by average pooling and max pooling, and then channel attention weights are obtained through a multilayer perceptron (MLP). Then, the normalized channel attention weights are obtained through the sigmoid function. Finally, the input of the channel attention module is multiplied by the normalized attention weights to obtain a feature map with channel attention characteristics and output it.
[0054] The structure of the spatial attention module is as follows: Figure 6 As shown, the input of the spatial attention module is the output of the channel attention module, i.e., the feature map with channel attention characteristics. First, average pooling and max pooling are performed in the channel dimension, and the processed results are concatenated. Then, a 7×7 convolution kernel is used to convolve on the concatenated feature map to reduce the data dimension of the concatenated feature map. Then, the sigmoid activation function is used to generate spatial attention weights. Finally, the input of the spatial attention module (the feature map with channel attention characteristics) is multiplied with the spatial attention weights to obtain the feature map output with dual attention characteristics of channel attention and spatial attention.
[0055] (6) Select the cross-entropy loss function and use the stochastic gradient descent algorithm to train the model. Save the network model with the minimum loss during training. The initial learning rate is 0.001. Train for a total of 50 generations. The batch size is 32. The model training environment is: CPU: Ryzen 3950X, GPU: RTX 3090, RAM: 128GB, OS: Windows 10, deep learning framework: Pytorch 1.10.0.
[0056] (7) The saved model was used to test the test set to obtain the overload judgment results of the trucks. The test set size was 10.2 GB, which contained 20,157 overloaded vehicles and 23,578 non-overloaded vehicles. The trucks traveled from November 1, 2022 to November 31, 2022. The test results showed that the prediction accuracy of this model was 92.2%, the recall rate of overload judgment was 93.8%, and the precision rate was 92.7%. It can be seen that the method achieves efficient and accurate truck overload judgment.
Claims
1. A method for detecting overloaded trucks based on artificial intelligence technology, comprising the following steps: (1) Collect truck driving information data to obtain raw data files, including three fields: driving time, speed, and location. Trucks include overloaded trucks and trucks that are not overloaded; (2) Organize and optimize the original data files to obtain driving information data for each truck; (3) The driving information data of a single truck is converted into a truck driving trajectory image, as follows: 1) Select the actual geographical area of the truck's driving trajectory; 2) Draw a point map of the truck's driving trajectory based on longitude and latitude; 3) Set the resolution of the generated truck trajectory image and divide the truck trajectory point map into pixel grid blocks; 4) Convert the number of trajectory points in each pixel of the truck trajectory point image after pixel grid division into grayscale values to obtain the truck trajectory image; (4) Construct a truck overload dataset using all truck driving trajectory images, which includes two categories: overloaded and not overloaded; (5) Construct an overload discrimination convolutional neural network model, select a backbone network, and add a spatial attention module and a channel attention module to make the network pay more attention to the effective information in the truck's driving trajectory image. The input of the overload discrimination convolutional neural network model is the truck's driving trajectory image. The method is as follows: 1) Input the truck's trajectory image and process it through a convolutional layer to obtain the initial feature map. F ; 2) Initial feature map F Passing through two in succession Residual The module, a channel attention module, and a spatial attention module process the data to obtain a feature map with both spatial and channel attention properties. F 1; 3) F 1 After two Residual A module, a channel attention module, and a spatial attention module process more efficiently than... F 1. Smaller scale feature maps F 2; 4) F 2 After two Residual A module, a channel attention module, and a spatial attention module process more efficiently than... F 2. Smaller-scale feature maps F 3; 5) Feature Map F 3 After two Residual The module obtains the final feature map used for discrimination. F 4; 6) Feature Map F 4. After processing through an average pooling layer and a fully connected layer, the final discrimination result is obtained and output. The output discrimination result is the predicted probability value of the two classes: overload and non-overload. (6) Model training.
2. The method for determining truck overload according to claim 1, characterized in that, In step (2), the original data file is organized and optimized to obtain the driving information data of each truck. The method is as follows: sort the original truck driving information data according to the driving time and license plate number to obtain the driving information data of each truck. Savitzky Golay smoothing and differential filters were selected to filter the data; cubic spline interpolation was selected to optimize the driving information data of each truck to obtain driving information data at equal time intervals.
3. The method for determining truck overload according to claim 1, characterized in that, In step (5), an overloaded discriminative convolutional neural network model is built using ResNet as the backbone network.
4. The method for determining truck overload according to claim 1, characterized in that, The method for step (6) is as follows: select the cross-entropy loss function, use the stochastic gradient descent algorithm to train the model, and save the network model with the minimum loss during the training process.