CN113808396B - Traffic speed prediction method and system based on traffic flow data fusion - Google Patents

Traffic speed prediction method and system based on traffic flow data fusion Download PDF

Info

Publication number
CN113808396B
CN113808396B CN202111018509.5A CN202111018509A CN113808396B CN 113808396 B CN113808396 B CN 113808396B CN 202111018509 A CN202111018509 A CN 202111018509A CN 113808396 B CN113808396 B CN 113808396B
Authority
CN
China
Prior art keywords
time
data
traffic
convolution
space
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.)
Active
Application number
CN202111018509.5A
Other languages
Chinese (zh)
Other versions
CN113808396A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202111018509.5A priority Critical patent/CN113808396B/en
Publication of CN113808396A publication Critical patent/CN113808396A/en
Application granted granted Critical
Publication of CN113808396B publication Critical patent/CN113808396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • G08G1/0129Traffic data processing for creating historical data or processing based on historical data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/052Detecting movement of traffic to be counted or controlled with provision for determining speed or overspeed

Abstract

A traffic speed prediction method based on traffic flow data fusion comprises the following steps: (1) preprocessing data; performing data preprocessing on original traffic data, wherein the data preprocessing comprises historical traffic speed data and traffic flow data; (2) designing a traffic speed prediction model based on traffic flow data fusion; the traffic speed prediction model comprises a flow prediction layer, a data fusion layer, a time-space analysis layer and a prediction output layer; (3) generating a sample data set and training a traffic speed prediction model; splitting the traffic data obtained in the step (2), generating a training data set, a verification data set and a test data set, and training a traffic speed prediction model; (4) predicting traffic speed in a future time period; and (4) predicting the traffic speed in the future time period according to the acquired traffic data based on the prediction model obtained by training in the step (3). The invention also comprises a system for implementing the traffic speed prediction method based on traffic flow data fusion.

Description

