CN114091772A - Multi-angle fusion road traffic flow prediction method based on encoder and decoder - Google Patents

Multi-angle fusion road traffic flow prediction method based on encoder and decoder Download PDF

Info

Publication number
CN114091772A
CN114091772A CN202111420461.0A CN202111420461A CN114091772A CN 114091772 A CN114091772 A CN 114091772A CN 202111420461 A CN202111420461 A CN 202111420461A CN 114091772 A CN114091772 A CN 114091772A
Authority
CN
China
Prior art keywords
traffic flow
road network
time
road
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111420461.0A
Other languages
Chinese (zh)
Other versions
CN114091772B (en
Inventor
杨晓春
于启迪
吴超
王斌
张晓红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CN202111420461.0A priority Critical patent/CN114091772B/en
Publication of CN114091772A publication Critical patent/CN114091772A/en
Application granted granted Critical
Publication of CN114091772B publication Critical patent/CN114091772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention provides a multi-angle fusion road traffic flow prediction method based on a coder decoder, and relates to the technical field of traffic flow prediction. The invention provides a Multi-angle fusion Attention Network Model (MFAN) based on an encoder-decoder structure, which comprehensively considers various factors in various aspects such as various sudden traffic conditions, weather conditions, holidays and the like and realizes dynamic and accurate prediction of traffic flow of a road Network. The invention considers various possible conditions influencing the road traffic flow, considers the whole road network as a dynamic directed graph, and dynamically considers the influence of different time points on the same intersection and the mutual influence between different intersections at the same time point. The method provided by the invention has higher accuracy in predicting the future dynamic traffic flow.

Description

Multi-angle fusion road traffic flow prediction method based on encoder and decoder
Technical Field
The invention relates to the technical field of traffic flow prediction, in particular to a multi-angle fusion road traffic flow prediction method based on a coder decoder.
Background
With the continuous increase of the holding amount of motor vehicles, traffic congestion has become a great challenge to city construction and management in the urbanization process of the current country. The dynamic traffic condition is analyzed and predicted, and the method has important significance for planning and building new roads in new periods and managing the traffic of smart cities.
However, traffic flow prediction has become increasingly challenging. First, it relies on the volatility and uncertainty of the vehicle flow in the time dimension. Vehicle traffic tends to have a long-cycle periodicity, so it is easier to summarize and predict in a long-cycle situation. However, there are many uncertainties in a short period of time, and the prediction model is difficult to adapt to the rapid change of the traffic flow in the emergent situations such as traffic accidents and special events in the existing method. Secondly, the complex relationship between the road and the vehicle also plays an important role in the spatial dimension. For example, the time evolution of traffic flow caused by events occurring on a certain road may affect distant roads in the near future. In addition, due to the complexity of road intersections or lanes, the interaction between roads is not easily recognized, resulting in difficulty in predicting the direction of traffic flow. Most of the existing methods only consider historical traffic flow data and time information of roads to carry out modeling, and learn a general rule from the historical traffic flow data and the time information, but the comprehensive consideration of dynamic changes of various factors such as various sudden traffic conditions, weather conditions, holidays and the like is not provided.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a Multi-angle fusion road traffic flow prediction method based on a coder-decoder, and provides a Multi-angle fusion Attention Network model MFAN (Multi-View Fuse Attention Network) based on a coder-decoder structure, which comprehensively considers various factors in various aspects such as sudden traffic conditions, weather conditions, holidays and the like, and realizes dynamic and accurate prediction of road Network traffic flow.
In order to solve the technical problems, the invention adopts the following technical scheme:
a multi-angle fusion road traffic flow prediction method based on an encoder and a decoder comprises the following steps:
step 1: collecting historical traffic flow data of the intersection to be predicted in a specified time period to form a two-dimensional traffic flow matrix;
matching and combining historical GPS data of vehicles passing by the intersection to be predicted with road network data in a specified time period to convert the data into historical traffic flow data, and obtaining a traffic flow sequence { V (V sequence) of the intersection to be predicted with T as a time interval1,V2,V3,…VpP is the number of urban intersections, and the traffic flow sequence of the intersection point i to be predicted is Vi={vi,1,vi,2,vi,3,…,vi,nN is the number of time intervals, vi,nRepresenting the traffic flow of the ith intersection in the nth time;
step 2: collecting road network information of an area where an intersection to be predicted is located to obtain spatial representation information of a road network;
the road network is a directed graph G ═ V, E, A, wherein V represents the number of nodes in the road network, namely intersections, V ═ p, E represents edges, namely road segments in the road network, and A ∈ RV*VA represents a adjacency matrix of generation weights, RV*VThe dimension representing a is dimension V x V; the space vector is sent into a two-layer full-connection network to obtain the space embedded representation of the road network information, namely the space representation information of the road network
Figure BDA0003376506200000021
Wherein the intersection point viE.g. V, S mark
Figure BDA0003376506200000022
The method comprises the steps of (1) representing a spatial embedded expression vector of a road network, wherein the dimension is D dimension;
and step 3: collecting weather and holiday information of an area where an intersection to be predicted is located to obtain weather representation information and holiday representation information of a road network;
the weather information of the road network comprises strong wind, light rain, medium rain, heavy snow and sunny days, and six vehicles are driven on the roadObtaining weather embedded representation information of road network under the condition of meeting weather
Figure BDA0003376506200000023
Wherein the intersection point vi belongs to V and W mark
Figure BDA0003376506200000024
The weather embedding expression vector of the road network is represented, and the dimensionality is D dimension;
obtaining the node holiday embedded representation information of the road network under the condition that the node holiday representation information of the road network is the national legal node holiday information
Figure BDA0003376506200000025
Wherein the intersection point vi belongs to V and is marked by H
Figure BDA0003376506200000026
The weather embedding expression vector of the road network is represented, and the dimensionality is D dimension;
and 4, step 4: the information of the seasons, the months, the weeks, the dates and the hours in the historical time period is subjected to multi-angle fusion to obtain the time embedded representation of the road network information, namely the time representation information of the road network
Figure BDA0003376506200000027
Wherein the intersection point viE.g. V, T mark
Figure BDA0003376506200000028
The time-embedded representation vector of the road network is D-dimension.
And 5: fusing multi-angle time-space information, fusing embedded expressions of the space, weather, holiday and time four-angle information of the intersection obtained in the step 2-4 to form multi-angle space-time embedded expression MTSE, and carrying out time step t on the multi-angle space-time embedded expression MTSEjPoint v of the way exitiMTSE is defined as
Figure BDA0003376506200000029
The MTSE simultaneously comprises road network information and information of time, weather, festivals and holidays.
Step 6: carrying out z-score standardization processing on traffic flow data, and dividing the standardized processing result into a training set, a verification set and a test set;
the z-score normalization process divides the difference of each value in the raw traffic flow data from the mean of all data by the standard deviation;
and 7: designing a multi-angle fusion attention neural network (MFAN) for predicting traffic flow, and training by using a training set;
the neural network comprises an input layer, a full connection layer, an attention mechanism encoder, a converted attention layer, an attention mechanism decoder and an output layer; making the traffic flow data X of the historical intersection of A time steps belong to RAxPxCTransmitting into input layer, and converting X into H via a two-layer full-connection layer(0)∈RAxPxDAs input to the attention mechanism encoder, the attention mechanism encoder is composed of K spatio-temporal attention blocks TSAB, where each spatio-temporal attention block is composed of a spatial attention block, a temporal attention block, and a gated fusion unit; h(0)Obtaining the output of the attention encoder as H through K space-time attention blocks TSAB(K)∈RAxPxDIs prepared from H(K)Passing into a switching attention layer through which features H that have been encoded(K)Generating future traffic flow signature sequence representation H(K+1)∈RBxPxDThis is used as input to an attention mechanism decoder, which consists of K spatio-temporal attention blocks TSAB, H(K+1)With attention-machine decoder, the resulting output is H(2K+1)∈RRBxPxDThen, H is introduced(2K+1)Through a two-layer full-connection network, the predicted value of the intersection traffic flow of the future B time steps is generated
Figure BDA0003376506200000031
And 8: testing the model trained by the training set by using the verification set, evaluating the error of the model, readjusting the hyper-parameters of the model if the error is greater than a set threshold, returning to the step 7, training again, and jumping to the step 9 if the error is less than the set threshold;
and step 9: and evaluating the model prediction effect by using a test set, dividing the test set into a historical data set and a prediction result set, inputting the traffic flow data of the set time of the road section to be predicted into the trained model from the historical data set to obtain the traffic flow condition of the intersection predicted by the MFAN at the set time, and comparing the traffic flow condition with the data in the prediction result set so as to predict the traffic flow.
The invention has the following beneficial effects:
the invention provides a multi-angle fusion road traffic flow prediction method based on a coder decoder, which considers various possible conditions influencing the road traffic flow, considers the whole road network as a dynamic directed graph, and dynamically considers the influence of different time points on the same intersection and the mutual influence between different intersections at the same time point. The method provided by the invention has higher accuracy in predicting the future dynamic traffic flow.
Drawings
FIG. 1 is a flowchart illustrating an overall traffic flow prediction method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a multi-angle fusion attention network model MFAN according to an embodiment of the present invention;
FIG. 3 is a multi-angle spatiotemporal information fusion diagram in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a spatiotemporal attention block structure according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
A multi-angle fusion road traffic flow prediction method based on an encoder and a decoder is disclosed, as shown in figure 1, and comprises the following steps:
step 1: collecting historical traffic flow data of the intersection to be predicted in a specified time period to form a two-dimensional traffic flow matrix;
historical GPS data and road network of vehicles passing by to-be-predicted intersection in specified time periodThe data is matched and combined with the data to be converted into historical traffic flow data, and a traffic flow sequence { V) of the intersection to be predicted with T as a time interval is obtained1,V2,V3,…VpP is the number of urban intersections, and the traffic flow sequence of the intersection point i to be predicted is Vi={vi,1,vi,2,vi,3,…,vi,nN is the number of time intervals, vi,nRepresenting the traffic flow of the ith intersection in the nth time;
step 2: collecting road network information of an area where an intersection to be predicted is located to obtain spatial representation information of a road network;
the road network is a directed graph G ═ V, E, A, wherein V represents the number of nodes in the road network, namely intersections, V ═ p, E represents edges, namely road segments in the road network, and A ∈ RV*VA represents a adjacency matrix of generation weights, RV*VThe dimension representing a is dimension V x V; the space vector is sent into a two-layer full-connection network to obtain the space embedded representation of the road network information, namely the space representation information of the road network
Figure BDA0003376506200000041
Wherein the intersection point viE.g. V, S mark
Figure BDA0003376506200000042
The method comprises the steps of (1) representing a spatial embedded expression vector of a road network, wherein the dimension is D dimension;
and step 3: collecting weather and holiday information of an area where an intersection to be predicted is located to obtain weather representation information and holiday representation information of a road network;
the weather information of the road network comprises strong wind, light rain, medium rain, heavy snow and sunny days, and the weather conditions of six vehicles which can be met during the road driving are obtained to obtain the weather embedded representation information of the road network
Figure BDA0003376506200000043
Wherein the intersection point vi belongs to V and W mark
Figure BDA0003376506200000044
Is a weather-embedded representation vector of the road networkThe dimension is D dimension;
obtaining the node holiday embedded representation information of the road network under the condition that the node holiday representation information of the road network is the national legal node holiday information
Figure BDA0003376506200000045
Wherein the intersection point vi belongs to V and is marked by H
Figure BDA0003376506200000046
The weather embedding expression vector of the road network is represented, and the dimensionality is D dimension;
and 4, step 4: information of quarterly, month, week, date and hour in historical time period is subjected to multi-angle fusion, as shown in figure 3, time embedded representation of road network information is obtained, namely time representation information of the road network
Figure BDA0003376506200000047
Wherein the intersection point viE.g. V, T mark
Figure BDA0003376506200000048
The time-embedded representation vector of the road network is D-dimension.
In this embodiment, each time interval of the historical traffic flow is encoded as a vector. Setting each day as M time intervals, using one-hot coding, coding according to M segments of a day as time steps in four seasons, three months, four weeks of a month, seven days of a week, and R4+3+4+7+MOf dimensions
Figure BDA0003376506200000049
Switching time characteristics to one R using a two-tier fully-connected networkDA dimension vector.
And 5: fusing multi-angle time-space information, fusing embedded expressions of the space, the weather, the holidays and the time of the intersection obtained in the step 2-4 in order to obtain the comprehensive expression of the intersection on the specific time, the weather and the holidays to form multi-angle space-time embedded expression MTSE, and fusing the multi-angle space-time embedded expression MTSE for the intersection at the time step tjPoint v of the way exitiMTSE is definedIs composed of
Figure BDA00033765062000000410
The MTSE simultaneously comprises road network information and information of time, weather, festivals and holidays.
Step 6: carrying out z-score standardization processing on traffic flow data, and dividing the standardized processing result into a training set, a verification set and a test set;
the z-score normalization process divides the difference of each value in the raw traffic flow data from the mean of all data by the standard deviation; in this embodiment, the training set accounts for 70% of the total data amount, the verification set accounts for 20%, and the test set accounts for 10%.
And 7: designing a multi-angle fusion attention neural network (MFAN) for predicting traffic flow, and training by using a training set;
the neural network comprises an input layer, a full connection layer, an attention mechanism encoder, a converted attention layer, an attention mechanism decoder and an output layer; the structure diagram is shown in figure 2, and the traffic flow data X ∈ R of the historical intersection at A time steps isAxPxCTransmitting into input layer, and converting X into H via a two-layer full-connection layer(0)∈RAxPxDAs input to the attention mechanism encoder, the attention mechanism encoder is composed of K spatiotemporal attention blocks TSAB, as shown in fig. 4, where each spatiotemporal attention block is in turn composed of a spatial attention block, a temporal attention block, and a gated fusion unit; h(0)Obtaining the output of the attention encoder as H through K space-time attention blocks TSAB(K)∈RAxPxDIs prepared from H(K)Passing into a switching attention layer through which features H that have been encoded(K)Generating future traffic flow signature sequence representation H(K+1)∈RBxPxDThis is used as input to an attention mechanism decoder, which consists of K spatio-temporal attention blocks TSAB, H(K+1)With attention-machine decoder, the resulting output is H(2K+1)∈RRBxPxDThen, H is introduced(2K+1)Through a two-layer full-connection network, the predicted value of the intersection traffic flow of the future B time steps is generated
Figure BDA0003376506200000052
Input layer in this embodiment: inputting the traffic flow value X belonging to the historical intersectionAxPxC
Full connection layer: outputting X as H through two-layer full-connection network(0)∈RAxPxD
Note that the mechanism encoder: consisting of K spatiotemporal attention blocks (TSAB). H(0)The output obtained by K TSAB is H(K)∈RAxPxD. One of the TSAB blocks, as shown in fig. 3, is composed of temporal and spatial attention blocks and a gated fusion unit.
Time attention block: since the current traffic state at a location is correlated with the previous traffic state at that location, and the correlation varies non-linearly with time, the temporal attention block can capture the characteristics of the variation between different time steps and can capture the common relationship between the traffic state at the intersection and the time. The temporal attention block concatenates the multi-angle spatiotemporal embedding and applies an attention mechanism to compute an attention score. Specifically, in the case of considering the intersection node vi, the relationship between the time steps tj and t is defined as follows:
Figure BDA0003376506200000053
and h is a hidden state between the multi-angle space-time embedding learned by the previous layer and the traffic flow. e.g. of the typev,tjAnd 5, multi-angle space-time embedding obtained in the step 5. The | | represents the splicing operation,<,>representing the inner product operation.
The output of the temporal attention block is as follows
Figure BDA0003376506200000054
Indicating newly learned node v at level kiAt time step tjHidden state of the lower.
Figure BDA0003376506200000055
Figure BDA0003376506200000056
In the formula, NtjIndicates all at tjThe set of the previous times is then set,
Figure BDA0003376506200000057
is to be
Figure BDA0003376506200000058
Regularizing the resulting attention score using the softmax activation function, indicating all other time steps t versus time step tjThe degree of importance of. The sum of the scores for attention was 1.
Spatial attention block: since the traffic state of one road is dynamically influenced by the other roads and the influence changes over time, the spatial attention block can capture the characteristics of the change and the influence of the current traffic conditions and road network on the traffic flow between intersections at a particular time. The spatial attention block connects the multi-angle spatiotemporal embedding and applies an attention mechanism to compute the attention score. In particular, a specific time step t is taken into accountjIn case of intersection node viThe relationship of v is defined as follows:
Figure BDA0003376506200000061
and h is a hidden state between the multi-angle space-time embedding learned by the previous layer and the traffic flow. e.g. of the typev,tjAnd 5, multi-angle space-time embedding obtained in the step 5. The | | represents the splicing operation,<,>representing the inner product operation. 2D is
Figure BDA0003376506200000062
Of (c) is calculated.
The output of the spatial attention block is as follows
Figure BDA0003376506200000063
Indicating a hidden state between the newly learned multi-angle space-time embedding and the traffic flow at the k layer.
Figure BDA0003376506200000064
Figure BDA0003376506200000065
In the formula, V represents the set of all intersection nodes,
Figure BDA0003376506200000066
is to be
Figure BDA0003376506200000067
The resulting attention score is regularized using the softmax activation function, indicating how important all other nodes v are to node vi. The sum of the scores for attention was 1.
A gated fusion unit: since the traffic state of a road at a specific time is related to the traffic state of the road before the road and the traffic state of other roads, a gating fusion method is designed to take the time attention block and the space attention block into consideration in a fusion manner. At the k-th block of the data stream,
Figure BDA0003376506200000068
and
Figure BDA0003376506200000069
the fusion was performed as follows:
Figure BDA00033765062000000610
Figure BDA00033765062000000611
wherein Wz,1∈RDxD,Wz,2∈RDxD,bz∈RDAre all parameters to be learned. An indication indicates that the corresponding element of the matrix is multiplied, σ (·) indicates that the sigmoid is an activation function, and z is gated. The gated fusion mechanism can adaptively control the traffic flow of each vertex and time step on multi-fusion space-time dependence.
Switching attention layer: the mapping of each future time step to the historical time step is modeled to convert the encoded traffic characteristics to an input to a decoder that can generate a future representation. Features H that have been encoded can be encoded by a switching attention layer(K)Generating future traffic flow signature sequence representation H(K+1)∈RBxPxD
Attention mechanism decoder: consisting of K TSAB. H(K+1)The output obtained by K TSAB is H(2K+1)∈RBxPxD
Full connection layer: attention will be paid to H generated by the mechanism decoder(2K+1)Generating intersection traffic flow predicted value of B time steps through a two-layer full-connection network
Figure BDA00033765062000000612
And 8: testing the model trained by the training set by using the verification set, evaluating the error of the model by using a Huber loss function, readjusting the hyper-parameters of the model if the error is greater than a set threshold, returning to the step 7, performing the training again, and jumping to the step 9 if the error is less than the set threshold;
and step 9: and evaluating the model prediction effect by using a test set, dividing the test set into a historical data set and a prediction result set, inputting the traffic flow data of the road section to be predicted 7 days before the historical data set into the trained model to obtain the traffic flow situation of the road junction predicted by the MFAN 7 days in the future, and comparing the traffic flow situation with the data in the prediction result set so as to predict the traffic flow. The trained model in the embodiment supports the intersection traffic flow prediction of 5 minutes, 10 minutes, 15 minutes, 30 minutes and one hour in the future.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions and scope of the present invention as defined in the appended claims.

Claims (7)

1. A multi-angle fusion road traffic flow prediction method based on a coder decoder is characterized by comprising the following steps:
step 1: collecting historical traffic flow data of the intersection to be predicted in a specified time period to form a two-dimensional traffic flow matrix;
step 2: collecting road network information of an area where an intersection to be predicted is located to obtain spatial representation information of a road network;
and step 3: collecting weather and holiday information of an area where an intersection to be predicted is located to obtain weather representation information and holiday representation information of a road network;
and 4, step 4: the information of the seasons, the months, the weeks, the dates and the hours in the historical time period is subjected to multi-angle fusion to obtain the time embedded representation of the road network information, namely the time representation information of the road network
Figure FDA0003376506190000011
Wherein the intersection point viE.g. V, T mark
Figure FDA0003376506190000012
The time embedding representation vector of the road network is represented, and the dimension is D dimension;
and 5: fusing multi-angle time-space information, fusing embedded representations of the four angle information of space, weather, holidays and time of the intersection obtained in the step 2-4 to form multi-angle space-time embedded representation MTSE;
step 6: carrying out z-score standardization processing on traffic flow data, and dividing the standardized processing result into a training set, a verification set and a test set;
and 7: designing a multi-angle fusion attention neural network (MFAN) for predicting traffic flow, and training by using a training set;
and 8: testing the model trained by the training set by using the verification set, evaluating the error of the model, readjusting the hyper-parameters of the model if the error is greater than a set threshold, returning to the step 7, training again, and jumping to the step 9 if the error is less than the set threshold;
and step 9: and evaluating the model prediction effect by using a test set, dividing the test set into a historical data set and a prediction result set, inputting the traffic flow data of the set time of the road section to be predicted into the trained model from the historical data set to obtain the traffic flow condition of the intersection predicted by the MFAN at the set time, and comparing the traffic flow condition with the data in the prediction result set so as to predict the traffic flow.
2. The method for predicting the traffic flow of the multi-angle fusion road based on the encoder and the decoder as claimed in claim 1, wherein the two-dimensional traffic flow matrix in the step 1 is obtained by matching and combining historical GPS data of vehicles passing through the intersection to be predicted in a specified time period with road network data to convert the data into historical traffic flow data, and obtaining a traffic flow sequence { V } of the intersection to be predicted with a time interval of T1,V2,V3,…VpP is the number of urban intersections, and the traffic flow sequence of the intersection point i to be predicted is Vi={vi,1,vi,2,vi,3,…,vi,nN is the number of time intervals, vi,nAnd the traffic flow of the ith crossing in the nth time is shown.
3. The method for predicting the traffic flow of roads based on encoder and decoder as claimed in claim 1, wherein the road network in step 2 is a directed graph G ═ (V, E, a), where V denotes the number of nodes in the road network, i.e. intersections, V ═ p, E denotes the edges, i.e. the road segments in the road network, a ∈ RV*VA represents a adjacency matrix of generation weights, RV*VThe dimension representing a is dimension V x V; will be provided withThe space vector is sent into a two-layer full-connection network to obtain the space embedded representation of the road network information, namely the space representation information of the road network
Figure FDA0003376506190000013
Wherein the intersection point viE.g. V, S mark
Figure FDA0003376506190000014
The spatial embedded representation vector of the road network is D-dimension.
4. The method for predicting the traffic flow of the road based on the encoder and the decoder as claimed in claim 1, wherein the weather information of the road network in the step 3 comprises the weather conditions of strong wind, light rain, medium rain, heavy snow and clear day, which are encountered by six vehicles in the road driving process, and the weather embedded representation information of the road network is obtained
Figure FDA0003376506190000021
Wherein the intersection point vi belongs to V and W mark
Figure FDA0003376506190000022
The weather embedding expression vector of the road network is represented, and the dimensionality is D dimension;
obtaining the node holiday embedded representation information of the road network under the condition that the node holiday representation information of the road network is the national legal node holiday information
Figure FDA0003376506190000023
Wherein the intersection point vi belongs to V and is marked by H
Figure FDA0003376506190000024
The weather embedding representation vector of the road network is D-dimension.
5. The encoder-decoder-based multi-angle fusion road traffic flow prediction method according to claim 1, wherein the MTSE is in step 5Time step tjPoint v of the way exitiIncluding road network information and time, weather, holiday and festival information, and MTSE is defined as
Figure FDA0003376506190000025
6. The encoder-decoder-based multi-angle fusion road traffic flow prediction method according to claim 1, wherein the z-score normalization process divides a difference of each value in the original traffic flow data and an average value of all data by a standard deviation in step 6.
7. The encoder-decoder-based multi-angle fusion road traffic flow prediction method according to claim 1, wherein the neural network in step 7 comprises an input layer, a full connection layer, an attention mechanism encoder, a switching attention layer, an attention mechanism decoder, and an output layer; making the traffic flow data X of the historical intersection of A time steps belong to RAxPxCTransmitting into input layer, and converting X into H via a two-layer full-connection layer(0)∈RAxPxDAs input to the attention mechanism encoder, the attention mechanism encoder is composed of K spatio-temporal attention blocks TSAB, where each spatio-temporal attention block is composed of a spatial attention block, a temporal attention block, and a gated fusion unit; h(0)Obtaining the output of the attention encoder as H through K space-time attention blocks TSAB(K)∈RAxPxDIs prepared from H(K)Passing into a switching attention layer through which features H that have been encoded(K)Generating future traffic flow signature sequence representation H(K+1)∈RBxPxDThis is used as input to an attention mechanism decoder, which consists of K spatio-temporal attention blocks TSAB, H(K+1)With attention-machine decoder, the resulting output is H(2K+1)∈RRBxPxDThen, H is introduced(2K+1)Through a two-layer full-connection network, the predicted value of the intersection traffic flow of the future B time steps is generated
Figure FDA0003376506190000026
CN202111420461.0A 2021-11-26 2021-11-26 Multi-angle fusion road traffic flow prediction method based on encoder and decoder Active CN114091772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111420461.0A CN114091772B (en) 2021-11-26 2021-11-26 Multi-angle fusion road traffic flow prediction method based on encoder and decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111420461.0A CN114091772B (en) 2021-11-26 2021-11-26 Multi-angle fusion road traffic flow prediction method based on encoder and decoder

Publications (2)

Publication Number Publication Date
CN114091772A true CN114091772A (en) 2022-02-25
CN114091772B CN114091772B (en) 2024-08-23

Family

ID=80304949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111420461.0A Active CN114091772B (en) 2021-11-26 2021-11-26 Multi-angle fusion road traffic flow prediction method based on encoder and decoder

Country Status (1)

Country Link
CN (1) CN114091772B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114582128A (en) * 2022-03-10 2022-06-03 浙江大学 Traffic flow prediction method, medium, and device based on graph discrete attention network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160866A (en) * 2015-08-07 2015-12-16 浙江高速信息工程技术有限公司 Traffic flow prediction method based on deep learning nerve network structure
CN108921343A (en) * 2018-06-26 2018-11-30 浙江工业大学 Based on storehouse self-encoding encoder-support vector regression traffic flow forecasting method
US20210209939A1 (en) * 2020-12-08 2021-07-08 Harbin Engineering University Large-scale real-time traffic flow prediction method based on fuzzy logic and deep LSTM
CN113408786A (en) * 2021-05-21 2021-09-17 浙江银江智慧交通工程技术研究院有限公司 Traffic characteristic prediction method and system applicable to long-time prediction based on control information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160866A (en) * 2015-08-07 2015-12-16 浙江高速信息工程技术有限公司 Traffic flow prediction method based on deep learning nerve network structure
CN108921343A (en) * 2018-06-26 2018-11-30 浙江工业大学 Based on storehouse self-encoding encoder-support vector regression traffic flow forecasting method
US20210209939A1 (en) * 2020-12-08 2021-07-08 Harbin Engineering University Large-scale real-time traffic flow prediction method based on fuzzy logic and deep LSTM
CN113408786A (en) * 2021-05-21 2021-09-17 浙江银江智慧交通工程技术研究院有限公司 Traffic characteristic prediction method and system applicable to long-time prediction based on control information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114582128A (en) * 2022-03-10 2022-06-03 浙江大学 Traffic flow prediction method, medium, and device based on graph discrete attention network

Also Published As

Publication number Publication date
CN114091772B (en) 2024-08-23

Similar Documents

Publication Publication Date Title
CN109658695B (en) Multi-factor short-term traffic flow prediction method
CN109670277B (en) Travel time prediction method based on multi-mode data fusion and multi-model integration
CN113487066B (en) Long-time-sequence freight volume prediction method based on multi-attribute enhanced graph convolution-Informer model
CN110991713A (en) Irregular area flow prediction method based on multi-graph convolution sum GRU
US20240054321A1 (en) Traffic prediction
CN112489426B (en) Urban traffic flow space-time prediction scheme based on graph convolution neural network
CN110956807B (en) Highway flow prediction method based on combination of multi-source data and sliding window
CN117494034A (en) Air quality prediction method based on traffic congestion index and multi-source data fusion
CN113962472A (en) Time-space double-attention subway passenger flow short-time prediction method based on GAT-Seq2Seq model
CN111242395B (en) Method and device for constructing prediction model for OD (origin-destination) data
Zhu et al. TA-STAN: A deep spatial-temporal attention learning framework for regional traffic accident risk prediction
CN112633602B (en) Traffic congestion index prediction method and device based on GIS map information
CN113051811B (en) Multi-mode short-term traffic jam prediction method based on GRU network
CN116663742B (en) Regional capacity prediction method based on multi-factor and model fusion
CN117037491A (en) Space-time feature-based dynamic graph convolution traffic flow prediction method
CN114565187A (en) Traffic network data prediction method based on graph space-time self-coding network
CN115204477A (en) Bicycle flow prediction method of context awareness graph recursive network
CN116913088A (en) Intelligent flow prediction method for expressway
CN113327417A (en) Traffic flow prediction method based on 3D dynamic space-time residual convolution associated network
CN118247947A (en) Road section speed multi-step prediction method based on ponding risk prediction grade
CN114091772B (en) Multi-angle fusion road traffic flow prediction method based on encoder and decoder
Vijayalakshmi et al. Multivariate Congestion Prediction using Stacked LSTM Autoencoder based Bidirectional LSTM Model.
CN117610734A (en) Deep learning-based user behavior prediction method, system and electronic equipment
CN105355038A (en) Method for predicting short-term traffic flow through employing PMA modeling
Ramhormozi et al. Multi-task graph neural network for truck speed prediction under extreme weather conditions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant