Intelligent Traffic Flow Prediction Method for Highway Engineering Based on Big Data

By employing a big data-driven intelligent traffic flow prediction method, which utilizes multi-source data acquisition, local feature enhancement, and frequency domain fusion techniques, the method addresses the issues of insufficient data feature mining and high computational resource consumption in traditional methods, achieving high-precision and low-latency traffic flow prediction.

CN120496325BActive Publication Date: 2025-10-28CHINA HIGHWAY ENG CONSULTING GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510755566.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-10-28
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Traditional traffic flow prediction methods have shortcomings in data feature mining and model training, making it difficult to capture the periodicity and trends of traffic flow, and they consume a lot of computational resources, making it difficult to meet accuracy requirements.

Method used

We adopt a big data-based intelligent traffic flow prediction method. Through multi-source data acquisition, data preprocessing, local feature enhancement, frequency domain fusion and knowledge distillation techniques, combined with Transformer encoder and GRU, we can achieve local feature enhancement and frequency domain feature decomposition of traffic data, thereby reducing the amount of computation and improving prediction accuracy.

Benefits of technology

It significantly improves the accuracy of predicting traffic flow periodicity and emergencies, reduces computing resource consumption, achieves real-time prediction on the edge, and avoids the latency of traditional cloud models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496325B_ABST
    Figure CN120496325B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent traffic flow prediction method for highway engineering based on big data, belonging to the field of traffic flow prediction technology. The method includes the following steps: collecting traffic data using a multi-source traffic data acquisition sensor network; data preprocessing; inserting a convolutional attention fusion module between Transformer encoders for local enhancement processing to highlight key information; frequency domain fusion; combining a double-distillation compression model with feature and similarity matrices; and outputting predicted traffic flow values ​​for future time periods. This invention can achieve local enhancement processing to highlight key information; the introduction of a frequency domain fusion module reduces computational load while explicitly modeling features at different time scales, improving prediction accuracy. This invention employs a double knowledge distillation mechanism, which can effectively reduce computational load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traffic flow prediction technology, and more specifically to a method for intelligent traffic flow prediction in highway engineering based on big data. Background Technology

[0002] The construction and maintenance of highway networks have become crucial tasks for ensuring smooth, safe, and efficient traffic flow. Modern urban development requires an efficient transportation system to support daily economic activities and residents' travel, and as a core component of the urban transportation system, the health of highways directly impacts the operational efficiency of the entire transportation network.

[0003] With the continuous expansion of my country's highway network, massive amounts of traffic flow monitoring data, vehicle trajectory information, and meteorological data are intertwined and superimposed, forming a complex and diverse data structure. Against this backdrop, traditional traffic flow prediction methods are gradually revealing their limitations and failing to meet the analytical demands of the big data era. How to improve traffic flow prediction accuracy through effective technological means has become a pressing practical problem. Deep learning, with its powerful data processing capabilities and adaptive learning characteristics, offers a new approach to solving complex traffic problems.

[0004] Currently, traditional methods for predicting highway traffic flow still have the following limitations:

[0005] (1) Most methods mainly study the time domain analysis of traffic flow data, but do not fully explore the frequency domain features hidden in the data, making it difficult to capture the deep-seated patterns such as the periodicity and trend of traffic flow changes.

[0006] (2) In 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 and affects the prediction accuracy.

[0007] (3) Predictive model training often improves performance through a large number of parameter adjustments and data training, but too many parameters lead to long training time and high computational resource consumption, while lightweight models are difficult to meet accuracy requirements.

[0008] Based on this, the present invention designs a big data-based intelligent traffic flow prediction method for highway engineering to solve the above problems. Summary of the Invention

[0009] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a method for intelligent traffic flow prediction in highway engineering based on big data.

[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0011] A big data-based intelligent traffic flow prediction method for highway engineering includes the following steps:

[0012] (1) Multi-source traffic data acquisition sensor network: traffic data is acquired by using the sensor network deployed in the existing technology, including surveillance cameras, road sensors and vehicle GPS; the multi-source traffic data acquisition sensor network communicates with the meteorological platform and the traffic event platform;

[0013] (2) Data preprocessing unit, used for data cleaning, normalization, feature extraction and spatiotemporal alignment of traffic data;

