CN115376317B - Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network - Google Patents

Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network Download PDF

Info

Publication number
CN115376317B
CN115376317B CN202211004685.8A CN202211004685A CN115376317B CN 115376317 B CN115376317 B CN 115376317B CN 202211004685 A CN202211004685 A CN 202211004685A CN 115376317 B CN115376317 B CN 115376317B
Authority
CN
China
Prior art keywords
traffic
data
road
traffic flow
convolution
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
CN202211004685.8A
Other languages
Chinese (zh)
Other versions
CN115376317A (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.)
Beijing Ironman Technology Co ltd
Chongqing University of Post and Telecommunications
Original Assignee
Beijing Ironman Technology Co ltd
Chongqing University of Post and Telecommunications
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 Beijing Ironman Technology Co ltd, Chongqing University of Post and Telecommunications filed Critical Beijing Ironman Technology Co ltd
Priority to CN202211004685.8A priority Critical patent/CN115376317B/en
Publication of CN115376317A publication Critical patent/CN115376317A/en
Application granted granted Critical
Publication of CN115376317B publication Critical patent/CN115376317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0137Measuring and analyzing of parameters relative to traffic conditions for specific applications
    • G08G1/0145Measuring and analyzing of parameters relative to traffic conditions for specific applications for active traffic flow control
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Analytical Chemistry (AREA)
  • Theoretical Computer Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention belongs to the technical field of intelligent traffic, and particularly relates to a traffic flow prediction method based on a dynamic graph convolution and a time sequence convolution network, which comprises the following steps: acquiring traffic flow data to be predicted in the intersection node, and preprocessing the traffic flow data to be predicted; inputting the preprocessed traffic flow data into a trained traffic flow prediction model to obtain a traffic flow prediction result of the intersection node; traffic control is carried out on the intersection according to the traffic flow prediction result; the method can more completely extract the space-time characteristics of traffic flow data, improves the accuracy of traffic flow prediction, solves the problems of unstable model gradient, slow response of dynamic change and the like by adopting time sequence diagram convolution, and has important significance for relieving urban traffic jam and improving driving efficiency.

