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 PDFInfo
- 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
Links
- 230000004927 fusion Effects 0.000 title claims abstract description 31
- 238000000034 method Methods 0.000 title claims abstract description 28
- 230000007246 mechanism Effects 0.000 claims description 21
- 238000012549 training Methods 0.000 claims description 16
- 238000012360 testing method Methods 0.000 claims description 13
- 239000013598 vector Substances 0.000 claims description 11
- 239000011159 matrix material Substances 0.000 claims description 8
- 230000002123 temporal effect Effects 0.000 claims description 7
- 238000012795 verification Methods 0.000 claims description 7
- 238000013528 artificial neural network Methods 0.000 claims description 6
- 239000013604 expression vector Substances 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 5
- 230000000694 effects Effects 0.000 claims description 3
- 230000009191 jumping Effects 0.000 claims description 3
- 238000002759 z-score normalization Methods 0.000 claims description 3
- 230000014509 gene expression Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000004913 activation Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000000875 corresponding effect Effects 0.000 description 2
- 206010039203 Road traffic accident Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- QVRVXSZKCXFBTE-UHFFFAOYSA-N n-[4-(6,7-dimethoxy-3,4-dihydro-1h-isoquinolin-2-yl)butyl]-2-(2-fluoroethoxy)-5-methylbenzamide Chemical compound C1C=2C=C(OC)C(OC)=CC=2CCN1CCCCNC(=O)C1=CC(C)=CC=C1OCCF QVRVXSZKCXFBTE-UHFFFAOYSA-N 0.000 description 1
- 238000007500 overflow downdraw method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9537—Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government 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
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 networkWherein the intersection point viE.g. V, S markThe 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 weatherWherein the intersection point vi belongs to V and W markThe 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 informationWherein the intersection point vi belongs to V and is marked by HThe 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 networkWherein the intersection point viE.g. V, T markThe 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 asThe 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
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 networkWherein the intersection point viE.g. V, S markThe 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 networkWherein the intersection point vi belongs to V and W markIs 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 informationWherein the intersection point vi belongs to V and is marked by HThe 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 networkWherein the intersection point viE.g. V, T markThe 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 dimensionsSwitching 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 ofThe 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
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:
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 followsIndicating newly learned node v at level kiAt time step tjHidden state of the lower.
In the formula, NtjIndicates all at tjThe set of the previous times is then set,is to beRegularizing 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:
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 isOf (c) is calculated.
The output of the spatial attention block is as followsIndicating a hidden state between the newly learned multi-angle space-time embedding and the traffic flow at the k layer.
In the formula, V represents the set of all intersection nodes,is to beThe 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,andthe fusion was performed as follows:
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
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 networkWherein the intersection point viE.g. V, T markThe 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 networkWherein the intersection point viE.g. V, S markThe 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 obtainedWherein the intersection point vi belongs to V and W markThe 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 informationWherein the intersection point vi belongs to V and is marked by HThe weather embedding representation vector of the road network is D-dimension.
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
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)
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)
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 |
-
2021
- 2021-11-26 CN CN202111420461.0A patent/CN114091772B/en active Active
Patent Citations (4)
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)
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 |