Traffic speed prediction method, device and storage medium based on ensemble learning and graph attention gated recurrent network

By adopting integrated learning and graph attention-gated loop network methods in traffic speed prediction, the accuracy problem of traffic speed prediction in complex traffic road networks is solved, and a more efficient traffic speed prediction effect is achieved.

CN119784180APending Publication Date: 2025-04-08FAW VOLKSWAGEN AUTOMOTIVE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411856981.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict traffic speeds in complex traffic road networks, and a single model cannot fully capture the temporal and spatial characteristics of traffic data.

Method used

The traffic speed prediction method based on integrated learning and graph attention gating recurrent network is adopted. The graph attention neural network and gated recurrent neural network are used as the basic model, and the recurrent neural network is combined as the secondary model. The stack integrated learning method integrates the output of multiple models to capture the temporal and spatial characteristics of the traffic road network.

Benefits of technology

It improves the accuracy and stability of traffic speed prediction, reduces prediction errors, and is suitable for traffic speed prediction of complex traffic road networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784180A_ABST
    Figure CN119784180A_ABST
Patent Text Reader

Abstract

The present invention discloses a traffic speed prediction method, device and storage medium based on ensemble learning and graph attention gated recurrent network. The method includes the following processes: obtaining traffic data source data, making traffic speed data set and sensor network adjacency matrix data; designing traffic speed prediction base model; using sensor historical data and adjacency matrix data to train the traffic speed prediction base model; using stack ensemble learning method, using gated recurrent neural network base model and graph attention gated recurrent neural network as base model, and using recurrent neural network as secondary model; training the secondary model module of recurrent neural network, designing loss function, and optimizing by optimization algorithm; using verification data set to test recurrent neural network performance index. The present invention predicts the accurate speed of roads in traffic network, improves the operation efficiency of urban traffic, reduces the management cost of traffic management department and improves people's travel experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic big data mining and analysis, and in particular to a method for predicting traffic speed of a complex traffic network by combining an urban traffic network with an integrated learning method. Background Art

[0002] With the rapid development of urban transportation, traffic congestion has become a key issue that needs to be solved urgently. Traffic congestion not only wastes passengers' time, but also the exhaust gas emitted by vehicles during congestion will cause air pollution and greenhouse effect.

[0003] In urban intelligent transportation systems, accurate speed prediction of roads in the traffic network is of great significance for reducing traffic congestion, improving urban traffic operation efficiency, reducing management costs of traffic management departments, and improving people's travel experience.

[0004] At present, traffic prediction methods mainly include traditional statistical methods and deep learning methods.

[0005] Traditional statistical methods, such as the differential integrated moving average autoregressive model, determine the dynamic characteristics of traffic speed by constructing mathematical models, but it is difficult to accurately model dynamic behavior for complex traffic network systems.

[0006] Although deep learning methods can understand the complex functional relationship between influencing factors by studying a large amount of data, for example, Y. Tian et al. and X. Ma et al. used long short-term memory neural networks, R. Fu et al. used gated recurrent neural networks, Y. Liu et al. used a fusion of convolutional neural networks and long short-term memory neural networks, and B. Yu et al. combined graph convolution neural networks (GCNNs) with gated recurrent neural networks to predict the speed values ​​of traffic networks, a single model cannot fully and accurately capture the characteristics of traffic data.

[0007] The integrated model can integrate the outputs of multiple single models for prediction, which can effectively improve the prediction accuracy of a single model, reduce variance and improve generalization ability. However, there are many problems with existing integrated learning applications. For example, L. Chen et al. used the method of assigning base model weights to improve the accuracy of short-term traffic flow prediction through integrated learning methods, but the prediction performance was poor; X. Qiu et al. proposed a method of combining base model outputs through support vector machines, but the base model could not efficiently capture the spatiotemporal characteristics of traffic flow data, resulting in unsatisfactory prediction performance.

[0008] In addition, it is known that the deep attention neural network constructed by X. Ma et al. is difficult to accurately capture traffic information in the time domain; the attention long short-term memory network proposed by Y. Liu et al. can only extract grid-type traffic data and is not suitable for sensor networks with non-standard grid structures; the graph convolutional neural network adopted by B. Yu et al. has limitations in dealing with the acquisition of features in different order fields, etc. Graph convolutional neural network methods are divided into two categories, spectral domain-based methods and spatial domain-based methods. The spectral domain-based method defines graph convolution by introducing filters from the perspective of graph signal processing, where the graph convolution operation is interpreted as removing noise from the graph signal. The spatial domain-based method represents graph convolution as aggregating feature information from neighbors. Summary of the invention

