CN114743374B - Multi-element traffic flow prediction method based on graph network - Google Patents

Multi-element traffic flow prediction method based on graph network Download PDF

Info

Publication number
CN114743374B
CN114743374B CN202210349264.2A CN202210349264A CN114743374B CN 114743374 B CN114743374 B CN 114743374B CN 202210349264 A CN202210349264 A CN 202210349264A CN 114743374 B CN114743374 B CN 114743374B
Authority
CN
China
Prior art keywords
traffic flow
graph
network
road
nodes
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
CN202210349264.2A
Other languages
Chinese (zh)
Other versions
CN114743374A (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.)
Shenzhen International Graduate School of Tsinghua University
Original Assignee
Shenzhen International Graduate School of Tsinghua University
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 Shenzhen International Graduate School of Tsinghua University filed Critical Shenzhen International Graduate School of Tsinghua University
Priority to CN202210349264.2A priority Critical patent/CN114743374B/en
Publication of CN114743374A publication Critical patent/CN114743374A/en
Application granted granted Critical
Publication of CN114743374B publication Critical patent/CN114743374B/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Human Resources & Organizations (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Strategic Management (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Analytical Chemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a multivariate traffic flow prediction method based on a graph network, which comprises the following steps: s1, acquiring multi-element traffic flow historical data for traffic flow prediction; s2, respectively constructing an independent dynamic relation graph for each traffic flow attribute based on the multivariate traffic flow historical data; s3, fusing the dynamic relationship graphs of the traffic flow attributes and converting the fused dynamic relationship graphs into a fused dynamic relationship graph network with the attributes mutually linked; s4, based on the fusion dynamic relational graph network, learning potential space dependency relationships among traffic flow attributes and road sections by using a graph attention network, extracting space dependency characteristics, and constructing a multi-element traffic flow prediction model based on the graph network; s5, training the multi-element traffic flow prediction model based on the graph network; and S6, carrying out short-time traffic flow prediction according to the multi-element traffic flow prediction model obtained through training.

Description

Multi-element traffic flow prediction method based on graph network
Technical Field
The invention relates to the technical field of deep learning, in particular to a multivariate traffic flow prediction method based on a graph network.
Background
The traffic flow prediction is a key problem in the construction of an intelligent traffic system, and the accurate traffic flow prediction has important practical significance for improving the road co-operation efficiency and promoting energy conservation and emission reduction.
At present, a plurality of traffic flow prediction methods are proposed by a plurality of researchers, and the prediction method mainly comprises the step of researching the traffic flow prediction problem from the aspects of time characteristics, space-time dependence and the like of the traffic flow.
The main characteristic attributes of the traffic flow comprise three aspects of traffic flow, average speed and road occupancy rate, which are closely related and different, and most of the current traffic flow prediction methods predict one of the attributes and do not reflect the overall condition of the traffic flow comprehensively.
Traffic flow in the real world often exhibits a high degree of dependency between multiple attributes (flow, speed, etc.), multiple variables (multiple road segments in a road network). Some prediction methods rely on deep learning methods of complex structures, package learning is performed on interaction between multiple attributes and multiple variables by combining multiple network structures, complex space-time characteristics of traffic flow are mined, potential dependency relationships between the attributes and the variables are difficult to fully utilize, and the structures of deep learning prediction networks are often complicated.
Most of the existing methods are difficult to learn the potential spatial dependency relationship between traffic flow attributes and road sections completely and autonomously, if a good prediction effect is to be achieved, the spatial dependency characteristics are often acquired better according to the prior knowledge of the existing spatial structure or domain experts, for example, by means of the prior road network structure, and the prediction algorithm for model autonomous learning of the road section spatial dependency relationship is few under the condition of no prior knowledge.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a multivariate traffic flow prediction method based on a graph network, which can realize more accurate prediction of short-time traffic flow by independently learning the spatial dependence between traffic flow attributes and road sections of multivariate traffic flow by a model under the condition of no prior knowledge.
A multivariate traffic flow prediction method based on a graph network comprises the following steps: s1, acquiring multi-element traffic flow historical data for traffic flow prediction; s2, respectively constructing an independent dynamic relation graph for each traffic flow attribute based on the multivariate traffic flow historical data; s3, fusing the dynamic relationship graphs of the traffic flow attributes and converting the fused dynamic relationship graphs into a fused dynamic relationship graph network with the attributes mutually linked; s4, based on the fusion dynamic relational graph network, learning potential space dependency relationships among traffic flow attributes and road sections by using a graph attention network, extracting space dependency characteristics, and constructing a multi-element traffic flow prediction model based on the graph network; s5, training the multi-element traffic flow prediction model based on the graph network; and S6, carrying out short-time traffic flow prediction according to the multi-element traffic flow prediction model obtained through training.
Further, in step S1, the multiple traffic flow history number is obtainedThe method comprises the following steps: obtaining time interval of all road sections in road network [1,T ]]In the multivariate traffic flow historical data, X = [ X ] in time series 1 ,X 2 ,…,X T ]Represents; wherein the content of the first and second substances,
Figure BDA0003578728440000021
the traffic, average speed and road section occupancy of all road sections in the road network at the time t are shown, and t belongs to [1,T ]]And n represents the number of links. />
Further, step S1 further includes preprocessing the multivariate traffic flow history data as follows: extracting multivariate traffic flow historical data at t moment
Figure BDA0003578728440000022
As an input, the actual value of the characteristic of the traffic flow of the respective section at the time t +1 ≥ s>
Figure BDA0003578728440000023
As a label.
Further, step S2 includes: aiming at three traffic flow attributes of flow, average speed and road section occupancy rate, a self-attention mechanism is respectively used for learning the mutual adjacency relation among road section nodes, the attention score between two road section nodes is used as the weight of a connecting edge between the nodes in a dynamic relation graph, and the independent dynamic relation graph of each traffic flow attribute is obtained.
Further, step S2 includes: taking the road sections as nodes of the dynamic relationship graph, and calculating the attention scores of any two road section nodes by the following method:
Figure BDA0003578728440000024
Figure BDA0003578728440000025
Figure BDA0003578728440000026
wherein the content of the first and second substances,
Figure BDA0003578728440000027
representing a link node N i And N j Attention scores in flow, average speed and road occupancy, i, j =1,2, …, n, respectively; />
Figure BDA0003578728440000028
And &>
Figure BDA0003578728440000029
All are matrixes used for linear transformation and also learnable parameters of the model, and the dimensionalities of the matrixes are d k ,· T Representing a matrix transposition; />
Figure BDA0003578728440000031
Respectively representing road section nodes N j Flow, mean speed and road segment occupancy at time t->
Figure BDA0003578728440000032
Respectively representing road section nodes N i The flow, the average speed and the road section occupancy at the moment t; and taking the attention score between the two road section nodes as the weight of a connecting edge between the nodes in the dynamic relation graph to obtain the dynamic relation graph of the flow, the average speed and the road section occupancy, and respectively recording the dynamic relation graph as follows: g q ,G k ,G v ;/>
Figure BDA0003578728440000033
I.e. representing the link node N i And N j In-flow dynamic relationship graph G q Weights on well-linked sides>
Figure BDA0003578728440000034
I.e. representing link nodes N i And N j At average speed dynamics graph G k The weight of the middle connected side is greater than or equal to>
Figure BDA0003578728440000035
I.e. representing link nodes N i And N j Dynamic relation graph G of road section occupancy v The weight of the middle connecting edge.
Further, step S3 includes: for any two road segment nodes N i And N j According to
Figure BDA0003578728440000036
Calculating two road section nodes N i And N j The adjacent relation in the network of the converged dynamic relational graph is obtained; the calculation formula of the adjacency relation is as follows:
Figure BDA0003578728440000037
wherein the content of the first and second substances,
Figure BDA0003578728440000038
representing road segment nodes N in a converged dynamic relationship graph network i And N j In a neighboring relationship of->
Figure BDA0003578728440000039
A value of 0 represents a link node N in the converged dynamic relationship graph network i And N j Has no correlation therebetween, is selected>
Figure BDA00035787284400000310
A value of 1 represents a road segment node N in the converged dynamic relationship graph network i And N j There is a correlation between them; thereby obtaining the fused dynamic relation graph network G f Expressed as follows:
Figure BDA00035787284400000311
where n represents the number of nodes, i.e., the number of links.
Further, step S4 includes: the graph attention network is calculated as follows:
Figure BDA00035787284400000312
Figure BDA0003578728440000041
wherein alpha is ij Denotes the attention coefficient, exp denotes the exponential function, leakyRelu denotes the nonlinear activation function, σ denotes the sigmoid activation function, W and a T All represent a weight matrix of the linear transformation, h i ,h j Respectively representing road section nodes N in the graph attention network i And N j Is input by the user, | | represents the splicing operation on the vector, H i Representing a link node N i Neighbor nodes in a graph attention network, h i ' Note the graph attention network vs. road segment node N i The neighbor node information is aggregated and then output space dependence characteristics are obtained; and inputting the spatial dependence characteristics extracted by the graph attention network into a 1 x 1 convolutional layer, outputting the convolutional layer as a multivariate traffic flow prediction result, and constructing a multivariate traffic flow prediction model based on the graph network.
Further, step S5 includes: training a multi-element traffic flow prediction model based on a graph network by using multi-element traffic flow historical data, wherein one part of data is used as a training set, and the other part of data is used as a verification set; inputting the training set into a model, training the model according to a loss function:
Figure BDA0003578728440000042
wherein n is the number of road segments in the road network, and T is the number of time intervals included in the training set;
Figure BDA0003578728440000043
representing a link node N i Flow, average speed and road segment occupancy at time t; />
Figure BDA0003578728440000044
Representation model to road segment node N i Predicted values of flow, average speed and road section occupancy at time t; selecting an optimal prediction model using the validation set a predetermined number of times per iteration; and stopping training after the iteration times reach 100 times to obtain the optimal multi-element traffic flow prediction model based on the graph network.
Further, still include: and evaluating the prediction effect by using the root mean square error on the traffic flow prediction result.
The present invention further provides a computer readable storage medium, on which a computer program is stored, wherein the computer program is executed by a processor to implement the aforementioned method for predicting multivariate traffic flow.
The technical scheme of the invention has the beneficial effects that: forecasting is carried out by jointly considering the dependency relationship of various attributes such as the flow, the average speed, the road section occupancy rate and the like of the traffic flow, so that more space dependency information is considered by the model, and the traffic flow state is more comprehensively depicted by the forecasting result; constructing a dynamic space-time relation graph under the condition of no prior knowledge of a road network spatial structure, and autonomously learning spatial dependence relations among traffic flow attributes and road sections; the degree of dependence between traffic flow segments can be quantified by the weight of the node edges, making the network under study explanatory.
Drawings
FIG. 1 is a flow chart of a multivariate traffic flow prediction method based on graph network according to an embodiment of the invention;
FIG. 2 is a diagram of a multivariate traffic flow prediction model network architecture based on a graph network according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described with reference to the accompanying drawings and specific embodiments.
The embodiment of the invention provides a multivariate traffic flow prediction method based on a graph network, and with reference to a graph 1, the method comprises the following steps of S1-S6:
s1, acquiring multivariate traffic flow historical data for traffic flow prediction.
Acquisition for trafficThe flow prediction multivariate traffic flow historical data is actually a time sequence and is marked as X = [ X = [) 1 ,X 2 ,…,X T ]The time sequence represents the time interval of all road sections in the road network [1,T ]]The traffic flow data of (2) includes data of three traffic flow attributes of a flow rate, an average speed, and a link occupancy. Wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003578728440000051
the traffic, average speed and road section occupancy of all road sections in the road network at the time t are shown, and t belongs to [1,T ]]And n represents the number of links.
Then, preprocessing the acquired historical data: extracting multivariate traffic flow historical data at t moment
Figure BDA0003578728440000052
As an input, the actual value of the characteristic of the traffic flow of the respective section at the time t +1 ≥ s>
Figure BDA0003578728440000053
As a label.
And S2, respectively constructing an independent dynamic relation graph for each traffic flow attribute based on the multivariate traffic flow historical data.
Describing spatial relationship of link variables using a relationship graph G = (N, E), where node N represents a variable of a link in a traffic flow, E =<N i ,N j >Representing mutual adjacency between segments, characterised by nodes
Figure BDA0003578728440000054
Indicating the link N at time t i Flow, average speed, and road segment occupancy.
Due to time t +1, link N i Based on the fact that the traffic flow attribute of the link N is not only related to the traffic flow attribute of the link at the time t, but also influenced by the traffic flow attributes of other links at the time t i The traffic flow state at time t +1 may be expressed as:
Figure BDA0003578728440000061
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003578728440000062
respectively represent the removed road section N i The flow, average speed and road section occupancy of the other road sections at the time t; f (-) represents the information in what way the nodes aggregate the surrounding nodes, i.e. how to consider the influence of traffic flow of other road segments for a particular road segment.
Regarding the road sections as nodes of the dynamic relationship graph, calculating the attention scores of any two road section nodes by the following method:
Figure BDA0003578728440000063
Figure BDA0003578728440000064
Figure BDA0003578728440000065
/>
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003578728440000066
representing a link node N i And N j Attention points on traffic, average speed and road segment occupancy, i, j =1,2, …, n, respectively; />
Figure BDA0003578728440000067
And &>
Figure BDA0003578728440000068
All are matrixes used for linear transformation and also learnable parameters of the model, and the dimensionalities of the matrixes are d k T represents a matrix transpose; />
Figure BDA0003578728440000069
Respectively representing road section nodes N j Flow, mean speed and road segment occupancy at time t->
Figure BDA00035787284400000610
Respectively representing road section nodes N i Flow at time t, average speed, and link occupancy.
And taking the attention score between the two road section nodes as the weight of a connecting edge between the nodes in the dynamic relation graph to obtain the dynamic relation graph of the flow, the average speed and the road section occupancy, and respectively recording the dynamic relation graph as follows: g q ,G k ,G v
Figure BDA00035787284400000611
I.e. representing link nodes N i And N j In-flow dynamic relationship graph G q The weight of the middle connected side is greater than or equal to>
Figure BDA00035787284400000612
I.e. representing link nodes N i And N j At average speed dynamics graph G k The weight of the middle connected side is greater than or equal to>
Figure BDA00035787284400000613
I.e. representing the link node N i And N j Dynamic relation graph G of road section occupancy v The weight of the middle connecting edge.
And S3, fusing the dynamic relationship graphs of the traffic flow attributes and converting the fused dynamic relationship graphs into a fused dynamic relationship graph network with the attributes mutually linked.
And the interaction among the three attributes of the flow, the average speed and the road section occupancy rate is taken into consideration. I.e. the road section N i The flow at the time t +1 is not only related to the flow attributes of the self and other road sections at the time t, but also is subjected to the road section N at the time t in the speed relation graph and the road section occupancy rate relation graph i The influence is realized by fusing the attribute relationship graphs.
For any two road segment nodes N i And N j According to
Figure BDA0003578728440000071
Calculating two road section nodes N i And N j And (3) the adjacent relations in the converged dynamic relational graph network so as to obtain the converged dynamic relational graph network.
The calculation formula of the adjacency relation is as follows:
Figure BDA0003578728440000072
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003578728440000073
representing road segment nodes N in a converged dynamic relationship graph network i And N j In an adjoining relationship of (4), in combination with a plurality of>
Figure BDA0003578728440000074
Is 0 represents a road segment node N in the converged dynamic relationship graph network i And N j Has no correlation therebetween, is selected>
Figure BDA0003578728440000075
A value of 1 represents a road segment node N in the converged dynamic relationship graph network i And N j There is a correlation between them.
Thereby, the converged dynamic relationship graph network G is obtained f Expressed as follows:
Figure BDA0003578728440000076
where n represents the number of nodes, i.e., the number of links.
And S4, based on the fusion dynamic relational graph network, learning potential space dependency relationships among traffic flow attributes and road sections by using a graph attention network, and extracting space dependency characteristics to construct a multi-element traffic flow prediction model based on the graph network.
The graph attention network is calculated as follows:
Figure BDA0003578728440000077
Figure BDA0003578728440000078
wherein alpha is ij Denotes the attention coefficient, exp denotes the exponential function, leakyRelu denotes the nonlinear activation function, σ denotes the sigmoid activation function, W and a T All represent a weight matrix of the linear transformation, h i ,h j Respectively representing road section nodes N in the graph attention network i And N j Is input by the user, | | represents the splicing operation on the vector, H i Representing a link node N i Neighbor nodes in a graph attention network, h i ' represents the graph attention network vs. road segment node N i And (4) aggregating the neighbor node information and outputting the aggregated neighbor node information.
The spatial dependence features extracted by the graph attention network are input into a 1 x 1 convolutional layer, and the output of the convolutional layer is a multivariate traffic flow prediction result. And completing the construction of the multivariate traffic flow prediction model based on the graph network.
And S5, training the multi-element traffic flow prediction model based on the graph network.
The multivariate traffic flow historical data is used for training a multivariate traffic flow prediction model based on a graph network, wherein one part of data (such as 80%) serves as a training set, and the other part of data (such as 20%) serves as a verification set. Inputting the training set into a model, training the model according to a loss function:
Figure BDA0003578728440000081
wherein the content of the first and second substances,
Figure BDA0003578728440000082
representing a link node N i Flow, average speed and road segment occupancy at time t; />
Figure BDA0003578728440000083
Representation model to road segment node N i And (4) predicted values of the flow, the average speed and the road section occupancy at the time t.
Selecting an optimal prediction model by using a verification set every iteration for a certain number of times; and stopping training after the iteration times reach 100 times to obtain the optimal multi-element traffic flow prediction model based on the graph network. It should be understood that the number of iterations is not limited to 100, but may be other values around 100, for example only.
And S6, carrying out short-time traffic flow prediction according to the multi-element traffic flow prediction model obtained through training.
Referring to fig. 2, during prediction, multivariate traffic flow historical data are input into a constructed multivariate traffic flow prediction model, a flow dynamic relation graph, an average speed dynamic relation graph and a road section occupancy dynamic relation graph are obtained by using a self-attention mechanism according to step S2, then the relation graphs are fused according to step S3, then an attention network GAT is used for extracting a spatial dependence characteristic according to step S4, then 1 × 1 convolution is input to convert the dimension of the spatial dependence characteristic into the dimension expected to be output, and a prediction result of the traffic flow is output and expressed as the prediction result of the traffic flow
Figure BDA0003578728440000084
Wherein->
Figure BDA0003578728440000085
Road segment N representing model predictions i Flow, average speed, and link occupancy at time t + 1. Finally, the algorithm effect can be evaluated based on the root mean square error.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for predicting multivariate traffic flow based on graph network provided in the foregoing embodiment can be implemented.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several equivalent substitutions or obvious modifications can be made without departing from the spirit of the invention, and all the properties or uses are considered to be within the scope of the invention.

