A short-term prediction method for slag truck activity level based on deep ensemble learning
Through the method based on deep ensemble learning, the spatio-temporal feature matrix of the slag truck is constructed and a variety of neural network models are used for short-term prediction, which solves the problem that it is difficult to accurately identify key points with high activity levels in the prior art. , achieving high accuracy and stability in short-term prediction of the activity level of slag trucks.
Patent Information
- Application Number
- CN202410799470.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-06-20
AI Technical Summary
The existing technology is difficult to accurately identify key points with high activity levels of slag trucks, which limits the effective control of slag trucks. The existing model mainly predicts vehicle speed or flow, and does not involve prediction of vehicle activity levels.
Using a deep ensemble learning method, a spatiotemporal feature matrix is constructed by acquiring and preprocessing the trajectory data of the slag truck, including geographical dependence, semantic dependence, time dependence and time periodic features, and using a variety of neural network models (such as BI-LSTM, TCN, STGCN and PDFor) perform short-term prediction, combining soft voting methods and weight loss functions to improve prediction accuracy.
It significantly improves the accuracy and stability of short-term prediction of the activity level of the slag truck, effectively deals with the problem of uneven sample distribution, and improves the model's prediction accuracy for a few types of samples.
Smart Images

Figure BDA0004902931550000021 
Figure BDA0004902931550000023 
Figure BDA0004902931550000031
Abstract
Description
Technical Field
[0001] The present invention belongs to environmental engineering, and in particular to a method for short-term prediction of slag truck activity levels based on deep ensemble learning. Background Art
[0002] Slag trucks are one of the most common heavy vehicles on city streets. They are not only an important source of carbon, nitrogen oxide and particulate matter emissions, but also a major contributor to road and site dust. In order to alleviate the air pollution caused by slag trucks, local governments have implemented a series of targeted transportation and environmental policies during periods of heavy pollution. However, existing on-site intervention measures based on the experience of law enforcement officers cannot accurately identify key points with high levels of slag truck activity, which limits the effective control of slag trucks. Current research has not explored effective methods to solve this problem. Although some traffic flow prediction models can predict slag truck activities, the models that perform well are usually unstable deep learning models. In addition, existing models mainly predict vehicle speed or flow, and do not involve the prediction of vehicle activity levels. Summary of the invention
[0003] In response to the above problems, the present invention provides a short-term prediction method for the activity level of slag trucks based on deep ensemble learning.
[0004] A method for short-term prediction of the activity level of a slag truck based on deep ensemble learning of the present invention comprises the following steps:
[0005] Step 1: Acquisition and preprocessing of research data.
[0006] (1) Track point acquisition: The track points of the vehicle are acquired through high-precision sensors mounted on the slag truck. The track point information includes the timestamp t i , latitude lat i and longitude information lon i .
[0007] (2) Stop point screening: The stop point is defined as:
[0008]
[0009] Where Dist(x, y) is the distance between trajectory points x and y; δ and θ are 200 meters and 10 minutes respectively.
[0010] (3) Traffic statistics: The study area is rasterized into 1 km*1 km square grids, and the stop points are accurately matched to each grid. The stop points in each grid are deduplicated by vehicle to ensure that each vehicle is counted only once in the same time window, so as to obtain the slag truck flow. Among them, t is the timestamp and s is the grid number.
[0011] (4) Grid downsampling: The grid is downsampled. First, the average slag truck flow rate of each grid during the heavy pollution period is counted. Secondly, based on Draw a graph of the cumulative distribution function CDF; finally, select The grids belonging to the first 25% are taken as the study area.
[0012] (5) Activity level threshold setting: based on the activity level of all grids in the study area. A line graph of the CDF was drawn; by analyzing the CDF line graph, the threshold corresponding to the top 10% of the slag truck flow was determined; this threshold will be used to distinguish between grids with high and medium activity levels, allowing relevant departments to more effectively manage and intervene in high-risk areas; the slag truck activity level is defined as:
[0013]
[0014] in, It represents the activity level of the slag truck in grid s at timestamp t, where 0, 1, and 2 represent no, medium, and high activity levels of the slag truck, respectively.
[0015] Step 2: Construct spatiotemporal features.
[0016] (1) Geographical dependency: When a slag truck migrates from one grid to another adjacent grid at two consecutive trajectory points, it indicates that there is a direct geographical connection between the two grids. Based on this, an adjacency matrix A is constructed to represent the geographical dependency between the grids:
[0017]
[0018] (2) Semantic dependency: The Fast Dynamic Time Warping (FastDTW) method is used. Fast Dynamic Time Warping finds the best correspondence by dynamically matching points in sequences of different lengths. Based on FastDTW, a semantic association matrix D(i, j) is constructed to represent the semantic dependency between grids:
[0019] D(i,j)=Dist(i,j)+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}
[0020] Among them, D(i, j) represents the first-order relationship between sequences i and j.
[0021] (3) Time dependency: The sliding time window method is used to extract the time dependency in the slag truck data. By setting a specific time window, the model captures the key time series features, thereby better understanding the movement trends and pattern changes of slag trucks in different time periods.
[0022] (4) Time periodicity: Two important information, daily period and weekly period, are extracted from the timestamp data as features.
[0023] Step 3: Establish a short-term prediction model for the activity level of slag trucks.
[0024] (1) Base model: When constructing the prediction framework, four representative neural network models were selected: bidirectional long short-term memory neural network BI-LSTM, temporal convolutional neural network TCN, spatiotemporal graph convolutional neural network STGCN, and propagation delay-aware dynamic long-distance transformer PDFormer; BI-LSTM can effectively capture the front-end and back-end dependencies in time series data through its bidirectional structure; TCN optimizes the processing of time series through its unique convolutional structure; STGCN combines graph convolutional network with temporal convolution and can process spatial and temporal dependencies at the same time; PDFormer introduces the ability to process dynamic long-distance dependencies.
[0025] (2) Ensemble strategy: A soft voting method is used to improve the accuracy and stability of the model, which is defined as:
[0026]
[0027] Among them, w model is the weight of the base model, is the output of the model.
[0028] (3) Loss function: Using the weight loss method, a higher weight is assigned to the minority class in the loss function to improve the model's ability to recognize the minority class. It is defined as follows:
[0029]
[0030] Among them, w i and p i Activity level of slag trucks The weights and probabilities of .
[0031] The beneficial technical effects of the present invention are:
[0032] The present invention significantly improves the accuracy of short-term prediction of slag truck activity level through two key strategies. On the one hand, the soft voting strategy integrates the information of multiple independent base models to provide more stable and reliable prediction results than a single model; on the other hand, the joint downsampling and weight loss are used to effectively deal with the problem of uneven sample distribution in the prediction of slag truck activity level, and effectively improve the prediction accuracy of the model for minority class samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1Schematic diagram of rapid dynamic time warping.
[0034] Figure 2 Schematic diagram of the sliding time window method.
[0035] Figure 3 It is the deep integrated learning framework of the present invention. DETAILED DESCRIPTION
[0036] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0037] A method for short-term prediction of the activity level of a slag truck based on deep ensemble learning of the present invention comprises the following steps:
[0038] Step 1: Acquisition and preprocessing of research data.
[0039] (1) Track point acquisition: The track points of the vehicle are acquired through high-precision sensors mounted on the slag truck. The track point information includes the timestamp t i , latitude lat i and longitude information lon i .
[0040] (2) Stop point screening: A stop point is a special track point of a slag truck, usually located at a location directly related to the transportation of construction waste, such as a construction site or a waste dump. At these locations, vehicles stay for a long time to carry out loading or unloading activities, which is very conducive to on-site personnel to collect evidence and conduct intervention. The definition of a stop point is:
[0041]
[0042] Where Dist(x, y) is the distance between trajectory points x and y; δ and θ are 200 meters and 10 minutes respectively.
[0043] (3) Traffic statistics: In order to achieve refined management of slag trucks, the study area is rasterized into 1 km*1 km square grids, and the parking points are accurately matched to each grid. The parking points in each grid are deduplicated by vehicle to ensure that each vehicle is counted only once in the same time window, so as to obtain the slag truck traffic. Among them, t is the timestamp and s is the grid number.
[0044] (4) Grid downsampling: Since a large proportion of This will seriously affect the prediction accuracy of the model. To solve this problem, the grids are downsampled. First, the average slag truck flow rate of each grid during the heavy pollution period is counted. Secondly, based on Draw a curve graph of the cumulative distribution function CDF to intuitively understand the distribution of slag truck flow in different grids; finally, select The grids belonging to the first 25% are taken as the study area.
[0045] (5) Activity level threshold setting: based on the activity level of all grids in the study area. A line graph of the CDF was drawn; by analyzing the CDF line graph, the threshold corresponding to the top 10% of the slag truck flow was determined; this threshold will be used to distinguish between grids with high and medium activity levels, allowing relevant departments to more effectively manage and intervene in high-risk areas; the slag truck activity level is defined as:
[0046]
[0047] in, It represents the activity level of the slag truck in grid s at timestamp t, where 0, 1, and 2 represent no, medium, and high activity levels of the slag truck, respectively.
[0048] Step 2: Construct spatiotemporal features.
[0049] (1) Geographical dependency: By analyzing the continuous trajectory points of the slag truck, the geographical dependency between grids can be determined. Specifically, when a slag truck migrates from one grid to another adjacent grid at two consecutive trajectory points, it indicates that there is a direct geographical connection between the two grids; this geographical dependency is of great significance for understanding the operation mode of slag trucks and the interaction between regions. Based on this, an adjacency matrix A is constructed to represent the geographical dependency between grids:
[0050]
[0051] (2) Semantic dependency: Due to differences in point type, site size, construction stage, and other factors, the operation modes of slag trucks in various grids show significant differences. In order to deeply analyze these differences, that is, semantic dependencies, the Fast Dynamic Time Warping (Fast DTW) method is used. This is an efficient time series data similarity measurement tool, which is particularly suitable for processing data sequences of inconsistent lengths. Fast Dynamic Time Warping dynamically matches points in sequences of different lengths to find the best correspondence, thereby effectively measuring the similarity of two time series. Its core idea is as follows Figure 1 As shown. Based on FastDTW, a semantic association matrix D(i, j) is constructed to represent the semantic dependency relationship between grids:
[0052] D(i,j)=Dist(i,j)+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}
[0053] Among them, D(i, j) represents the first-order relationship between sequences i and j.
[0054] (3) Time dependency: The sliding time window method is used to extract the time dependency in the slag truck data, such as Figure 2 By setting a specific time window, the model captures key time series features, thus better understanding the movement trends and pattern changes of slag trucks in different time periods.
[0055] (4) Time periodicity: The activities of slag trucks show significant daily and weekly periodicity characteristics, which is extremely critical for predicting the activity level of slag trucks. Therefore, two important information, daily period and weekly period, are extracted from the timestamp data as features so that the model can capture the regular changes in the activities of slag trucks.
[0056] Step 3: Establish a short-term prediction model for the activity level of slag trucks. The framework of the model is as follows: Figure 3 shown.
[0057] (1) Base model: When constructing the prediction framework, the base model is selected according to the principle of diversity to ensure that the selected model can capture and supplement information from different perspectives. To this end, four representative neural network models are selected: bidirectional long short-term memory neural network (BI-LSTM), temporal convolutional neural network (TCN), spatiotemporal graph convolutional neural network (STGCN), and propagation delay-aware dynamic long-distance transformer (PDFormer). These models are based on different theoretical foundations and have shown excellent performance in different development stages of traffic flow prediction. BI-LSTM can effectively capture the front-to-back dependencies in time series data through its bidirectional structure; TCN optimizes the processing of time series through its unique convolutional structure; STGCN combines graph convolutional networks with temporal convolutions to simultaneously process spatial and temporal dependencies; PDFormer introduces the ability to process dynamic long-distance dependencies, which is particularly critical for complex traffic flow dynamics prediction. By integrating these models, not only can the activity level of slag trucks be understood and predicted from multiple dimensions, but the accuracy and robustness of the overall prediction can also be improved.
[0058] (2) Integration strategy: Use soft voting to improve the accuracy and stability of the model. Soft voting does not simply count the majority of the model's prediction results, but determines the final prediction by calculating the weighted average of the outputs of multiple base models. This method allows the model to use the output probability of each base model, thereby more carefully integrating the prediction results of each model. It is defined as:
[0059]
[0060] Among them, W modelis the weight of the base model, is the output of the model.
[0061] (3) Loss function: To further alleviate the problem of uneven sample distribution, the weight loss method is used. In the loss function, a higher weight is assigned to the minority class to improve the model's ability to recognize the minority class. It is defined as follows:
[0062]
[0063] Among them, w i and p i Activity level of slag trucks The weights and probabilities of .
[0064] The short-term prediction method of the activity level of slag trucks based on deep ensemble learning provided by the present invention provides scientific decision-making support for the management and control of slag trucks during heavy pollution periods, and effectively guides relevant departments to carry out refined management, thereby alleviating air pollution problems related to slag trucks.
Claims
1. A short-term prediction method for slag truck activity level based on deep ensemble learning, characterized in that: The following steps are involved: Step 1: Acquisition and preprocessing of research data; (1) Track point acquisition: The track points of the vehicle are acquired through high-precision sensors mounted on the slag truck. The track point information includes the timestamp t i , latitude lat i and longitude information lon i ; (2) Stop point screening: The stop point is defined as: Dist((lat1,lon1),(lat j ,lon j ))≤δ t n -t1≥θ Where Dist(x, y) is the distance between trajectory points x and y; δ and θ are 200 meters and 10 minutes respectively; (3) Traffic statistics: The study area is rasterized into 1 km*1 km square grids, and the stop points are accurately matched to each grid. The stop points in each grid are deduplicated by vehicle to ensure that each vehicle is counted only once in the same time window, so as to obtain the slag truck flow. Among them, t is the timestamp, s is the number of the grid; (4) Grid downsampling: The grid is downsampled. First, the average slag truck flow rate of each grid during the heavy pollution period is counted. Secondly, based on Draw a graph of the cumulative distribution function CDF; finally, select The grids belonging to the first 25% were taken as the study area; (5) Activity level threshold setting: based on the activity level of all grids in the study area. A line graph of the CDF was drawn; by analyzing the CDF line graph, the threshold corresponding to the top 10% of the slag truck flow was determined; this threshold will be used to distinguish between grids with high and medium activity levels, allowing relevant departments to more effectively manage and intervene in high-risk areas; the slag truck activity level is defined as: in, represents the slag truck activity level of grid s at timestamp t, 0, 1, and 2 represent no, medium, and high slag truck activity levels, respectively; Step 2: Construct spatiotemporal features; (1) Geographical dependency: When a slag truck migrates from one grid to another adjacent grid at two consecutive trajectory points, it indicates that there is a direct geographical connection between the two grids. Based on this, an adjacency matrix A is constructed to represent the geographical dependency between the grids: (2) Semantic dependency: The Fast Dynamic Time Warping (FastDTW) method is used. Fast Dynamic Time Warping finds the best correspondence by dynamically matching points in sequences of different lengths. Based on FastDTW, a semantic association matrix D(i, j) is constructed to represent the semantic dependency between grids: D(i,j)=Dist(i,j)+min{D(i-1,j),D(i,j-1),D(i-1,j-1)} Where D(i, j) represents the first-order relationship between sequences i and j; (3) Time dependency: A sliding time window method is used to extract the time dependency in the slag truck data. By setting a specific time window, the model captures key time series features, thereby better understanding the movement trends and pattern changes of slag trucks in different time periods. (4) Time periodicity: Two important information, daily period and weekly period, are extracted from the timestamp data as features; Step 3: Establish a short-term prediction model for the activity level of slag trucks; (1) Base model: When constructing the prediction framework, four representative neural network models were selected: bidirectional long short-term memory neural network BI-LSTM, temporal convolutional neural network TCN, spatiotemporal graph convolutional neural network STGCN, and propagation delay-aware dynamic long-distance transformer PDFormer; BI-LSTM can effectively capture the front-end dependency relationship in time series data through its bidirectional structure; TCN optimizes the processing of time series through its unique convolutional structure; STGCN combines graph convolutional network with temporal convolution and can process spatial and temporal dependencies at the same time; PDFormer introduces the ability to process dynamic long-distance dependencies; (2) Ensemble strategy: A soft voting method is used to improve the accuracy and stability of the model, which is defined as: Among them, w model is the weight of the base model, is the output of the model; (3) Loss function: Using the weight loss method, a higher weight is assigned to the minority class in the loss function to improve the model's ability to recognize the minority class. It is defined as follows: Among them, w i and p i Activity level of slag trucks The weights and probabilities of .
Citation Information
Patent Citations
Big data analysis method based on traffic data
CN108242149A
An intelligent traffic data analysis system based on big data
CN109345823A