Highway engineering intelligent traffic flow prediction method based on big data
Through the big data intelligent traffic flow prediction method, multi-source data acquisition and feature enhancement, frequency domain fusion and knowledge distillation technology are used to solve the problems of insufficient feature mining and high computing resource consumption in traditional methods, and high-precision and low-latency traffic flow prediction are achieved.
Patent Information
- Application Number
- CN202510755566.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-06-06
AI Technical Summary
Traditional traffic flow prediction methods have limitations in data feature mining and model training, and it is difficult to capture the periodicity and trend of traffic flow, and the computing resources are consumed and the prediction accuracy is insufficient.
Using intelligent traffic flow prediction method based on big data, we realize the outstanding key information and efficient extraction and fusion of features through multi-source data acquisition, data preprocessing, local enhancement and fusion module, frequency domain fusion and knowledge distillation module, combined with Transformer encoder and GRU.
It improves the accuracy of traffic flow prediction, reduces the amount of calculation, realizes end-side real-time prediction, and avoids transmission delays of traditional cloud models.
Smart Images

Figure CN120496325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a method for intelligent traffic flow prediction in highway engineering based on big data. Background Art
[0002] The construction and maintenance of highway networks has become a crucial task in ensuring smooth, safe, and efficient transportation. The development of modern cities requires an efficient transportation system to support daily economic activities and residents' travel. As a core component of the urban transportation system, the health of highways directly impacts the operational efficiency of the entire transportation network.
[0003] As my country's highway network continues to expand, massive amounts of traffic flow monitoring data, vehicle trajectory information, and meteorological and environmental data are intertwined and superimposed, forming a complex and multifaceted data structure. Against this backdrop, traditional traffic flow forecasting methods are gradually exposing their limitations and are unable to adapt to the analytical needs of the big data era. Improving traffic flow forecasting through effective technical means has become a pressing challenge. Deep learning, with its powerful data processing capabilities and adaptive learning characteristics, offers new solutions to complex traffic problems.
[0004] At present, traditional methods for highway traffic flow prediction still have the following limitations:
[0005] (1) Most methods focus on the time domain analysis of traffic flow data, but fail to fully explore the frequency domain features implicit in the data, making it difficult to capture the deep laws of traffic flow changes, such as the periodicity and trend.
[0006] (2) During the feature processing process, there is a lack of targeted enhancement of local key features, which makes it difficult for the model to effectively extract important information from traffic flow data, affecting the prediction accuracy.
[0007] (3) The prediction model training process often improves performance through a large number of parameter adjustments and data training, but too many parameters lead to long training time and high consumption of computing resources, while lightweight models are difficult to meet accuracy requirements.
[0008] Based on this, the present invention designs an intelligent traffic flow prediction method for highway engineering based on big data to solve the above problems. Summary of the Invention
[0009] In view of the above shortcomings of the prior art, the present invention provides an intelligent traffic flow prediction method for highway engineering based on big data.
[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0011] The intelligent traffic flow prediction method for highway engineering based on big data includes the following steps:
[0012] (1) A multi-source traffic data collection sensor network, which collects traffic data using existing sensor networks, including surveillance cameras, road sensors, and vehicle-mounted GPS. The multi-source traffic data collection sensor network communicates with a meteorological platform and a traffic event platform.
[0013] (2) Data preprocessing unit, which is used to clean, normalize, and extract features from traffic data and perform spatiotemporal alignment;
[0014] (3) Local data enhancement and fusion module: a convolutional attention fusion module is inserted between the 2nd, 6th, and 9th layers of the Transformer encoder, a GRU is embedded in the convolutional attention fusion module, and a sliding window local feature enhancement algorithm is used to perform local enhancement on the processed spatiotemporal features, statistical features, image features, and environmental and event features to highlight key information;
[0015] (4) Frequency domain fusion module: Perform fast Fourier transform (FFT) on the temporal features output by the Transformer encoder and convert them into the frequency domain space to obtain frequency domain features; set the frequency division threshold K to split the frequency domain features into low-frequency components and high-frequency components; perform information interaction fusion of low-frequency and high-frequency components; perform inverse discrete Fourier transform to obtain the final fusion feature F 最终 ;
[0016] (5) Knowledge distillation module, which adopts a double distillation mechanism and a double distillation compression model combining feature and similarity matrices;
[0017] (6) Traffic prediction module, the final fusion feature F 最终 Input the Transformer decoder and output the traffic flow prediction value for the future period.
[0018] Furthermore, in step (1), the monitoring camera is used to obtain the number, speed, distance between vehicles, and license plate number information of the vehicles; the road sensor uses a geomagnetic sensor or a lidar sensor to obtain the vehicle position, speed, and vehicle model information; the on-board GPS is used to obtain the vehicle position, speed, and trajectory information; the meteorological data is obtained through the meteorological platform; and the event data is obtained through the traffic event platform.
[0019] Furthermore, in step (2), data cleaning specifically includes: missing value processing, spatiotemporal interpolation outlier detection, and duplicate data removal;
[0020] Normalization processing specifically includes: dimension unification, numerical standardization, and time synchronization;
[0021] Feature extraction unit, used to extract spatiotemporal features, statistical features, image features, and environmental and event features of traffic data;
[0022] The spatiotemporal alignment unit is used to perform spatial and temporal alignment processing on the features extracted by the feature extraction unit and realize data association.
[0023] Furthermore, the specific steps of step (3) are:
[0024] ① Combine the processed spatiotemporal features, statistical features, image features, and environmental and event features to form a multidimensional feature vector F∈R T×N×C , where T represents the time step, N represents the feature dimension, and C represents the number of channels. The sliding window local feature enhancement algorithm is used, with the window size set to w and the step size set to 1. The feature vector F is divided along the time dimension to obtain the local feature subsequence F local ∈R w×N×C , each local feature subsequence uses a convolutional neural network to extract local spatial features. The convolution kernel size is set to k×1×1. The convolution operation obtains the spatial response R of the local feature, which is input to the attention mechanism module to calculate the attention weight β of each local feature element:
[0025] β=Softmax(MLP(Flatten(R)));
[0026] Among them, MLP represents multi-layer perceptron, Flatten is the flattening operation, and β is used to measure the importance of each element in the local feature.
[0027] According to the calculated attention weight β, the local feature subsequence F local Perform weighted operations to enhance local features:
[0028] F 增强 =β⊙F local
[0029] Here, ⊙ represents element-wise multiplication. This can highlight the key information in local features and suppress the secondary information, thus achieving local feature enhancement.
[0030] ②Convolutional attention fusion modules are inserted into the 2nd, 6th, and 9th layers of the Transformer encoder respectively. Through the convolutional attention fusion modules, local feature enhancement and cross-modal feature interaction are achieved.
[0031] Furthermore, in step (3), the specific steps of the convolutional attention fusion module are: the enhanced local feature subsequence F 增强 and the global feature F output by the current layer of the Transformer encoder 全局 Perform channel splicing to obtain input feature F 输入 ; Adaptive normalization method is used to adjust F 输入 Normalize it and then calculate F输入 Use multi-branch convolution structure for feature extraction:
[0032] Use a convolution kernel of size 3×3×C, a stride of 1, and a padding of 1 for F 输入 Perform convolution operations to extract the spatial structure information of features. After obtaining spatial features, input them into GRU to further capture more complex temporal dependencies and obtain F space.
[0033] A convolution kernel of size 1×3×C, a step size of 1, and padding of (0, 1, 0) is used to perform convolution along the time dimension to capture the changing trend of traffic flow over time and obtain the time feature F 时间 ;
[0034] Channel convolution branch: Use the convolution kernel of 1×1×Cin~Cout to integrate and transform the channel dimension to obtain the channel feature F 通道 ;
[0035] F 空间 、F 时间 、F 通道 Splicing along the channel dimension to obtain the fusion feature F 融合 ; for F 融合 Perform linear transformation to obtain the query matrix Q, key matrix K and value matrix V; divide Q, K, and V into multiple local windows, calculate the attention score in each local window, and merge the attention results of each local window to obtain the local cross attention result F local_attn . The local cross attention result F local_attn Perform residual connection and gate fusion with fusion; the final output F 输出 As the input of the next layer of Transformer encoder.
[0036] Furthermore, in step (4), the low-frequency component and the high-frequency component are subjected to dimensionality reduction processing respectively, and the number of channels C is reduced to C′=C / 2, and the low-frequency component F after dimensionality reduction is obtained. 低 and high frequency component F 高 ; Perform weighted summation on the low-frequency and high-frequency components after dimensionality reduction, and the calculation formula is:
[0037] F fusion =W 低 ⊙F 低 +W 高 ⊙F 高
[0038] Among them, W 低 、W 高 Represents the learnable weight vector, W 低 ∈RC′,W 高 ∈RC′,W 低 +W高 = 1. ⊙ represents element-wise multiplication.
[0039] Through simple linear weighting, the information interaction and fusion of low-frequency and high-frequency components are achieved.
[0040] Furthermore, in step (4), before the inverse transformation, the fused frequency domain feature F fusion The length T of the original frequency domain feature can be filled in by zeroing the frequency points where the high-frequency components are missing, and the complete frequency domain feature F is obtained. 完整 , then to F 完整 Perform inverse discrete Fourier transform and convert it back to the time domain to obtain the final fusion feature F 最终 .
[0041] Furthermore, in step (5), in the double distillation mechanism, feature representation distillation forces the student to imitate the teacher's intermediate layer features, using the MSE loss function:
[0042]
[0043] Among them, Ftea represents the feature representation of the teacher model, Fstu represents the feature representation of the student model, and Lfeat represents the feature distillation loss.
[0044] Furthermore, in step (5), in the double distillation mechanism, similarity matrix distillation is used to guide students to learn the teacher's spatiotemporal correlation matrix, using the L2 loss function:
[0045]
[0046] Where l represents the network level; (i, j) represents the row and column index of the similarity matrix, corresponding to the sample pairs in the time and space dimensions. For example, in the time similarity matrix, i and j correspond to different time steps; in the spatial similarity matrix, i and j correspond to different road sections. represents the similarity matrix of the output of the student model layer l, represents the similarity matrix of the output of the teacher model layer l; ∑l represents the sum of the corresponding layers of the teacher model and the student model.
[0047] Furthermore, in step (6), the mean square error or mean absolute error is used to measure the difference between the predicted value and the true value to optimize the model parameters.
[0048] In order to better achieve the purpose of the present invention, the present invention also provides
[0049] Compared with the existing technology, the present invention has the following advantages: the present invention adopts a local data enhancement and fusion module, inserts a convolutional attention fusion module between the 2nd, 6th and 9th layers of the Transformer encoder, embeds a GRU in the convolutional attention fusion module, and adopts a sliding window local feature enhancement algorithm to locally enhance the processed spatiotemporal features, statistical features, image features, and environmental and event features to highlight key information;
[0050] The present invention introduces a frequency domain fusion module, which decomposes the time series features into low-frequency (long-term trend) and high-frequency (short-term fluctuation) components through FFT, and performs weighted fusion after dimensionality reduction. This reduces the amount of calculation while explicitly modeling characteristics of different time scales, thereby improving the prediction accuracy of periodic congestion (such as morning and evening rush hours) and sudden accidents.
[0051] This paper employs a dual knowledge distillation mechanism, compressing a 12-layer teacher model into a 4-layer student model through feature distillation and similarity matrix distillation. This effectively reduces computational complexity while maintaining over 90% accuracy. The student model generated through knowledge distillation can be deployed on edge computing devices (such as roadside units (RSUs)) or cloud servers, enabling real-time prediction on the edge, avoiding the transmission delays associated with traditional cloud-based models.
[0052] The present invention can be used in intelligent traffic flow prediction of highway engineering, such as freeway flow prediction and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0054] Figure 1 This is a schematic diagram of the principle of the big data-based intelligent traffic flow prediction method for highway engineering of the present invention. DETAILED DESCRIPTION
[0055] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0056] Example 1: In some embodiments, please refer to the accompanying drawings of the specification. Figure 1,The intelligent traffic flow prediction method for highway engineering based on big data ,includes the following steps:
[0057] (1) A multi-source traffic data collection sensor network, which collects traffic data using existing sensor networks, including surveillance cameras, road sensors, and vehicle-mounted GPS. The multi-source traffic data collection sensor network communicates with the meteorological platform and the traffic event platform.
[0058] Surveillance cameras are used to obtain information such as the number of vehicles, speed, distance between vehicles, and license plate numbers;
[0059] Road sensors use geomagnetic sensors or LiDAR sensors to obtain information such as vehicle location, speed, and vehicle type;
[0060] The vehicle-mounted GPS is used to obtain information such as the vehicle's location, speed, and trajectory;
[0061] Obtain meteorological data (rainfall, wind speed, visibility) through the meteorological platform;
[0062] Obtain event data (traffic accident notifications, road construction notices) through the traffic event platform;
[0063] (2) Data preprocessing unit, which is used to clean, normalize, and extract features from traffic data and perform spatiotemporal alignment;
[0064] Among them, data cleaning specifically includes: missing value processing (using Kalman filtering and spatiotemporal interpolation for completion), spatiotemporal interpolation outlier detection (detection and elimination through isolation forest algorithm and Laida criterion), and duplicate data elimination.
[0065] Normalization processing specifically includes: dimensional unification, numerical standardization (for example, using Z-score standardization for continuous variables such as vehicle distance and speed, and one-hot encoding for categorical variables such as vehicle model and lane), and time synchronization: resampling data with different sampling frequencies (such as camera, GPS, radar, etc.) according to time windows (such as 1 minute);
[0066] Feature extraction unit, used to extract spatiotemporal features, statistical features, image features, and environmental and event features of traffic data;
[0067] Spatiotemporal features include dynamic features such as vehicle acceleration, number of sudden brakes, average speed change rate, vehicle lane change frequency, and following distance change rate; statistical features include traffic indicator features such as lane occupancy, peak hour coefficient, traffic flow density, road section capacity utilization rate, and traffic flow uniformity; image features include visual features such as vehicle color, aspect ratio, license plate area, and vehicle posture features; environmental and event features include rainfall, wind speed, visibility, and traffic accident type, location, duration, road construction section, expected end time, location and time of large-scale activities, and time and area of traffic control.
[0068] The spatiotemporal alignment unit is used to perform spatial and temporal alignment on the features extracted by the feature extraction unit and to achieve data association;
[0069] Specifically, spatial calibration uses a coordinate conversion algorithm (such as UTM projection) to unify position data in different coordinate systems into a local coordinate system. Time calibration uses the NTP protocol to synchronize the clocks of each sensor and perform timestamp correction on data with time delays. Data association uses the DBSCAN clustering algorithm to associate the observation data of the same vehicle from different sensors to construct the vehicle's complete trajectory.
[0070] (3) Local data enhancement and fusion module: insert the convolutional attention fusion module between the 2nd, 6th, and 9th layers of the Transformer encoder, embed the GRU in the convolutional attention fusion module, and use the sliding window local feature enhancement algorithm to perform local enhancement on the processed spatiotemporal features, statistical features, image features, and environmental and event features to highlight key information. The specific steps are as follows:
[0071] ① Combine the processed spatiotemporal features, statistical features, image features, and environmental and event features to form a multidimensional feature vector F∈R T×N×C , where T represents the time step, N represents the feature dimension, and C represents the number of channels. The sliding window local feature enhancement algorithm is used, with the window size set to w (set to 3-5 time steps) and the step size set to 1. The feature vector F is divided along the time dimension to obtain the local feature subsequence F local ∈R w×N×C , each local feature subsequence uses a convolutional neural network (CNN) to extract local spatial features, and the convolution kernel size is set to k×1×1 (k is an odd number). The convolution operation obtains the spatial response R of the local feature, which is input to the attention mechanism module to calculate the attention weight β of each local feature element:
[0072] β=Softmax(MLP(Flatten(R)));
[0073] Among them, MLP represents multi-layer perceptron, Flatten is the flattening operation, and β is used to measure the importance of each element in the local feature.
[0074] According to the calculated attention weight β, the local feature subsequence F local Perform weighted operations to enhance local features:
[0075] F 增强 =β⊙F local
[0076] Here, ⊙ represents element-wise multiplication. This can highlight the key information in local features and suppress the secondary information, thus achieving local feature enhancement.
[0077] ②Insert convolutional attention fusion modules into the 2nd, 6th, and 9th layers of the Transformer encoder respectively, and realize local feature enhancement and cross-modal feature interaction through the convolutional attention fusion module;
[0078] The specific steps of the convolutional attention fusion module are: the enhanced local feature subsequence F 增强 and the global feature F output by the current layer of the Transformer encoder 全局 Perform channel splicing to obtain input feature F 输入 Adaptive normalization method is used to adjust F 输入 Normalize it and then calculate F 输入 Use multi-branch convolution structure for feature extraction:
[0079] Use a convolution kernel of size 3×3×C, a stride of 1, and a padding of 1 for F 输入 Perform convolution operation to extract the spatial structure information of the features, and then input the obtained spatial features into GRU to further capture more complex temporal dependencies and obtain F 空间 , highlighting the correlation characteristics of spatial dimensions such as different road sections and vehicle positions.
[0080] A convolution kernel of size 1×3×C, a step size of 1, and padding of (0, 1, 0) is used to perform convolution along the time dimension to capture the changing trend of traffic flow over time and obtain the time feature F 时间 .
[0081] Channel convolution branch: Use the convolution kernel of 1×1×Cin~Cout (Cin is the number of input channels, Cout is the number of output channels, which can be adjusted according to the complexity of the feature) to integrate and transform the channel dimension to obtain the channel feature F 通道 .
[0082] F 空间 、F 时间 、F 通道Splicing along the channel dimension to obtain the fusion feature F 融合 ;
[0083] F 融合 Perform linear transformation to obtain query matrix Q, key matrix K and value matrix V;
[0084] Divide Q, K, and V into multiple local windows, calculate the attention score in each local window, and merge the attention results of each local window to obtain the local cross attention result F local_attn . The local cross attention result F local_attn The residual connection and gate fusion are performed with the fusion. The final output F 输出 As the input of the next layer of Transformer encoder.
[0085] (4) Frequency domain fusion module, which performs fast Fourier transform (FFT) on the time series features output by the Transformer encoder and converts them into the frequency domain space to obtain frequency domain features. Set the frequency division threshold K (for example, T / 2) to split the frequency domain features into low-frequency components and high-frequency components. The low-frequency component reflects the long-term trend and periodic changes of traffic flow, while the high-frequency component captures short-term fluctuations and sudden anomalies. In order to further reduce the amount of calculation, the low-frequency component and the high-frequency component are respectively subjected to dimensionality reduction processing, and the number of channels C is reduced to C′=C / 2, and the low-frequency component F after dimensionality reduction is obtained. 低 and high frequency component F 高 ; Perform weighted summation on the low-frequency and high-frequency components after dimensionality reduction, and the calculation formula is:
[0086] F fusion =W 低 ⊙F 低 +W 高 ⊙F 高
[0087] Among them, W 低 、W 高 Represents the learnable weight vector, W 低 ∈RC′,W 高 ∈RC′,W 低 +W 高 = 1. ⊙ represents element-wise multiplication.
[0088] Through simple linear weighting, the information interaction and fusion of low-frequency and high-frequency components is achieved, avoiding the complex attention mechanism calculation.
[0089] Before the inverse transformation, the fused frequency domain feature F fusion The length T of the original frequency domain feature can be filled in by zeroing the frequency points where the high-frequency components are missing, and the complete frequency domain feature F is obtained. 完整 , then to F 完整Perform inverse discrete Fourier transform and convert it back to the time domain to obtain the final fusion feature F 最终 . F 最终 It can be directly input into the prediction module to make traffic flow predictions.
[0090] A frequency domain fusion module is introduced to decompose the time series features into low-frequency (long-term trend) and high-frequency (short-term fluctuation) components through FFT, and then weighted fusion is performed after dimensionality reduction. This reduces the amount of computation while explicitly modeling features of different time scales, thereby improving the prediction accuracy of periodic congestion (such as morning and evening rush hours) and sudden accidents.
[0091] (5) Knowledge distillation module, which adopts a double distillation mechanism and combines the double distillation of feature and similarity matrices to compress the model size while retaining a high prediction accuracy (more than 90%);
[0092] The teacher model includes a complete set of multi-source data processing, local enhancement, and frequency domain fusion modules, with a 12-layer Transformer encoder. The student model has a similar structure to the teacher model, with a 4-layer Transformer encoder. The convolution kernel size in the local data enhancement and fusion modules is reduced (for example, from 3×3 to 1×1), and the number of channels is halved.
[0093] In the double distillation mechanism, feature representation distillation forces the student to imitate the teacher’s intermediate layer features (such as the locally enhanced feature subsequence F 增强 , the fusion feature F output by the convolutional attention fusion module 融合 , the fused frequency domain feature F fusion ), using the MSE loss function:
[0094]
[0095] Among them, Ftea represents the feature representation of the teacher model, Fstu represents the feature representation of the student model, and Lfeat represents the feature distillation loss;
[0096] The student model imitates the locally enhanced feature subsequence F 增强 , we can learn how to effectively extract and enhance local features, and how to better understand the local patterns of traffic data based on these features. The student model imitates the fusion feature F output by the convolutional attention fusion module 融合 , can learn how to effectively fuse features of different levels and types, so as to more comprehensively capture various information and relationships in traffic data. The student model imitates the fused frequency domain features F fusion , we can learn how to analyze and process traffic data in the frequency domain, capture traffic patterns at different frequencies, and thus better predict traffic flow.
[0097] In the double distillation mechanism, similarity matrix distillation is used to guide students to learn the teacher's spatiotemporal correlation matrix (such as road section correlation and time period periodicity), improving their ability to model the spatiotemporal dependence of traffic flow. The L2 loss function is used:
[0098]
[0099] Among them, l represents the network layer (such as the 2nd, 6th, and 9th layers of Transformer); (i, j) represents the row and column indices of the similarity matrix, corresponding to sample pairs in the time and space dimensions. For example, in the temporal similarity matrix, i and j correspond to different time steps (such as i = 2:00, j = 3:00); in the spatial similarity matrix, i and j correspond to different road sections (such as i = main road ①, j = branch road ②). represents the similarity matrix of the output of the student model layer l, Represents the similarity matrix of the teacher model’s layer l output. ∑l represents the sum of the corresponding layers of the teacher model and the student model.
[0100] The student model generated through knowledge distillation can be deployed on edge computing devices (such as roadside units (RSUs)) or cloud servers, enabling real-time prediction on the device side and avoiding the transmission delays of traditional cloud-based models.
[0101] A dual knowledge distillation mechanism is adopted to compress the 12-layer teacher model into a 4-layer student model through feature distillation and similarity matrix distillation, which can effectively reduce the amount of computation while maintaining an accuracy of more than 90%.
[0102] (6) Traffic prediction module, the final fusion feature F 最终 The Transformer decoder is input and outputs traffic flow predictions for the next period (e.g., 30 minutes) (including the predicted time point, lane ID, vehicle type, and the corresponding estimated traffic flow value). The mean squared error (MSE) or mean absolute error (MAE) is used to measure the difference between the predicted value and the true value and optimize the model parameters.
[0103] The present invention can be used for intelligent traffic flow prediction in highway engineering, such as highway traffic flow prediction. The model has a short-term prediction accuracy (next 30 minutes) of higher than 99.36% in highway traffic flow prediction (measured by road section traffic flow).
[0104] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. The intelligent traffic flow prediction method for highway engineering based on big data is characterized by: The following steps are involved: (1) A multi-source traffic data collection sensor network, which collects traffic data using existing sensor networks, including surveillance cameras, road sensors, and vehicle-mounted GPS. The multi-source traffic data collection sensor network communicates with a meteorological platform and a traffic event platform. (2) Data preprocessing unit, which is used to clean, normalize, and extract features from traffic data and perform spatiotemporal alignment; (3) Local data enhancement and fusion module: a convolutional attention fusion module is inserted between the 2nd, 6th, and 9th layers of the Transformer encoder, a GRU is embedded in the convolutional attention fusion module, and a sliding window local feature enhancement algorithm is used to perform local enhancement on the processed spatiotemporal features, statistical features, image features, and environmental and event features to highlight key information; (4) Frequency domain fusion module, which performs fast Fourier transform (FFT) on the temporal features output by the Transformer encoder and converts them into the frequency domain space to obtain frequency domain features; Set the frequency division threshold K to split the frequency domain features into low-frequency components and high-frequency components; Perform interactive fusion of low-frequency and high-frequency components; perform inverse discrete Fourier transform to obtain the final fusion feature F 最终 ; (5) Knowledge distillation module, which adopts a double distillation mechanism and a double distillation compression model combining feature and similarity matrices; (6) Traffic prediction module, the final fusion feature F 最终 Input the Transformer decoder and output the traffic flow prediction value for the future period.
2. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 1 is characterized in that: In step (1), the monitoring camera is used to obtain the number, speed, distance between vehicles, and license plate number information of the vehicles; the road sensor uses a geomagnetic sensor or a lidar sensor to obtain the vehicle position, speed, and vehicle model information; the on-board GPS is used to obtain the vehicle position, speed, and trajectory information; the meteorological data is obtained through the meteorological platform; and the event data is obtained through the traffic event platform.
3. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 1 is characterized in that: In step (2), data cleaning specifically includes: missing value processing, spatiotemporal interpolation outlier detection, and duplicate data removal; Normalization processing specifically includes: dimension unification, numerical standardization, and time synchronization; Feature extraction unit, used to extract spatiotemporal features, statistical features, image features, and environmental and event features of traffic data; The spatiotemporal alignment unit is used to perform spatial and temporal alignment processing on the features extracted by the feature extraction unit and realize data association.
4. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 1 is characterized in that: The specific steps of step (3) are: ① Combine the processed spatiotemporal features, statistical features, image features, and environmental and event features to form a multidimensional feature vector F∈R T×N×C , where T represents the time step, N represents the feature dimension, and C represents the number of channels. The sliding window local feature enhancement algorithm is used, with the window size set to w and the step size set to 1. The feature vector F is divided along the time dimension to obtain the local feature subsequence F local ∈R w×N×C , each local feature subsequence uses a convolutional neural network to extract local spatial features. The convolution kernel size is set to k×1×1. The convolution operation obtains the spatial response R of the local feature, which is input to the attention mechanism module to calculate the attention weight β of each local feature element: β=Softmax(MLP(Flatten(R))); Among them, MLP represents multi-layer perceptron, Flatten is the flattening operation, and β is used to measure the importance of each element in the local feature; According to the calculated attention weight β, the local feature subsequence F local Perform weighted operations to enhance local features: F 增强 =β⊙F local Among them, ⊙ represents element-wise multiplication; ②Convolutional attention fusion modules are inserted into the 2nd, 6th, and 9th layers of the Transformer encoder respectively. Through the convolutional attention fusion modules, local feature enhancement and cross-modal feature interaction are achieved.
5. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 4 is characterized in that: In step (3), the specific steps of the convolutional attention fusion module are: the enhanced local feature subsequence F 增强 and the global feature F output by the current layer of the Transformer encoder 全局 Perform channel splicing to obtain input feature F 输入 ; Adaptive normalization method is used to adjust F 输入 Normalize it and then calculate F 输入 Use multi-branch convolution structure for feature extraction: use The convolution kernel of size 3×3×C, stride 1, padding 1, for F 输入 Perform convolution operations to extract the spatial structure information of features. After obtaining spatial features, input them into GRU to further capture more complex temporal dependencies and obtain F space. A convolution kernel of size 1×3×C, a step size of 1, and padding of (0, 1, 0) is used to perform convolution along the time dimension to capture the changing trend of traffic flow over time and obtain the time feature F 时间 ; Channel convolution branch: Use the convolution kernel of 1×1×Cin~Cout to integrate and transform the channel dimension to obtain the channel feature F 通道 ; F 空间 、F 时间 、F 通道 Splicing along the channel dimension to obtain the fusion feature F 融合 ; for F 融合 Perform linear transformation to obtain the query matrix Q, key matrix K and value matrix V; divide Q, K, and V into multiple local windows, calculate the attention score in each local window, and merge the attention results of each local window to obtain the local cross attention result F local_attn ; The local cross attention result F local_attn Perform residual connection and gate fusion with fusion; the final output F 输出 As the input of the next layer of Transformer encoder.
6. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 1 is characterized in that: In step (4), the low-frequency component and the high-frequency component are subjected to dimensionality reduction processing respectively, and the number of channels C is reduced to C′=C / 2, and the low-frequency component F after dimensionality reduction is obtained. 低 and high frequency component F 高 ; Perform weighted summation on the low-frequency and high-frequency components after dimensionality reduction, and the calculation formula is: F fusion =W 低 ⊙F 低 +W 高 ⊙F 高 Among them, W 低 、W 高 Represents the learnable weight vector, W 低 ∈RC′,W 高 ∈RC′,W 低 +W 高 =1. ⊙ means element-wise multiplication; The interactive fusion of low-frequency and high-frequency components is achieved through linear weighting.
7. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 6 is characterized in that: In step (4), before performing the inverse transformation, the fused frequency domain feature F fusion The length T of the original frequency domain feature can be filled in by zeroing the frequency points where the high-frequency components are missing, and the complete frequency domain feature F is obtained. 完整 , then to F 完整 Perform inverse discrete Fourier transform and convert it back to the time domain to obtain the final fusion feature F 最终 .
8. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 1 is characterized in that: In step (5), in the double distillation mechanism, feature representation distillation forces the student to imitate the teacher's intermediate layer features, using the MSE loss function: Among them, Ftea represents the feature representation of the teacher model, Fstu represents the feature representation of the student model, and Lfeat represents the feature distillation loss.
9. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 8 is characterized in that: In step (5), in the double distillation mechanism, similarity matrix distillation is used to guide students to learn the teacher's spatiotemporal correlation matrix, using the L2 loss function: Where l represents the network level; (i, j) represents the row and column index of the similarity matrix, corresponding to the sample pairs in the time and space dimensions. For example, in the time similarity matrix, i and j correspond to different time steps; in the spatial similarity matrix, i and j correspond to different road sections. represents the similarity matrix of the output of the student model layer l, represents the similarity matrix of the output of the teacher model layer l; ∑l represents the sum of the corresponding layers of the teacher model and the student model.
10. The method for predicting intelligent traffic flow in highway engineering based on big data according to claim 1 is characterized in that: In step (6), the mean square error or mean absolute error is used to measure the difference between the predicted value and the true value to optimize the model parameters.
Citation Information
Patent Citations
Traffic flow long-time prediction method and system based on improved Transform model
CN115587454A
RGBT target tracking method based on convolution attention fusion
CN120088292A
Short-term traffic flow prediction method based on causal gated-low-pass graph convolutional network
US20240029556A1
Cited By
Method and system for active monitoring and emergency disposal of highway traffic events
CN121122026A
A method and system for highway traffic incident active monitoring and emergency disposal
CN121122026B