[0014] (3) Local data augmentation and fusion module: Convolutional attention fusion module is inserted in layers 2, 6 and 9 between Transformer encoders. GRU is embedded in the convolutional attention fusion module. The sliding window local feature enhancement algorithm is used to perform local enhancement processing on the processed spatiotemporal features, statistical features, image features and environmental and event features to highlight key information.

[0015] (4) Frequency domain fusion module: The temporal features output by the Transformer encoder are converted to the frequency domain space by performing Fast Fourier Transform (FFT) to obtain frequency domain features; a frequency division threshold K is set to split the frequency domain features into low-frequency components and high-frequency components; information interaction and fusion of low-frequency and high-frequency components are performed; and the final fused feature F is obtained by performing Discrete Fourier Transform. 最终 ;

[0016] (5) Knowledge distillation module, which adopts a double distillation mechanism, combining the double distillation compression model of feature and similarity matrix;

[0017] (6) Traffic prediction module, which ultimately fuses features F 最终 Input the Transformer decoder and output the traffic flow forecast for future time periods.

[0018] Furthermore, in step (1), the surveillance camera is used to obtain information on the number of vehicles, speed, distance between vehicles, and license plate number; the road sensor uses a geomagnetic sensor or a lidar sensor to obtain information on the vehicle's location, speed, and model; the vehicle-mounted GPS is used to obtain information on the vehicle's location, speed, and trajectory; meteorological data is obtained through the meteorological platform; and 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 specifically includes: unit unification, numerical standardization, and time synchronization;

[0021] Feature extraction specifically includes: extracting spatiotemporal features, statistical features, image features, and environmental and event features from traffic data;

[0022] Spatiotemporal alignment specifically includes: performing spatial and temporal calibration on the extracted features and achieving data association.

[0023] Furthermore, the specific steps of step (3) are as follows:

[0024] ① The processed spatiotemporal features, statistical features, image features, and environmental and event features are concatenated 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, a sliding window local feature enhancement algorithm is used, with a window size of w and a step size of 1. The feature vector F is divided along the time dimension to obtain local feature subsequences F. local ∈R w×N×C Each local feature subsequence is processed using a convolutional neural network to extract local spatial features. The kernel size is set to k×1×1. The convolution operation yields the spatial response R of the local features. R is input to the attention mechanism module to calculate the attention weight β for each local feature element.

[0025] β=Softmax(MLP(Flatten(R)));

[0026] In this context, MLP stands for Multilayer Perceptron, Flatten is the flattening operation, and β is used to measure the importance of each element in the local features.

[0027] Based on 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 key information in local features and suppress secondary information, thereby enhancing local features.

[0030] ② Insert convolutional attention fusion modules into layers 2, 6, and 9 of the Transformer encoder. Through these modules, local feature enhancement and cross-modal feature interaction can be achieved.

[0031] Furthermore, in step (3), the specific steps of the convolutional attention fusion module are as follows: The enhanced local feature subsequence F... 增强 The global features F output by the current layer of the Transformer encoder 全局 Channel concatenation is performed to obtain the input feature F. 输入 An adaptive normalization method is used to normalize F. 输入 Perform normalization, and then apply it to F.输入 Feature extraction is performed using a multi-branch convolutional structure:

[0032] Use a 3×3×C kernel with a stride of 1 and padding of 1, for F 输入 Convolutional operations are performed to extract the spatial structure information of the features. The resulting spatial features are then input into a GRU to further capture more complex temporal dependencies, yielding the Fi algorithm. 空间 ;

[0033] Using a 1×3×C convolution kernel with a stride of 1 and padding of (0, 1, 0), convolution is performed along the time dimension to capture the trend of traffic flow over time, thus obtaining the temporal feature F. 时间 ;

[0034] Channel convolution branch: Using a 1×1×Cin~Cout convolution kernel, information is integrated and transformed along the channel dimension to obtain the channel features F. 通道 ;

[0035] F 空间 F 时间 F 通道 By splicing along the channel dimension, the fused feature F is obtained. 融合 ; For F 融合 A linear transformation is performed to obtain the query matrix Q, the key matrix K, and the value matrix V. Q, K, and V are then divided into multiple local windows. Attention scores are calculated within each local window. The attention results from each local window are then combined to obtain the local cross-attention result F. local_attn The local cross-attention result F local_attn Residual connections and gated fusion are performed with the fusion; the final output F 输出 As input to 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, reducing the number of channels C to C′=C / 2, to obtain the dimensionality-reduced low-frequency component F. 低 and high frequency component F 高 The weighted summation of the low-frequency and high-frequency components after dimensionality reduction is calculated using the following formula:

[0037] F fusion =W 低 ⊙F 低 +W 高 ⊙F 高

[0038] Among them, W 低 、W 高 W represents the learnable weight vector. 低 ∈RC′,W 高 ∈RC′,W低 +W 高 =1. ⊙ indicates element-wise multiplication.

[0039] By using simple linear weighting, information interaction and fusion of low-frequency and high-frequency components can be achieved.

[0040] Furthermore, in step (4), before performing the inverse transform, the fused frequency domain features F are first... fusion The length T of the original frequency domain feature can be padded with zeros at the missing frequency points of the high-frequency components to obtain the complete frequency domain feature F. 完整 After that, for F 完整 Perform an inverse discrete Fourier transform to convert it back to the time domain, and obtain the final fused feature F. 最终 .

[0041] Furthermore, in step (5), in the double distillation mechanism, feature representation distillation forces students to imitate the intermediate layer features of the teacher, using the MSE loss function:

[0042] ;

[0043] Where 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), the similarity matrix distillation in the double distillation mechanism is used to guide students to learn the teacher's spatiotemporal correlation matrix, employing the L2 loss function:

[0045] ;

[0046] Where l represents the network level; (i, j) represents the row and column indices of the similarity matrix, corresponding to sample pairs in the spatiotemporal dimensions. For example, in the temporal similarity matrix, i and j correspond to different time steps; in the spatial similarity matrix, i and j correspond to different road segments. This represents the similarity matrix output by the l-th layer of the student model. This represents the similarity matrix output by the l-th layer of the teacher model; This indicates that the corresponding layers of the teacher model and student model are summed.

[0047] Furthermore, in step (6), the mean squared error or mean absolute error is used to measure the difference between the predicted value and the true value, and the model parameters are optimized.

[0048] Compared with the prior art, the beneficial effects of this invention are as follows: This invention adopts a local data enhancement and fusion module, inserts a convolutional attention fusion module in the 2nd, 6th and 9th layers between Transformer encoders, embeds GRU in the convolutional attention fusion module, and adopts a sliding window local feature enhancement algorithm to perform local enhancement processing on the processed spatiotemporal features, statistical features, image features and environmental and event features, highlighting key information;

[0049] This invention introduces a frequency domain fusion module, which decomposes time-series features into low-frequency (long-term trend) and high-frequency (short-term fluctuation) components through FFT, and then performs dimensionality reduction and weighted fusion. This reduces the amount of computation while explicitly modeling features at different time scales, thereby improving the prediction accuracy for periodic congestion (such as morning and evening rush hours) and sudden accidents.

[0050] This invention 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 maintains over 90% accuracy while effectively reducing computational load. The student model obtained 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 and avoiding the transmission latency of traditional cloud models.

[0051] This invention can be used for intelligent traffic flow prediction in highway engineering, such as highway traffic flow prediction. Attached Figure Description

[0052] 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.

[0053] Figure 1 This is a schematic diagram of the intelligent traffic flow prediction method for highway engineering based on big data according to the present invention. Detailed Implementation

[0054] 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.

[0055] Example 1: In some embodiments, please refer to the accompanying drawings. Figure 1A big data-based intelligent traffic flow prediction method for highway engineering includes the following steps:

[0056] (1) Multi-source traffic data acquisition sensor network: traffic data is acquired by using the sensor network deployed in the existing technology, including surveillance cameras, road sensors, vehicle GPS, etc.; the multi-source traffic data acquisition sensor network communicates with the meteorological platform and the traffic event platform.

[0057] Surveillance cameras are used to obtain information such as the number of vehicles, their speed, distance between vehicles, and license plate numbers;

[0058] Road sensors use geomagnetic sensors or LiDAR sensors to obtain information such as vehicle position, speed, and vehicle type;

[0059] Vehicle-mounted GPS is used to obtain information such as the vehicle's location, speed, and trajectory;

[0060] Meteorological data (rainfall, wind speed, visibility) are obtained through a meteorological platform.

[0061] Obtain event data (traffic accident reports, road construction notices) through the traffic incident platform;