Claims (9)

1. A multivariate traffic flow prediction method based on a graph network is characterized by comprising the following steps:
s1, acquiring multivariate traffic flow historical data for traffic flow prediction;
s2, respectively constructing an independent dynamic relation graph for each traffic flow attribute based on the multivariate traffic flow historical data; the traffic flow attributes comprise three attributes of flow, average speed and road section occupancy rate;
s3, fusing the dynamic relationship graphs of the traffic flow attributes and converting the fused dynamic relationship graphs into a fused dynamic relationship graph network with the attributes mutually linked;
s4, based on the fusion dynamic relational graph network, learning potential space dependency relationships among traffic flow attributes and road sections by utilizing a graph attention network, extracting space dependency characteristics, and constructing a multi-element traffic flow prediction model based on the graph network;
s5, training the multi-element traffic flow prediction model based on the graph network;
s6, according to the multi-element traffic flow prediction model obtained through training, short-time traffic flow prediction is carried out
The step S3 comprises the following steps: for any two road segment nodes N i And N j According to the road section node N i And N j Attention scores on traffic, road occupancy, and average speed, respectively
Figure FDA0004051939780000011
Calculating two road section nodes N i And N j Adjacency relation/in fused dynamic relationship graph network>
Figure FDA0004051939780000012
Obtaining a converged dynamic relationship graph networkG f
Figure FDA0004051939780000013
Wherein n represents the number of nodes, namely the number of road sections;
step S4 comprises the following steps:
the graph attention network is calculated as follows:
Figure FDA0004051939780000014
Figure FDA0004051939780000015
wherein alpha is ij Denotes the attention coefficient, exp denotes the exponential function, leakyRelu denotes the nonlinear activation function, σ denotes the sigmoid activation function, W and a T All represent a weight matrix of a linear transformation, h i ,h j ,h k Respectively representing road section nodes N in the graph attention network i 、N j 、N k The input feature of (1), represents the splicing operation on the vector, H i Representing a link node N i Neighbor nodes in a graph attention network, h i ' Note the graph attention network vs. road segment node N i The neighbor node information is aggregated and then output space dependence characteristics are obtained;
and inputting the spatial dependence characteristics of all road section nodes extracted by the graph attention network into a 1 x 1 convolution layer, outputting the convolution layer as a multivariate traffic flow prediction result, and constructing a multivariate traffic flow prediction model based on the graph network.
2. The multivariate traffic flow prediction method based on graph network as claimed in claim 1, wherein in step S1, the obtaining of the multivariate traffic flow history data comprises:
obtaining time interval of all road sections in road network [1,T ]]Intercrossing of multiple elementsFlow history data in time series X = [) 1 ,X 2 ,…,X T ]Representing; wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0004051939780000021
the traffic, average speed and road section occupancy of all road sections in the road network at the time t are shown, and t belongs to [1,T ]]And n represents the number of links. />
3. The multi-element traffic flow prediction method based on graph network according to claim 2, characterized in that step S1 further comprises the following preprocessing of the multi-element traffic flow historical data:
extracting multivariate traffic flow historical data at t moment
Figure FDA0004051939780000022
As an input, the actual value of the characteristic of the traffic flow of the respective section at the time t +1 ≥ s>
Figure FDA0004051939780000023
As a label.
4. The multivariate traffic flow prediction method based on graph network as claimed in claim 1, wherein the step S2 comprises:
aiming at three traffic flow attributes of flow, average speed and road section occupancy rate, a self-attention mechanism is respectively used for learning the mutual adjacency relation among road section nodes, the attention score between two road section nodes is used as the weight of a connecting edge between the nodes in a dynamic relation graph, and the independent dynamic relation graph of each traffic flow attribute is obtained.
5. The multivariate traffic flow prediction method based on a graph network as set forth in claim 4, wherein the step S2 comprises:
taking the road sections as nodes of the dynamic relationship graph, and calculating the attention scores of any two road section nodes by the following method:
Figure FDA0004051939780000024
Figure FDA0004051939780000025
Figure FDA0004051939780000031
wherein the content of the first and second substances,
Figure FDA0004051939780000032
and &>
Figure FDA0004051939780000033
All are matrixes used for linear transformation and also are learnable parameters of the model, and the dimensionalities of the matrixes are all d k ,· T Representing a matrix transposition; />
Figure FDA0004051939780000034
Respectively representing road section nodes N j Flow, mean speed and road segment occupancy at time t->
Figure FDA0004051939780000035
Respectively representing road section nodes N i Flow, average speed and road segment occupancy at time t;
and taking the attention score between two road section nodes as the weight of a connecting edge between the nodes in the dynamic relation graph to obtain the dynamic relation graph of the flow, the average speed and the road section occupancy, and respectively recording as: g q ,G k ,G v
Figure FDA0004051939780000036
I.e. representing link nodes N i And N j In-flow dynamic relationship graph G q Weights on well-linked sides>
Figure FDA0004051939780000037
I.e. representing link nodes N i And N j At average speed dynamics graph G k The weight of the middle connected side is greater than or equal to>
Figure FDA0004051939780000038
I.e. representing link nodes N i And N j Dynamic relation graph G of road section occupancy v The weight of the middle connecting edge.
6. The multivariate traffic flow prediction method based on a graph network as set forth in claim 5, wherein,
the calculation formula of the adjacency relation is as follows:
Figure FDA0004051939780000039
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA00040519397800000310
representing road segment nodes N in a converged dynamic relationship graph network i And N j In a neighboring relationship of->
Figure FDA00040519397800000311
Is 0 represents a road segment node N in the converged dynamic relationship graph network i And N j In a correlation therebetween, are absent>
Figure FDA00040519397800000312
A value of 1 represents a road segment node N in the converged dynamic relationship graph network i And N j There is a correlation between them.
7. The multivariate traffic flow prediction method based on graph network as claimed in claim 1, wherein the step S5 comprises:
training a multi-element traffic flow prediction model based on a graph network by using multi-element traffic flow historical data, wherein one part of data is used as a training set, and the other part of data is used as a verification set;
inputting the training set into a model, training the model according to a loss function:
Figure FDA00040519397800000313
wherein n is the number of road segments in the road network, and T is the number of time intervals included in the training set;
Figure FDA0004051939780000041
representing a link node N i Flow, average speed and road segment occupancy at time t; />
Figure FDA0004051939780000042
Representation model to road segment node N i Predicted values of flow, average speed and road section occupancy at time t;
selecting an optimal prediction model using the validation set a predetermined number of times per iteration; and stopping training after the iteration times reach 100 times to obtain the optimal multi-element traffic flow prediction model based on the graph network.
8. The multivariate traffic flow prediction method based on graph network as claimed in claim 1, further comprising: and evaluating the prediction effect on the traffic flow prediction result by using the root mean square error.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implements the multivariate traffic flow prediction method of any of claims 1-8.
CN202210349264.2A 2022-04-01 2022-04-01 Multi-element traffic flow prediction method based on graph network Active CN114743374B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210349264.2A CN114743374B (en) 2022-04-01 2022-04-01 Multi-element traffic flow prediction method based on graph network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210349264.2A CN114743374B (en) 2022-04-01 2022-04-01 Multi-element traffic flow prediction method based on graph network

