Short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network
Through the odd-even alternating reorganization and bidirectional LSTM model of the traffic-air interaction hybrid convolutional network, the real-time dynamic coupling problem of traffic flow and air quality data is solved, and traffic flow prediction with higher accuracy and robustness is achieved, supporting the refined management of intelligent transportation systems.
Patent Information
- Application Number
- CN202511318876.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-10-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing traffic flow prediction methods fail to effectively integrate the real-time dynamic coupling relationship between traffic flow and air quality data, resulting in insufficient prediction accuracy and robustness, especially when processing complex multi-source heterogeneous data.
A method based on traffic-air interaction hybrid convolutional network is adopted to model the bidirectional causal relationship between traffic flow and air quality by alternating odd and even time-space node features and combining with a bidirectional LSTM model to achieve deep feature interaction and collaborative learning.
It significantly improves the accuracy and robustness of traffic flow forecasting, can better adapt to complex traffic environments and changes in external conditions, provide more accurate forecasting data, optimize traffic resource allocation, and reduce traffic congestion and carbon emissions.
Smart Images

Figure CN120822190A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a short-term traffic flow prediction method based on a traffic-air interactive hybrid convolutional network. Background Art
[0002] As one of the core technologies of modern intelligent transportation systems (ITS), traffic flow prediction plays a vital role in alleviating traffic congestion, improving road network efficiency, optimizing traffic management and control strategies, and reducing traffic accidents, energy consumption, and carbon emissions. With the acceleration of urbanization and the continued growth of travel demand, the demand for high-precision, real-time traffic flow prediction is becoming increasingly urgent.
[0003] Thanks to the rapid development of the Internet of Things (IoT) and intelligent sensing technologies, traffic data collection has become unprecedentedly rich and convenient. On-board sensors (such as GPS and OBD), roadside sensing equipment (such as radar, geomagnetic coils, and lidar), and a network of traffic cameras throughout the city can capture core traffic flow parameters such as vehicle speed, volume, density, and occupancy in real time and in all directions, providing a solid data foundation for predictive models.
[0004] Traditional traffic flow forecasting methods, such as historical averaging, time series models (ARIMA), Kalman filtering, and statistical regression models, have played an important role over the past decades. However, these methods often exhibit significant limitations when dealing with the inherently nonlinear characteristics, strong spatiotemporal dependencies, complex dynamic evolution, and sudden disturbances of traffic systems. Their accuracy and robustness are insufficient to meet the demands of refined management and control.
[0005] Recent breakthroughs in artificial intelligence (AI), particularly deep learning (such as convolutional neural networks (CNNs), recurrent neural networks (RNNs) and their variants, such as LSTM / GRUs, and graph neural networks (GNNs), and reinforcement learning, have revolutionized traffic flow forecasting. These methods can automatically learn complex feature representations and dynamic patterns from massive, high-dimensional spatiotemporal data. They demonstrate strong capabilities in handling nonlinear relationships and large-scale data, significantly improving forecast accuracy.
[0006] However, current mainstream deep learning methods still face key challenges in the deep integration of multi-source heterogeneous data, especially the failure to systematically and deeply integrate key external environmental factors that affect traffic flow:
[0007] 1. The complex impact of external environmental factors is ignored or treated superficially: Traffic flow does not exist in isolation; its dynamics are profoundly influenced by a variety of urban environmental data. For example, severe weather significantly reduces road capacity and changes driving behavior, directly affecting traffic flow and speed distribution; high pollution levels may trigger traffic restrictions (such as environmental restrictions) or affect residents' willingness to travel (such as reducing outdoor activities), thereby changing regional traffic demand. In existing technologies, the fusion of multimodal data such as traffic flow and air quality often uses shallow methods such as "feature splicing" (such as directly splicing traffic flow feature vectors and air quality feature vectors into a long vector) or "weighted averaging". These methods only achieve the physical combination of data and do not model the real-time dynamic coupling relationship between the two at the same time point (such as the mutual influence between traffic flow at a certain moment and PM concentration at the same time). As a result, the model cannot capture the closed-loop feedback of "traffic flow → pollution → traffic flow".
[0008] 2. Insufficient feature interaction and information complementarity: Data from different sources (core traffic flow data and various environmental data) are heterogeneous (different in structure, scale, and semantics) and have spatiotemporal correlations. Existing interactive hybrid convolutional networks (such as standard CNNs and LSTMs) have limitations in processing multimodal data. CNNs can only extract local features from a single modality and cannot interact across modalities. While LSTMs can process time series data, they are mostly single-item models (capturing only past-future dependencies) and are unable to simultaneously capture the bidirectional causal relationships between "traffic flow affecting air quality" and "air quality's reactionary effect on traffic flow." This results in low prediction accuracy and poor robustness in complex scenarios. Summary of the Invention
[0009] In response to the shortcomings of the existing technology, the present invention provides a short-term traffic flow prediction method based on a traffic-air interactive hybrid convolutional network. The core of the method is to propose "contemporaneous spatiotemporal node binding reorganization", which arranges the contemporaneous traffic flow and air quality characteristics in close proximity through odd-even alternation, solving the problem of "cross-region association learning" in traditional splicing; designing a convolutional interaction layer that matches the reorganization rule, realizing bidirectional dynamic modulation of subsequences based on odd-even splitting, and strengthening the interaction of contemporaneous features; using bidirectional LSTM to model the causal chain of "traffic flow → air quality" and the feedback chain of "air quality → traffic flow", respectively, covering the complete bidirectional dependency relationship.
[0010] To achieve the above objectives, the present invention provides the following technical solution: a short-term traffic flow prediction method based on a traffic-air interactive hybrid convolutional network, comprising the following steps: Step S1: Collect historical traffic flow data of the target area to construct a historical traffic flow dataset, and simultaneously collect historical air data corresponding to the target area and time period to construct a historical air quality dataset; Step S2: preprocessing the historical traffic flow dataset and the historical air quality dataset, and dividing the preprocessed historical traffic flow dataset and the historical air quality dataset into a training set and a test set; Step S3: Perform cross-modal spatiotemporal sequence interleaving and reorganization on the preprocessed historical traffic flow dataset and historical air quality dataset to obtain a historical fusion feature sequence; Step S4: construct an interactive hybrid convolutional network consisting of a convolutional interaction network model and a bidirectional long short-term memory network model, and iteratively train and test the interactive hybrid convolutional network using a training set and a test set; in each iterative training, the parameters of the prediction model are optimized using the mean square error loss function and the RMSprop optimizer in combination with the fusion feature sequence to obtain a trained interactive hybrid convolutional network; Step S5: Acquire real-time traffic flow data and air quality data in the target area, and pass the real-time traffic flow data and air quality data through steps S2 and S3 to obtain real-time standardized traffic flow data features, real-time standardized air quality data features, and real-time fusion feature sequences; input the real-time fusion feature sequences, real-time standardized traffic flow data features, and real-time standardized air quality data features into the trained interactive hybrid convolutional network to output the final traffic flow prediction results.
[0011] Furthermore, the specific process of step S3 is as follows: Assume that the preprocessed historical traffic flow dataset The standardized historical traffic flow data characteristics in , express Middle Standardized historical traffic flow data characteristics at spatiotemporal nodes, Indicates the total number of spatiotemporal nodes; Assume the preprocessed historical air quality dataset The standardized historical air quality data characteristics in , express Middle Standardized historical air quality data characteristics at each spatiotemporal node; Select by "odd-even index alternation" rule and Features in: 1st time: Take The feature with index 1 in ; Second time: Take The feature with index 1 in ; 3rd time: Take The feature with index 2 ; 4th time: Take The feature with index 2 ; No. Times: Take The index is Features , ; No. Times: Take The index is Features ; Repeat this process until all and All features in; Splice the selected features in order to obtain the historical fusion feature sequence .
[0012] Furthermore, in each iterative training, the fusion feature sequence , using the mean square error loss function and RMSprop optimizer to optimize the parameters of the prediction model, the specific process of obtaining the trained interactive hybrid convolutional network is: Fusion feature sequence Input the interactive hybrid convolutional network, and generate the traffic flow state prediction value through network forward propagation calculation; The mean square error loss function is used to compare the predicted traffic flow state value with the actual traffic flow state value, calculate the difference between the two, and obtain the loss value; Based on the loss value, the gradient of the loss function with respect to the parameters of each layer of the interactive hybrid convolutional network is calculated through reverse deduction using the back-propagation algorithm; The learning rate is dynamically adjusted using the root mean square propagation optimizer, and the parameters of the interacting hybrid convolutional network are updated according to the exponential moving average of the gradient amplitude to obtain a trained interacting hybrid convolutional network.
[0013] Furthermore, the convolutional interaction network model consists of a first convolutional module and an interaction layer; the bidirectional long short-term memory network model consists of a forward LSTM layer and a reverse LSTM layer; the forward LSTM layer processes the input sequence in chronological order; the reverse LSTM layer processes the input sequence in reverse chronological order; The processing flow of the interactive hybrid convolutional network is: Set the historical fusion feature sequence ,in, represents the field of real numbers, Indicates the number of channels, Indicates the sequence length; Fusing history into feature sequences Input into the first convolution module to obtain the convolution module Output ; Fusing history into feature sequences Input into the interaction layer to obtain the air quality update feature and traffic flow update characteristics ; Update the air quality feature and traffic flow update characteristics Input into the bidirectional long short-term memory network model and output the traffic flow prediction results .
[0014] Furthermore, the first convolution module The processing flow is: Historical fusion feature sequence Fill and generate the filled sequence ; The first convolutional module It consists of multiple one-dimensional convolutional layers; the padded sequence Input into the first one-dimensional convolution layer to get the first feature ; use Activation function for the first feature Transform to get the second feature ; right Perform regularization operation to obtain the third feature ; The third feature Input to the second one-dimensional convolution layer to obtain the fourth feature ; use Activation function pair Process and generate convolution module Output .
[0015] Furthermore, the processing flow of the interaction layer is as follows: Fusing history into feature sequences Split into air quality element subsequences and traffic flow element subsequence ; Using the second convolution module and the third convolutional module Subsequence the air quality element and traffic flow element subsequence Mapped to the hidden state, through element-by-element multiplication and exponential scaling, the subsequences are adjusted using the parameters learned by each other to obtain the air quality scaling feature and traffic flow scaling characteristics : ; ; Scaling the air quality feature and traffic flow scaling characteristics Input to the fourth convolution module and the fifth convolutional module After processing in, it is fused with the original features through addition and subtraction operations to obtain the updated air quality features and traffic flow update characteristics : ; ; Among them, the second convolution module , the third convolution module , the fourth convolution module and the fifth convolutional module and the first convolutional module Same structure.
[0016] Furthermore, the processing flow of the bidirectional long short-term memory network model is as follows: Update the air quality feature and traffic flow update characteristics With convolutional modules Output Sum, integrate multi-source information to form an integrated sequence ; The forward LSTM layer is in chronological order Processing integration sequences No. Time step characteristics , output hidden state set at each time step , Indicates the The forward hidden state at time step, , represents the total number of time steps; The reverse LSTM layer reverses the time sequence deal with , output hidden state set at each time step , Indicates the The reverse hidden state of the time step; By time step and Splice and get the fusion feature matrix ; The fused feature matrix After the fully connected layer, the output of the interactive hybrid convolutional network is obtained, which is the traffic flow prediction result. .
[0017] Furthermore, the specific process of step S2 is: Historical traffic flow dataset , historical air quality dataset Fill in the missing data points in ; Historical traffic flow dataset , historical air quality dataset Z-Score standardization was performed separately; The standardized historical traffic flow dataset , historical air quality dataset They are divided into training set and test set according to the preset time ratio.
[0018] An electronic device includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute a short-term traffic flow prediction method based on a traffic-air interaction hybrid convolutional network.
[0019] A non-volatile computer storage medium stores computer-executable instructions for executing a short-term traffic flow prediction method based on a traffic-air interaction hybrid convolutional network.
[0020] Compared with the existing technology, the present invention has the following beneficial effects:
[0021] (1) The present invention uses a cross-modal spatiotemporal sequence interleaving and reorganization mechanism to alternately arrange and combine traffic flow data and air quality data at the same spatiotemporal node according to odd and even indexes, explicitly interweaving the traffic flow status at adjacent moments with the air quality status at the same time, and effectively modeling the spatiotemporal coupling relationship between the two. This mechanism significantly improves the efficiency of feature interaction and solves the problem that traditional feature splicing methods cannot model real-time interaction. At the same time, the convolutional interaction network uses independent convolution kernels to perform differentiated feature extraction on air quality and traffic flow subsequences, and realizes cross-subsequence information exchange through affine transformation. Combined with the bidirectional long short-term memory network, the bidirectional modeling of the lag effect of "traffic flow → air quality" and the feedback effect of "air quality → traffic flow" further explores the forward and reverse dependencies of the time series, making the model more robust and adaptable when facing complex traffic environments and changes in external conditions.
[0022] (2) The present invention fully utilizes the deep complementary information of multi-source heterogeneous data to achieve deep interaction and collaborative learning between traffic flow core data and environmental protection data. The model can adaptively identify the differences in the correlation strength between different air quality components and traffic, strengthen the feature weights of highly correlated factors, and provide strong support for the refined management of intelligent transportation systems. This method can provide more accurate prediction data for traffic signal control, traffic congestion relief, traffic planning and optimization, etc., which will help optimize traffic resource allocation, alleviate traffic congestion, reduce traffic accidents, energy consumption and carbon emissions, improve road network traffic efficiency, and promote the sustainable development of intelligent transportation systems.
[0023] (3) This paper significantly improves the accuracy of traffic flow prediction by deeply integrating traffic flow data with air quality data. Experimental results show that this method outperforms existing models in terms of evaluation indicators such as root mean square error, mean square error, and mean absolute error. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Schematic diagram of the overall structure of the interactive hybrid convolutional network of the present invention. DETAILED DESCRIPTION
[0025] like Figure 1 As shown, the present invention provides a technical solution: a short-term traffic flow prediction method based on a traffic-air interactive hybrid convolutional network, comprising the following steps:
[0026] Step S1: Collect historical traffic flow data of the target area to build a historical traffic flow dataset , synchronously collect historical air data corresponding to the target area and time period to build a historical air quality dataset .
[0027] Among them, historical traffic flow data mainly includes spatiotemporal sequence information such as vehicle volume, speed, and occupancy rate; historical urban environmental protection data mainly includes air quality data, such as 、 、 、 、 、 Time series data on the concentration of pollutants such as air pollution; the data is collected by deploying multiple sensors in the city (each individual air pollution concentration data is combined with traffic data for experiments to facilitate observation of which type of air pollution is more closely related to traffic in different scenarios).
[0028] Step S2: Historical traffic flow dataset and historical air quality datasets Perform preprocessing and convert the preprocessed historical traffic flow dataset and historical air quality datasets Divide into training set and test set.
[0029] The specific process of step S2 is as follows:
[0030] 1. Historical traffic flow dataset , historical air quality dataset The missing data points in the dataset are filled with the average value of the feature dimension to ensure the continuity and integrity of the data sequence.
[0031] 2. Historical traffic flow dataset , historical air quality dataset Perform Z-Score standardization separately:
[0032] Computing historical traffic flow datasets The mean and standard deviation of each feature dimension in the specified dataset (training set / full set).
[0033] Calculate historical air quality datasets The mean and standard deviation of each feature dimension in the specified dataset (training set / full set).
[0034] For historical traffic flow datasets The original features (traffic volume, speed, occupancy rate, etc.) in the data are substituted into the mean and standard deviation of the corresponding feature dimensions to calculate the standardized historical traffic flow data features.
[0035] For historical air quality datasets The original features in ( 、 、 、 、 、 The standard historical air quality data characteristics are calculated by substituting the mean and standard deviation of the corresponding characteristic dimensions.
[0036] 3. Standardized historical traffic flow dataset Divide into training sets according to the preset time ratio and test set ; The standardized historical air quality dataset Divide into training sets according to the preset time ratio and test set , ensuring the independence of training and evaluation data.
[0037] Step S3: Preprocess the historical traffic flow dataset and historical air quality datasets Perform cross-modal spatiotemporal sequence interleaving and reorganization (simultaneous spatiotemporal node binding reorganization) to obtain historical fusion feature sequences .
[0038] The specific process of step S3 is as follows: A valid historical traffic flow dataset and historical air quality datasets Based on the potential coupling relationship of the feature sequences at the same spatiotemporal nodes, a specific feature sequence fusion strategy is designed: 1. Assume the preprocessed historical traffic flow dataset The standardized historical traffic flow data characteristics in , express Middle Standardized historical traffic flow data characteristics at spatiotemporal nodes, Indicates the total number of spatiotemporal nodes; 2. Assume the preprocessed historical air quality dataset The standardized historical air quality data characteristics in , express Middle Standardized historical air quality data characteristics at each spatiotemporal node; 3. Select according to the "odd-even index alternation" rule and Features in: 1st time: Take The feature with index 1 in ; Second time: Take The feature with index 1 in ; 3rd time: Take The feature with index 2 ; 4th time: Take The feature with index 2 ; No. Second-rate( ):Pick The index is Features ; No. Times: Take The index is Features ; Repeat this process until all and All features in .
[0039] 4. Splice the selected features in order to obtain the historical fusion feature sequence .
[0040] This recombination method makes each pair of contemporaneous characters physically adjacent in the sequence (e.g. and adjacent to), which is different from the traditional "traffic flow characteristics are arranged in full and then the air quality characteristics are spliced" (e.g. ) partitioning mode, forcing the model to perceive the spatiotemporal coupling relationship between the two at the input stage.
[0041] Step S4: Construct an interactive hybrid convolutional network consisting of a convolutional interactive network model and a bidirectional long short-term memory network model, and iteratively train and test the interactive hybrid convolutional network using training sets and test sets; in each iterative training, combine the fusion feature sequence , the mean square error loss function and RMSprop optimizer are used to optimize the parameters of the prediction model to obtain a trained interactive hybrid convolutional network.
[0042] Among them, in each iterative training, combined with the fusion feature sequence , using the mean square error loss function and RMSprop optimizer to optimize the parameters of the prediction model, the specific process of obtaining the trained interactive hybrid convolutional network is: 1. Fusion feature sequence Input the interactive hybrid convolutional network, and generate the traffic flow state prediction value through network forward propagation calculation; 2. Use the mean square error (MSE) loss function to compare the "traffic flow state prediction value" with the "actual traffic flow state value", calculate the difference between the two, and obtain the loss value (the smaller the loss value, the higher the prediction accuracy); 3. Based on the loss value, reverse deduction is performed through the back propagation algorithm to calculate the effect of the loss function on the parameters of each layer of the interactive hybrid convolutional network (weights , bias etc.) (i.e., the degree of influence of the parameters on the loss); 4. Use the RMSprop (root mean square propagation) optimizer to dynamically adjust the learning rate and update the interacting hybrid convolutional network parameters based on the exponential moving average of the gradient magnitude to accelerate convergence, improve stability, and minimize the loss function to obtain a trained interacting hybrid convolutional network.
[0043] Step S5: Obtain the real-time traffic flow data and air quality data of the target area, and pass the real-time traffic flow data and air quality data through steps S2 and S3 to obtain real-time standardized traffic flow data features, real-time standardized air quality data features and real-time fusion feature sequences; and real-time standardized traffic flow data characteristics , Real-time standardized air quality data characteristics Input into the trained interactive hybrid convolutional network and output the final traffic flow prediction result, which can be expressed as: ; Where, Indicates the traffic flow prediction result; Represents the convolutional interaction network model; Represents a bidirectional long short-term memory network model; represents a real-time fusion feature sequence; Representing sequences in real-time traffic flow data; Represents a series in real-time air quality data.
[0044] Among them, the convolutional interaction network model consists of the first convolution module and the interaction layer; the bidirectional long short-term memory network model (BiLSTM) consists of a forward LSTM layer (Forward LSTM) and a backward LSTM layer (Backward LSTM); the forward LSTM layer processes the input sequence in chronological order; the backward LSTM layer processes the input sequence in reverse chronological order.
[0045] The processing flow of the interactive hybrid convolutional network is: 1. Set the historical fusion feature sequence ,in, represents the field of real numbers, Indicates the number of channels, Indicates the sequence length.
[0046] 2. Integrate history into feature sequences Input to the first convolution module, in the first convolution module middle: In order to maintain causality and avoid boundary problems, replication padding is used to fused historical feature sequences. Fill and generate the filled sequence : ; Where, Represents a copy-fill operation.
[0047] Among them, the first convolution module It consists of multiple one-dimensional convolutional layers; the padded sequence Input to the first one-dimensional convolution layer (the convolution kernel size is , the expansion rate is , step size is 1), get the first feature : ; Where, Represents the first one-dimensional convolutional layer; 、 Represent the weight and bias of the convolution kernel of the first one-dimensional convolution layer respectively.
[0048] use Activation function for the first feature Transform to get the second feature : ; Where, Represents the activation function.
[0049] To prevent overfitting, Perform regularization operation (Dropout) to obtain the third feature : ; Where, represents the regularization operation.
[0050] The third feature Input to the second one-dimensional convolution layer (convolution kernel size is 3, step size is 1, input and output channels are the same), and the fourth feature is obtained : ; Where, Represents the second one-dimensional convolutional layer; 、 Represent the weight and bias of the convolution kernel of the second one-dimensional convolution layer respectively.
[0051] use Activation function pair Process and generate convolution module Output : ; To facilitate calculation, the first convolution module The processing process is expressed as: .
[0052] 3. Integrate history into feature sequences Input to the interaction layer, in the interaction layer:
[0053] Fusing history into feature sequences Split into air quality element subsequences (Extract all even-numbered features in the sequence, corresponding to the position of air quality features during reorganization) and traffic flow element subsequences (Extract all odd-numbered features in the sequence, corresponding to the traffic flow feature positions during reorganization); this splitting method ensures that the subsequences strictly correspond to the original spatiotemporal nodes, solving the problem of time sequence disorder caused by traditional random splitting.
[0054] Using the second convolution module and the third convolutional module Subsequence the air quality element and traffic flow element subsequence Mapped to the hidden state, through element-by-element multiplication (Hadamard product) and exponential scaling, the subsequences are adjusted using the parameters learned by each other to obtain the air quality scaling feature and traffic flow scaling characteristics : ; ; Scaling the air quality feature and traffic flow scaling characteristics Input to the fourth convolution module and the fifth convolutional module After processing in, it is fused with the original features through addition and subtraction operations to obtain the updated air quality features and traffic flow update characteristics : ; .
[0055] Among them, the second convolution module , the third convolution module , the fourth convolution module and the fifth convolutional module and the first convolutional module The structure is the same, so the processing flow will not be described in detail.
[0056] 4. Update the air quality feature and traffic flow update characteristics Input to the bidirectional long short-term memory network model, in the bidirectional long short-term memory network model: Update the air quality feature and traffic flow update characteristics With convolutional modules Output Sum, integrate multi-source information to form an integrated sequence (length L): .
[0057] Bidirectional causal chain modeling:
[0058] The forward LSTM layer is in chronological order Processing integration sequences No. Time step characteristics , analyze the lag effect of “traffic flow → air quality”: for example, Time step characteristics The traffic flow characteristics in Time step characteristics The driving relationship of PM2.5 in the (increased traffic volume → increased exhaust emissions → subsequent pollution increase) outputs the hidden state set at each time step , Indicates the The forward hidden state of the time step (containing the state from the beginning of the sequence to the The forward time series dependency information of the time step (such as the driving relationship between the previous traffic flow changes and the current air quality) , Indicates the total number of time steps.
[0059] The reverse LSTM layer reverses the time sequence deal with , focus on learning the immediate feedback of “air quality → traffic flow”: for example PM2.5 in the Time step characteristics The suppression relationship of traffic flow characteristics in the (pollution warning → traffic restriction policy → early traffic flow reduction) outputs the hidden state set step by step , Indicates the The reverse hidden state of the time step (containing the state from the end of the sequence to the The reverse temporal dependence of the time step (such as the feedback effect of the current pollution concentration on the previous traffic flow)).
[0060] Feature fusion and prediction: By time step and Splice and get the fusion feature matrix (The spliced fusion feature matrix fully retains the bidirectional correlation between "contemporary traffic and air", allowing the prediction results to simultaneously reflect the combined effects of causal driving and feedback regulation): .
[0061] The fused feature matrix After the fully connected layer, the output of the interactive hybrid convolutional network is obtained, which is the traffic flow prediction result. : ; Where, Represents the weight matrix of the fully connected layer; represents the bias term of the fully connected layer; Represents the traffic flow prediction result for the future The traffic flow prediction value of time steps is output. The output prediction result is actually a sequence Prediction of temporal evolution of multi-source information.
[0062] An electronic device includes a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute a short-term traffic flow prediction method based on a traffic-air interaction hybrid convolutional network.
[0063] A non-volatile computer storage medium stores computer-executable instructions for executing a short-term traffic flow prediction method based on a traffic-air interaction hybrid convolutional network.
[0064] Ablation experiments
[0065] To demonstrate the effectiveness of the present invention, the present invention is compared with traditional machine learning and mainstream deep learning methods on an urban dataset, as shown in Table 1.
[0066] Table 1 Comparison results
[0067] In Table 1, the city A dataset is a dataset of a medium-sized city, and the city B dataset is a dataset of a large and complex city; SVR represents the support vector regression method, Transformer represents a deep learning model based on the self-attention mechanism; SCInet represents a sample convolutional interaction network; BiLSTM represents a bidirectional long short-term memory network; FEDformer represents a long time series prediction optimization model based on frequency decomposition; informer represents a long time series prediction optimization model based on sparse attention; Autoformer represents a long time series prediction optimization model based on the autocorrelation mechanism; TrairNet represents the interactive hybrid convolutional network of the present invention; TrairNet(speed) represents an interactive hybrid convolutional network trained with only traffic flow data; TrairNet(speed+O3) represents an interactive hybrid convolutional network trained with fused traffic flow data and ozone (O3) data; TrairNet(speed+PM) represents an interactive hybrid convolutional network trained with fused traffic flow data and particulate matter (PM) data; RMSE represents root mean square error; MAE represents mean absolute error; and MSE represents mean square error.
[0068] The results in Table 1 show that the TrairNet(speed), TrairNet(speed+O3) and TrairNet(speed+PM) of the present invention are all ahead in RMSE, MAE and MSE indicators. For example, in the city A dataset, the MSE of TrairNet(speed+O3) is 0.0649, which is only 0.24% of SVR and 15.1% of Transformer, proving that the prediction accuracy of the interactive hybrid convolutional network of the present invention far exceeds traditional machine learning and mainstream deep learning methods.
[0069] After integrating air quality data (O3 and PM), TrairNet's accuracy is further improved. Taking the City B dataset as an example, the MSE of TrairNet (speed + PM) is 0.3841, which is 33.1% lower than the 0.5739 of TrairNet (speed) using only traffic flow data, and 22.6% lower than the 0.4961 of TrairNet (speed + O3). This validates the effectiveness of the proposed cross-modal spatiotemporal sequence interleaving and reorganization. By demonstrating the simultaneous dynamic coupling relationship between modeled traffic flow and air quality, it significantly improves the efficiency of feature interaction.
[0070] TrairNet maintains its advantage on the City B dataset, which features a more complex traffic-environment relationship. For example, the RMSE of TrairNet (speed+PM) is 0.6198, a 20.9% decrease from BiLSTM's 0.7837 and a 21.5% decrease from SCInet's 0.7892. This demonstrates that the proposed method can better handle nonlinear spatiotemporal dependencies and exhibits superior robustness.
[0071] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A short-term traffic flow prediction method based on traffic-air interaction hybrid convolutional network, characterized by: The steps include: Step S1: Collect historical traffic flow data of the target area to construct a historical traffic flow dataset, and simultaneously collect historical air data corresponding to the target area and time period to construct a historical air quality dataset; Step S2: preprocessing the historical traffic flow dataset and the historical air quality dataset, and dividing the preprocessed historical traffic flow dataset and the historical air quality dataset into a training set and a test set; Step S3: Perform cross-modal spatiotemporal sequence interleaving and reorganization on the preprocessed historical traffic flow dataset and historical air quality dataset to obtain a historical fusion feature sequence; Step S4: constructing an interactive hybrid convolutional network consisting of a convolutional interaction network model and a bidirectional long short-term memory network model, and iteratively training and testing the interactive hybrid convolutional network using a training set and a test set; In each iterative training, the fusion feature sequence is combined, and the mean square error loss function and RMSprop optimizer are used to optimize the parameters of the prediction model to obtain a trained interactive hybrid convolutional network; Step S5: Acquire real-time traffic flow data and air quality data in the target area, and pass the real-time traffic flow data and air quality data through steps S2 and S3 to obtain real-time standardized traffic flow data features, real-time standardized air quality data features, and real-time fusion feature sequences; input the real-time fusion feature sequences, real-time standardized traffic flow data features, and real-time standardized air quality data features into the trained interactive hybrid convolutional network to output the final traffic flow prediction results.
2. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 1 is characterized by: The specific process of step S3 is: Assume that the preprocessed historical traffic flow dataset The standardized historical traffic flow data characteristics in , express Middle Standardized historical traffic flow data characteristics at spatiotemporal nodes, Indicates the total number of spatiotemporal nodes; Assume the preprocessed historical air quality dataset The standardized historical air quality data characteristics in , express Middle Standardized historical air quality data characteristics at each spatiotemporal node; Select by "odd-even index alternation" rule and Features in: 1st time: Take The feature with index 1 in ; Second time: Take The feature with index 1 in ; 3rd time: Take The feature with index 2 ; 4th time: Take The feature with index 2 ; No. Times: Take The index is Features , ; No. Times: Take The index is Features ; Repeat this process until all and All features in; Splice the selected features in order to obtain the historical fusion feature sequence .
3. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 2 is characterized by: In each iterative training, the fusion feature sequence , using the mean square error loss function and RMSprop optimizer to optimize the parameters of the prediction model, the specific process of obtaining the trained interactive hybrid convolutional network is: Fusion feature sequence Input the interactive hybrid convolutional network, and generate the traffic flow state prediction value through network forward propagation calculation; The mean square error loss function is used to compare the predicted traffic flow state value with the actual traffic flow state value, calculate the difference between the two, and obtain the loss value; Based on the loss value, the gradient of the loss function with respect to the parameters of each layer of the interactive hybrid convolutional network is calculated through reverse deduction using the back-propagation algorithm; The learning rate is dynamically adjusted using the root mean square propagation optimizer, and the parameters of the interacting hybrid convolutional network are updated according to the exponential moving average of the gradient amplitude to obtain a trained interacting hybrid convolutional network.
4. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 3 is characterized by: The convolutional interaction network model consists of the first convolution module and the interaction layer; the bidirectional long short-term memory network model consists of a forward LSTM layer and a reverse LSTM layer; the forward LSTM layer processes the input sequence in chronological order; the reverse LSTM layer processes the input sequence in reverse chronological order; The processing flow of the interactive hybrid convolutional network is: Set the historical fusion feature sequence ,in, represents the field of real numbers, Indicates the number of channels, Indicates the sequence length; Fusing history into feature sequences Input into the first convolution module to obtain the convolution module Output ; Fusing history into feature sequences Input into the interaction layer to obtain the air quality update feature and traffic flow update characteristics ; Update the air quality feature and traffic flow update characteristics Input into the bidirectional long short-term memory network model and output the traffic flow prediction results .
5. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 4 is characterized by: The first convolutional module The processing flow is: Historical fusion feature sequence Fill and generate the filled sequence ; The first convolutional module It consists of multiple one-dimensional convolutional layers; the padded sequence Input into the first one-dimensional convolution layer to get the first feature ; use Activation function for the first feature Transform to get the second feature ; right Perform regularization operation to obtain the third feature ; The third feature Input to the second one-dimensional convolution layer to obtain the fourth feature ; use Activation function pair Process and generate convolution module Output .
6. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 5 is characterized by: The processing flow of the interaction layer is: Fusing history into feature sequences Split into air quality element subsequences and traffic flow element subsequence ; Using the second convolution module and the third convolutional module Subsequence the air quality element and traffic flow element subsequence Mapped to the hidden state, through element-by-element multiplication and exponential scaling, the subsequences are adjusted using the parameters learned by each other to obtain the air quality scaling feature and traffic flow scaling characteristics : ; ; Scaling the air quality feature and traffic flow scaling characteristics Input to the fourth convolution module and the fifth convolutional module After processing in, it is fused with the original features through addition and subtraction operations to obtain the updated air quality features and traffic flow update characteristics : ; ; Among them, the second convolution module , the third convolution module , the fourth convolution module and the fifth convolutional module and the first convolutional module Same structure.
7. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 6 is characterized by: The processing flow of the bidirectional long short-term memory network model is as follows: Update the air quality feature and traffic flow update characteristics With convolutional modules Output Sum, integrate multi-source information to form an integrated sequence ; The forward LSTM layer is in chronological order Processing integration sequences No. Time step characteristics , output hidden state set at each time step , Indicates the The forward hidden state at time step, , represents the total number of time steps; The reverse LSTM layer reverses the time sequence deal with , output hidden state set at each time step , Indicates the The reverse hidden state of the time step; By time step and Splice and get the fusion feature matrix ; The fused feature matrix After the fully connected layer, the output of the interactive hybrid convolutional network is obtained, which is the traffic flow prediction result. .
8. The short-term traffic flow prediction method based on traffic-air interactive hybrid convolutional network according to claim 7 is characterized by: The specific process of step S2 is: Historical traffic flow dataset , historical air quality dataset Fill in the missing data points in ; Historical traffic flow dataset , historical air quality dataset Z-Score standardization was performed separately; The standardized historical traffic flow dataset , historical air quality dataset They are divided into training set and test set according to the preset time ratio.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute the short-term traffic flow prediction method based on the traffic-air interaction hybrid convolutional network according to any one of claims 1 to 8.
10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that: The computer-executable instructions execute the short-term traffic flow prediction method based on the traffic-air interactive hybrid convolutional network described in any one of claims 1-8.
Citation Information
Patent Citations
Short-term traffic flow prediction method fusing air quality and traffic flow data
CN116913098A
Traffic flow prediction method fusing air pollution factors
CN120564428A
Short-term traffic flow prediction method under complex road network, storage medium, and system
WO2022241802A1
Cited By
Traffic and air pollution bidirectional coupling flow prediction method based on double-path dynamic fusion
CN121938205A