Description

Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network
Technical Field
The invention belongs to the technical field of intelligent traffic, and particularly relates to a traffic flow prediction method based on a dynamic graph convolution and a time sequence convolution network.
Background
Big data and artificial intelligence integrate intelligence into traffic construction, drive the development of intelligent traffic system (Intelligent Transportation System, ITS), ITS can realize intelligent traffic functions such as real-time data acquisition and analysis, real-time traffic control and dynamic traffic management. The traffic flow prediction is used as an important link of the ITS, and can realize real-time and dynamic prediction of traffic flow. The ITS can continuously predict the condition of the urban road in the future time through a traffic flow prediction technology, and can extract traffic jam events which can happen in advance, regulate and guide the traffic flow and keep the urban road smooth. The existing traffic flow prediction method uses the traffic flow of the adjacent road section in space of the urban road flow as an independent variable, utilizes the historical time sequence data to establish a prediction model, or uses the change in the change of the time dimension as the independent variable, adopts the most popular intelligent learning algorithm to perform prediction simulation, and lacks research and analysis for synchronizing the two dimensions of the time space; and secondly, the space-time characteristic extraction of the current traffic flow prediction method is insufficient, the spatial characteristic is extracted by a graph convolution neural network, a static graph is constructed, the relevance among nodes is represented by using a fixed weight, and the relevance among the nodes is ignored to dynamically change along with time.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a traffic flow prediction method based on a dynamic graph convolution and a time sequence convolution network, which comprises the following steps: acquiring traffic flow data to be predicted in the intersection node, and preprocessing the traffic flow data to be predicted; inputting the preprocessed traffic flow data into a trained traffic flow prediction model to obtain a traffic flow prediction result of the intersection node; traffic control is carried out on the intersection according to the traffic flow prediction result;
the process of training the traffic flow prediction model comprises the following steps:
s1: acquiring traffic data, preprocessing the traffic data, and taking the preprocessed traffic data as a training set;
s2: constructing a traffic map, and constructing a static adjacency matrix according to the traffic map;
s3: inputting the static adjacency matrix and the data in the training set into a graph learning module to obtain a dynamic adjacency matrix in the current traffic network;
s4: carrying out spatial feature extraction on the dynamic adjacent matrix by adopting a graph convolution neural network to obtain spatial features;
s5: performing time feature extraction on data in a training set by adopting a time sequence convolutional neural network to obtain time sequence features;
s6: fusing the time sequence features and the space features to obtain information of the state of the space-time feature covered by the input data;
s7: and calculating a loss function of the model, and completing training of the model when the loss function is minimum.
Preferably, the process of preprocessing traffic data includes: constructing a traffic data anomaly screening rule, and screening traffic data according to the traffic data anomaly screening rule to obtain anomaly data; and repairing the abnormal data to obtain preprocessed data.
Further, the traffic data anomaly screening rule includes: traffic data includes speed, flow, occupancy of vehicle traffic; the abnormal data comprise data that the speed, the flow and the occupancy of the vehicle flow are all negative values, the flow exceeds the traffic capacity of a lane and the occupancy exceeds 100%, only one of the speed, the flow and the occupancy is not zero, only the flow and the occupancy are not zero or only the speed and the occupancy are not zero, and the traffic data index calculated through an index algorithm does not reach a corresponding threshold value.
Preferably, the process of constructing the static adjacency matrix includes:
s21: obtaining a road network structure diagram, obtaining all roads meeting the space neighbor condition in the road network structure diagram, and constructing a traffic diagram G= (V, E) according to the roads meeting the space neighbor condition sp ) The method comprises the steps of carrying out a first treatment on the surface of the Roads meeting spatial neighbor conditions include road V i With road V j Is commonly connected to the same road intersection, then the road V i With road V j The space neighbor condition is satisfied; wherein V represents N road sets, E sp Representing connectivity between real space roads;
s22: and calculating the geographic distance between the road i and the road j, calculating the weight of the edge of the road i and the edge of the road j according to the geographic distance between the road i and the road j, and constructing a space adjacency matrix by taking the edge weight as an element.
Preferably, the process of processing the static adjacency matrix and the data in the training set by adopting the graph learning module comprises the following steps:
s31: acquiring traffic data X of the first h time lengths of N roads in a training set;
s32: constructing projection matrix P E R h×d Wherein h is the first h time lengths selected, and d is the dimension of the weight vector parameter;
s33: multiplying the traffic data X with the projection matrix so that the traffic data is converted into traffic matrix data;
s34: and inputting the traffic matrix data and the static adjacency matrix into a graph learning module to obtain a dynamic adjacency matrix in the current traffic network.
Further, the formula for processing the traffic matrix data and the static adjacency matrix by adopting the graph learning module is as follows:
wherein A is ij Representing a dynamic adjacency matrix, f representing a neural network,traffic matrix data representing road i, +.>Representing traffic matrix data at road j, S representing a static adjacency matrix, S ij Representing elements in the spatial adjacency matrix S, reLU representing the activation function, K T Representing weight vector parameters, N representing the number of roads in the current road network, S ir Representing a fixed adjacency matrix for road i and road r.
Preferably, the formula for extracting the spatial features of the dynamic adjacent matrix by adopting the graph convolution neural network is as follows:
wherein I is an identity matrix,is->Is the degree matrix of each layer, H is the characteristic of each layer, H (l) Is the output of layer I, W (l) The parameters of the layer i are included, and sigma (·) represents the nonlinear activation function of the nonlinear model.
Preferably, the process of extracting the time characteristics of the data by using the time sequence convolutional neural network comprises the following steps:
s51: processing the input time series data by adopting a multi-layer self-attention model to obtain the characteristics of different subspaces;
s52: combining the features of each subspace;
s53: and carrying out convolution treatment on the combined spatial features by adopting expansion convolution of multiple layers of TCNs, and keeping the time sequence length unchanged by adopting a zero filling strategy for each layer to obtain the time high-dimensional features.
Preferably, a time sequence convolutional neural network is adopted to extract time characteristics of data in a training set:
processing the input time series data by adopting a multi-layer self-attention model to obtain the characteristics of different subspaces;
combining the features of each subspace; the calculation formula is as follows:
MultiHead(Q,K,V)=Contact(head 1 ,…,head n )W c
head i =Attention(Q i ,K i ,V i )
Q i =XW i Q ,K i =XW i K ,V i =XW i V
where Q, K, V is the three subspaces of the single-attention model derived from the same input X,wherein d is q 、d k 、d v Representing the dimensions of Q, K, V, respectively. N is the number of road nodes, N is the number of attention models, c is the semantic representation vector, W Q 、W k 、W v And representing a learnable parameter matrix, wherein T is T historical traffic flow parameters.
And carrying out convolution treatment on the combined spatial features by adopting expansion convolution of multiple layers of TCNs, and keeping the time sequence length unchanged by adopting a zero filling strategy for each layer to obtain the time high-dimensional features.
The expansion convolution of TCN adopts zero filling strategy to keep the time sequence length unchanged, uses the same convolution kernel for all elements in the output sequence, and the calculation formula of TCN is as follows:
Y tcn =θ* d X
wherein, is d The expansion convolution is performed, d is the expansion rate, and θ is the time convolution kernel. Then at t the road node V on the p-th channel i TCN result y of (2) i,t,p Expressed as:
wherein d is the expansion ratio, θ a,z,p Is an element of the convolution kernel and constitutes a temporal convolution kernelWherein A is τ Representing the kernel length, P' represents the number of output channels, and z refers to the dimension.
Using multilayer TCN superposition, when expandedThe receptive field on the inter-axis gets more output. To expand the receptive field, the expansion rate increases at an exponential rate, i.e., d l =2 l-1 . The output of the multi-headed self-attention time convolution network of the l-th layer is
Wherein, when l=0 is the input layer, the input of the network is the output of the multi-head self-attention model, X∈R T×N×P ,θ l ∈R T ×N×p′ Is the expanded convolution kernel of TCN, sigma (&) is a nonlinear function, and T is the number of historical traffic flow parameters.
Preferably, the fused high-dimensional spatiotemporal features are:
Y i =W tcn ·Y i tcn +W H ·Y i H
wherein W is tcn And W is H Weights of high-dimensional features in time and space, respectively, Y i tcn 、Y i H Respectively represent nodes V to be aggregated i Is a high dimensional feature in time and space.
The invention has the beneficial effects that:
according to the invention, a graph learning module is introduced into the graph convolution neural network, so that the graph learning module dynamically changes along with the change of the traffic condition of an actual road network, the spatial characteristics of urban traffic flow are more comprehensively described, a multi-head attention mechanism is adopted before a time sequence convolution network, and the time sequence state influence of historical traffic is re-weighted, so that the global change trend of traffic state is captured; the invention can effectively extract the space-time characteristics of traffic flow and improve the prediction precision of traffic flow.
Drawings
FIG. 1 is a general flow chart of a traffic flow control method based on a time graph rolling network of the present invention;
fig. 2 is a flow chart of preprocessing traffic data according to the present invention.
FIG. 3 is a diagram of a multi-headed attention model of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
A traffic flow prediction method based on a dynamic graph convolution and time sequence convolution network, the method comprising: acquiring traffic flow data to be predicted in the intersection node, and preprocessing the traffic flow data to be predicted; inputting the preprocessed traffic flow data into a trained traffic flow prediction model to obtain a traffic flow prediction result of the intersection node; and controlling the traffic of the intersection according to the traffic flow prediction result.
A method of training a traffic flow prediction model, as shown in fig. 1, the method comprising:
s1: acquiring traffic data, preprocessing the traffic data, and taking the preprocessed traffic data as a training set;
s2: constructing a traffic map, and constructing a static adjacency matrix according to the traffic map;
s3: inputting the static adjacency matrix and the data in the training set into a graph learning module to obtain a dynamic adjacency matrix in the current traffic network;
s4: carrying out spatial feature extraction on the dynamic adjacent matrix by adopting a graph convolution neural network to obtain spatial features;
s5: performing time feature extraction on data in a training set by adopting a time sequence convolutional neural network to obtain time sequence features;
s6: fusing the time sequence features and the space features to obtain information of the state of the space-time feature covered by the input data;
s7: and calculating a loss function of the model, and completing training of the model when the loss function is minimum.
The graph learning module adopted by the invention judges the current relevance according to the connectivity of the data and the current speed; if the traffic flow is large, the correlation is large; the opposite would result in inaccurate spatial characteristics if the roads are connected, but the traffic flow is small, if he is still considered to be highly relevant, and the specific way each user obtains the dynamic spatial relationship is different.
As shown in fig. 2, the process of preprocessing traffic data includes: constructing a traffic data anomaly screening rule, and screening traffic data according to the traffic data anomaly screening rule to obtain anomaly data; and repairing the abnormal data to obtain preprocessed data. The traffic data anomaly screening rule comprises the following steps: traffic data includes speed, flow, occupancy of vehicle traffic; the abnormal data comprise data that the speed, the flow and the occupancy of the vehicle flow are all negative values, the flow exceeds the traffic capacity of a lane and the occupancy exceeds 100%, only one of the speed, the flow and the occupancy is not zero, only the flow and the occupancy are not zero or only the speed and the occupancy are not zero, and the traffic data index calculated through an index algorithm does not reach a corresponding threshold value.
The process for repairing the screened abnormal data according to different missing conditions comprises the following steps:
(1) Repairing based on historical data: because the traffic flow has a certain periodicity, the traffic data of different dates and same time points can be used for repairing.
(2) Repair based on time series:
wherein alpha is i-1 Indicating the square at time i-1Path parameters, x i-1 The traffic flow data at time i-1 is represented, and k represents the length of time.
(3) Spatial correlation based repair:
wherein, the liquid crystal display device comprises a liquid crystal display device,the traffic data repaired at the moment i; x is x i-T The detection value is i-T moment; />Repairing data of the position j for the position m and the position n; k, alpha i ,γ 0 ,γ 1 ,γ 2 Is an equation parameter; x is x i (m),x i (n) is the detection value of position m and position n; />The final repair value for detector j.
The specific operation of constructing the static space adjacency matrix comprises the following steps:
step 1: if the road V i With road V j When the two roads are connected together at the same road intersection, the two roads are defined as space neighbors, and the roads meeting the space neighbor condition in the road network form a traffic map G= (V, E) sp );
Where V is the N sets of roads in the area, referred to as road nodes; e (E) sp Representing connectivity between real space roads.
Step 2: space adjacency matrix according to E sp Edges are constructed with S.epsilon.R N×N And (3) representing. S is S ij As elements in the spatial adjacency matrix S, the current path V i With road V j The value is when sharing the same road intersectionOtherwise, 0.
Wherein S is ij Weights d for road i and road j edges ij The geographical distance is for road i and road j. σ is the standard deviation of the distance between nodes and e is the threshold that controls sparsity.
The specific operation of learning the adjacency matrix by using the graph learning module to acquire the dynamic spatial relationship of the current traffic network comprises the following steps:
step 1: traffic data x= (X) for the first h time lengths of N roads are known 1 ,x 2 ,…,x N ) T ∈R N×h
Step 2: multiplying the input data X by the projection matrix P εR h×d Carrying out data preprocessing;
wherein x is i ∈R h (i∈[1,N]) For a speed sequence of road i, i is the order of the road; the weight vector parameter K is a learnable parameter, k= (K) 1 ,k 2 ,…,k d ) T ∈R d×1 The method comprises the steps of carrying out a first treatment on the surface of the T represents the transpose.
Step 3: the preprocessed data and the fixed adjacency matrix S are input into a single neural network, and the current adjacency matrix is learned. The output dynamic adjacency matrix of the graph learning module is as follows:
wherein A is ij Representing a dynamic adjacency matrix, f representing a neural network,traffic matrix data representing road i, +.>Representing traffic matrix data at road j, S representing a static adjacency matrix, S ij Representing elements in the spatial adjacency matrix S, reLU representing the activation function, K T Representing weight vector parameters, N representing the number of roads in the current road network, S ir Representing a fixed adjacency matrix for road i and road r. ReLU (x) =max (0, x) is an activation function, ensuring a ij Not less than 0; the Softmax function is used to ensure that the row sum of the graph learning modules is 1.
The specific operation of extracting spatial and temporal feature information of traffic flow data by using a graph convolutional neural network (GCN) and a time sequence convolutional network respectively comprises the following steps:
step 1: constructing a feature matrix X epsilon R according to the features of all points in the graph N×D Wherein N is the number of nodes, and D is the feature number of each node;
step 2: carrying out graph convolution operation on the feature matrix and the dynamic space adjacent matrix, wherein the transfer process between GCN layers is as follows:
wherein the method comprises the steps ofI is the identity matrix, ">Is->Degree matrix of->H is a feature of each layer, H (l) Is the input of layer IAnd (5) outputting. If l is the input layer, H is the feature matrix X. W (W) (l) The parameters of the layer l are included, and sigma (·) represents the nonlinear activation function of the nonlinear model: sigmoid function.
The time sequence convolution is adopted to acquire the time sequence characteristics, and is different from other time sequence characteristics, and the time sequence convolution has the advantages over other time sequence characteristic extraction in that the time sequence convolution can process the whole sequence in a large scale in parallel, can generate stable gradient, has shorter time consumption and higher processing speed.
Step 3: the time sequence convolutional neural network is adopted to extract the time characteristics of the data, namely, the multi-head self-attention model is used for preprocessing the time sequence data, the characteristics of different subspaces are learned, richer potential information is obtained, and the TCN is used for extracting the time characteristics of the processed time sequence data, so that local and remote time dependence is captured, as shown in figure 3. The specific process comprises the following steps:
s51: processing the input time series data by adopting a multi-layer self-attention model to obtain the characteristics of different subspaces;
s52: combining the features of each subspace; the calculation formula is as follows:
MultiHead(Q,K,V)=Contact(head 1 ,…,head n )W c
head i =Attention(Q i ,K i ,V i )
Q i =XW i Q ,K i =XW i K ,V i =XW i V
where Q, K, V is the three subspaces of the single-attention model derived from the same input X,wherein d is q 、d k 、d v Representing the dimensions of Q, K, V, respectively. N is road sectionThe number of points, n is the number of attention models, c is the semantic representation vector, W Q 、W k 、W v And representing a learnable parameter matrix, wherein T is T historical traffic flow parameters.
S53: and carrying out convolution treatment on the combined spatial features by adopting expansion convolution of multiple layers of TCNs, and keeping the time sequence length unchanged by adopting a zero filling strategy for each layer to obtain the time high-dimensional features.
The expansion convolution of TCN adopts zero filling strategy to keep the time sequence length unchanged, uses the same convolution kernel for all elements in the output sequence, and the calculation formula of TCN is as follows:
Y tcn =θ* d X
wherein, is d The expansion convolution is performed, d is the expansion rate, and θ is the time convolution kernel. Then at t the road node V on the p-th channel i TCN result y of (2) i,t,p Expressed as:
wherein d is the expansion ratio, θ a,z,p Is an element of the convolution kernel and constitutes a temporal convolution kernelWherein A is τ Representing the kernel length, P' represents the number of output channels, and z refers to the dimension.
And the receptive field on the time axis is enlarged by using multi-layer TCN superposition, so that more output is obtained. To expand the receptive field, the expansion rate increases at an exponential rate, i.e., d l =2 l-1 . The output of the multi-headed self-attention time convolution network of the l-th layer is
Wherein, when l=0 is the input layer, the input of the network is the output of the multi-head self-attention model, X∈R T×N×P ,θ l ∈R T ×N×p′ Is the expanded convolution kernel of TCN, sigma (&) is a nonlinear function, and T is the number of historical traffic flow parameters.
The fused high-dimensional space-time features are as follows:
Y i =W tcn ·Y i tcn +W H ·Y i H
wherein W is tcn And W is H Weights of high-dimensional features in time and space, respectively, Y i tcn 、Y i H Respectively represent nodes V to be aggregated i Is a high dimensional feature in time and space.
The weights of the acquired temporal and spatial high-dimensional features include computing variances of the prediction results of the combined intra-prediction model, and determining weights of the prediction model using a minimum variance criterion.
The loss function of the model adopts a mean square error MSE, namely, a predicted value and a true value are continuously compared, a back propagation algorithm is used for continuously optimizing the neural network parameter, and when the iteration number reaches a set value or the loss function value is smaller than a set threshold value, the optimal solution of the network parameter is obtained, wherein the loss function is as follows:
wherein Y ε R n×N×M Is the actual value, Y' ∈R n×N×M Is the predicted value and n is the number of training samples in the batch.
While the foregoing is directed to embodiments, aspects and advantages of the present invention, other and further details of the invention may be had by the foregoing description, it will be understood that the foregoing embodiments are merely exemplary of the invention, and that any changes, substitutions, alterations, etc. which may be made herein without departing from the spirit and principles of the invention.