[0009] In order to accurately predict the speed of roads in a traffic network, reduce traffic congestion, improve the efficiency of urban traffic operation, reduce the management cost of traffic management departments, and improve people's travel experience, the present invention provides a traffic speed prediction method based on ensemble learning and graph attention gated recurrent network, including the following process:

[0010] S1, data acquisition and processing: obtain traffic data source data, make traffic speed data set and sensor network adjacency matrix data;

[0011] S2. Basic module design: Select graph attention neural network and gated recurrent neural network as basic modules, and design the traffic speed prediction base model (Base Model, which is a language model obtained through large-scale unsupervised learning training).

[0012] S3, base model training: Use sensor historical data and adjacency matrix data to train the gated recurrent neural network base model and graph attention gated recurrent neural network module, design the loss function, and use the optimization algorithm for optimization;

[0013] S4. Construct prediction model framework: Construct a traffic speed prediction model framework, adopt a stacked ensemble learning method, use the gated recurrent neural network base model and the graph attention gated recurrent neural network as the base model, and use the recurrent neural network as the secondary model;

[0014] S5, secondary model training: training the secondary model module of the recurrent neural network, designing the loss function, and optimizing it using the optimization algorithm;

[0015] S6. Performance testing: Use the validation dataset to test the performance indicators of the recurrent neural network.

[0016] Furthermore, the specific steps of step S1 are:

[0017] S11, download the traffic speed data source of the California Performance Evaluation System (PeMS-BAY), and divide the traffic speed data of the traffic speed data source into a training data set and a validation data set;

[0018] S12, using the traffic speed sequence data of the training data set for module training, and using the validation data set to test the module training effect;

[0019] S13. Construct an adjacency matrix of the entire sensor network according to the connection relationship between multiple sensors in the traffic network.

[0020] Furthermore, the specific steps of step S2 are:

[0021] S21, select the graph attention neural network to obtain the spatial characteristics of the traffic road network of the traffic speed data, and the graph attention network captures the spatial structure of adjacent points in the non-Euclidean space;

[0022] S22, gated recurrent neural network to obtain the time characteristics of traffic speed data;

[0023] Furthermore, the specific steps of step S3 are:

[0024] S31, integrating graph attention neural network and gated recurrent neural network into a graph attention gated recurrent neural network layer, which simultaneously captures the temporal and spatial characteristics of traffic speed information on complex traffic road networks;

[0025] S32, selecting a gated recurrent neural network as a base model of the ensemble learning model;

[0026] S33. Design a loss function and use an optimization algorithm to train the two base models.

[0027] Furthermore, the specific steps of step S4 are:

[0028] S41. Construct a traffic speed prediction model framework, adopt a stacked ensemble learning method, and use the gated recurrent neural network base model and the graph attention gated recurrent neural network as the base model;

[0029] S42. Use recurrent neural network as a secondary model.

[0030] Furthermore, the specific steps of step S5 are:

[0031] S51. Concatenate the output data of the base model as the input of the secondary model recurrent neural network.

[0032] S52. Design the loss function and use the Adam optimization algorithm to train the secondary model.

[0033] The loss function is defined as follows:

[0034]

[0035] y represents the label value, represents the network prediction value, T represents the total number of samples in the entire test set, and y i represents the i-th sample.

[0036] Furthermore, the optimization algorithm in step S3 and / or step S5 is the Adam optimization algorithm.

[0037] The present invention also provides a device for traffic speed prediction based on ensemble learning and graph attention gated recurrent network, comprising:

[0038] Data acquisition and processing module, used to acquire traffic data source data and produce traffic speed data set and sensor network adjacency matrix data;

[0039] The basic module design module is used to select graph attention neural network and gated recurrent neural network as basic modules and design the traffic speed prediction base model.

[0040] The base model training module uses sensor historical data and adjacency matrix data to train the gated recurrent neural network base model and graph attention gated recurrent neural network module, designs the loss function, and uses the optimization algorithm for optimization;

[0041] A prediction model framework building module is used to build a traffic speed prediction model framework, which adopts a stacked ensemble learning method, uses a gated recurrent neural network base model and a graph attention gated recurrent neural network as base models, and uses a recurrent neural network as a secondary model;

[0042] The secondary model training module is used to train the secondary model module of the recurrent neural network, design the loss function, and use the optimization algorithm for optimization;

[0043] The performance testing module is used to test the performance indicators of the recurrent neural network using the validation data set.

[0044] The present invention also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a processor to implement a traffic speed prediction method based on integrated learning and a graph attention gated recurrent network when executed.

[0045] The existing technology fails to fully combine the temporal and spatial traffic information to accurately predict the traffic speed of complex traffic networks, and does not use a multi-model ensemble learning method to capture the characteristics of traffic flow data. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network described in the present invention adopts a data-driven approach, uses graph attention gated recurrent neural network and gated recurrent neural network as the base model of the ensemble learning model, and selects recurrent neural network as the secondary model of the ensemble learning model, which can better combine the temporal and spatial information of the traffic network, integrate the characteristics of the traffic data captured by the base model, reduce the traffic speed prediction error, and achieve better prediction effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to better understand the above and other purposes, features, advantages and functions of the present invention, reference may be made to the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings refer to the same components. It should be understood by those skilled in the art that the accompanying drawings are intended to schematically illustrate the preferred embodiments of the present invention and have no limiting effect on the scope of the present invention, and the components in the drawings are not drawn to scale.

[0047] Attached Figure 1 This is a schematic diagram of the structure of a gated recurrent neural network designed by the present invention, showing the operational relationship between the variables in the gated recurrent neural network.

[0048] Attached Figure 2 This is a schematic diagram of the graph attention gated recurrent neural network structure of the design method of the present invention, which embodies the structural composition and variable relationship of the graph attention gated recurrent neural network unit.

[0049] Attached Figure 3 This is a schematic diagram of the structure of the prediction model of the design method of the present invention based on ensemble learning and graph attention gated recurrent neural network, which presents the architecture and data flow of the base model and secondary model in the entire prediction model.

[0050] Attached Figure 4 This is a schematic diagram of the secondary model recurrent neural network structure of the design method of the present invention, which illustrates the internal structure of the secondary model recurrent neural network.

[0051] Attached Figure 5 The actual traffic speed prediction result of a sensor node is displayed, which directly reflects the prediction effect of the method of the present invention. DETAILED DESCRIPTION

[0052] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0053] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0054] In order to at least partially solve one or more of the above problems and other potential problems, the embodiments of the present disclosure propose a traffic speed prediction method based on ensemble learning and graph attention gated recurrent network, including the following process:

[0055] S1, data acquisition and processing: obtain traffic data source data, make traffic speed data set and sensor network adjacency matrix data;

[0056] S2. Basic module design: Select graph attention neural network and gated recurrent neural network as basic modules, and design the traffic speed prediction base model (Base Model, which is a language model obtained through large-scale unsupervised learning training).

[0057] S3, base model training: Use sensor historical data and adjacency matrix data to train the gated recurrent neural network base model and graph attention gated recurrent neural network module, design the loss function, and use the optimization algorithm for optimization;

[0058] S4. Construct prediction model framework: Construct a traffic speed prediction model framework, adopt a stacked ensemble learning method, use the gated recurrent neural network base model and the graph attention gated recurrent neural network as the base model, and use the recurrent neural network as the secondary model;

[0059] S5, secondary model training: training the secondary model module of the recurrent neural network, designing the loss function, and optimizing it using the optimization algorithm;

[0060] S6. Performance testing: Use the validation dataset to test the performance indicators of the recurrent neural network.

[0061] The detailed steps to implement the above processes are:

[0062] S11. Download the traffic speed data source of the California Performance Evaluation System PeMS-BAY as a data set, and select the traffic data set from January to May 2017 provided by the California Department of Transportation. Divide the traffic speed data into a training data set and a validation data set. In this example, the number of samples in the training data set is 36481, and the number of samples in the validation data set is 15634;

[0063] S12, using the traffic speed sequence data of the training data set for module training, and using the validation data set to test the module training effect;

[0064] S13. Based on the connection relationship of 325 sensors in the traffic road network, the adjacency matrix of the entire sensor network is constructed to capture the correlation graph between sensor nodes on the road section. The representation of the adjacency matrix is ​​as follows:

[0065]

[0066] W ij =1, indicating that the i-th sensor and the j-th sensor are connected on the road network, W ij =0 otherwise.

[0067] S21. Select the graph attention neural network to obtain the spatial features of traffic speed data. The graph attention network can capture the spatial structure of adjacent points in non-Euclidean space. The formula is as follows:

[0068]

[0069] W is a linear transformation operation; e ij is the multiplication attention mechanism to obtain the correlation coefficient between sensor nodes, and is the traffic speed data of node i and node j at time t;

[0070] In order to make the correlations between all sensors comparable, the correlation coefficients between all sensors are normalized. The multiplicative attention mechanism formula and normalization formula are as follows:

[0071]

