This application claims priority to Chinese Patent Application No. 202210411429.4, filed on Apr. 19, 2022, the contents of which are hereby incorporated by reference.
The application relates to the field of traffic flow forecasting, and in particular to a traffic flow forecasting method based on a multi-mode dynamic residual graph convolution network.
Urban traffic congestion is not only an important cause of traffic accidents, but also one of the important factors hindering urban development. With the continuous development of Internet technology, network, monitoring and various electronic sensor devices are widely used in urban road traffic management and control, resulting in massive traffic data, such as vehicle trajectory data, traffic flow data, vehicle speed data, etc., which can be used to learn the changing law of traffic trajectory, traffic congestion and the judgment of traffic accidents. Therefore, learning the time variation law of traffic flow from the historical traffic flow data can forecast the traffic congestion in urban areas or roads in the future, so that the urban traffic planning department can take corresponding preventive measures and evacuate the traffic congestion in time to avoid traffic accidents, which is very important for urban traffic safety and maintaining social stability.
However, urban traffic flow is often affected by road environment. Because of complex topology of the traffic networks, there may be many different traffic modes in the traffic network that affect the traffic flow of the network at the same time, and they may be affected by different factors at the same time, such as complex traffic network structure, weather conditions and emergencies. How to learn the characteristics of different traffic patterns from traffic flow and integrate them is a difficult point in traffic flow forecasting.
The objective of the present application is to provide a traffic flow forecasting method based on a multi-mode dynamic residual graph convolution network, so as to solve problems existing in the prior art.
To achieve the above objective, the present application provides a traffic flow forecasting method based on multi-mode dynamic residual graph convolution network, including:
Optionally, the adjacency matrix includes a relational matrix and an adaptive matrix, and the relational matrix is:
where both E1 and E2 represent learning nodes, ReLU represents an activation function, and T represents a matrix transposition.
Optionally, in the process of acquiring different traffic flow modes based on the adjacency matrix, the different traffic flow modes include time traffic dependence and space traffic dependence;
Optionally, the process of dynamically fusing the different traffic flow modes includes: fusing the time traffic dependence and the space traffic dependence in time and space.
Optionally, in the process of fusing the time traffic dependence and the space traffic dependence in time and space, the following formula is adopted for fusion:
h=Wrel×hrel+Wada×hada
Optionally, the process of forecasting the future traffic based on the historical data and the fused data includes:
Optionally, the process of fusing the historical data and the output results based on the dynamic residual fusion mechanism includes:
fusing by using the following formula:
Ŷ=H×W1+X×W2
Optionally, the process of fusing the historical data and the output results based on the dynamic residual fusion mechanism to obtain the forecasting result of future traffic further includes: the loss function is a root mean square error, and the formula of the loss function is as below:
The application has the following technical effects:
(1) In the traditional traffic flow forecasting, only a kind of adjacency matrix is usually used to capture the traffic characteristics in the traffic network, but a single adjacency matrix cannot capture the traffic characteristics corresponding to different traffic modes. The application utilizes two different methods to construct an adjacency matrix, which can effectively capture the traffic flow characteristics corresponding to different traffic modes and dynamically fuse the traffic flow characteristics of two different modes.
(2) By replacing the linear transformation operation in the gated cyclic neural network with the multi-mode dynamic graph convolution, the application combines the multi-mode dynamic graph convolution and gated cyclic unit to form a new module, thus realizing the simultaneous capture of the space dependence and time dependence of traffic flow.
(3) In a conventional traffic flow forecasting algorithm, the influence of historical input data on the final forecasting result is often ignored. In this application, the dynamic residual network is used to screen out useful information from the historical flow data to update the future flow, so as to improve the forecasting accuracy.
The figures that form a part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application, and do not constitute undue limitations on this application. In the attached figures:
It should be noted that the embodiments in this application and the characteristics in the embodiments may be combined with each other without conflict. The application will be described in detail with reference to the figures and embodiments.
It should be noted that the steps shown in the flowcharts of the figures may be executed in a computer system such as a set of computer-executable instructions; although a logical sequence is shown in the flowcharts, in some cases, the steps shown or described may be executed in a sequence different from that here.
As shown in
S01: extracting multi-traffic-mode traffic feature, capturing the traffic characteristics corresponding to different traffic modes from the traffic flow data of road network by using various adjacency matrix construction methods.
The concrete implementation process is as follows: constructing a similarity matrix to capture the space dependence characteristics of regular traffic, and constructing an adaptive matrix to capture the space dependence characteristics of random traffic. The construction process of the similarity matrix is as follows:
The construction process of the adaptive matrix is as follows:
Aada=soft max(Relu(E1E2T)),
where E1 and E2 are all learnable nodes, ReLU is an activation function, and T represents matrix transposition.
S02: sending the two adjacency matrices obtained by learning into the graph convolution network to extract the traffic characteristics of different traffic modes; for the extracted traffic characteristics of two different modes, using the dynamic fusion module to integrate the two traffic characteristics.
The specific implementation process is as follows: the output hsim and hada of two adjacency matrices after graph convolution defines two trainable parameter Wrel and Wada, which are multiplied by hsim and hada and then added. With the training of the model, Wsim and Wada are constantly updated, so as to dynamically fuse the traffic characteristics corresponding to different traffic modes, and combine the outputs of the two modules to obtain the final output h of dynamic graph convolution. The dynamic integration process of different traffic modes is shown in
S03: fusing the space dependence characteristics and time dependence characteristics of traffic flow. The multi-mode dynamic graph convolution unit extracts the traffic characteristics corresponding to different traffic modes, and sends the characteristics into the recurrent neural network to realize the combination of space dependence and time dependence of traffic flow, as shown in
The concrete implementation process is as follows: acquiring a new multi-mode dynamic gated cyclic neural unit by replacing the linear operation in the gated recurrent neural network with the multi-mode dynamic graph convolution. Dynamic graph convolutional gated recurrent unit (MDGRU) is defined as:
r(t)=σ(θr*G[h(t),H(t-1)]+br)
u(t)=σ(θu*G[h(t),H(t-1)]+bu)
c(t)=tanh(θc*G[h(t),(r(t)□H(t-1))]+bc)
H(t)=u(t)□H(t-1)+(1−u(t))□c(t)
where h(t) and H(t) represent the output of the dynamic fusion module and the output of GRU at time step t, respectively, □ represents Hadamard product, and a is the activation function. Resetting the door r(t) helps to forget unnecessary information. The update gate u(t) can control the output. θr, θu, and θc is the corresponding filter parameters.
S04: fusing the historical characteristics of traffic flow and characteristics of decoding end. As a kind of time series data, future traffic flow data may be influenced by historical traffic flow data. The application designs a dynamic residual fusion module, which dynamically combines input data with extracted data, and the process is shown in
The specific implementation process is as follows: defining two trainable parameters W1 and W2, multiplying the original input data X and output data H in the decoder by the two parameters respectively, and fusing the two parts of data through parameter training dynamically. The process of dynamic residual fusion mechanism can be expressed as:
Y=H×W1+X×W2
To sum up, the traffic flow forecasting method of the multi-mode dynamic residual graph convolution network of the present application learns the traffic characteristics corresponding to different traffic modes from historical traffic data, and uses the dynamic fusion module to fuse the traffic characteristics of different modes. The linear operation in the recurrent neural network is replaced by the multi-mode graph convolution module, which realizes the combination of space dependence and time dependence of traffic flow. Finally, the dynamic residual module is used to select useful information from the historical flow to update the future flow. According to the traffic flow forecasting method of multi-mode dynamic residual graph convolution, traffic characteristics of different traffic modes can be excavated from traffic flow data, and the graph convolution module is combined with the gated circulation unit to realize the combination of traffic space dependence and time dependence.
The above are only the preferred embodiments of this application, but the scope of protection of this application is not limited to this. Any changes or substitutions that can be easily thought of by those skilled in the technical field within the technical scope disclosed in this application should be covered by the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 202210411429.4 | Apr 2022 | CN | national |
| Number | Name | Date | Kind |
|---|---|---|---|
| 20150127243 | Jang | May 2015 | A1 |
| 20190164418 | Neukart | May 2019 | A1 |
| 20220343146 | Xue | Oct 2022 | A1 |
| 20230306489 | Kong | Sep 2023 | A1 |
| 20230394284 | Zwicklbauer | Dec 2023 | A1 |
| Number | Date | Country | |
|---|---|---|---|
| 20230334981 A1 | Oct 2023 | US |