Claims (7)

1. A traffic flow prediction method based on a dynamic graph convolution and time sequence convolution network, the method comprising: acquiring traffic flow data to be predicted in the intersection node, and preprocessing the traffic flow data to be predicted; inputting the preprocessed traffic flow data into a trained traffic flow prediction model to obtain a traffic flow prediction result of the intersection node; traffic control is carried out on the intersection according to the traffic flow prediction result;
the process of training the traffic flow prediction model comprises the following steps:
s1: acquiring traffic data, preprocessing the traffic data, and taking the preprocessed traffic data as a training set;
s2: constructing a traffic map, and constructing a static adjacency matrix according to the traffic map;
s3: inputting the static adjacency matrix and the data in the training set into a graph learning module to obtain a dynamic adjacency matrix in the current traffic network;
s4: carrying out spatial feature extraction on the dynamic adjacent matrix by adopting a graph convolution neural network to obtain spatial features; the formula for extracting the spatial features of the dynamic adjacency matrix is as follows:
wherein I is an identity matrix,is->Is the degree matrix of each layer, H is the characteristic of each layer, H (l) Is the output of layer I, W (l) The nonlinear activation function of the nonlinear model is represented by sigma (·) which contains l-layer parameters;
s5: performing time feature extraction on data in a training set by adopting a time sequence convolutional neural network to obtain time sequence features; the method specifically comprises the following steps:
s51: processing the input time series data by adopting a multi-layer self-attention model to obtain the characteristics of different subspaces;
s52: combining the features of each subspace;
s53: carrying out convolution treatment on the combined spatial features by adopting expansion convolution of a plurality of layers of TCNs, and keeping the time sequence length unchanged by adopting a zero filling strategy for each layer to obtain time high-dimensional features;
s6: fusing the time sequence features and the space features to obtain information of the state of the space-time feature covered by the input data; the formula for fusing the time sequence characteristic and the space characteristic is as follows:
Y i =W tcn ·Y i tcn +W H ·Y i H
wherein W is tcn And W is H Weights of high-dimensional features in time and space, respectively, Y i tcn 、Y i H Respectively represent road nodes V to be aggregated i Is a high dimensional feature in time and space;
s7: and calculating a loss function of the model, and completing training of the model when the loss function is minimum.
2. The traffic flow prediction method based on the dynamic graph convolution and time sequence convolution network according to claim 1, wherein the process of preprocessing traffic data comprises the following steps: constructing a traffic data anomaly screening rule, and screening traffic data according to the traffic data anomaly screening rule to obtain anomaly data; and repairing the abnormal data to obtain preprocessed data.
3. The traffic flow prediction method based on the dynamic graph convolution and time sequence convolution network according to claim 2, wherein the traffic data anomaly screening rule comprises: traffic data includes speed, flow, occupancy of vehicle traffic; the abnormal data comprise data that the speed, the flow and the occupancy of the vehicle flow are all negative values, the flow exceeds the traffic capacity of a lane and the occupancy exceeds 100%, only one of the speed, the flow and the occupancy is not zero, only the flow and the occupancy are not zero or only the speed and the occupancy are not zero, and the traffic data index calculated through an index algorithm does not reach a corresponding threshold value.
4. The traffic flow prediction method based on dynamic graph convolution and time sequence convolution network according to claim 1, wherein the process of constructing a static adjacency matrix comprises:
s21: obtaining a road network structure diagram, obtaining all roads meeting the space neighbor condition in the road network structure diagram, and constructing a traffic diagram G= (V, E) according to the roads meeting the space neighbor condition sp ) The method comprises the steps of carrying out a first treatment on the surface of the Roads meeting spatial neighbor conditions include road V i With road V j Are commonly connected at the same road intersection, wherein V represents N road sets, E sp Representing connectivity between real space roads;
s22: calculated road V i And road V j And (3) geographic distance, calculating weights of the edges of the road i and the road j according to the geographic distance of the road i and the road j, and constructing a space adjacency matrix by taking the edge weights as elements.
5. The traffic flow prediction method based on dynamic graph convolution and time sequence convolution network according to claim 1, wherein the process of processing the static adjacency matrix and the data in the training set by using the graph learning module comprises:
s31: acquiring traffic data X of the first h time lengths of N roads in a training set;
s32: constructing projection matrix P E R h×d Wherein h is the first h time lengths selected, and d is the dimension of the weight vector parameter;
s33: multiplying the traffic data X with the projection matrix so that the traffic data is converted into traffic matrix data;
s34: and inputting the traffic matrix data and the static adjacency matrix into a graph learning module to obtain a dynamic adjacency matrix in the current traffic network.
6. The traffic flow prediction method based on the dynamic graph convolution and time sequence convolution network according to claim 5, wherein the formula for processing the traffic matrix data and the static adjacency matrix by using the graph learning module is as follows:
wherein A is ij Representing a dynamic adjacency matrix, f representing a neural network,representing the ith road V i Traffic matrix data at ∈10->Represents the jth road V j Traffic matrix data at the location, S represents a static adjacency matrix, S ij Representing elements in the spatial adjacency matrix S, reLU representing the activation function, K T Representing weight vector parameters, N representing the number of roads in the current road network, S ir Representing the ith road V i And the (r) th road V r Is provided for the fixed adjacency matrix.
7. The traffic flow prediction method based on the dynamic graph convolution and time sequence convolution network according to claim 1, wherein the loss function of the model is:
wherein Y εR n×N×M Is the actual value, Y ∈R n×N×M Is the predicted value and n is the number of training samples in the batch.
CN202211004685.8A 2022-08-22 2022-08-22 Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network Active CN115376317B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211004685.8A CN115376317B (en) 2022-08-22 2022-08-22 Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211004685.8A CN115376317B (en) 2022-08-22 2022-08-22 Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network