[0072] is the normalized correlation coefficient among all sensor nodes, and softmax is the normalized exponential function;

[0073] S22. The gated recurrent neural network obtains the temporal characteristics of traffic speed data, and its gating characteristics can efficiently capture the long-term and short-term temporal characteristics of traffic speed.

[0074] like Figure 1 Shown is a schematic diagram of the gated recurrent neural network structure of the design method of the present invention.

[0075] The variable relationship of the graph attention gated recurrent neural network unit is:

[0076] r t =σ(W ir x t +W hr h (t-1) +b r )

[0077] z t =σ(W iz x t +W hz h (t-1) +b z )

[0078] n t =tanh(W in x t +W hn (r t *h (t-1) )+b n )

[0079] h t =(1-z t )*n t +z t *h (t-1)

[0080] Among them, x t is the traffic speed input, h (t-1) is the hidden state at the previous moment, h t is the hidden state at this moment. σ is the sigmoid activation function, tanh is the tanh activation function. W is the learnable parameter matrix, and b is the bias. t , z t , n t is the operation process quantity.

[0081] S31. Design a graph attention gated recurrent neural network layer to fuse the graph attention neural network and the gated recurrent neural network to generate the spatiotemporal features of traffic speed data.

[0082] S32. Use a graph attention neural network to replace the linear connection layer of the gated recurrent neural network to obtain a graph attention gated recurrent neural network unit, and stack 64 graph attention gated recurrent neural network units to obtain a graph attention gated recurrent neural network layer.

[0083] like Figure 2Shown is a schematic diagram of the structure of the attention gated recurrent neural network unit of the present invention.

[0084] The variable relationship of the graph attention gated recurrent neural network unit is:

[0085] r t =σ(W ir GAT(x t )+W hr GAT(h (t-1) )+b r )

[0086] z t =σ(W iz GAT(x t )+W hz GAT(h (t-1) )+b z )

[0087] n t =tanh(W in *x t )+W hn (r t *h (t-1) )+b n )

[0088] h t =(1-z t )*n t +z t *h (t-1)

[0089] Among them, x t is the traffic speed input, h (t-1) is the hidden state at the previous moment, h t is the hidden state at this moment. GAT is a single-head graph attention network module, σ is the sigmoid activation function, tanh is the tanh activation function. W is the learnable parameter matrix, and b is the bias. t , z t , n t is the operation process quantity.

[0090] S33. Use the validation data set to test the speed prediction performance index of the training base model, design the loss function, and use the Adam optimization algorithm for optimization.

[0091] The loss function is defined as follows:

[0092]

[0093] y represents the label value, represents the network prediction value, and T represents the total number of samples in the entire test set.i represents the i-th sample.

[0094] S41. The stacked ensemble learning method is adopted, and the gated recurrent neural network base model and the graph attention gated recurrent neural network are used as the base models.

[0095] like Figure 3 As shown, it is a schematic diagram of the structure of the prediction model of the design method of the present invention based on ensemble learning and graph attention gated recurrent neural network.

[0096] S42. The recurrent neural network is used as a secondary model, and the training output data of the base model are concatenated and used as the input data of the secondary model.

[0097] S51. Select a recurrent neural network as the secondary model, and use the output of the base model as the input of the secondary model.

[0098] like Figure 4 Shown is a schematic diagram of the secondary model recurrent neural network structure of the present invention.

[0099] The variable relationship of the recurrent neural network is:

[0100] h t =tanh(W t (x t +h (t-1) )+b n )

[0101] Among them, x t is the traffic speed input, h (t-1) is the hidden state at the previous moment, h t is the hidden state at this moment. tanh is the tanh activation function. W is the learnable parameter matrix and b is the bias.

[0102] S52. Use the validation data set to test the speed prediction performance index of the training base model, design the loss function, and use the Adam optimization algorithm for optimization.

[0103] The loss function is defined as follows:

[0104]

[0105] y represents the label value, represents the network prediction value, and T represents the total number of samples in the entire test set. i represents the i-th sample.

[0106] S6. Use the validation dataset to test the network performance indicators and compare the performance with other benchmark traffic speed prediction networks.

[0107] The performance indicator formula is defined as follows:

[0108]

[0109] like Figure 5 Shown is a performance comparison table.

[0110] The key protection point of the present invention is the structure and prediction method of the traffic speed prediction method based on ensemble learning and graph attention gated recurrent network. Compared with the prior art, the present invention has the following significant advantages:

[0111] The use of traffic speed data based on sensor networks instead of traditional grid-type data makes data representation more detailed and predictions more accurate.