Publications (2)

Publication Number Publication Date
CN114743374A CN114743374A (en) 2022-07-12
CN114743374B true CN114743374B (en) 2023-04-07

Family

ID=82279251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210349264.2A Active CN114743374B (en) 2022-04-01 2022-04-01 Multi-element traffic flow prediction method based on graph network

Country Status (1)

Country Link
CN (1) CN114743374B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102018201787A1 (en) * 2018-02-06 2019-08-08 Siemens Aktiengesellschaft Method and system for optimizing and predicting a traffic situation
CN110969854A (en) * 2019-12-13 2020-04-07 深圳先进技术研究院 Traffic flow prediction method, system and terminal equipment
CN112241814B (en) * 2020-10-20 2022-12-02 河南大学 Traffic prediction method based on reinforced space-time diagram neural network
CN113053115B (en) * 2021-03-17 2022-04-22 中国科学院地理科学与资源研究所 Traffic prediction method based on multi-scale graph convolution network model
CN113313947B (en) * 2021-05-31 2022-04-19 湖南大学 Road condition evaluation method of short-term traffic prediction graph convolution network
CN113505536A (en) * 2021-07-09 2021-10-15 兰州理工大学 Optimized traffic flow prediction model based on space-time diagram convolution network
CN113673769B (en) * 2021-08-24 2024-02-02 北京航空航天大学 Traffic flow prediction method of graph neural network based on multivariate time sequence interpolation
CN113705880A (en) * 2021-08-25 2021-11-26 杭州远眺科技有限公司 Traffic speed prediction method and device based on space-time attention diagram convolutional network
CN114038200B (en) * 2021-11-29 2022-09-20 东北大学 Attention mechanism-based time-space synchronization map convolutional network traffic flow prediction method
CN114120652A (en) * 2021-12-21 2022-03-01 重庆邮电大学 Traffic flow prediction method based on dynamic graph neural network