Publications (2)

Publication Number Publication Date
CN115376317A CN115376317A (en) 2022-11-22
CN115376317B true CN115376317B (en) 2023-08-11

Family

ID=84067163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211004685.8A Active CN115376317B (en) 2022-08-22 2022-08-22 Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network

Country Status (1)

Country Link
CN (1) CN115376317B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116415928B (en) * 2023-03-06 2023-11-17 武汉理工大学 Urban waterlogging traffic network rapid restoration method and system based on deep learning
CN117116051B (en) * 2023-10-25 2023-12-22 深圳市交投科技有限公司 Intelligent traffic management system and method based on artificial intelligence

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674987A (en) * 2019-09-23 2020-01-10 北京顺智信科技有限公司 Traffic flow prediction system and method and model training method
CN112053560A (en) * 2020-08-27 2020-12-08 武汉理工大学 Short-time traffic flow prediction method, system and storage medium based on neural network
CN113380025A (en) * 2021-05-28 2021-09-10 长安大学 Vehicle driving quantity prediction model construction method, prediction method and system
CN114220271A (en) * 2021-12-21 2022-03-22 南京理工大学 Traffic flow prediction method, equipment and storage medium based on dynamic space-time graph convolution cycle network
CN114495492A (en) * 2021-12-31 2022-05-13 中国科学院软件研究所 Traffic flow prediction method based on graph neural network
CN114565124A (en) * 2022-01-12 2022-05-31 武汉理工大学 Ship traffic flow prediction method based on improved graph convolution neural network
CN114566048A (en) * 2022-03-03 2022-05-31 重庆邮电大学 Traffic control method based on multi-view self-adaptive space-time diagram network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674987A (en) * 2019-09-23 2020-01-10 北京顺智信科技有限公司 Traffic flow prediction system and method and model training method
CN112053560A (en) * 2020-08-27 2020-12-08 武汉理工大学 Short-time traffic flow prediction method, system and storage medium based on neural network
CN113380025A (en) * 2021-05-28 2021-09-10 长安大学 Vehicle driving quantity prediction model construction method, prediction method and system
CN114220271A (en) * 2021-12-21 2022-03-22 南京理工大学 Traffic flow prediction method, equipment and storage medium based on dynamic space-time graph convolution cycle network
CN114495492A (en) * 2021-12-31 2022-05-13 中国科学院软件研究所 Traffic flow prediction method based on graph neural network
CN114565124A (en) * 2022-01-12 2022-05-31 武汉理工大学 Ship traffic flow prediction method based on improved graph convolution neural network
CN114566048A (en) * 2022-03-03 2022-05-31 重庆邮电大学 Traffic control method based on multi-view self-adaptive space-time diagram network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向交通流预测的双分支时空图卷积神经网络;刘赏;《信息与控制》;1-15 *