Traffic speed prediction method and system based on traffic flow data fusion
Technical Field
The invention relates to a traffic speed prediction method and a traffic speed prediction system for intelligent traffic, which can predict the traffic speed in a period of time in the future, and can be used for traffic control, route planning and traffic guidance.
Background
Traffic speed is one of the important parameters reflecting the traffic state of roads. Accurate traffic speed prediction is helpful for optimizing traffic control and improving traffic efficiency. Traffic speed prediction is an integral part of intelligent traffic systems. Usually, a traffic manager can input a result of traffic speed prediction into a traffic control system to divide a road network, so as to formulate different signal timing schemes, guide traffic travel and improve the traffic capacity of the whole road network.
The traffic speed prediction problem methods mainly have three categories. The first method is based on traditional statistical prediction models, such as Historical Average (HA), Vector Auto-regression (VAR), and Auto-Regressive differential Moving Average (ARIMA), etc. The method mainly models the relation between traffic data, regresses the traffic data and optimizes parameters, and realizes the fitting prediction of the traffic data. However, due to the complexity of the traffic scene, it is difficult to obtain an accurate prediction result by using such a prediction method. The second type is a Machine learning-based method, which mainly includes a K-neighborhood algorithm (KNN), a Support Vector Machine (SVM), a Support Vector Regression (SVR), and the like. The K-neighborhood algorithm can model more complex data, but the value of K in the method is very dependent on a priori knowledge. Support vector machines and support vector regression can effectively predict short-term traffic speeds, but they cannot model complex road networks, thereby affecting the prediction effect and performance thereof. The third type is a Neural Network-based method, which mainly includes a Recurrent Neural Network (RNN), a Long Short-Term Neural Network (LSTM), a Convolutional Neural Network (CNN), a Graph Convolutional Network (GCN), and the like. The RNN and LSTM methods can extract the time characteristics of the traffic data, but the RNN and LSTM methods cannot extract the space characteristics of the traffic data, the prediction precision is limited, the RNN and LSTM methods need repeated iteration, and the model training is time-consuming. The CNN adopts a convolution mode, can extract spatial features, but is only suitable for two-dimensional grid data and is not suitable for complex traffic data. Compared with other neural network methods, the GCN method can capture the spatial characteristics of the road network and improve the traffic speed prediction capability, but the GCN can only extract static spatial characteristics, and the GCN method still has limitations because the spatial characteristics of the road network are dynamically changed and change along with the change of traffic flow. Furthermore, all neural network methods only use historical traffic speed data to predict the future traffic speed, and the original traffic speed data has collection errors, which are only the average speed of part of vehicles, which affects the accuracy of traffic speed prediction to a certain extent.
At present, the existing traffic speed prediction method has the following main problems: 1) most methods adopt a recursive iteration mode, the calculation is time-consuming, and the spatial correlation existing among all road sections is not considered, so that the method is not suitable for complex road networks; 2) part of methods not only consider the time relationship, but also consider the static spatial relationship, but do not consider the dynamic change of the spatial relationship; 3) most methods only use historical traffic speed data to predict future traffic speed, and collection errors existing in original traffic speed data are not considered, so that the accuracy of traffic speed prediction is influenced.
Disclosure of Invention
The invention overcomes the defects of the prior art, provides a traffic speed prediction method and a traffic speed prediction system based on traffic flow data fusion, and is suitable for urban road networks and expressway networks.
The invention adopts a full convolution structure, designs and realizes a traffic speed prediction model based on traffic flow data fusion. The model adopts graph convolution to capture space characteristics, adopts time gating convolution to capture time characteristics, considers the correlation between traffic flow and traffic speed and the accuracy of traffic flow data, and takes the traffic flow data as model input to perform data fusion so as to improve the traffic speed prediction performance. The invention also designs a composite adjacency matrix applied to graph convolution operation, and the composite adjacency matrix integrates static and dynamic adjacency matrixes, wherein the static adjacency matrix is based on static distance, and the dynamic adjacency matrix is based on dynamic change of traffic flow, so that the comprehensive analysis of the spatial relationship of the traffic network is realized, and the prediction accuracy of the model is improved. The method adopts a full convolution structure, avoids the time-consuming problem of model training, and is suitable for complex road networks; meanwhile, the invention fuses more accurate traffic flow data, makes up for the acquisition error of the original traffic speed data and reduces the prediction error. In addition, the invention designs the composite adjacency matrix, comprehensively analyzes the static and dynamic spatial relationship between road sections, realizes more effective spatial graph convolution operation and improves the prediction precision of the whole model.
The invention achieves the aim through the following technical scheme: namely, the traffic speed prediction method based on traffic flow data fusion comprises the following specific implementation steps:
(1) and (4) preprocessing data. The raw traffic data is subjected to data preprocessing, including historical traffic speed data and traffic flow data. And repairing missing data by adopting an average value method, and normalizing the data by adopting a Z-Score method to ensure that the average value of the original data is 0 and the variance is 1.
(2) And designing a traffic speed prediction model based on traffic flow data fusion. The traffic speed prediction model comprises a flow prediction layer, a data fusion layer, a time-space analysis layer and a prediction output layer. The flow prediction layer adopts a time-space volume block to process the input historical traffic flow data, so as to obtain the traffic flow prediction data of a plurality of time periods in the future. The data fusion layer is used for processing predicted traffic flow data and historical traffic speed data by adopting time-gated convolution, and then performing serial fusion and outputting the data to the next layer. The space-time analysis layer is mainly used for processing the fused traffic data and extracting the spatial characteristics and the time characteristics of the traffic data by adopting graph convolution and time gating convolution respectively. The prediction output layer comprises a space-time convolution block, a time-gated convolution block and a full connection layer, wherein the space-time convolution block is used for further extracting the space-time characteristics of the traffic data, and the time-gated convolution block and the full connection layer are used for outputting the final prediction result.
The traffic speed prediction model adopts a space-time convolution block, and the space-time convolution block is a core component of the whole model. The spatio-temporal convolution block consists of two time-gated convolution for extracting temporal features and one spatial image convolution in between for extracting spatial features. The whole traffic speed prediction model totally uses three space-time convolution blocks, and the space-time convolution block of the flow prediction layer is used for processing historical traffic flow data and outputting future traffic flow data; the data fusion layer and the space-time analysis layer are combined together to form a space-time volume block which is used for processing the fused traffic data and extracting space-time characteristics; and a space-time volume block is also superposed on the prediction output layer and is used for further extracting space-time characteristics.
The traffic speed prediction model uses graph convolution operation to extract the spatial relationship of traffic data. The graph convolution treats a traffic network as an undirected graph, each node represents a road segment, and the graph convolution process is realized by using Laplace first-order approximation. The general expression of graph convolution is:
Figure BDA0003240856800000051
wherein, thetaGRepresents a graph convolution, theta is the convolution kernel, theta is the shared parameter of the graph convolution kernel, L is the normalized Laplace matrix, and
Figure BDA0003240856800000052
d is a degree matrix of the graph, A is an adjacent matrix of the graph, and
Figure BDA0003240856800000053
the volume product of the two-dimensional variable is denoted as ΘGX, graph convolution kernel
Figure BDA0003240856800000054
K is the graph convolution size, CinAnd CoutThe number of input channels and the number of output channels of the graph convolution are respectively.
The traffic speed prediction model designs a composite adjacency matrix which is applied to all graph convolution operations of the model. Compared with the traditional adjacency matrix, the composite adjacency matrix integrates the static adjacency matrix and the dynamic adjacency matrix, and realizes the comprehensive analysis of the spatial relationship between the road sections. The method comprises the following specific steps:
Figure BDA0003240856800000055
Figure BDA0003240856800000056
Figure BDA0003240856800000057
wherein the content of the first and second substances,
Figure BDA0003240856800000058
is a static adjacency matrix based on exponential distances, which is used to analyze static spatial correlation between road segments. ε is used to control the sparsity of the matrix, | | xi-xj||2For calculating the distance, σ, between the segments i and j2Representing the spatial attenuation length.
Figure BDA0003240856800000059
Based on the dynamic adjacency matrix of the traffic flow, the covariance matrix is adopted to calculate the correlation of the traffic flow among all road sections, thereby realizing the dynamic analysis of the spatial correlation of the road sections,
Figure BDA00032408568000000510
and
Figure BDA00032408568000000511
is the average traffic flow of links i and j over the past i time period, i.e.
Figure BDA00032408568000000512
Figure BDA00032408568000000513
The method is a composite adjacency matrix, integrates a static adjacency matrix and a dynamic adjacency matrix, and can comprehensively analyze the static and dynamic spatial relationship between road sections.
The traffic prediction layer of the traffic speed prediction model includes a space-time convolution block in which time-gated convolution is used to capture temporal characteristics of the traffic flow data and graph convolution is used to capture spatial characteristics of the traffic flow data. Compared with a common recurrent neural network, the method utilizes convolution operation, has the advantages of fast training, simple structure and the like, and effectively reduces the complexity of model training. The input/output variation of the traffic prediction layer is:
Figure BDA0003240856800000061
wherein the output is
Figure BDA0003240856800000062
Representing predicted future traffic flow data, n being the number of road segments, CoutIs the number of output channels, KtIs the time-gated convolution size, input
Figure BDA0003240856800000063
Represents the historical traffic flow data and,
Figure BDA0003240856800000064
is the traffic flow data of the n road segments,
Figure BDA0003240856800000065
is the traffic flow of the ith road segment in the past l time periods; gamma-shaped0*TAnd Γ1*TRepresenting two time-gated convolutions, Γ0And Γ1Is a convolution kernel;
Figure BDA0003240856800000066
it represents the convolution of the diagram,
Figure BDA0003240856800000067
is a convolution kernel, the number of input channels C of whichin1 is ═ 1; ReLU (. cndot.) is an activation function;
the data fusion layer of the traffic speed prediction model comprises two time-gated convolution and series operation, the two time-gated convolution are respectively used for predicted traffic flow data and historical traffic speed data to extract the time characteristics of the predicted traffic flow data and the historical traffic speed data, and the series operation is used for fusing the two parts of data and is used as the input of the next layer. The input and output changes of the data fusion layer are as follows:
Figure BDA0003240856800000068
wherein the content of the first and second substances,
Figure BDA0003240856800000069
is the output of the data fusion layer, X1And h0Is an input to the data fusion layer,
Figure BDA00032408568000000610
is the traffic speed data of the n road segments,
Figure BDA00032408568000000611
is the traffic speed of the ith road segment in the past time period,
Figure BDA00032408568000000612
is a series operation, gamma2*TAnd Γ3*TRepresenting two time-gated convolutions, Γ2And Γ3Is a convolution kernel.
The space-time analysis layer of the traffic speed prediction model comprises a space map convolution and a time gating convolution, wherein the space map convolution is used for extracting the space characteristics of the fusion data, and the time gating convolution is used for extracting the time characteristics of the fusion data. The input and output of the space-time analysis layer are changed into:
Figure BDA0003240856800000071
wherein the content of the first and second substances,
Figure BDA0003240856800000072
is the output of the spatio-temporal analysis layer, h1Is the input to the spatio-temporal analysis layer,
Figure BDA0003240856800000073
it represents the convolution of the diagram,
Figure BDA0003240856800000074
is a convolution kernel, Γ4*TRepresenting time-gated convolution, Γ4Is a convolution kernel.
The prediction output layer of the traffic speed prediction model comprises a space-time convolution block, a time-gated convolution and a full connection layer, wherein the space-time convolution block is used for further extracting space-time relation, and the additional time-gated convolution and the full connection layer are used for outputting a final prediction result. The input-output variation of the prediction output layer is:
Figure BDA0003240856800000075
Z=Γ7*Th3 (9)
Figure BDA0003240856800000076
wherein the content of the first and second substances,
Figure BDA0003240856800000077
as a result of the output of the space-time volume block,
Figure BDA0003240856800000078
it represents the convolution of the diagram,
Figure BDA0003240856800000079
is a convolution kernel, Γ5*TAnd Γ6*TRepresenting time-gated convolution, Γ5And Γ6Is a convolution kernel;
Figure BDA00032408568000000710
for the output result of the time-gated convolution, Γ7*TRepresenting time-gated convolution, Γ7Is a convolution kernel;
Figure BDA00032408568000000711
is a predicted value of the traffic speed in the j-th time period in the future,
Figure BDA00032408568000000712
is the weight vector and b is the bias term. When predicting the futureAt traffic speed, Yt+1Is the first predicted value, then Yt+1Input data can be spliced in, and the traffic speed Y of the next time period can be predicted by repeating the same processt+2And the traffic speed of T time periods in the future can be predicted by repeating the steps continuously.
The traffic speed prediction model is trained by adopting an Adam optimizer, and parameters are updated by using a gradient descent algorithm. The loss function of the model adopts a mean square error, and the method specifically comprises the following steps:
Figure BDA0003240856800000081
wherein the content of the first and second substances,
Figure BDA0003240856800000082
is the predicted value, YiIs the true value.
(3) Generating a sample data set and training a traffic speed prediction model. And (3) splitting the traffic data obtained in the step (2), generating a training data set, a verification data set and a test data set, and training a traffic speed prediction model.
(4) Prediction of traffic speed for a future time period. And (4) predicting the traffic speed in the future time period according to the acquired traffic data based on the prediction model obtained by training and testing in the step (3).
Preferably, formula (2) of step (2), the parameter is set to σ2=100,ε=0.5。
Preferably, in step (3), the training data set, the verification data set and the test data set are generated by splitting according to the ratio of 6:2: 2.
The system for implementing the traffic flow data fusion-based traffic speed prediction method comprises a data preprocessing module, a traffic speed prediction model design module, a sample data set generation and traffic speed prediction model training module and a future time period traffic speed prediction module which are sequentially connected.
The invention has the beneficial effects that: (1) the method adopts a full convolution structure comprising time-gated convolution and space map convolution, avoids the time-consuming problem of model training, and is suitable for complex road networks; (2) on the basis of historical traffic speed data, more accurate traffic flow data are fused, and the prediction precision of the traffic speed is improved; (3) the invention designs the composite adjacency matrix applied to graph convolution operation, not only considers the static spatial relationship, but also analyzes the dynamic spatial relationship, realizes the comprehensive analysis of the spatial correlation among the road sections, and improves the prediction precision.
Drawings
FIG. 1 is a block diagram of the spatio-temporal convolution of the present invention.
Fig. 2 is a view showing a traffic speed prediction model according to the present invention.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
The invention discloses a traffic speed prediction method based on traffic flow data fusion, which comprises the following specific implementation steps of:
(1) and (4) preprocessing data. The raw traffic data is subjected to data preprocessing, including historical traffic speed data and traffic flow data. And repairing missing data by adopting an average value method, and normalizing the data by adopting a Z-Score method to ensure that the average value of the original data is 0 and the variance is 1.
(2) And designing a traffic speed prediction model based on traffic flow data fusion. The traffic speed prediction model comprises a flow prediction layer, a data fusion layer, a time-space analysis layer and a prediction output layer. The flow prediction layer adopts a time-space volume block to process the input historical traffic flow data, so as to obtain the traffic flow prediction data of a plurality of time periods in the future. The data fusion layer is used for processing predicted traffic flow data and historical traffic speed data by adopting time-gated convolution, and then performing serial fusion and outputting the data to the next layer. The space-time analysis layer is mainly used for processing the fused traffic data and extracting the spatial characteristics and the time characteristics of the traffic data by respectively adopting graph convolution and time gating convolution. The prediction output layer comprises a space-time convolution block, a time-gating convolution block and a full connection layer, wherein the space-time convolution block is used for further extracting space-time characteristics of traffic data, and the time-gating convolution block and the full connection layer are used for outputting a final prediction result.
The traffic speed prediction model adopts a space-time convolution block, and the space-time convolution block is a core component of the whole model. The spatio-temporal convolution block consists of two time-gated convolution for extracting temporal features and one spatial image convolution in between for extracting spatial features. The whole traffic speed prediction model totally uses three space-time convolution blocks, and the space-time convolution block of the flow prediction layer is used for processing historical traffic flow data and outputting future traffic flow data; the data fusion layer and the space-time analysis layer are combined together to form a space-time volume block which is used for processing the fused traffic data and extracting space-time characteristics; and a space-time volume block is also superposed on the prediction output layer and is used for further extracting space-time characteristics.
The traffic speed prediction model uses graph convolution operation to extract the spatial relationship of traffic data. The graph convolution treats a traffic network as an undirected graph, each node represents a road segment, and the graph convolution process is realized by using Laplace first-order approximation. The general expression of graph convolution is:
Figure BDA0003240856800000101
wherein, thetaGRepresents a graph convolution, theta is the convolution kernel, theta is the shared parameter of the graph convolution kernel, L is the normalized Laplace matrix, and
Figure BDA0003240856800000102
d is a degree matrix of the graph, A is an adjacent matrix of the graph, and
Figure BDA0003240856800000103
the volume product of the two-dimensional variable is denoted as ΘGX, graph convolution kernel
Figure BDA0003240856800000104
K is the graph convolution size, CinAnd CoutInput channels each being a graph convolutionNumber and output channel number.
The traffic speed prediction model designs a composite adjacency matrix which is applied to all graph convolution operations of the model. Compared with the traditional adjacency matrix, the composite adjacency matrix integrates the static adjacency matrix and the dynamic adjacency matrix, and realizes the comprehensive analysis of the spatial relationship between the road sections. The method comprises the following specific steps:
Figure BDA0003240856800000111
Figure BDA0003240856800000112
Figure BDA0003240856800000113
wherein the content of the first and second substances,
Figure BDA0003240856800000114
is a static adjacency matrix based on exponential distances, which is used to analyze static spatial correlation between road segments. ε is used to control the sparsity of the matrix, | | xi-xj||2For calculating the distance, σ, between the segments i and j2Representing the spatial attenuation length, these two parameters generally take the value σ2=100,ε=0.5。
Figure BDA0003240856800000115
Based on the dynamic adjacency matrix of the traffic flow, the covariance matrix is adopted to calculate the correlation of the traffic flow among all road sections, thereby realizing the dynamic analysis of the spatial correlation of the road sections,
Figure BDA0003240856800000116
and
Figure BDA0003240856800000117
is the average traffic flow of links i and j over the past i time period, i.e.
Figure BDA0003240856800000118
Figure BDA0003240856800000119
The method is a composite adjacency matrix, integrates a static adjacency matrix and a dynamic adjacency matrix, and can comprehensively analyze the static and dynamic spatial relationship between road sections.
The traffic prediction layer of the traffic speed prediction model includes a space-time convolution block in which time-gated convolution is used to capture temporal characteristics of the traffic flow data and graph convolution is used to capture spatial characteristics of the traffic flow data. Compared with a common recurrent neural network, the method utilizes convolution operation, has the advantages of fast training, simple structure and the like, and effectively reduces the complexity of model training. The input/output variation of the traffic prediction layer is:
Figure BDA00032408568000001110
wherein the output is
Figure BDA00032408568000001111
Representing predicted future traffic flow data, n being the number of road segments, CoutIs the number of output channels, KtIs the time-gated convolution size, input
Figure BDA0003240856800000121
Is indicative of historical traffic flow data and,
Figure BDA0003240856800000122
is the traffic flow data of the n road segments,
Figure BDA0003240856800000123
is the traffic flow of the ith road segment in the past l time periods; gamma-shaped0*TAnd gamma1*TRepresenting two time-gated convolutions, Γ0And Γ1Is a convolution kernel;
Figure BDA0003240856800000124
it represents the convolution of the diagram,
Figure BDA0003240856800000125
is a convolution kernel, the number of input channels C of whichin1 is ═ 1; ReLU (. cndot.) is an activation function;
the data fusion layer of the traffic speed prediction model comprises two time-gated convolution and series operation, the two time-gated convolution are respectively used for predicted traffic flow data and historical traffic speed data to extract the time characteristics of the predicted traffic flow data and the historical traffic speed data, and the series operation is used for fusing the two parts of data and is used as the input of the next layer. The input and output changes of the data fusion layer are as follows:
Figure BDA0003240856800000126
wherein the content of the first and second substances,
Figure BDA0003240856800000127
is the output of the data fusion layer, X1And h0Is an input to the data fusion layer and,
Figure BDA0003240856800000128
is the traffic speed data of the n road segments,
Figure BDA0003240856800000129
is the traffic speed of the ith road segment in the past time period,
Figure BDA00032408568000001210
is a series operation, gamma2*TAnd Γ3*TRepresenting two time-gated convolutions, Γ2And Γ3Is a convolution kernel.
The space-time analysis layer of the traffic speed prediction model comprises a space map convolution and a time gating convolution, wherein the space map convolution is used for extracting the space characteristics of the fusion data, and the time gating convolution is used for extracting the time characteristics of the fusion data. The input and output of the space-time analysis layer are changed into:
Figure BDA00032408568000001211
wherein the content of the first and second substances,
Figure BDA00032408568000001212
is the output of the spatio-temporal analysis layer, h1Is the input to the spatio-temporal analysis layer,
Figure BDA00032408568000001213
it represents the convolution of the diagram,
Figure BDA00032408568000001214
is a convolution kernel, Γ4*TRepresenting time-gated convolution, Γ4Is a convolution kernel.
The prediction output layer of the traffic speed prediction model comprises a space-time convolution block, a time-gated convolution block and a full connection layer, wherein the space-time convolution block is used for further extracting the space-time relation, and the additional time-gated convolution block and the full connection layer are used for outputting the final prediction result. The input-output variation of the prediction output layer is:
Figure BDA0003240856800000131
Z=Γ7*Th3 (9)
Figure BDA0003240856800000132
wherein the content of the first and second substances,
Figure BDA0003240856800000133
as a result of the output of the space-time volume block,
Figure BDA0003240856800000134
it represents the convolution of the diagram,
Figure BDA0003240856800000135
is a convolution kernel, Γ5*TAnd Γ6*TRepresenting time-gated convolution, Γ5And Γ6Is a convolution kernel;
Figure BDA0003240856800000136
as an output result of the time-gated convolution, Γ7*TRepresenting time-gated convolution, Γ7Is a convolution kernel;
Figure BDA0003240856800000137
is a predicted value of the traffic speed in the j-th time period in the future,
Figure BDA0003240856800000138
is the weight vector and b is the bias term. When predicting future traffic speed, Yt+1Is the first predicted value, then Yt+1Input data can be spliced in, and the traffic speed Y of the next time period can be predicted by repeating the same processt+2And the traffic speed of T time periods in the future can be predicted by repeating the steps continuously.
The traffic speed prediction model is trained by adopting an Adam optimizer, and parameters are updated by using a gradient descent algorithm. The loss function of the model adopts a mean square error, and the method specifically comprises the following steps:
Figure BDA0003240856800000139
wherein the content of the first and second substances,
Figure BDA00032408568000001310
is the predicted value, YiIs the true value.
(3) Generating a sample data set and training a traffic speed prediction model. And (3) splitting the traffic data obtained in the step (2) according to the ratio of 6:2:2 to generate a training data set, a verification data set and a test data set, and training a traffic speed prediction model.
(4) Prediction of traffic speed for a future time period. And (4) predicting the traffic speed of the future time period according to the acquired traffic data based on the prediction model obtained by training in the step (3).
Referring to FIG. 1, a space-time convolution block diagram of the present invention is shown. The method is composed of two time-gated convolution products and a middle space image convolution product, wherein the time-gated convolution products are used for extracting time characteristics, and the image convolution products are used for extracting space characteristics.
Referring to fig. 2, a traffic speed prediction model according to the present invention is shown. The model has four layers including a flow prediction layer, a data fusion layer, a time-space analysis layer and a prediction output layer. The flow prediction layer adopts a time-space volume block to process the input historical traffic flow data, so as to obtain the traffic flow prediction data of a plurality of time periods in the future. The data fusion layer is used for processing predicted traffic flow data and historical traffic speed data by adopting time-gated convolution, and then performing serial fusion and outputting the data to the next layer. The space-time analysis layer is mainly used for processing the fused traffic data, extracting space features by adopting graph convolution and extracting time features by adopting time gating convolution. The prediction output layer comprises a space-time convolution block, a time-gated convolution block and a full connection layer, wherein the space-time convolution block is used for further extracting the space-time characteristics of the traffic data, and the time-gated convolution block and the full connection layer are used for outputting the final prediction result. The whole model uses three time-space convolution blocks with the same structure, and the time-space convolution block of the flow prediction layer is used for processing historical traffic flow data and outputting future traffic flow data; the data fusion layer and the space-time analysis layer are combined together to form a space-time volume block which is used for processing the fused traffic data and extracting space-time characteristics; and a space-time volume block is also superposed on the prediction output layer and is used for further extracting space-time characteristics.
The system for implementing the traffic flow data fusion-based traffic speed prediction method comprises a data preprocessing module, a traffic speed prediction model design module, a sample data set generation and traffic speed prediction model training module and a future time period traffic speed prediction module which are sequentially connected. The data preprocessing module, the traffic speed prediction model design module, the sample data set generation and traffic speed prediction model training module and the traffic speed prediction module in the future time period respectively comprise the technical contents of the steps (1) to (4) of the method.
The invention adopts a full convolution structure, designs and realizes a traffic speed prediction model based on traffic flow data fusion. The model adopts graph convolution to capture space characteristics, adopts time gating convolution to capture time characteristics, considers the correlation between traffic flow and traffic speed and the accuracy of traffic flow data, and takes the traffic flow data as model input to perform data fusion so as to improve the traffic speed prediction performance. The invention also designs a composite adjacency matrix applied to graph convolution operation, and the composite adjacency matrix integrates static and dynamic adjacency matrixes, wherein the static adjacency matrix is based on static distance, and the dynamic adjacency matrix is based on dynamic change of traffic flow, so that the comprehensive analysis of the spatial relationship of the traffic network is realized, and the prediction accuracy of the model is improved.
The embodiments described in this specification are merely illustrative of implementations of the inventive concept and the scope of the present invention should not be considered limited to the specific forms set forth in the embodiments but rather by the equivalents thereof as may occur to those skilled in the art upon consideration of the present inventive concept.