[0062] (2) Data preprocessing unit, used for data cleaning, normalization, feature extraction and spatiotemporal alignment of traffic data;

[0063] The data cleaning process specifically includes: missing value handling (using Kalman filtering and spatiotemporal interpolation for completion), spatiotemporal interpolation outlier detection (using the Isolation Forest algorithm and the Laida criterion for detection and removal), and duplicate data removal.

[0064] Normalization processing specifically includes: dimension unification, numerical standardization (e.g., Z-score standardization for continuous variables such as vehicle distance and speed, and one-hot encoding for categorical variables such as vehicle type and lane), and time synchronization: resampling data with different sampling frequencies (such as cameras, GPS, radar, etc.) according to time windows (e.g., 1 minute).

[0065] Feature extraction specifically includes: extracting spatiotemporal features, statistical features, image features, and environmental and event features from traffic data;

[0066] Spatiotemporal features include dynamic features such as vehicle acceleration, number of emergency braking events, average speed change rate, vehicle lane change frequency, and following distance change rate; statistical features include traffic indicators such as lane occupancy rate, peak hour coefficient, traffic flow density, road segment 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 sections, expected end time, location and time of large-scale events, and time and area of ​​traffic control.

[0067] Spatiotemporal alignment specifically includes: performing spatial and temporal calibration on the extracted features and achieving data association;

[0068] Specifically, spatial calibration unifies position data from different coordinate systems into the local coordinate system through coordinate transformation algorithms (such as UTM projection); time calibration uses the NTP protocol to synchronize the clocks of each sensor and corrects the timestamps of 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.

[0069] (3) Local data augmentation and fusion module: A convolutional attention fusion module is inserted at layers 2, 6, and 9 between the Transformer encoders. A GRU is embedded in the convolutional attention fusion module, and a sliding window local feature enhancement algorithm is used to locally enhance the processed spatiotemporal features, statistical features, image features, and environmental and event features to highlight key information. The specific steps are as follows:

[0070] ① The processed spatiotemporal features, statistical features, image features, and environmental and event features are concatenated 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, a sliding window local feature enhancement algorithm is adopted, with the window size set to w (set to 3-5 time steps) and the step size 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 is processed using a convolutional neural network (CNN) to extract local spatial features. The kernel size is set to k×1×1 (k takes an odd number). The convolution operation yields the spatial response R of the local features. R is input to the attention mechanism module to calculate the attention weight β for each local feature element.

[0071] β=Softmax(MLP(Flatten(R)));

[0072] In this context, MLP stands for Multilayer Perceptron, Flatten is the flattening operation, and β is used to measure the importance of each element in the local features.

[0073] Based on the calculated attention weight β, the local feature subsequence F local Perform weighted operations to enhance local features:

[0074] F 增强 =β⊙F local

[0075] Here, ⊙ represents element-wise multiplication. This can highlight key information in local features and suppress secondary information, thereby enhancing local features.

[0076] ② Insert convolutional attention fusion modules into layers 2, 6, and 9 of the Transformer encoder, respectively. Through the convolutional attention fusion modules, local feature enhancement and cross-modal feature interaction are achieved.

[0077] The specific steps of the convolutional attention fusion module are as follows: The enhanced local feature subsequence F... 增强 The global features F output by the current layer of the Transformer encoder 全局 Channel concatenation is performed to obtain the input feature F. 输入 An adaptive normalization method is used for F. 输入 Perform normalization, and then apply it to F. 输入 Feature extraction is performed using a multi-branch convolutional structure:

[0078] Use a 3×3×C kernel with a stride of 1 and padding of 1, for F 输入 Convolutional operations are performed to extract the spatial structure information of the features. The resulting spatial features are then input into a GRU to further capture more complex temporal dependencies, yielding the Fi algorithm. 空间 It highlights the spatial connections between different road sections and vehicle locations.

[0079] Using a 1×3×C convolution kernel with a stride of 1 and padding of (0, 1, 0), convolution is performed along the time dimension to capture the trend of traffic flow over time, thus obtaining the temporal feature F. 时间 .

[0080] Channel convolution branch: Using a 1×1×Cin~Cout convolution kernel (Cin is the number of input channels, Cout is the number of output channels, which can be adjusted according to feature complexity), information is integrated and transformed along the channel dimensions to obtain the channel features F. 通道 .

