CN113160570A - Traffic jam prediction method and system - Google Patents

Traffic jam prediction method and system Download PDF

Info

Publication number
CN113160570A
CN113160570A CN202110606622.9A CN202110606622A CN113160570A CN 113160570 A CN113160570 A CN 113160570A CN 202110606622 A CN202110606622 A CN 202110606622A CN 113160570 A CN113160570 A CN 113160570A
Authority
CN
China
Prior art keywords
road
vehicle
predicted
road network
link
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.)
Pending
Application number
CN202110606622.9A
Other languages
Chinese (zh)
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.)
Changchun University of Science and Technology
Original Assignee
Changchun University of Science and Technology
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 Changchun University of Science and Technology filed Critical Changchun University of Science and Technology
Priority to CN202110606622.9A priority Critical patent/CN113160570A/en
Publication of CN113160570A publication Critical patent/CN113160570A/en
Pending legal-status Critical Current

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/0133Traffic data processing for classifying traffic situation
    • 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/044Recurrent networks, e.g. Hopfield networks
    • 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/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

Landscapes

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

Abstract

The invention relates to a traffic jam prediction method and a system. The method comprises the steps of obtaining historical track data of all vehicles in a road network to be predicted; the road network to be predicted consists of a plurality of road sections; for any road section, obtaining the average speed of the road section in a set time period according to the historical track data of all vehicles in the road section in the set time period; determining the average speed of each road section in all time periods as a congestion feature matrix of the road network to be predicted; obtaining an adjacency matrix of the road network to be predicted according to the position relation of all road sections in the road network to be predicted; and inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result. The invention can improve the prediction condition of traffic jam.

Description

Traffic jam prediction method and system
Technical Field
The invention relates to the technical field of traffic congestion prediction, in particular to a traffic congestion prediction method and a traffic congestion prediction system.
Background
For the complexity of the urban traffic network, with the gradual maturity of deep learning technology, the following prior art exists to predict the traffic jam condition: (1) and predicting node flows and edge flows of the whole road network through a multi-task learning model MDL to obtain the traffic jam condition. (2) Based on sparse track data, a graph-based CNN-LSTM model is provided for long-term traffic prediction. (3) A data reduction method of time correlation is provided for short-term traffic prediction by using graph volume and time characteristics. (4) Based on a deep convolutional neural network, a new method named PCNN is established for short-time traffic jam prediction.
The prior art does not consider the influence and the space-time characteristic among the road sections, so that the prediction result of the traffic jam is inaccurate.
Disclosure of Invention
The invention aims to provide a traffic jam prediction method and a system, which can improve the prediction situation of traffic jam.
In order to achieve the purpose, the invention provides the following scheme:
a traffic congestion prediction method, comprising:
acquiring historical track data of all vehicles in a road network to be predicted; the road network to be predicted consists of a plurality of road sections;
for any road section, obtaining the average speed of the road section in a set time period according to the historical track data of all vehicles in the road section in the set time period;
determining the average speed of each road section in all time periods as a congestion feature matrix of the road network to be predicted;
obtaining an adjacency matrix of the road network to be predicted according to the position relation of all road sections in the road network to be predicted;
and inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result.
Optionally, the obtaining historical trajectory data of all vehicles in the road network to be predicted specifically includes:
for any one vehicle, acquiring a vehicle track set of the vehicle at each historical time point, wherein the vehicle track set comprises longitude and latitude, speed and vehicle state;
judging whether the vehicle track set meets a first condition, a second condition or a third condition to obtain a first judgment result; the first condition is that the vehicle state corresponding to the vehicle track set is not empty and is not passenger carrying; the second condition is that the speed corresponding to the vehicle track set is 0, and the longitude and latitude of a first time point are the same as the longitude and latitude of a second time point, wherein the first time point is the previous moment of a historical time point corresponding to the speed; the second time point is a time subsequent to the historical time point corresponding to the speed; the third condition is that the historical time point corresponding to the vehicle track set is empty;
if the first judgment result is yes, deleting the vehicle track set to obtain a preprocessed vehicle track set;
and determining the preprocessed vehicle track set of all the vehicles as historical track data of all the vehicles in the road network to be predicted.
Optionally, the obtaining the average speed of the road segment in the set time period according to the historical track data of all vehicles in the road segment in the set time period specifically includes:
according to the formula
Figure BDA0003087742820000021
Calculating the average speed of the road section in a set time period, wherein Ph(Link, last) is the last position of vehicle h on road segment link, Ph(link, first) is the first position of vehicle h on road link, DIST (P)h(link,last)-Ph(link, first)) to calculate the distance between the last position of the vehicle h on the link road segment and the first position of the vehicle h on the link road segment,
Figure BDA0003087742820000022
the point in time of the last position of the vehicle h on the link,
Figure BDA0003087742820000023
the time point of the first position of the vehicle h on the link, m is the total number of vehicles passing through the link in the set time period, ViThe average speed of the link is set for a set time period between a time point of a first position of the vehicle h on the link and a time point of a last position of the vehicle h on the link.
Optionally, the obtaining an adjacency matrix of the road network to be predicted according to the position relationship of all the road segments in the road network to be predicted specifically includes:
constructing a road section directed tree according to the position relation of each road section in the road network to be predicted;
mapping all the road sections into a grid according to the road section directed tree to obtain a grid map;
obtaining a road network matrix of the road network to be predicted according to the grid map;
and calculating an adjacent matrix of the road network to be predicted according to the road network matrix of the road network to be predicted.
Optionally, the congestion prediction model determining method includes:
constructing a neural network model, wherein the neural network model comprises a graph convolution neural network model, a long-time memory model and a full connection layer which are sequentially connected;
acquiring a congestion feature matrix of a road network to be trained and an adjacent matrix of the road network to be trained;
taking the congestion feature matrix of the road network to be trained and the adjacent matrix of the road network to be trained as input, taking the real congestion result of the road network to be trained as output, and training the neural network model to obtain a trained neural network model;
and determining the trained neural network model as a congestion prediction model.
Alternatively to this, the first and second parts may,
the graph convolution neural network model is as follows:
Figure BDA0003087742820000031
wherein f (A, X)t) A is an adjacency matrix which is a speed change value of a road network,
Figure BDA0003087742820000032
is the sum of the adjacency matrix and the identity matrix, X is the congestion feature matrix, W(0)For a weight matrix from the input layer of the convolutional neural network model to the hidden layer of the convolutional neural network model, W(1)A weight matrix from a hidden layer of the graph convolution neural network model to an output layer of the graph convolution neural network model;
the long-time and short-time memory model is as follows:
it=σ(Wi*f(A,Xt)+Ui*Ht-1+bi)
ft=σ(Wf*f(A,Xt)+Uf*Ht-1+bf)
ot=σ(Wo*f(A,Xt)+Uo*Ht-1+bo)
Figure BDA0003087742820000041
Figure BDA0003087742820000042
Figure BDA0003087742820000043
wherein itRepresents the input gate of the long and short term memory model, sigma () is sigmoid activation function, WiFirst weight of input gate for long and short time memory model, f (A, X)t) Is a speed variation value, UiFor long and short time memory of modelsSecond weight of input gate, Ht-1Representing the hidden layer output of the memory model at the time t-1, biFor long and short duration memory of the input gate of the model, ftForgetting door, W, for long and short time memory modelfFor long and short time memory of the first weight of the forgetting gate of the model, UfA second weight of the forgetting gate for a long-and-short-term memory model, bfFor memorizing the deviation of the forgetting gate of the model at long and short times, otOutput gates, W, for long-and-short-term memory modelsoFor long and short duration memory of a first weight, U, of an output gate of the modeloFor long and short duration memorization of a second weight of the output gate of the model, boIn order to remember the deviation of the output gate of the model in a long time,
Figure BDA0003087742820000044
for the long and short time memory model's cell state update value, tanh () is the activation function, WcFirst weight, U, of cell state update values for a long-and-short memory modelcSecond weight of cell state update value for long and short memory model, bcDeviation of cell state update values for long and short memory models, ctFor long and short time memory of cell state at time t of model, ct-1For long and short time memory of the cell state at the moment t-1 of the model, HtAnd the output of a hidden layer of the memory model for representing the long and short time at the time t is as follows:
Figure BDA0003087742820000045
wherein the content of the first and second substances,
Figure BDA0003087742820000046
for congestion prediction results, UFWeight vector of fully connected layer, bFIs the bias vector for the fully connected layer.
A traffic congestion prediction system, comprising:
the acquisition module is used for acquiring historical track data of all vehicles in a road network to be predicted; the road network to be predicted consists of a plurality of road sections;
the average speed determining module is used for obtaining the average speed of any road section in a set time period according to the historical track data of all vehicles in the set time period of the road section;
the congestion feature matrix determining module is used for determining the average speed of each road section in all time periods as the congestion feature matrix of the road network to be predicted;
the adjacent matrix determining module is used for obtaining an adjacent matrix of the road network to be predicted according to the position relation of all road sections in the road network to be predicted;
and the result determining module is used for inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result.
Optionally, the obtaining module includes:
the vehicle tracking system comprises an acquisition unit, a storage unit and a control unit, wherein the acquisition unit is used for acquiring a vehicle track set of any vehicle at each historical time point, and the vehicle track set comprises longitude and latitude, speed and vehicle state;
the judging unit is used for judging whether the vehicle track set meets a first condition, a second condition or a third condition to obtain a first judgment result; the first condition is that the vehicle state corresponding to the vehicle track set is not empty and is not passenger carrying; the second condition is that the speed corresponding to the vehicle track set is 0, and the longitude and latitude of a first time point are the same as the longitude and latitude of a second time point, wherein the first time point is the previous moment of a historical time point corresponding to the speed; the second time point is a time subsequent to the historical time point corresponding to the speed; the third condition is that the historical time point corresponding to the vehicle track set is empty;
the result unit is used for deleting the vehicle track set if the first judgment result is yes, so as to obtain a preprocessed vehicle track set;
and the track data determining unit is used for determining the preprocessed vehicle track set of all the vehicles as historical track data of all the vehicles in the road network to be predicted.
Optionally, the average speed determining module includes:
an average speed determining unit for determining the average speed according to the formula
Figure BDA0003087742820000051
Calculating the average speed of the road section in a set time period, wherein Ph(Link, last) is the last position of vehicle h on road segment link, Ph(link, first) is the first position of vehicle h on road link, DIST (P)h(link,last)-Ph(link, first)) to calculate the distance between the last position of the vehicle h on the link road segment and the first position of the vehicle h on the link road segment,
Figure BDA0003087742820000061
the point in time of the last position of the vehicle h on the link,
Figure BDA0003087742820000062
the time point of the first position of the vehicle h on the link, m is the total number of vehicles passing through the link in the set time period, ViThe average speed of the link is set for a set time period between a time point of a first position of the vehicle h on the link and a time point of a last position of the vehicle h on the link.
Optionally, the adjacency matrix determination module includes:
the directed tree determining unit is used for constructing a road section directed tree according to the position relation of each road section in the road network to be predicted;
the grid map determining unit is used for mapping all the road sections into grids according to the road section directed trees to obtain a grid map;
the road network matrix determining unit is used for obtaining a road network matrix of the road network to be predicted according to the grid map;
and the adjacency matrix determining unit is used for calculating the adjacency matrix of the road network to be predicted according to the road network matrix of the road network to be predicted.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects: according to the method, the congestion characteristic matrix and the adjacency matrix of the road network to be predicted are input into the congestion prediction model to obtain the congestion prediction result, the adjacency matrix is used for considering the mutual influence among the road sections, and the correlation of the time dimension is considered according to the congestion characteristic matrix.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a traffic congestion prediction method according to an embodiment of the present invention;
fig. 2 is a schematic process diagram of a traffic congestion prediction method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a connection relationship between a convolutional neural network model and a long-term and short-term memory model according to an embodiment of the present invention;
fig. 4 is a flowchart of constructing a road network matrix according to an embodiment of the present invention;
fig. 5 is a block diagram of a traffic congestion prediction system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As shown in fig. 1 and 2, the present embodiment provides a traffic congestion prediction method, including:
step 101: and acquiring historical track data of all vehicles in the road network to be predicted. The road network to be predicted consists of a plurality of road sections.
Step 102: and for any road section, obtaining the average speed of the road section in the set time period according to the historical track data of all vehicles in the road section in the set time period.
Step 103: and determining the average speed of each road section in all the time sections as the congestion feature matrix of the road network to be predicted.
Step 104: and obtaining an adjacency matrix of the road network to be predicted according to the position relation of all road sections in the road network to be predicted.
Step 105: and inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result.
In practical application, step 101 specifically includes:
for any vehicle, acquiring a vehicle track set of the vehicle at each historical time point, wherein the vehicle track set comprises longitude and latitude, speed and vehicle state.
Judging whether the vehicle track set meets a first condition, a second condition or a third condition to obtain a first judgment result; the first condition is that the vehicle state corresponding to the vehicle track set is not empty and is not passenger carrying; the second condition is that the speed corresponding to the vehicle track set is 0, and the longitude and latitude of a first time point are the same as the longitude and latitude of a second time point, wherein the first time point is the previous moment of a historical time point corresponding to the speed; the second time point is a time subsequent to the historical time point corresponding to the speed; the third condition is that the historical time point corresponding to the vehicle track set is empty.
And if the first judgment result is yes, deleting the vehicle track set to obtain a preprocessed vehicle track set.
And determining the preprocessed vehicle track set of all the vehicles as historical track data of all the vehicles in the road network to be predicted.
In practical applications, step 102 specifically includes:
according to
Figure BDA0003087742820000081
Calculating the average speed of the road section in a set time period, wherein Ph(Link, last) is the last position of vehicle h on road segment link, Ph(link, first) is the first position of vehicle h on road link, DIST (P)h(link,last)-Ph(link, first)) to calculate the distance between the last position of the vehicle h on the link road segment and the first position of the vehicle h on the link road segment,
Figure BDA0003087742820000082
the point in time of the last position of the vehicle h on the link,
Figure BDA0003087742820000083
the time point of the first position of the vehicle h on the link, m is the total number of vehicles passing through the link in the set time period, ViThe average speed of the link is set for a set time period between a time point of a first position of the vehicle h on the link and a time point of a last position of the vehicle h on the link.
In practical application, step 104 specifically includes:
and constructing a road section directed tree according to the position relation of each road section in the road network to be predicted.
And mapping all the road sections into a grid according to the road section directed tree to obtain a grid map.
And obtaining a road network matrix of the road network to be predicted according to the grid map.
And calculating an adjacent matrix of the road network to be predicted according to the road network matrix of the road network to be predicted.
In practical application, the method for determining the congestion prediction model comprises the following steps:
constructing a neural network model, wherein the neural network model comprises a graph convolution neural network model (GCN), a long-term memory model (LSTM) and a full connection layer (FC) which are connected in sequence; FIG. 3 includes a GCN portion and an LSTM portion:
and acquiring a congestion feature matrix of the road network to be trained and an adjacent matrix of the road network to be trained.
And training the neural network model by taking the congestion feature matrix of the road network to be trained and the adjacent matrix of the road network to be trained as input and taking the real congestion result of the road network to be trained as output to obtain the trained neural network model.
And determining the trained neural network model as a congestion prediction model.
In practical application, in the model training process, the goal is to make the error between the actual congestion situation and the predicted congestion situation on the road as small as possible, so the loss function is as follows, and the training effect of the model is judged by applying the function:
Figure BDA0003087742820000091
wherein LOSS is a LOSS function, LregIs a regularization term of the loss function, λ is a hyperparameter, which is a known parameter, Y is an actual congestion condition,
Figure BDA0003087742820000092
to predict congestion conditions.
In practical application, the graph convolution neural network model is as follows:
Figure BDA0003087742820000093
wherein Output (X, A) is the speed change value of road network and is marked as f (A, X)t) A is adjacentAnd then the matrix is connected with the first terminal,
Figure BDA0003087742820000094
is the sum of the adjacency matrix and the identity matrix, X is the congestion feature matrix, W(0)For a weight matrix from the input layer of the convolutional neural network model to the hidden layer of the convolutional neural network model, W(1)Is a weight matrix from the hidden layer of the atlas neural network model to the output layer of the atlas neural network model.
The long-time and short-time memory model is as follows:
it=σ(Wi*f(A,Xt)+Ui*Ht-1+bi)
ft=σ(Wf*f(A,Xt)+Uf*Ht-1+bf)
ot=σ(Wo*f(A,Xt)+Uo*Ht-1+bo)
Figure BDA0003087742820000095
Figure BDA0003087742820000096
Figure BDA0003087742820000097
wherein itRepresents the input gate of the long and short term memory model, sigma () is sigmoid activation function, WiFirst weight of input gate for long and short time memory model, f (A, X)t) Is a speed variation value, UiSecond weight of input gate for long and short time memory model, Ht-1Representing the hidden layer output of the memory model at the time t-1, biFor long and short duration memory of the input gate of the model, ftForgetting door, W, for long and short time memory modelfFor long and short time memory of the first weight of the forgetting gate of the model, UfA second weight of the forgetting gate for a long-and-short-term memory model, bfFor memorizing the deviation of the forgetting gate of the model at long and short times, otOutput gates, W, for long-and-short-term memory modelsoFor long and short duration memory of a first weight, U, of an output gate of the modeloFor long and short duration memorization of a second weight of the output gate of the model, boIn order to remember the deviation of the output gate of the model in a long time,
Figure BDA0003087742820000101
for the cell state update values of the long and short term memory model, tanh () is the activation function (hyperbolic tangent function), WcFor long and short time memory of models
Figure BDA0003087742820000102
First weight of (cell state update value), UcFor long and short time memory of models
Figure BDA0003087742820000103
Second weight of (cell state update value), bcFor long and short time memory of models
Figure BDA0003087742820000104
Deviation of (cell state update value), ctFor long and short time memory of the cell state at time t of the model, ct-1For long and short time memory of the cell state at the moment t-1 of the model, HtAnd the output of a hidden layer of the memory model represents the long time at the time t.
The full connecting layer is as follows:
Figure BDA0003087742820000105
wherein the content of the first and second substances,
Figure BDA0003087742820000106
for congestion prediction results, UFWeight vector of fully connected layer, bFIs the bias vector for the fully connected layer.
In the practical application of the method, the material is,
Figure BDA0003087742820000107
Figure BDA0003087742820000108
wherein the content of the first and second substances,
Figure BDA0003087742820000109
is that
Figure BDA00030877428200001010
A degree matrix of j is
Figure BDA00030877428200001011
The number of columns of (a) is,
Figure BDA00030877428200001012
is composed of
Figure BDA00030877428200001013
The degree matrix of (c) is,
Figure BDA00030877428200001014
is the sum of the adjacency matrix A and the unit matrix I.
The embodiment also provides a process for predicting two hundred main roads in a certain administrative area by the method according to the floating car track data from 1 month and 1 day to 6 months and 30 days in 2018 of a certain city, wherein the floating car track data are shown in table 1.
Firstly, preprocessing track data of the floating car, and filtering data with a time stamp value of NULL; deleting the data with the vehicle state value of 2; and deleting the data with the speed of 0 and the same latitude and longitude fields of the adjacent time segments to obtain a floating car track data set suitable for traffic jam prediction research.
TABLE 1
Name of field Field ID Field sample description Data examples
Vehicle ID REC_CARID Unique identification of vehicle Vehicle number
Driver ID DRIVER_ID Driver unique identifier Desensitizing treatment
Time stamp TIMESTAMP Time of recording track data Unix time stamp
Longitude (G) LONGITUDE Longitude (G) 110.3427
Dimension (d) of LATITUDE Latitude 20.0299
Speed of vehicle SPEED Instantaneous speed 42.3587
Current state of vehicle STATUS 0: empty car 1: passenger 2: others 1
And step two, extracting the values of longitude and latitude fields according to the floating car track data set to determine the position of the track, using the connecting line of track points as the road section information, counting the number of all vehicles at one time point of the road section according to the road section information, using the obtained number as the traffic flow m of the road section, and calculating the average speed of the vehicles at the road section by adopting a formula (1).
And step three, mapping nearly two hundred main road grids to the road network matrix. And selecting one grid unit in the grid mapping as a matrix element corresponding to the node, if the road section appears in a plurality of grid units, only selecting one grid unit, covering more road sections than other grids, and finally ignoring redundant road sections and length information to obtain a road network matrix. The mesh modeling process is fine-grained distortion mapping of road networks, and spatial relations among road sections can be clearly shown through mesh division.
Step three detailed steps as shown in fig. 4, a link directed tree is given at the leftmost side of fig. 4, and 6 links r1, r2, … and r6 are involved. Next, as shown in the middle of fig. 4, the area covered by the corresponding target road network is divided into 5 × 5 grid maps. A road segment (e.g., r4) appears in multiple grid cells, and a grid cell also exists that contains zero or more partial road segments (e.g., second row and third column of the grid). Unlike such a conventional grid map, the grid matrix ensures that each matrix element corresponds to at most one complete road segment, and ignores the length of the road segment, so that the entire road segment corresponds to only one element. At the far right side of fig. 4, the grid matrix only involves three rows and three columns. Note that some special road segments, such as r4, although appearing in 3 grid cells, correspond to r4 with only one matrix element in the third row and second column. Such a grid matrix may substantially reflect the geographic information of the road segments, although the road segments may only appear in one matrix element.
Step four, obtaining an adjacent matrix A and a congestion feature matrix X, wherein A is obtained according to a grid matrix, the rows of X represent road sections, the columns represent time slices, and the value of the matrix is an average speed matrix (6 rows and 3 columns); a is a sparse array describing a directed tree.
And step five, taking the adjacent matrix A and the congestion feature matrix X as the input of the trained graph convolution neural network model to obtain the speed change value of the road network.
And step six, inputting the speed change value of the road network into the trained long-time memory model to obtain the output of the hidden layer.
And step seven, inputting the output of the hidden layer into the trained fully-connected layer to obtain a congestion prediction result (congestion or no congestion).
The present embodiment further provides a traffic congestion prediction system corresponding to the above method, as shown in fig. 5, the system includes:
the acquisition module A1 is used for acquiring historical track data of all vehicles in a road network to be predicted; the road network to be predicted consists of a plurality of road sections.
And the average speed determining module A2 is used for obtaining the average speed of the road section in the set time period according to the historical track data of all vehicles in the set time period of the road section for any road section.
And a congestion feature matrix determining module a3, configured to determine the average speed of each link in all time periods as a congestion feature matrix of the road network to be predicted.
And the adjacency matrix determining module A4 is used for obtaining the adjacency matrix of the road network to be predicted according to the position relation of all the road sections in the road network to be predicted.
And the result determining module A5 is used for inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result.
In practical application, the obtaining module includes:
the vehicle tracking system comprises an acquisition unit, a storage unit and a control unit, wherein the acquisition unit is used for acquiring a vehicle track set of any vehicle at each historical time point, and the vehicle track set comprises longitude and latitude, speed and vehicle state.
The judging unit is used for judging whether the vehicle track set meets a first condition, a second condition or a third condition to obtain a first judgment result; the first condition is that the vehicle state corresponding to the vehicle track set is not empty and is not passenger carrying; the second condition is that the speed corresponding to the vehicle track set is 0, and the longitude and latitude of a first time point are the same as the longitude and latitude of a second time point, wherein the first time point is the previous moment of a historical time point corresponding to the speed; the second time point is a time subsequent to the historical time point corresponding to the speed; the third condition is that the historical time point corresponding to the vehicle track set is empty.
And the result unit is used for deleting the vehicle track set to obtain a preprocessed vehicle track set if the first judgment result is yes.
And the track data determining unit is used for determining the preprocessed vehicle track set of all the vehicles as historical track data of all the vehicles in the road network to be predicted.
In practical applications, the average speed determination module includes:
an average speed determining unit for determining the average speed according to the formula
Figure BDA0003087742820000131
Calculating the average speed of the road section in a set time period, wherein Ph(Link, last) is the last position of vehicle h on road segment link, Ph(link, first) is the first position of vehicle h on road link, DIST (P)h(link,last)-Ph(link, first)) to calculate the distance between the last position of the vehicle h on the link road segment and the first position of the vehicle h on the link road segment,
Figure BDA0003087742820000132
the point in time of the last position of the vehicle h on the link,
Figure BDA0003087742820000133
the time point of the first position of the vehicle h on the link, m is the total number of vehicles passing through the link in the set time period, ViThe average speed of the link is set for a set time period between a time point of a first position of the vehicle h on the link and a time point of a last position of the vehicle h on the link.
In practical applications, the adjacency matrix determination module includes:
and the directed tree determining unit is used for constructing a road section directed tree according to the position relation of each road section in the road network to be predicted.
And the grid map determining unit is used for mapping all the road sections into the grid according to the road section directed tree to obtain the grid map.
And the road network matrix determining unit is used for obtaining the road network matrix of the road network to be predicted according to the grid map.
And the adjacency matrix determining unit is used for calculating the adjacency matrix of the road network to be predicted according to the road network matrix of the road network to be predicted.
The traffic congestion prediction method provided by the invention inputs congestion characteristic data with a historical time sequence into a graph convolution neural network model, and obtains the spatial characteristics of a target road segment by utilizing the graph convolution neural network. And then, time sequence data with the spatial characteristics are used as input and put into a long-time and short-time memory model, the time characteristics of the traffic condition change of the target road network segment are obtained through information transmission among cell units, and the congestion prediction result of the model is obtained through calculation according to the time and space characteristics.
The invention has the following beneficial effects:
1. the congestion feature matrix constructed by the method can realize the mapping of the road traffic conditions in a fine-grained manner, and the congestion prediction model has the highest prediction accuracy and the best stability compared with various baseline models and is more consistent with the real traffic conditions.
2. The method is based on a complex road network, simultaneously considers the mutual influence among road sections, combines the time as the dimension correlation, and obtains a prediction result more close to the real traffic network.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (10)