Also Published As

Publication number Publication date
CN114743374A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
US11461654B2 (en) Multi-agent cooperation decision-making and training method
CN112382082B (en) Method and system for predicting traffic running state in congested area
Meng et al. Wind speed forecasting based on wavelet packet decomposition and artificial neural networks trained by crisscross optimization algorithm
CN111104522A (en) Regional industry association effect trend prediction method based on knowledge graph
Chen et al. Evolutionary artificial neural networks for hydrological systems forecasting
CN106529818B (en) Water quality assessment Forecasting Methodology based on Fuzzy Wavelet Network
CN113190688B (en) Complex network link prediction method and system based on logical reasoning and graph convolution
CN112086958B (en) Power transmission network extension planning method based on multi-step backtracking reinforcement learning algorithm
Bhattacharjya et al. Evaluating influence diagrams with decision circuits
CN103324954A (en) Image classification method based on tree structure and system using same
CN113762595B (en) Traffic time prediction model training method, traffic time prediction method and equipment
CN114925836B (en) Urban traffic flow reasoning method based on dynamic multi-view graph neural network
CN113780002A (en) Knowledge reasoning method and device based on graph representation learning and deep reinforcement learning
CN113240086B (en) Complex network link prediction method and system
CN112396187A (en) Multi-agent reinforcement learning method based on dynamic collaborative map
CN105512755A (en) Decomposition-based multi-objective distribution estimation optimization method
CN113326919A (en) Traffic travel mode selection prediction method based on computational graph
CN116484740A (en) Line parameter identification method based on space topology characteristics of excavated power grid
CN113360664B (en) Knowledge graph complementing method
CN113326884B (en) Efficient learning method and device for large-scale heterograph node representation
CN114743374B (en) Multi-element traffic flow prediction method based on graph network
Edalatpanah et al. A hybrid time series forecasting method based on neutrosophic logic with applications in financial issues
CN112562312B (en) GraphSAGE traffic network data prediction method based on fusion features
CN117312782A (en) Missing traffic state data filling method based on generation countermeasure network
CN117116045A (en) Traffic flow prediction method and device based on space-time sequence deep learning

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