[0081] F 空间 F 时间 F 通道By splicing along the channel dimension, the fused feature F is obtained. 融合 ;

[0082] F 融合 Perform a linear transformation to obtain the query matrix Q, the key matrix K, and the value matrix V;

[0083] The parameters Q, K, and V are divided into multiple local windows. Attention scores are calculated within each local window. The attention results from each local window are then combined to obtain the local cross-attention result F. local_attn The local cross-attention result F local_attn Residual connections and gated fusion are performed with the fusion process. The final output F 输出 As input to the next layer of Transformer encoder.

[0084] (4) Frequency domain fusion module: The temporal features output by the Transformer encoder are converted to the frequency domain by performing a Fast Fourier Transform (FFT) to obtain frequency domain features. A frequency partitioning threshold K is set (e.g., T / 2) to split the frequency domain features into low-frequency and high-frequency components. The low-frequency components reflect the long-term trend and periodic changes of traffic flow, while the high-frequency components capture short-term fluctuations and sudden anomalies. To further reduce the computational load, the low-frequency and high-frequency components are dimensionality-reduced respectively, reducing the number of channels C to C′=C / 2, to obtain the dimensionality-reduced low-frequency component F. 低 and high frequency component F 高 The weighted summation of the low-frequency and high-frequency components after dimensionality reduction is calculated using the following formula:

[0085] F fusion =W 低 ⊙F 低 +W 高 ⊙F 高

[0086] Among them, W 低 、W 高 W represents the learnable weight vector. 低 ∈RC′,W 高 ∈RC′,W 低 +W 高 =1. ⊙ indicates element-wise multiplication.

[0087] By using simple linear weighting, information interaction and fusion of low-frequency and high-frequency components are achieved, avoiding complex attention mechanism calculations.

[0088] Before performing the inverse transform, first convert the fused frequency domain features F fusion The length T of the original frequency domain feature can be padded with zeros at the missing frequency points of the high-frequency components to obtain the complete frequency domain feature F. 完整 After that, for F 完整Perform an inverse discrete Fourier transform to convert it back to the time domain, and obtain the final fused feature F. 最终 F 最终 Traffic flow can be predicted directly by inputting data into the prediction module.

[0089] A frequency domain fusion module is introduced, which decomposes time series features into low-frequency (long-term trend) and high-frequency (short-term fluctuation) components through FFT. After dimensionality reduction, the components are weighted and fused, which reduces the amount of computation and explicitly models features at different time scales, thereby improving the prediction accuracy of periodic congestion (such as morning and evening rush hours) and sudden accidents.

[0090] (5) Knowledge distillation module, which adopts a double distillation mechanism, combining the double distillation of features and similarity matrix, to retain high (over 90%) prediction accuracy while compressing the model size;

[0091] The teacher model includes complete multi-source data processing, local augmentation, and frequency domain fusion modules, and contains a 12-layer Transformer encoder. The student model has a similar structure to the teacher model, containing a 4-layer Transformer encoder, but the kernel size in the local data augmentation and fusion modules is reduced (e.g., from 3×3 to 1×1), and the number of channels is halved.

[0092] 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 fused feature F output by the convolutional attention fusion module 融合 The fused frequency domain features F fusion ), using the MSE loss function:

[0093] ;

[0094] Where 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;

[0095] The student model mimics the feature subsequence F after local enhancement. 增强 This allows the student model to learn how to effectively extract and enhance local features, and how to better understand local patterns in traffic data based on these features. The student model mimics the fused feature F output by the convolutional attention fusion module. 融合 It can learn how to effectively fuse features of different levels and types, thereby capturing a more comprehensive range of information and relationships in traffic data. The student model imitates the fused frequency domain features F. fusion It can help learn how to analyze and process traffic data in the frequency domain, capture traffic patterns at different frequencies, and thus better predict traffic flow.

[0096] In the double distillation mechanism, similarity matrix distillation guides students to learn the teacher's spatiotemporal correlation matrix (such as road segment correlation and time periodicity), improving their ability to model the spatiotemporal dependence of traffic flow. An L2 loss function is used.

[0097] ;