[0112] The graph attention gated recurrent neural network base model can effectively capture the spatial variation pattern of traffic speed. Combined with the temporal features extracted by the gated recurrent neural network, it greatly improves the accuracy and stability of the traffic speed prediction model.

[0113] The recurrent neural network secondary model can integrate the temporal and spatial data characteristics of the traffic network captured by the base model to further improve the prediction accuracy of traffic speed data.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A traffic speed prediction method based on ensemble learning and graph attention gated recurrent network, characterized in that: The process includes: S1, data acquisition and processing: obtain traffic data source data, make traffic speed data set and sensor network adjacency matrix data; S2. Basic module design: Select graph attention neural network and gated recurrent neural network as basic modules to design the traffic speed prediction base model; S3, base model training: Use sensor historical data and adjacency matrix data to train the gated recurrent neural network base model and graph attention gated recurrent neural network module, design the loss function, and use the optimization algorithm for optimization; S4. Construct prediction model framework: Construct a traffic speed prediction model framework, adopt a stacked ensemble learning method, use the gated recurrent neural network base model and the graph attention gated recurrent neural network as the base model, and use the recurrent neural network as the secondary model; S5, secondary model training: training the secondary model module of the recurrent neural network, designing the loss function, and optimizing it using the optimization algorithm; S6. Performance testing: Use the validation dataset to test the performance indicators of the recurrent neural network.

2. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The specific steps of step S1 are: S11, downloading a traffic speed data source, and dividing the traffic speed data of the traffic speed data source into a training data set and a verification data set; S12, using the traffic speed sequence data of the training data set for module training, and using the validation data set to test the module training effect; S13. Construct an adjacency matrix of the entire sensor network according to the connection relationship between multiple sensors in the traffic network.

3. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The specific steps of step S2 are: S21. Selecting a graph attention neural network to obtain the spatial characteristics of the traffic road network of traffic speed data, the graph attention network captures the spatial structure of adjacent points in non-Euclidean space; S22. The gated recurrent neural network obtains the temporal characteristics of traffic speed data.

4. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The specific steps of step S3 are: S31, integrating graph attention neural network and gated recurrent neural network into a graph attention gated recurrent neural network layer, which simultaneously captures the temporal and spatial characteristics of traffic speed information on complex traffic road networks; S32, selecting a gated recurrent neural network as a base model of the ensemble learning model; S33. Design a loss function and use an optimization algorithm to train the two base models.

5. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The specific steps of step S4 are: S41. Construct a traffic speed prediction model framework, adopt a stacked ensemble learning method, and use the gated recurrent neural network base model and the graph attention gated recurrent neural network as the base model; S42. Use recurrent neural network as a secondary model.

6. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The specific steps of step S5 are: S51, splicing the output data of the base model as the input of the secondary model recurrent neural network; S52. Design the loss function and use the Adam optimization algorithm to train the secondary model.

7. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The loss function in step S3 and / or step S5 is defined as follows: y represents the label value, represents the network prediction value, T represents the total number of samples in the entire test set, and y i represents the i-th sample.

8. The traffic speed prediction method based on ensemble learning and graph attention gated recurrent network as claimed in claim 1, characterized in that: The optimization algorithm in step S3 and / or step S5 is the Adam optimization algorithm.

9. A device for traffic speed prediction based on ensemble learning and graph attention gated recurrent network, characterized in that: include: Data acquisition and processing module, used to acquire traffic data source data and produce traffic speed data set and sensor network adjacency matrix data; Basic module design module, used to select graph attention neural network and gated recurrent neural network as basic modules and design the basic model for traffic speed prediction; The base model training module uses sensor historical data and adjacency matrix data to train the gated recurrent neural network base model and graph attention gated recurrent neural network module, designs the loss function, and uses the optimization algorithm for optimization; A prediction model framework building module is used to build a traffic speed prediction model framework, which adopts a stacked ensemble learning method, uses a gated recurrent neural network base model and a graph attention gated recurrent neural network as base models, and uses a recurrent neural network as a secondary model; The secondary model training module is used to train the secondary model module of the recurrent neural network, design the loss function, and use the optimization algorithm for optimization; The performance testing module is used to test the performance indicators of the recurrent neural network using the validation data set.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the traffic speed prediction method based on ensemble learning and graph attention gated recurrent network described in any one of claims 1 to 8 when executed.

Citation Information

Cited By

  • Front vehicle speed parallel prediction method based on deep confidence and gating cycle unit

    CN121246828A

  • A parallel prediction method for preceding vehicle speed based on deep belief and gated recurrent unit

    CN121246828B