Claims (4)

1. A traffic speed prediction method based on traffic flow data fusion comprises the following steps:
(1) preprocessing data; performing data preprocessing on original traffic data, wherein the data preprocessing comprises historical traffic speed data and traffic flow data; repairing missing data by adopting an average value method, and normalizing the data by adopting a Z-Score method to ensure that the average value of the original data is 0 and the variance is 1;
(2) designing a traffic speed prediction model based on traffic flow data fusion; the traffic speed prediction model comprises a flow prediction layer, a data fusion layer, a time-space analysis layer and a prediction output layer; the flow prediction layer adopts a space-time volume block to process the input historical traffic flow data so as to obtain traffic flow prediction data of a plurality of time periods in the future; the data fusion layer is used for processing predicted traffic flow data and historical traffic speed data by adopting time-gated convolution, and then performing serial fusion and outputting the data to the next layer; the space-time analysis layer is mainly used for processing the fused traffic data and extracting the spatial characteristics and the time characteristics of the traffic data by respectively adopting graph convolution and time gating convolution; the prediction output layer comprises a space-time convolution block, a time-gated convolution and a full connection layer, wherein the space-time convolution block is used for further extracting the space-time characteristics of the traffic data, and the time-gated convolution and the full connection layer are used for outputting the final prediction result;
the traffic speed prediction model adopts a space-time convolution block, and the space-time convolution block is a core component of the whole model; the space-time convolution block consists of two time-gated convolution volumes and a middle space graph convolution volume, wherein the time-gated convolution volumes are used for extracting time characteristics, and the graph convolution volumes are used for extracting space characteristics; the whole traffic speed prediction model totally uses three space-time convolution blocks, and the space-time convolution block of the flow prediction layer is used for processing historical traffic flow data and outputting future traffic flow data; the data fusion layer and the space-time analysis layer are combined together to form a space-time volume block which is used for processing the fused traffic data and extracting space-time characteristics; a space-time convolution block is also superposed on the prediction output layer and is used for further extracting space-time characteristics;
the traffic speed prediction model adopts graph convolution operation to extract the spatial relationship of traffic data; the graph convolution takes a traffic road network as an undirected graph, each node represents a road section, and the graph convolution process is realized by adopting Laplace first-order approximation; the general expression of graph convolution is:
Figure FDA0003240856790000011
wherein, thetaGRepresents the graph convolution, theta is the convolution kernel, theta is the shared parameter of the graph convolution kernel, L is the normalized Laplacian matrix, and
Figure FDA0003240856790000012
d is a degree matrix of the graph, A is an adjacent matrix of the graph, and
Figure FDA0003240856790000021
the volume product of the two-dimensional variable is denoted as ΘGX, graph convolution kernel
Figure FDA0003240856790000022
K is the graph convolution size, CinAnd CoutThe number of input channels and the number of output channels of the graph convolution are respectively;
the traffic speed prediction model designs a composite adjacency matrix which is applied to all graph convolution operations of the model; compared with the traditional adjacency matrix, the composite adjacency matrix integrates the static adjacency matrix and the dynamic adjacency matrix, and realizes the comprehensive analysis of the spatial relationship between the road sections; the method comprises the following specific steps:
Figure FDA0003240856790000023
Figure FDA0003240856790000024
Figure FDA0003240856790000025
wherein the content of the first and second substances,
Figure FDA0003240856790000026
the method is based on a static adjacency matrix of exponential distances, and the exponential distances are adopted to analyze the static spatial correlation among road sections; ε is used to control the sparsity of the matrix, | | xi-xj||2For calculating the distance, σ, between the segments i and j2Representing a spatial attenuation length;
Figure FDA0003240856790000027
based on the dynamic adjacency matrix of the traffic flow, the covariance matrix is adopted to calculate the correlation of the traffic flow among all road sections, thereby realizing the dynamic analysis of the spatial correlation of the road sections,
Figure FDA0003240856790000028
and
Figure FDA0003240856790000029
is the average traffic flow of links i and j over the past i time period, i.e.
Figure FDA00032408567900000210
Figure FDA00032408567900000211
The composite adjacency matrix is a composite adjacency matrix, integrates a static adjacency matrix and a dynamic adjacency matrix, and can comprehensively analyze the static and dynamic spatial relationship between road sections;
the traffic speed prediction model comprises a flow prediction layer and a time-space convolution block, wherein the time-gated convolution is used for capturing the time characteristics of the traffic flow data, and the graph convolution is used for capturing the space characteristics of the traffic flow data; the input/output variation of the traffic prediction layer is:
Figure FDA00032408567900000212
wherein the output is
Figure FDA00032408567900000213
Representing predicted future traffic flow data, n being the number of road segments, CoutIs the number of output channels, KtIs the time-gated convolution size, input
Figure FDA00032408567900000214
Representing historical traffic flowThe amount of data is measured and, if necessary,
Figure FDA0003240856790000031
is the traffic flow data of the n road segments,
Figure FDA0003240856790000032
is the traffic flow of the ith road segment in the past l time periods; gamma-shaped0*TAnd Γ1*TRepresenting two time-gated convolutions, Γ0And Γ1Is a convolution kernel;
Figure FDA0003240856790000033
it represents the convolution of the diagram,
Figure FDA0003240856790000034
is a convolution kernel, the number of input channels C of whichin1 is ═ 1; ReLU (. cndot.) is an activation function;
the data fusion layer of the traffic speed prediction model comprises two time-gated convolutions and series operation, the two time-gated convolutions are respectively used for predicted traffic flow data and historical traffic speed data to extract time characteristics of the predicted traffic flow data and the historical traffic speed data, and the series operation is used for fusing the two parts of data and is used as input of the next layer; the input and output changes of the data fusion layer are as follows:
Figure FDA0003240856790000035
wherein the content of the first and second substances,
Figure FDA0003240856790000036
is the output of the data fusion layer, X1And h0Is an input to the data fusion layer,
Figure FDA0003240856790000037
is the traffic speed data of the n road segments,
Figure FDA0003240856790000038
is the traffic speed of the ith road segment in the past time period,
Figure FDA0003240856790000039
is a series operation, gamma2*TAnd Γ3*TRepresenting two time-gated convolutions, Γ2And Γ3Is a convolution kernel;
the space-time analysis layer of the traffic speed prediction model comprises a space map convolution and a time gating convolution, wherein the space map convolution is used for extracting the space characteristics of the fusion data, and the time gating convolution is used for extracting the time characteristics of the fusion data; the input and output of the space-time analysis layer are changed into:
Figure FDA00032408567900000310
wherein the content of the first and second substances,
Figure FDA00032408567900000311
is the output of the spatio-temporal analysis layer, h1Is the input to the spatio-temporal analysis layer,
Figure FDA00032408567900000312
it represents the convolution of the diagram,
Figure FDA00032408567900000313
is a convolution kernel, Γ4*TRepresenting time-gated convolution, Γ4Is a convolution kernel;
the prediction output layer of the traffic speed prediction model comprises a space-time convolution block, a time-gated convolution and a full connection layer, wherein the space-time convolution block is used for further extracting the space-time relation, and the additional time-gated convolution and the full connection layer are used for outputting the final prediction result; the input-output variation of the prediction output layer is:
Figure FDA00032408567900000314
Z=Γ7*Th3 (9)
Figure FDA00032408567900000315
wherein the content of the first and second substances,
Figure FDA0003240856790000041
as a result of the output of the space-time volume block,
Figure FDA0003240856790000042
it is shown that the graph is convolved,
Figure FDA0003240856790000043
is a convolution kernel, Γ5*TAnd Γ6*TRepresenting time-gated convolution, Γ5And Γ6Is a convolution kernel;
Figure FDA0003240856790000044
as an output result of the time-gated convolution, Γ7*TRepresenting time-gated convolution, Γ7Is a convolution kernel;
Figure FDA0003240856790000045
is a predicted value of the traffic speed in the j-th time period in the future,
Figure FDA0003240856790000046
is the weight vector, b is the bias term; when predicting future traffic speed, Yt+1Is the first predicted value, then Yt+1Input data are spliced in, and the traffic speed Y of the next time period can be predicted by repeating the same processt+2The traffic speed of the T time periods in the future can be predicted by repeating the steps continuously;
the traffic speed prediction model is trained by adopting an Adam optimizer, and parameters are updated by using a gradient descent algorithm; the loss function of the model adopts a mean square error, and the method specifically comprises the following steps:
Figure FDA0003240856790000047
wherein the content of the first and second substances,
Figure FDA0003240856790000048
is the predicted value, YiIs the true value;
(3) generating a sample data set and training a traffic speed prediction model; splitting the traffic data obtained in the step (2), generating a training data set, a verification data set and a test data set, and training a traffic speed prediction model;
(4) predicting traffic speed in a future time period; and (4) predicting the traffic speed of the future time period according to the acquired traffic data based on the prediction model obtained by training in the step (3).
2. The traffic-flow data fusion-based traffic speed prediction method according to claim 1, characterized in that: formula (2) in step (2), with the parameters set to σ2=100,ε=0.5。
3. The traffic-flow data fusion-based traffic speed prediction method according to claim 1, characterized in that: in the step (3), splitting according to the ratio of 6:2:2 to generate a training data set, a verification data set and a test data set.
4. The system for implementing the traffic flow data fusion-based traffic speed prediction method according to claim 1, characterized in that: the system comprises a data preprocessing module, a traffic speed prediction model design module, a sample data set generation and traffic speed prediction model training module and a future time period traffic speed prediction module which are sequentially connected.
CN202111018509.5A 2021-09-01 2021-09-01 Traffic speed prediction method and system based on traffic flow data fusion Active CN113808396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111018509.5A CN113808396B (en) 2021-09-01 2021-09-01 Traffic speed prediction method and system based on traffic flow data fusion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111018509.5A CN113808396B (en) 2021-09-01 2021-09-01 Traffic speed prediction method and system based on traffic flow data fusion