1. A method for predicting traffic congestion, comprising:
acquiring historical track data of all vehicles in a road network to be predicted; the road network to be predicted consists of a plurality of road sections;
for any road section, obtaining the average speed of the road section in a set time period according to the historical track data of all vehicles in the road section in the set time period;
determining the average speed of each road section in all time periods as a congestion feature matrix of the road network to be predicted;
obtaining an adjacency matrix of the road network to be predicted according to the position relation of all road sections in the road network to be predicted;
and inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result.
2. The method according to claim 1, wherein the obtaining of historical trajectory data of all vehicles in a road network to be predicted specifically comprises:
for any one vehicle, acquiring a vehicle track set of the vehicle at each historical time point, wherein the vehicle track set comprises longitude and latitude, speed and vehicle state;
judging whether the vehicle track set meets a first condition, a second condition or a third condition to obtain a first judgment result; the first condition is that the vehicle state corresponding to the vehicle track set is not empty and is not passenger carrying; the second condition is that the speed corresponding to the vehicle track set is 0, and the longitude and latitude of a first time point are the same as the longitude and latitude of a second time point, wherein the first time point is the previous moment of a historical time point corresponding to the speed; the second time point is a time subsequent to the historical time point corresponding to the speed; the third condition is that the historical time point corresponding to the vehicle track set is empty;
if the first judgment result is yes, deleting the vehicle track set to obtain a preprocessed vehicle track set;
and determining the preprocessed vehicle track set of all the vehicles as historical track data of all the vehicles in the road network to be predicted.
3. The method according to claim 1, wherein the obtaining an average speed of the road segment in a set time period according to historical track data of all vehicles in the road segment in the set time period specifically comprises:
according to the formula
Figure FDA0003087742810000021
Calculating the average speed of the road section in a set time period, wherein Ph(Link, last) is the last position of vehicle h on road segment link, Ph(link, first) is the first position of vehicle h on road link, DIST (P)h(link,last)-Ph(link, first)) to calculate the distance between the last position of the vehicle h on the link road segment and the first position of the vehicle h on the link road segment,
Figure FDA0003087742810000022
the point in time of the last position of the vehicle h on the link,
Figure FDA0003087742810000023
the time point of the first position of the vehicle h on the link, m is the total number of vehicles passing through the link in the set time period, ViThe average speed of the link is set for a set time period between a time point of a first position of the vehicle h on the link and a time point of a last position of the vehicle h on the link.
4. The method according to claim 1, wherein the obtaining of the adjacency matrix of the road network to be predicted according to the positional relationship of all the road segments in the road network to be predicted specifically comprises:
constructing a road section directed tree according to the position relation of each road section in the road network to be predicted;
mapping all the road sections into a grid according to the road section directed tree to obtain a grid map;
obtaining a road network matrix of the road network to be predicted according to the grid map;
and calculating an adjacent matrix of the road network to be predicted according to the road network matrix of the road network to be predicted.
5. The method of claim 1, wherein the congestion prediction model is determined by:
constructing a neural network model, wherein the neural network model comprises a graph convolution neural network model, a long-time memory model and a full connection layer which are sequentially connected;
acquiring a congestion feature matrix of a road network to be trained and an adjacent matrix of the road network to be trained;
taking the congestion feature matrix of the road network to be trained and the adjacent matrix of the road network to be trained as input, taking the real congestion result of the road network to be trained as output, and training the neural network model to obtain a trained neural network model;
and determining the trained neural network model as a congestion prediction model.
6. The method of claim 5, wherein the step of predicting the traffic congestion comprises,
the graph convolution neural network model is as follows:
Figure FDA0003087742810000031
wherein f (A, X)t) A is an adjacency matrix which is a speed change value of a road network,
Figure FDA0003087742810000032
is the sum of the adjacency matrix and the identity matrix, X is the congestion feature matrix, W(0)For a weight matrix from the input layer of the convolutional neural network model to the hidden layer of the convolutional neural network model, W(1)A weight matrix from a hidden layer of the graph convolution neural network model to an output layer of the graph convolution neural network model;
the long-time and short-time memory model is as follows:
it=σ(Wi*f(A,Xt)+Ui*Ht-1+bi)
ft=σ(Wf*f(A,Xt)+Uf*Ht-1+bf)
ot=σ(Wo*f(A,Xt)+Uo*Ht-1+bo)
Figure FDA0003087742810000033
Figure FDA0003087742810000034
Figure FDA0003087742810000035
wherein itRepresents the input gate of the long and short term memory model, sigma () is sigmoid activation function, WiFirst weight of input gate for long and short time memory model, f (A, X)t) Is a speed variation value, UiSecond weight of input gate for long and short time memory model, Ht-1Representing the hidden layer output of the memory model at the time t-1, biFor long and short duration memory of the input gate of the model, ftForgetting door, W, for long and short time memory modelfFor long and short time memory of the first weight of the forgetting gate of the model, UfA second weight of the forgetting gate for a long-and-short-term memory model, bfFor memorizing the deviation of the forgetting gate of the model at long and short times, otOutput gates, W, for long-and-short-term memory modelsoFor long and short duration memory of a first weight, U, of an output gate of the modeloFor long and short duration memorization of a second weight of the output gate of the model, boIn order to remember the deviation of the output gate of the model in a long time,
Figure FDA0003087742810000041
for the long and short time memory model's cell state update value, tanh () is the activation function, WcFirst weight, U, of cell state update values for a long-and-short memory modelcSecond weight of cell state update value for long and short memory model, bcDeviation of cell state update values for long and short memory models, ctFor long and short time memory of cell state at time t of model, ct-1For long and short time memory of the cell state at the moment t-1 of the model, HtAnd the output of a hidden layer of the memory model represents the long time at the time t.
The full connecting layer is as follows:
Figure FDA0003087742810000042
wherein the content of the first and second substances,
Figure FDA0003087742810000043
for congestion prediction results, UFWeight vector of fully connected layer, bFIs the bias vector for the fully connected layer.
7. A traffic congestion prediction system, comprising:
the acquisition module is used for acquiring historical track data of all vehicles in a road network to be predicted; the road network to be predicted consists of a plurality of road sections;
the average speed determining module is used for obtaining the average speed of any road section in a set time period according to the historical track data of all vehicles in the set time period of the road section;
the congestion feature matrix determining module is used for determining the average speed of each road section in all time periods as the congestion feature matrix of the road network to be predicted;
the adjacent matrix determining module is used for obtaining an adjacent matrix of the road network to be predicted according to the position relation of all road sections in the road network to be predicted;
and the result determining module is used for inputting the congestion feature matrix of the road network to be predicted and the adjacent matrix of the road network to be predicted into a congestion prediction model to obtain a congestion prediction result.
8. The system of claim 7, wherein the obtaining module comprises:
the vehicle tracking system comprises an acquisition unit, a storage unit and a control unit, wherein the acquisition unit is used for acquiring a vehicle track set of any vehicle at each historical time point, and the vehicle track set comprises longitude and latitude, speed and vehicle state;
the judging unit is used for judging whether the vehicle track set meets a first condition, a second condition or a third condition to obtain a first judgment result; the first condition is that the vehicle state corresponding to the vehicle track set is not empty and is not passenger carrying; the second condition is that the speed corresponding to the vehicle track set is 0, and the longitude and latitude of a first time point are the same as the longitude and latitude of a second time point, wherein the first time point is the previous moment of a historical time point corresponding to the speed; the second time point is a time subsequent to the historical time point corresponding to the speed; the third condition is that the historical time point corresponding to the vehicle track set is empty;
the result unit is used for deleting the vehicle track set if the first judgment result is yes, so as to obtain a preprocessed vehicle track set;
and the track data determining unit is used for determining the preprocessed vehicle track set of all the vehicles as historical track data of all the vehicles in the road network to be predicted.
9. The traffic congestion prediction system of claim 7, wherein the average speed determination module comprises:
an average speed determining unit for determining the average speed according to the formula
Figure FDA0003087742810000051
Calculating the average speed of the road section in a set time period, wherein Ph(Link, last) is the last position of vehicle h on road segment link, Ph(link, first) is the first position of vehicle h on road link, DIST (P)h(link,last)-Ph(link, first)) to calculate the distance between the last position of the vehicle h on the link road segment and the first position of the vehicle h on the link road segment,
Figure FDA0003087742810000052
the point in time of the last position of the vehicle h on the link,
Figure FDA0003087742810000053
the time point of the first position of the vehicle h on the link, m is the total number of vehicles passing through the link in the set time period, ViThe average speed of the link is set for a set time period between a time point of a first position of the vehicle h on the link and a time point of a last position of the vehicle h on the link.
10. The traffic congestion prediction system of claim 7, wherein the adjacency matrix determination module comprises:
the directed tree determining unit is used for constructing a road section directed tree according to the position relation of each road section in the road network to be predicted;
the grid map determining unit is used for mapping all the road sections into grids according to the road section directed trees to obtain a grid map;
the road network matrix determining unit is used for obtaining a road network matrix of the road network to be predicted according to the grid map;
and the adjacency matrix determining unit is used for calculating the adjacency matrix of the road network to be predicted according to the road network matrix of the road network to be predicted.
CN202110606622.9A 2021-05-27 2021-05-27 Traffic jam prediction method and system Pending CN113160570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110606622.9A CN113160570A (en) 2021-05-27 2021-05-27 Traffic jam prediction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110606622.9A CN113160570A (en) 2021-05-27 2021-05-27 Traffic jam prediction method and system