Also Published As

Publication number Publication date
CN115376317A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
US11270579B2 (en) Transportation network speed foreeasting method using deep capsule networks with nested LSTM models
CN109887282B (en) Road network traffic flow prediction method based on hierarchical timing diagram convolutional network
CN110570651B (en) Road network traffic situation prediction method and system based on deep learning
CN111832814B (en) Air pollutant concentration prediction method based on graph attention mechanism
CN109492822B (en) Air pollutant concentration time-space domain correlation prediction method
CN115376317B (en) Traffic flow prediction method based on dynamic graph convolution and time sequence convolution network
CN113313947B (en) Road condition evaluation method of short-term traffic prediction graph convolution network
Yan et al. Spatial-temporal chebyshev graph neural network for traffic flow prediction in iot-based its
CN115578852B (en) DSTGCN-based traffic prediction method
CN106529818A (en) Water quality evaluation prediction method based on fuzzy wavelet neural network
CN112949828A (en) Graph convolution neural network traffic prediction method and system based on graph learning
Huang et al. A GAN framework-based dynamic multi-graph convolutional network for origin–destination-based ride-hailing demand prediction
CN114925836A (en) Urban traffic flow reasoning method based on dynamic multi-view graph neural network
CN115392554A (en) Track passenger flow prediction method based on depth map neural network and environment fusion
CN113988263A (en) Knowledge distillation-based space-time prediction method in industrial Internet of things edge equipment
CN116311921A (en) Traffic speed prediction method based on multi-spatial scale space-time converter
Liu et al. A method for short-term traffic flow forecasting based on GCN-LSTM
Sun et al. Ada-STNet: A Dynamic AdaBoost Spatio-Temporal Network for Traffic Flow Prediction
CN117494034A (en) Air quality prediction method based on traffic congestion index and multi-source data fusion
CN117131991A (en) Urban rainfall prediction method and platform based on hybrid neural network
CN116978218A (en) Urban traffic flow prediction method, system and equipment based on generation countermeasure network
CN116486611A (en) Urban road vehicle speed prediction method
CN116187561A (en) PM (particulate matter) based on space time domain convolution network 10 Concentration refinement prediction method
Bhaumik et al. STLGRU: Spatio-temporal lightweight graph GRU for traffic flow prediction
Su et al. Graph ode recurrent neural networks for traffic flow forecasting

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