Publications (2)

Publication Number Publication Date
CN113808396A CN113808396A (en) 2021-12-17
CN113808396B true CN113808396B (en) 2022-06-21

Family

ID=78894538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111018509.5A Active CN113808396B (en) 2021-09-01 2021-09-01 Traffic speed prediction method and system based on traffic flow data fusion

Country Status (1)

Country Link
CN (1) CN113808396B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463977B (en) * 2022-02-10 2023-06-23 北京工业大学 Path planning method based on vehicle-road cooperation multi-source data fusion traffic flow prediction
CN114299723B (en) * 2022-02-15 2022-11-08 北京科技大学 Traffic flow prediction method
CN115063972A (en) * 2022-05-18 2022-09-16 浙江工业大学 Traffic speed prediction method and system based on graph convolution and gate control cyclic unit
CN116403409B (en) * 2023-06-06 2023-08-15 中国科学院空天信息创新研究院 Traffic speed prediction method, traffic speed prediction device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110415516A (en) * 2019-07-15 2019-11-05 厦门大学 Urban traffic flow prediction technique and medium based on figure convolutional neural networks
CN112053560A (en) * 2020-08-27 2020-12-08 武汉理工大学 Short-time traffic flow prediction method, system and storage medium based on neural network
CN112949828A (en) * 2021-03-04 2021-06-11 湖南大学 Graph convolution neural network traffic prediction method and system based on graph learning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11537852B2 (en) * 2020-02-13 2022-12-27 International Business Machines Corporation Evolving graph convolutional networks for dynamic graphs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110415516A (en) * 2019-07-15 2019-11-05 厦门大学 Urban traffic flow prediction technique and medium based on figure convolutional neural networks
CN112053560A (en) * 2020-08-27 2020-12-08 武汉理工大学 Short-time traffic flow prediction method, system and storage medium based on neural network
CN112949828A (en) * 2021-03-04 2021-06-11 湖南大学 Graph convolution neural network traffic prediction method and system based on graph learning

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
荣斌等.基于时空多图卷积网络的交通站点流量预测.《计算机工程》.2019,(第05期), *
闫旭等.基于图卷积神经网络的城市交通态势预测算法.《浙江大学学报(工学版)》.2020,(第06期), *