Publications (1)

Publication Number Publication Date
CN113160570A true CN113160570A (en) 2021-07-23

Family

ID=76875577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110606622.9A Pending CN113160570A (en) 2021-05-27 2021-05-27 Traffic jam prediction method and system

Country Status (1)

Country Link
CN (1) CN113160570A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570867A (en) * 2021-09-26 2021-10-29 西南交通大学 Urban traffic state prediction method, device, equipment and readable storage medium
CN113807221A (en) * 2021-09-07 2021-12-17 丰图科技(深圳)有限公司 Track quality identification method and device, electronic equipment and readable storage medium
CN114495490A (en) * 2021-12-31 2022-05-13 联通智网科技股份有限公司 Traffic condition prediction method, device terminal, and storage medium
CN114970949A (en) * 2022-04-12 2022-08-30 北京百度网讯科技有限公司 Method and device for predicting running speed, electronic device and storage medium
CN115620524A (en) * 2022-12-15 2023-01-17 中南大学 Traffic jam prediction method, system, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530694A (en) * 2016-11-07 2017-03-22 深圳大学 Traffic congestion prediction method and system based on traffic congestion propagation model
CN107180530A (en) * 2017-05-22 2017-09-19 北京航空航天大学 A kind of road network trend prediction method based on depth space-time convolution loop network
CN108648457A (en) * 2018-06-28 2018-10-12 苏州大学 A kind of method, apparatus and computer readable storage medium of prediction of speed
CN109191849A (en) * 2018-10-22 2019-01-11 北京航空航天大学 A kind of traffic congestion Duration Prediction method based on multi-source data feature extraction
CN109285346A (en) * 2018-09-07 2019-01-29 北京航空航天大学 A kind of city road net traffic state prediction technique based on key road segment
CN110599766A (en) * 2019-08-22 2019-12-20 浙江工业大学 Road traffic jam propagation prediction method based on SAE-LSTM-SAD
CN110766942A (en) * 2019-10-18 2020-02-07 北京大学 Traffic network congestion prediction method based on convolution long-term and short-term memory network
US20200135017A1 (en) * 2018-10-29 2020-04-30 Beihang University Transportation network speed foreeasting method using deep capsule networks with nested lstm models
CN111612243A (en) * 2020-05-18 2020-09-01 湖南大学 Traffic speed prediction method, system and storage medium
CN112418547A (en) * 2020-12-03 2021-02-26 北京工业大学 Bus stop passenger flow prediction method based on GCN-LSTM combined model

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530694A (en) * 2016-11-07 2017-03-22 深圳大学 Traffic congestion prediction method and system based on traffic congestion propagation model
CN107180530A (en) * 2017-05-22 2017-09-19 北京航空航天大学 A kind of road network trend prediction method based on depth space-time convolution loop network
CN108648457A (en) * 2018-06-28 2018-10-12 苏州大学 A kind of method, apparatus and computer readable storage medium of prediction of speed
CN109285346A (en) * 2018-09-07 2019-01-29 北京航空航天大学 A kind of city road net traffic state prediction technique based on key road segment
CN109191849A (en) * 2018-10-22 2019-01-11 北京航空航天大学 A kind of traffic congestion Duration Prediction method based on multi-source data feature extraction
US20200135017A1 (en) * 2018-10-29 2020-04-30 Beihang University Transportation network speed foreeasting method using deep capsule networks with nested lstm models
CN110599766A (en) * 2019-08-22 2019-12-20 浙江工业大学 Road traffic jam propagation prediction method based on SAE-LSTM-SAD
CN110766942A (en) * 2019-10-18 2020-02-07 北京大学 Traffic network congestion prediction method based on convolution long-term and short-term memory network
CN111612243A (en) * 2020-05-18 2020-09-01 湖南大学 Traffic speed prediction method, system and storage medium
CN112418547A (en) * 2020-12-03 2021-02-26 北京工业大学 Bus stop passenger flow prediction method based on GCN-LSTM combined model

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807221A (en) * 2021-09-07 2021-12-17 丰图科技(深圳)有限公司 Track quality identification method and device, electronic equipment and readable storage medium
CN113570867A (en) * 2021-09-26 2021-10-29 西南交通大学 Urban traffic state prediction method, device, equipment and readable storage medium
CN113570867B (en) * 2021-09-26 2021-12-07 西南交通大学 Urban traffic state prediction method, device, equipment and readable storage medium
CN114495490A (en) * 2021-12-31 2022-05-13 联通智网科技股份有限公司 Traffic condition prediction method, device terminal, and storage medium
CN114970949A (en) * 2022-04-12 2022-08-30 北京百度网讯科技有限公司 Method and device for predicting running speed, electronic device and storage medium
CN115620524A (en) * 2022-12-15 2023-01-17 中南大学 Traffic jam prediction method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113160570A (en) Traffic jam prediction method and system
CN109285346B (en) Urban road network traffic state prediction method based on key road sections
CN109658695B (en) Multi-factor short-term traffic flow prediction method
CN111080029B (en) Urban traffic road speed prediction method and system based on multi-path segment space-time correlation
CN113724489B (en) Traffic jam tracing method based on multi-source data
CN112287294B (en) Space-time bidirectional soil water content interpolation method based on deep learning
CN112242060B (en) Traffic flow prediction method and apparatus, computer device, and readable storage medium
CN110164129B (en) Single-intersection multi-lane traffic flow prediction method based on GERNN
CN109840587A (en) Reservoir reservoir inflow prediction technique based on deep learning
CN113516304B (en) Regional pollutant space-time joint prediction method and device based on space-time diagram network
CN110956807A (en) Highway flow prediction method based on combination of multi-source data and sliding window
CN113591380A (en) Traffic flow prediction method, medium and equipment based on graph Gaussian process
CN112633602B (en) Traffic congestion index prediction method and device based on GIS map information
CN113947132B (en) Bus arrival prediction method based on GCN (generalized belief network) graph neural network, computer and medium
CN114937366B (en) Traffic flow calculation method based on multi-scale traffic demand and supply conversion
CN113205698A (en) Navigation reminding method based on IGWO-LSTM short-time traffic flow prediction
CN113962472A (en) Time-space double-attention subway passenger flow short-time prediction method based on GAT-Seq2Seq model
CN115545758A (en) Method and system for self-adaptive incremental site selection of urban service facilities
CN113011455A (en) Air quality prediction SVM model construction method
CN110334412B (en) Reconstruction method of wetland landscape pattern in period without remote sensing data
CN112098869B (en) Self-adaptive electric vehicle SOC estimation method based on big data
CN117610208A (en) River water quality and quantity prediction method based on urban water system model interaction
Li et al. An algorithm for precipitation correction in flood season based on dendritic neural network
CN110309953B (en) Urban security monitoring layout system and method adopting target mobility distribution prediction
CN114912669A (en) Public transport passenger flow combined graph neural network prediction method based on multi-source data

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210723

RJ01 Rejection of invention patent application after publication