[0098] Where l represents the network layer (e.g., 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 spatiotemporal dimensions. For example, in the temporal similarity matrix, i and j correspond to different time steps (e.g., i=2:00, j=3:00); in the spatial similarity matrix, i and j correspond to different road segments (e.g., i=main road ①, j=branch road ②). This represents the similarity matrix output by the l-th layer of the student model. Let represent the similarity matrix output by the l-th layer of the teacher model. This indicates that the corresponding layers of the teacher model and student model are summed.

[0099] The student model obtained through knowledge distillation can be deployed on edge computing devices (such as roadside units, RSUs) or cloud servers. This enables real-time prediction at the edge, avoiding the transmission latency of traditional cloud models.

[0100] By employing a dual knowledge distillation mechanism, through feature distillation and similarity matrix distillation, the 12-layer teacher model is compressed into a 4-layer student model, maintaining over 90% accuracy while effectively reducing computational load.

[0101] (6) Traffic prediction module, which ultimately fuses features F 最终 Input the Transformer decoder and output the traffic flow forecast for a future time period (e.g., 30 minutes) (including the forecast time point, lane ID, vehicle type, and corresponding expected flow value). Measure the difference between the forecast and the actual value using mean squared error (MSE) or mean absolute error (MAE) to optimize the model parameters.

[0102] This invention can be used for intelligent traffic flow prediction in highway engineering, such as expressway traffic flow prediction. The model achieves a short-term prediction accuracy (for the next 30 minutes) of over 99.36% in expressway traffic flow prediction (measured by road segment traffic volume).

[0103] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for intelligent traffic flow prediction in highway engineering based on big data, characterized in that, Includes the following steps: (1) Multi-source traffic data acquisition sensor network: traffic data is acquired by utilizing the existing sensor network, including surveillance cameras, road sensors and vehicle GPS; the multi-source traffic data acquisition sensor network communicates with the meteorological platform and the traffic incident platform; (2) Data preprocessing unit, used for data cleaning, normalization, feature extraction and spatiotemporal alignment of traffic data; (3) Local data augmentation and fusion module: Convolutional attention fusion module is inserted in layers 2, 6 and 9 between Transformer encoders. GRU is embedded in the convolutional attention fusion module. The sliding window local feature enhancement algorithm is used to perform local enhancement processing on the processed spatiotemporal features, statistical features, image features and environmental and event features to highlight key information. (4) Frequency domain fusion module: The temporal features output by the Transformer encoder are converted to the frequency domain space by performing Fast Fourier Transform (FFT) to obtain the frequency domain features; Set a frequency division threshold K to split the frequency domain features into low-frequency components and high-frequency components; The information exchange and fusion of low-frequency and high-frequency components are performed; the final fused feature F is obtained by performing inverse discrete Fourier transform. 最终 ; 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 to obtain the dimensionality-reduced low-frequency component F. 低 and high frequency component F 高 The weighted summation of the low-frequency and high-frequency components after dimensionality reduction is calculated using the following formula: F fusion =W 低 ⊙F 低 +W 高 ⊙F 高 Among them, W 低 、W 高 W represents the learnable weight vector. 低 ∈RC′,W 高 ∈RC′, where R represents the spatial response of the local features obtained by the convolution operation, and W 低 +W 高 =1, ⊙ indicates element-wise multiplication; Information interaction and fusion of low-frequency and high-frequency components are achieved through linear weighting; In step (4), before performing the inverse transform, the fused frequency domain features F are first... fusion The length T of the original frequency domain feature can be padded with zeros at the missing frequency points of the high-frequency components to obtain the complete frequency domain feature F. 完整 After that, for F 完整 Perform an inverse discrete Fourier transform to convert it back to the time domain, and obtain the final fused feature F. 最终 (5) Knowledge distillation module, which adopts a double distillation mechanism and combines a double distillation compression model of feature and similarity matrix; In step (5), the double distillation mechanism forces students to mimic the intermediate features of the teacher through feature representation distillation, using the MSE loss function: ; Among them, F tea F represents the feature representation of the teacher model. stu L represents the feature representation of the student model. feat Indicates characteristic distillation loss; In step (5), the similarity matrix distillation in the double distillation mechanism is used to guide students to learn the teacher's spatiotemporal correlation matrix, employing the L2 loss function: ; Where l represents the network level; (i, j) represents the row and column indices of the similarity matrix, corresponding to sample pairs in the spatiotemporal dimensions, including the temporal similarity matrix, where i and j correspond to different time steps, and the spatial similarity matrix, where i and j correspond to different road segments; This represents the similarity matrix output by the l-th layer of the student model. This represents the similarity matrix output by the l-th layer of the teacher model; This indicates that the corresponding layers of the teacher model and student model are summed. (6) Traffic prediction module, which ultimately fuses features F 最终 Input the Transformer decoder and output the traffic flow forecast for future time periods.

2. The intelligent traffic flow prediction method for highway engineering based on big data according to claim 1, characterized in that, In step (1), the surveillance camera is used to obtain information on the number of vehicles, speed, distance between vehicles, and license plate number; the road sensor uses a geomagnetic sensor or a lidar sensor to obtain information on vehicle location, speed, and vehicle type; the vehicle GPS is used to obtain information on vehicle location, speed, and trajectory; meteorological data is obtained through the meteorological platform; and event data is obtained through the traffic event platform.

3. The intelligent traffic flow prediction method for highway engineering based on big data according to claim 1, characterized in that, In step (2), data cleaning specifically includes: handling missing values, detecting outliers in spatiotemporal interpolation, and removing duplicate data; Normalization specifically includes: unit unification, numerical standardization, and time synchronization; Feature extraction specifically includes: extracting spatiotemporal features, statistical features, image features, and environmental and event features from traffic data; Spatiotemporal alignment specifically includes: performing spatial and temporal calibration on the extracted features and achieving data association.

4. The intelligent traffic flow prediction method for highway engineering based on big data according to claim 1, characterized in that, Step (3) The specific steps are as follows: ① The processed spatiotemporal features, statistical features, image features, and environmental and event features are concatenated 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, a sliding window local feature enhancement algorithm is used, with a window size of w and a step size of 1. The feature vector F is divided along the time dimension to obtain local feature subsequences F. local ∈R w×N×C Each local feature subsequence is processed using a convolutional neural network to extract local spatial features. The kernel size is set to k×1×1. The convolution operation yields the spatial response R of the local features. R is input to the attention mechanism module to calculate the attention weight β for each local feature element. β=Softmax(MLP(Flatten(R))); Where MLP stands for Multilayer Perceptron, Flatten is the flattening operation, and β is used to measure the importance of each element in the local feature; Based on the calculated attention weight β, the local feature subsequence F local Perform weighted operations to enhance local features: F 增强 =β⊙F local Where ⊙ represents element-wise multiplication; ② Insert convolutional attention fusion modules into layers 2, 6, and 9 of the Transformer encoder. Through these modules, local feature enhancement and cross-modal feature interaction can be achieved.

5. The intelligent traffic flow prediction method for highway engineering based on big data according to claim 4, characterized in that, In step (3), the specific steps of the convolutional attention fusion module are as follows: The enhanced local feature subsequence F... 增强 The global features F output by the current layer of the Transformer encoder 全局 Channel concatenation is performed to obtain the input feature F. 输入 An adaptive normalization method is used for F. 输入 Perform normalization, and then apply it to F. 输入 Feature extraction is performed using a multi-branch convolutional structure: use A convolution kernel of size 3×3×C with stride of 1 and padding of 1, for F 输入 Convolutional operations are performed to extract the spatial structure information of the features. The resulting spatial features are then input into a GRU to further capture more complex temporal dependencies, yielding the Fi algorithm. 空间 ; Using a 1×3×C convolution kernel with a stride of 1 and padding of (0, 1, 0), convolution is performed along the time dimension to capture the trend of traffic flow over time, thus obtaining the temporal feature F. 时间 ; Channel convolution branch: Using a 1×1×Cin~Cout convolution kernel, information is integrated and transformed along the channel dimension to obtain the channel features F. 通道 ; F 空间 F 时间 F 通道 By splicing along the channel dimension, the fused feature F is obtained. 融合 ; For F 融合 A linear transformation is performed to obtain the query matrix Q, the key matrix K, and the value matrix V. Q, K, and V are then divided into multiple local windows. Attention scores are calculated within each local window. The attention results from each local window are then combined to obtain the local cross-attention result F. local_attn ; the local cross-attention result F local_attn Residual connections and gated fusion are performed with the fusion; the final output F 输出 As input to the next layer of Transformer encoder.

6. The intelligent traffic flow prediction method for highway engineering based on big data according to claim 1, characterized in that, In step (6), mean square error or mean absolute error is used to measure the difference between the predicted value and the true value, and the model parameters are optimized.

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