Also Published As

Publication number Publication date
CN113808396A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN113808396B (en) Traffic speed prediction method and system based on traffic flow data fusion
CN109285346B (en) Urban road network traffic state prediction method based on key road sections
CN113450568B (en) Convolutional network traffic flow prediction model based on space-time attention mechanism
CN110570651B (en) Road network traffic situation prediction method and system based on deep learning
CN109492830B (en) Mobile pollution source emission concentration prediction method based on time-space deep learning
CN109754605B (en) Traffic prediction method based on attention temporal graph convolution network
Kim et al. A capsule network for traffic speed prediction in complex road networks
CN113313947B (en) Road condition evaluation method of short-term traffic prediction graph convolution network
Zhang et al. DNEAT: A novel dynamic node-edge attention network for origin-destination demand prediction
CN110674987A (en) Traffic flow prediction system and method and model training method
CN112949828B (en) Graph convolution neural network traffic prediction method and system based on graph learning
CN112489497B (en) Airspace operation complexity evaluation method based on deep convolutional neural network
CN113591380B (en) Traffic flow prediction method, medium and equipment based on graph Gaussian process
CN111047078B (en) Traffic characteristic prediction method, system and storage medium
CN114944053B (en) Traffic flow prediction method based on space-time hypergraph neural network
CN114664091A (en) Early warning method and system based on holiday traffic prediction algorithm
CN112465199A (en) Airspace situation evaluation system
CN115376317B (en) Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network
CN112801386A (en) Short-term traffic flow prediction method based on three-stage model
CN112712169A (en) Model building method and application of full residual depth network based on graph convolution
James Citywide estimation of travel time distributions with Bayesian deep graph learning
CN111311907A (en) Identification method for uncertain basic graph parameter identification based on cellular transmission model
CN115936242B (en) Method and device for acquiring traceability relation data of air quality and traffic condition
CN115063972A (en) Traffic speed prediction method and system based on graph convolution and gate control cyclic unit
CN116721538A (en) Method for adaptively learning traffic flow prediction under dynamic traffic condition

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