CN113936462A - Bus road condition prediction method and system based on ASTGCN algorithm - Google Patents

Bus road condition prediction method and system based on ASTGCN algorithm Download PDF

Info

Publication number
CN113936462A
CN113936462A CN202111209349.2A CN202111209349A CN113936462A CN 113936462 A CN113936462 A CN 113936462A CN 202111209349 A CN202111209349 A CN 202111209349A CN 113936462 A CN113936462 A CN 113936462A
Authority
CN
China
Prior art keywords
information
historical
time
road condition
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.)
Pending
Application number
CN202111209349.2A
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.)
Guangzhou Jiaoxin Investment Technology Co Ltd
Original Assignee
Guangzhou Jiaoxin Investment Technology Co Ltd
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 Guangzhou Jiaoxin Investment Technology Co Ltd filed Critical Guangzhou Jiaoxin Investment Technology Co Ltd
Priority to CN202111209349.2A priority Critical patent/CN113936462A/en
Publication of CN113936462A publication Critical patent/CN113936462A/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
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/065Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention relates to a bus road condition prediction method based on an ASTGCN algorithm, which comprises the following steps: the method comprises the steps that a data acquisition unit acquires historical GPS driving information road network structure information and real-time GPS driving information of a bus; cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information; training the historical preprocessing information to obtain a historical road condition model, and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information. The invention also provides a bus road condition prediction system based on the ASTGCN algorithm. The invention adopts the attention mechanism-based space-time graph convolutional neural network algorithm, thereby improving the prediction precision and the prediction effect of the real-time traffic conditions of the public transport.

Description

Bus road condition prediction method and system based on ASTGCN algorithm
Technical Field
The invention relates to the technical field of urban traffic monitoring, in particular to a bus road condition prediction method based on an ASTGCN algorithm, namely a bus road condition prediction method and a bus road condition prediction system based on the ASTGCN algorithm.
Background
At the present stage, the urban road condition and speed prediction technology is also applied to urban traffic travel, and at present, the research methods for urban traffic road conditions are various, and the considered dimensions are different. At the present stage, mature road condition prediction technologies are applied, such as hectic and high-grade real-time private car traveling road condition display and future road condition prediction. From the analysis of the algorithm principle, the algorithm adopted at the bottom layer comprises a wavelet neural network, a particle swarm algorithm, a graph neural network and the like; from the application scene, the method mainly analyzes and prejudges road conditions based on data of various vehicle floating cars on high-speed and urban roads.
The existing urban road condition analysis mainly analyzes the road condition and speed of a city or an expressway based on various vehicles, lacks the analysis of the road condition of a bus route lane, and has certain loss on the monitoring of urban traffic road conditions.
Disclosure of Invention
The invention aims to provide a method and a system for predicting the real-time traffic condition of a bus by using a Graph convolution neural network (ASTCGN) Based on a space-time Attention mechanism.
In order to achieve the purpose, the invention adopts the following technical scheme:
a bus road condition prediction method based on an ASTGCN algorithm comprises
The method comprises the steps that a data acquisition unit acquires historical GPS driving information road network structure information and real-time GPS driving information of a bus;
cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information;
training the historical preprocessing information to obtain a historical road condition model, and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
As a further technical solution of the present invention, the acquiring historical GPS driving information road network structure information and real-time GPS driving information of a public transportation vehicle specifically includes:
determining a basic bus network by using a geographic grid tool, acquiring all geographic grids through which the bus GPS passes in the vertical data, and processing abnormal values;
and optimizing the actual running GPS path to obtain the speed and the running distance of the nodes of the public traffic network.
As a further technical solution of the present invention, the cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information specifically includes: converting a city public transport network table formed by historical GPS driving information of the public transport vehicles into an adjacency matrix for determining a model network structure, continuously performing characteristic processing on the city public transport network table to form a space-time matrix for training a data set to form a training model, wherein the spatial dimension sequence of the space-time matrix corresponds to the node sequence of the model network structure one by one.
As a further technical solution of the present invention, the converting of the city public transportation network table composed of the historical GPS driving information of the public transportation vehicles into the adjacency matrix specifically includes:
sequentially connecting nodes among the same stations of the public traffic network nodes according to the condition of the line stations passing through the running vehicle, and establishing a connection relation among the nodes;
finding out adjacent nodes, wherein each pair of adjacent nodes generates a record;
calculating the relation weight between the nodes according to the distance between the nodes;
constructing an urban public transport network table for nodes in the public transport network and relation weights among the nodes;
and converting the urban public transport network table into an adjacent matrix by using a directed graph construction mode, wherein the connection relation between nodes in the adjacent matrix is calculated through the distance between blocks.
As a further technical solution of the present invention, the relationship weight between nodes is calculated according to the distance between nodes; and accumulating all the GPS track advancing distances in the two nodes through historical data, calculating an average value, and calculating the distance between every two adjacent nodes.
The invention adopts the further technical scheme that the historical preprocessing information is trained to obtain a historical road condition model, and the real-time preprocessing information is predicted according to the historical road condition model to obtain predicted road condition information; the method specifically comprises the following steps:
calculating the weight of the adjacent matrix through a spatial attention mechanism and a temporal attention mechanism to obtain a spatial attention matrix and a temporal attention matrix;
normalizing the space attention matrix and multiplying the normalized space attention matrix by the adjacent matrix to obtain a new input matrix;
normalizing the time attention moment array, and multiplying the time attention moment array by a new input matrix to obtain a final input matrix;
and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
As a further technical solution of the present invention, the weights of the adjacency matrix are calculated by a spatial attention mechanism and a temporal attention mechanism; the method specifically comprises the following steps:
calculating a degree of correlation of the spatial adjacency matrix using an attention mechanism;
Figure BDA0003308245260000031
Figure BDA0003308245260000032
the method is simplified as follows:
S=V·σ{(X·W1)·W2·(W3·X)T+b};
dimension relation: and X belongs to R (N C T), wherein N represents the number of the nodes of the public traffic network, and C represents the representative value (the use speed in the patent) taken in the block. T represents T time periods of input. W1 ∈ R (T), W2 ∈ R (T), W3 ∈ R (C ∈ T), V ∈ R (N ∈ N), b ∈ R (N ∈ N), and the final result S ∈ R (N ∈ N);
different weights are adaptively given to the data using an attention mechanism:
Figure BDA0003308245260000041
Figure BDA0003308245260000042
for ease of understanding, equation (3) is simplified to:
E=V·σ{((X)T·U1)·U2·(X·U3)+b};
dimension relation: and X belongs to R (N C T), wherein N represents the number of the public transportation network nodes of the N gpsns, C represents a representative value (the using speed of the invention) taken in the block, and T represents T input time periods. U1 ∈ R (N), U2 ∈ R (C ∈ N), U3 ∈ R (C), V ∈ R (T ∈ T), b ∈ R (T ∈ T), and the final result E ∈ R (T ∈ T).
The invention adopts the further technical scheme that the real-time preprocessing information is predicted according to a historical road condition model to obtain predicted road condition information; the method specifically comprises the following steps: for real-time road prediction, taking two public transport stations as a unit, the patent adopts a dynamic history mean value method to divide the traffic smooth grade of the traffic road condition, and the method specifically comprises the following steps:
calculating the predicted speed between stations: converting the mapping table of the public traffic network-node-geographical coding block established during preprocessing into the road condition on a map, and solving the predicted speed mean value v between unit stations to realize road condition prediction;
defining the grade: dynamic storage of history between unit public transportation stations in certain recent time rangeTerm driving speed v1
Wherein the road condition unblocked rating is as follows:
Figure BDA0003308245260000043
the invention also provides a bus road condition prediction system based on the ASTGCN algorithm, which comprises the following steps:
the data acquisition unit is used for acquiring historical GPS driving information road network structure information and real-time GPS driving information of the public transport vehicle;
the data preprocessing unit is used for cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information;
and the training prediction unit is used for training the historical preprocessing information to obtain a historical road condition model and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
The invention has at least the following beneficial effects:
the invention adopts the space-time graph convolutional neural network algorithm of the self-attention mechanism, fully utilizes the superiority of data and a deep learning algorithm, and improves the prediction precision of the real-time road condition of the bus; the method has the advantages that the actual driving path is innovatively used for generating the public traffic network, the traditional mode has poor adaptability to the complex road network, and the actual road conditions of different roads in different directions in the block cannot be distinguished; applying a space-time graph convolutional neural network algorithm of a self-attention mechanism to a real-time bus road condition prediction scene; the method adopts an actual running GPS path optimization mode, introduces a running direction concept on the basis of traditional grid division, reduces the speed condition and distance condition of a road network in a block, and improves the model prediction effect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for predicting real-time traffic conditions of a bus based on a spatio-temporal graph convolutional neural network according to the present invention;
FIG. 2 is a structural block diagram of a bus real-time traffic status prediction method based on a spatio-temporal graph convolutional neural network according to the present invention;
FIG. 3 is an exemplary diagram of a bus network node definition proposed by the present invention;
fig. 4 is a structural diagram of a bus real-time traffic condition prediction system based on a space-time graph convolutional neural network provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1 and 2, a method for predicting bus traffic conditions based on an ASTGCN algorithm includes the following steps:
step 101, a data acquisition unit acquires historical GPS driving information road network structure information and real-time GPS driving information of a bus;
102, cleaning and preprocessing information acquired by a data acquisition unit to obtain historical preprocessing information and real-time preprocessing information;
and 103, training the historical preprocessing information to obtain a historical road condition model, and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
In step 101, the acquiring historical GPS driving information road network structure information and real-time GPS driving information of the public transportation vehicle specifically includes:
determining a basic bus network by using a geographic grid tool, acquiring all geographic grids through which the bus GPS passes in the vertical data, and processing abnormal values;
and optimizing the actual running GPS path to obtain the speed and the running distance of the nodes of the public traffic network.
The method for defining the public transport network node specifically comprises the following steps:
in an actual scene, the following phase connection line segments (segments) in fig. 3 represent inter-station segments in two directions, i.e., up and down, between certain stations on a certain line. For convenience of description, taking a single row direction as an example, an uplink is a GPS signal traveling in a certain vehicle, a dot on the uplink represents a GPS position reported by the vehicle at that time, and the GPS position is discontinuous because the signal is transmitted at intervals of 30 seconds.
Determining the basic public transportation network with a geographic grid tool (GeoHash): finding out all geographical grids which have public traffic gps passing through in historical data, and performing data preprocessing such as abnormal value processing and the like;
the method comprises the following steps of innovatively using an actual driving path to generate a bus network: in a real environment, roads with different trends may be covered in a geographic grid of 7-bit GeoHash. The traditional grid division adopts a processing mode of sum average value to unify a plurality of moving roads. The traditional mode has poor adaptability to a complex road network, and actual road conditions of different roads in different directions in a block cannot be distinguished. The method creatively uses an actual running GPS path optimization mode, introduces a concept of running direction on the basis of traditional grid division, and relatively truly restores the speed condition and the distance condition of a road network in a block.
Node definition: the definition of the nodes in the public traffic network comprises two elements: GeoHash block and direction of travel. Wherein, this patent uses GPS point position mark advancing direction, replaces traditional "south-east-west-north" direction. As in the above figure, one of the public transportation network nodes is represented as: (ws0ehju, direction ws0 ehjv), and the speed and distance of the node, the specific speed and distance traveled are calculated from the two gps points.
In step 102, the cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information specifically includes: converting a city public transport network table formed by historical GPS driving information of the public transport vehicles into an adjacency matrix for determining a model network structure, continuously performing characteristic processing on the city public transport network table to form a space-time matrix for training a data set to form a training model, wherein the spatial dimension sequence of the space-time matrix corresponds to the node sequence of the model network structure one by one.
Wherein, the city public transit network table to the historical GPS travel information constitution of public transit vehicle is converted into the adjacency matrix, specifically includes:
sequentially connecting nodes among the same stations of the public traffic network nodes according to the condition of the line stations passing through the running vehicle, and establishing a connection relation among the nodes;
finding out adjacent nodes, wherein each pair of adjacent nodes generates a record;
calculating the relation weight between the nodes according to the distance between the nodes;
constructing an urban public transport network table for nodes in the public transport network and relation weights among the nodes;
and converting the urban public transport network table into an adjacent matrix by using a directed graph construction mode, wherein the connection relation between nodes in the adjacent matrix is calculated through the distance between blocks.
The urban public transport network map generated in the scene of the invention belongs to a directed graph, and specifically comprises the following steps:
confirming the node connection relation:
and sequentially connecting the nodes between the same stations according to the line station condition of the running vehicle, and establishing the connection relation between the nodes.
Finding out adjacent nodes according to the method, generating a record by a pair of adjacent nodes, and calculating the relationship weight between the nodes:
the distance between nodes (dist) is used as the node relation weight. And accumulating all gps track advancing distances in the two nodes through historical data, calculating an average value, and calculating the distance dist between every two adjacent nodes. In table 1, from _ node represents a start node of the directed node, to _ node represents an end node of the directed node, and dist represents a distance between two adjacent nodes.
TABLE 1 urban public transport network table
Figure BDA0003308245260000081
Further, calculating the relation weight between the nodes according to the distance between the nodes; and accumulating all the GPS track advancing distances in the two nodes through historical data, calculating an average value, and calculating the distance between every two adjacent nodes.
The invention uses the node distance dist as the loss weight between nodes, and the distance loss represents the correlation degree between nodes in the adjacent matrix and is used for calculating the influence range and the correlation on the space when the space attention is calculated. Information such as traffic light conditions, turn ratios and the like can be used as node loss weights.
In the embodiment of the invention, for an urban public transport network table, the running speed of each public transport network node is calculated through GPS running data, the speed at a certain time interval is selected to form time-space data of urban traffic speed change, the time-space data is analyzed and processed, invalid time periods are removed, and a public transport speed expression data set with an effective means is screened; and processing the missing value to obtain a city bus running speed data set.
In the embodiment of the invention, based on the generated urban public transportation network table, the running speed of each public transportation network node is calculated by using the GPS running data, and the speed of each public transportation network node is taken every 15 minutes to form time space data of urban traffic speed change.
The processed data is a 3-dimensional matrix of (2310,4477,1), wherein each dimension has the following meaning:
a first dimension: 2310(30 x 77) takes 5-24 hours of data time data every day, the interval is 15 minutes, and therefore 2310 is 30 days of node speed data of the block public transportation network;
a second dimension: 4477 the training data relates to the number of nodes of the block-containing public transport network in the region.
And a third dimension: 1 indicates that the current feature type is only a speed feature, and other features can be added in a customized mode. After the historical data are analyzed and processed, invalid time periods (time periods without operation records or other abnormal conditions and the like) are removed, and a public transportation speed performance data set in the valid time periods is screened out.
For a certain node, the bus gps records are not always available at all times, so that missing values can be generated. And filling the historical expression mean value of the node for the missing value of the part. And when the bus road condition is predicted in real time, the same method is adopted to process the missing value. Finally, the city bus running speed data set shown in the table 2 is obtained.
TABLE 2 urban public transport driving speed data set
Figure BDA0003308245260000101
2310rows×4479columns
The above data represents the average speed per 15 minutes for all 4477 public transportation network nodes over 30 days.
Particularly, the algorithm requires that the spatial dimension sequence of the space-time matrix and the node sequence of the network structure must be in one-to-one correspondence, namely the spatial dimension in the urban public transport driving speed data set of the table above needs to be in one-to-one correspondence with the spatial node relationship corresponding to 3.1. Specifically, the field "0" in the city bus driving speed data set table is node0, the field "1" is node1, and so on, and the spatial dimension of the table is the number of graph nodes defined by the model.
In step 103, training the historical pre-processing information to obtain a historical road condition model, and predicting the real-time pre-processing information according to the historical road condition model to obtain predicted road condition information; the method specifically comprises the following steps:
calculating the weight of the adjacent matrix through a spatial attention mechanism and a temporal attention mechanism to obtain a spatial attention matrix and a temporal attention matrix;
normalizing the space attention matrix and multiplying the normalized space attention matrix by the adjacent matrix to obtain a new input matrix;
normalizing the time attention moment array, and multiplying the time attention moment array by a new input matrix to obtain a final input matrix;
and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
In the embodiment of the invention, the weight of the adjacent matrix is calculated through a space attention mechanism and a time attention mechanism; the method specifically comprises the following steps:
calculating a degree of correlation of the spatial adjacency matrix using an attention mechanism;
Figure BDA0003308245260000111
Figure BDA0003308245260000112
the method is simplified as follows:
S=V·σ{(X·W1)·W2·(W3·X)T+b};
dimension relation: and X belongs to R (N C T), wherein N represents the number of the nodes of the public traffic network, and C represents the representative value (the use speed in the patent) taken in the block. T represents T time periods of input. W1 ∈ R (T), W2 ∈ R (T), W3 ∈ R (C ∈ T), V ∈ R (N ∈ N), b ∈ R (N ∈ N), and the final result S ∈ R (N ∈ N);
different weights are adaptively given to the data using an attention mechanism:
Figure BDA0003308245260000113
Figure BDA0003308245260000114
for ease of understanding, equation (3) is simplified to:
E=V·σ{((X)T·U1)·U2·(X·U3)+b};
dimension relation: and X belongs to R (N C T), wherein N represents the number of the public transportation network nodes of the N gpsns, C represents a representative value (the using speed of the invention) taken in the block, and T represents T input time periods. U1 ∈ R (N), U2 ∈ R (C ∈ N), U3 ∈ R (C), V ∈ R (T ∈ T), b ∈ R (T ∈ T), and the final result E ∈ R (T ∈ T).
Predicting the real-time preprocessing information according to a historical road condition model to obtain predicted road condition information; the method specifically comprises the following steps: for real-time road prediction, taking two public transport stations as a unit, the patent adopts a dynamic history mean value method to divide the traffic smooth grade of the traffic road condition, and the method specifically comprises the following steps:
calculating the predicted speed between stations: converting the mapping table of the public traffic network-node-geographical coding block established during preprocessing into the road condition on a map, and solving the predicted speed mean value v between unit stations to realize road condition prediction;
defining the grade: dynamically storing historical synchronous running speed v between unit bus stations in a certain recent time range1
Wherein the road condition unblocked rating is as follows:
Figure BDA0003308245260000121
the input model is specifically as follows:
csv: adjacent to the matrix.
data. npz: the 3-dimensional matrix of (2310,4477,1) needs to be further converted to include cycle-of-week, cycle-of-day and recent combined data, and each data set includes week, day and receiver and target data.
The calculation method comprises the following steps:
Figure BDA0003308245260000122
week (1065,4124,1, 4): 1065 represents a data volume of 60% for 30 days, 4477 represents a bus network node, 1 represents a speed, and 4 represents a data volume of 1 hour.
day (1065,4477,1, 4): 1065 represents a data volume of 60% for 30 days, 4477 represents a bus network node, 1 represents a speed, and 4 represents a data volume of 1 hour.
recent (1065,4477,1, 12): 1065 represents the data amount of 60% taken for 30 days, 4477 represents the number of links, the public traffic network node, 1 represents the speed, and 12 represents the data amount of 3 hours.
target (1065,4477, 4): 1065 represents 60% of data volume taken for 30 days, 4477 represents a bus network node, and 4 represents 1 hour data volume.
The training set conversion results are as follows:
week:(1065,4477,1,4),day:(1065,4477,1,4),recent:(1065, 4477,1,12)
a first dimension: data volume, 1065 ═ 77 × 30-77 × 7+4 × (60%). (in 30 days of data, the start of the time period for which the week data can be retrieved is 77 x 7+4, so the start of the time period for which the week, day, and recovery data are contained is (77 x 30-77 x 7+4), and 60% is taken as training set data); wherein the second dimension: number of time periods, third dimension: feature number (i.e., velocity), fourth dimension: the number of gpsns.
The training output data is converted as follows:
target:(1065,4477,4);
wherein, the first dimension: data volume, second dimension: number of nodes of the public network, third dimension: the number of time segments.
The predictive application of the invention is as follows:
and (3) prediction input:
predict data:week:(1,4477,1,4),day:(1,4477,1,4),recent: (1,4477,1,12)。
description of the drawings: week (1,4124,1, 4): 1 represents the current time period, 4477 represents the number of nodes of the public network, 1 represents the speed, and 4 represents the data volume of 1 hour; day (1,4477,1, 4): 1 represents the current time period, 4477 represents the number of nodes of the public network, 1 represents the speed, and 4 represents the data volume of 1 hour; recent (1,4477,1, 12): 1 represents the current time period, 4477 represents the number of nodes of the public network, 1 represents the speed, and 12 represents the data volume of 3 hours;
and (3) prediction output:
predict result:(1,4477,4)
description of the drawings: predict result (1,4477, 4): 1 represents one hour into the future, 4477 represents the number of stages, and 4 represents the data volume 1 hour into the future.
And performing model prediction at regular time intervals of 5 minutes, reading speed matrix data of road sections between real-time stations as prediction input, and predicting a result. And outputting the driving speed of each bus network node divided by all lines by the model. And converting the mapping table of the public traffic network-node-geographical coding block established during preprocessing into the road condition on the map. And realizing road condition prediction.
In the embodiment of the invention, after the adjacent matrixes are divided in the urban space, the running speed conditions which are relatively close to each other can be mutually influenced, and the influence degree has certain regularity and burst property. The present invention adaptively calculates the degree of correlation of the spatial adjacency matrix using an attention mechanism.
The invention adopts the attention mechanism-based spatiotemporal graph convolutional neural network algorithm, fully utilizes the superiority of data and a deep learning algorithm, and improves the prediction precision of the real-time road condition of the bus; the public traffic network is generated by innovatively using the actual driving path, the traditional mode has poor adaptability to the complex road network, and the actual road conditions of different roads in different directions in the block cannot be distinguished.
Applying a time-space diagram convolutional neural network algorithm of an attention mechanism to a real-time bus road condition prediction scene; the method adopts an actual running GPS path optimization mode, introduces a running direction concept on the basis of traditional grid division, reduces the speed condition and distance condition of a road network in a block, and improves the model prediction effect.
The invention mainly predicts the traffic road condition of a bus network by using bus driving data, and converts GeoHash blocks by combining a city bus stop road network with GPS driving records (GeoHash is an address coding method, two-dimensional space longitude and latitude data are coded into a character string), and the GeoHash blocks are connected to construct a directed graph G (V (D), A (D) and psiD). And the psi D related factors adopt historical bus GPS running records to clean the travel distance of the GPS after drifting dirty data. The spatiotemporal dimensions were chosen to be approximately 3 hours, 1 hour before the day and 1 hour before the week. The characteristic is that the running speed of the vehicle in the block is adopted. The model inputs the average driving speed in blocks of GeoHash of the city of 3 hours, 1 hour before one day and 1 hour before one week, and outputs the driving speed of all GeoHash blocks of the city of 60 minutes in the future. And converting the mapping table of the public traffic network-node-geographical coding block established during preprocessing into the road condition on the map. For real-time road prediction, taking two public transport stations as a unit, the patent adopts a dynamic history mean value method to divide the traffic smooth grade of the traffic road condition.
Referring to fig. 4, the present invention further provides a system for predicting bus traffic conditions based on the ASTGCN algorithm, including:
the data acquisition unit 201 is used for acquiring historical GPS driving information road network structure information and real-time GPS driving information of the public transport vehicle;
the data preprocessing unit 202 is used for cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information;
and the training data unit 203 is used for training the historical preprocessing information to obtain a historical road condition model, and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are merely illustrative of the principles of the invention, but that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (9)

1. A bus road condition prediction method based on an ASTGCN algorithm is characterized by comprising the following steps:
the method comprises the steps that a data acquisition unit acquires historical GPS driving information road network structure information and real-time GPS driving information of a bus;
cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information;
training the historical preprocessing information to obtain a historical road condition model, and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
2. The method for predicting the traffic conditions based on the ASTGCN algorithm according to claim 1, wherein the obtaining of the historical GPS driving information road network structure information and the real-time GPS driving information of the bus specifically comprises:
determining a basic bus network by using a geographic grid tool, acquiring all geographic grids through which the bus GPS passes in the vertical data, and processing abnormal values;
and optimizing the actual running GPS path to obtain the speed and the running distance of the nodes of the public traffic network.
3. The bus traffic condition prediction method based on the ASTGCN algorithm according to claim 1, wherein the step of cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information comprises: converting a city public transport network table formed by historical GPS driving information of the public transport vehicles into an adjacency matrix for determining a model network structure, continuously performing characteristic processing on the city public transport network table to form a space-time matrix for training a data set to form a training model, wherein the spatial dimension sequence of the space-time matrix corresponds to the node sequence of the model network structure one by one.
4. The method for predicting the conditions of the buses according to claim 3, wherein the urban bus network table formed by the historical GPS driving information of the buses is converted into an adjacency matrix, and the method specifically comprises the following steps:
sequentially connecting nodes among the same stations of the public traffic network nodes according to the condition of the line stations passing through the running vehicle, and establishing a connection relation among the nodes;
finding out adjacent nodes, wherein each pair of adjacent nodes generates a record;
calculating the relation weight between the nodes according to the distance between the nodes;
constructing an urban public transport network table for nodes in the public transport network and relation weights among the nodes;
and converting the urban public transport network table into an adjacency matrix by using a directed graph construction mode.
5. The ASTGCN algorithm-based bus traffic prediction method according to claim 4, wherein the relationship weight between nodes is calculated according to the distance between nodes; and accumulating all the GPS track advancing distances in the two nodes through historical data, calculating an average value, and calculating the distance between every two adjacent nodes.
6. The bus traffic prediction method based on the ASTGCN algorithm according to claim 1, wherein the historical pre-processed information is trained to obtain a historical traffic model, and the real-time pre-processed information is predicted according to the historical traffic model to obtain predicted traffic information; the method specifically comprises the following steps:
calculating the weight of the adjacent matrix through a spatial attention mechanism and a temporal attention mechanism to obtain a spatial attention matrix and a temporal attention matrix;
normalizing the space attention matrix and multiplying the normalized space attention matrix by the adjacent matrix to obtain a new input matrix;
normalizing the time attention moment array, and multiplying the time attention moment array by a new input matrix to obtain a final input matrix;
and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
7. The ASTGCN algorithm-based bus traffic prediction method as claimed in claim 6, wherein the weight of the adjacency matrix is calculated by a spatial attention mechanism and a temporal attention mechanism; the method specifically comprises the following steps:
calculating a degree of correlation of the spatial adjacency matrix using an attention mechanism;
Figure FDA0003308245250000031
Figure FDA0003308245250000032
the method is simplified as follows:
S=V·σ{(X·W1)·W2·(W3·X)T+b};
dimension relation: and X belongs to R (N C T), wherein N represents the number of the nodes of the public traffic network, and C represents the representative value (the use speed in the patent) taken in the block. T represents T time periods of input. W1 ∈ R (T), W2 ∈ R (T), W3 ∈ R (C ∈ T), V ∈ R (N ∈ N), b ∈ R (N ∈ N), and the final result S ∈ R (N ∈ N);
different weights are adaptively given to the data using an attention mechanism:
Figure FDA0003308245250000033
Figure FDA0003308245250000034
for ease of understanding, equation (3) is simplified to:
E=V·σ{((X)T·U1)·U2·(X·U3)+b};
dimension relation: and X belongs to R (N C T), wherein N represents the number of the public transportation network nodes of the N gpsns, C represents a representative value (the using speed of the invention) taken in the block, and T represents T input time periods. U1 ∈ R (N), U2 ∈ R (C ∈ N), U3 ∈ R (C), V ∈ R (T ∈ T), b ∈ R (T ∈ T), and the final result E ∈ R (T ∈ T).
8. The ASTGCN algorithm-based bus traffic prediction method as claimed in claim 6, wherein the real-time pre-processed information is predicted according to a historical traffic model to obtain predicted traffic information; the method specifically comprises the following steps: for real-time road prediction, taking two public transport stations as a unit, the patent adopts a dynamic history mean value method to divide the traffic smooth grade of the traffic road condition, and the method specifically comprises the following steps:
calculating the predicted speed between stations: converting the mapping table of the public traffic network-node-geographical coding block established during preprocessing into the road condition on a map, and solving the predicted speed mean value v between unit stations to realize road condition prediction;
defining the grade: dynamic storage unit public transport in certain recent time rangeHistorical synchronous running speed v between stations1
Wherein the road condition unblocked rating is as follows:
Figure FDA0003308245250000041
9. a bus road condition prediction system based on the ASTGCN algorithm is characterized by being realized by adopting the bus road condition prediction method based on the ASTGCN algorithm according to any one of claims 1 to 8, and comprising the following steps:
the data acquisition unit is used for acquiring historical GPS driving information road network structure information and real-time GPS driving information of the public transport vehicle;
the data preprocessing unit is used for cleaning and preprocessing the information acquired by the data acquisition unit to obtain historical preprocessing information and real-time preprocessing information;
and the training prediction unit is used for training the historical preprocessing information to obtain a historical road condition model and predicting the real-time preprocessing information according to the historical road condition model to obtain predicted road condition information.
CN202111209349.2A 2021-10-18 2021-10-18 Bus road condition prediction method and system based on ASTGCN algorithm Pending CN113936462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111209349.2A CN113936462A (en) 2021-10-18 2021-10-18 Bus road condition prediction method and system based on ASTGCN algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111209349.2A CN113936462A (en) 2021-10-18 2021-10-18 Bus road condition prediction method and system based on ASTGCN algorithm

Publications (1)

Publication Number Publication Date
CN113936462A true CN113936462A (en) 2022-01-14

Family

ID=79279937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111209349.2A Pending CN113936462A (en) 2021-10-18 2021-10-18 Bus road condition prediction method and system based on ASTGCN algorithm

Country Status (1)

Country Link
CN (1) CN113936462A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1963847A (en) * 2005-11-07 2007-05-16 同济大学 Method for forecasting reaching station of bus
CN112419718A (en) * 2020-11-17 2021-02-26 东北大学秦皇岛分校 Traffic congestion propagation prediction method based on space-time graph convolutional neural network
CN112419710A (en) * 2020-10-22 2021-02-26 深圳云天励飞技术股份有限公司 Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium
CN112669606A (en) * 2020-12-24 2021-04-16 西安电子科技大学 Traffic flow prediction method for training convolutional neural network by utilizing dynamic space-time diagram
CN112949828A (en) * 2021-03-04 2021-06-11 湖南大学 Graph convolution neural network traffic prediction method and system based on graph learning
CN113034913A (en) * 2021-03-22 2021-06-25 平安国际智慧城市科技股份有限公司 Traffic congestion prediction method, device, equipment and storage medium
US20210287138A1 (en) * 2020-03-12 2021-09-16 Autodesk, Inc. Learning to simulate and design for structural engineering
CN113470365A (en) * 2021-09-01 2021-10-01 北京航空航天大学杭州创新研究院 Bus arrival time prediction method oriented to missing data
CN113469425A (en) * 2021-06-23 2021-10-01 北京邮电大学 Deep traffic jam prediction method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1963847A (en) * 2005-11-07 2007-05-16 同济大学 Method for forecasting reaching station of bus
US20210287138A1 (en) * 2020-03-12 2021-09-16 Autodesk, Inc. Learning to simulate and design for structural engineering
CN112419710A (en) * 2020-10-22 2021-02-26 深圳云天励飞技术股份有限公司 Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium
CN112419718A (en) * 2020-11-17 2021-02-26 东北大学秦皇岛分校 Traffic congestion propagation prediction method based on space-time graph convolutional neural network
CN112669606A (en) * 2020-12-24 2021-04-16 西安电子科技大学 Traffic flow prediction method for training convolutional neural network by utilizing dynamic space-time diagram
CN112949828A (en) * 2021-03-04 2021-06-11 湖南大学 Graph convolution neural network traffic prediction method and system based on graph learning
CN113034913A (en) * 2021-03-22 2021-06-25 平安国际智慧城市科技股份有限公司 Traffic congestion prediction method, device, equipment and storage medium
CN113469425A (en) * 2021-06-23 2021-10-01 北京邮电大学 Deep traffic jam prediction method
CN113470365A (en) * 2021-09-01 2021-10-01 北京航空航天大学杭州创新研究院 Bus arrival time prediction method oriented to missing data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JUN HU 等: "Multi-Attention Based Spatial-Temporal Graph Convolution Networks for Traffic Flow Forecasting", 《2021 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN)》 *

Similar Documents

Publication Publication Date Title
KR102267032B1 (en) Method, apparatus and computer program for predicting traffic information
CN102737510B (en) Real-time traffic condition acquisition method based on mobile intelligent terminal
CN108681795B (en) Electric automobile charging load space-time prediction method under constraint of urban traffic network and user travel chain
CN105809962A (en) Traffic trip mode splitting method based on mobile phone data
US7953544B2 (en) Method and structure for vehicular traffic prediction with link interactions
CN109584552B (en) Bus arrival time prediction method based on network vector autoregressive model
CN111653088A (en) Vehicle driving quantity prediction model construction method, prediction method and system
CN104121918A (en) Real-time path planning method and system
CN111724601A (en) Motor vehicle traffic flow prediction method suitable for data loss
CN102779410B (en) Parallel implementation method of multi-source heterogeneous traffic data fusion
CN109612488B (en) Big data micro-service-based mixed travel mode path planning system and method
CN109579861B (en) Path navigation method and system based on reinforcement learning
CN110163449B (en) Motor vehicle pollution discharge monitoring node deployment method based on active space-time diagram convolution
CN112863182B (en) Cross-modal data prediction method based on transfer learning
CN108985506A (en) Planning driving path recommended method, prediction technique, acquisition methods and its device
CN110414795B (en) Newly-increased high-speed rail junction accessibility influence method based on improved two-step mobile search method
CN102956105B (en) Floating car sample point data interpolation method
CN112562309B (en) Network taxi appointment scheduling method based on improved Dijkstra algorithm
CN112633602B (en) Traffic congestion index prediction method and device based on GIS map information
CN109064750B (en) Urban road network traffic estimation method and system
CN115660220A (en) GeoHash algorithm-based tidal parking crowd-sourcing optimization method
Tomaras et al. Crowd-based ecofriendly trip planning
CN113936462A (en) Bus road condition prediction method and system based on ASTGCN algorithm
CN112100163A (en) Road network state space-time prediction method based on three-dimensional convolutional neural network
CN113641749A (en) Population mobility network estimation method and system based on bipartite graph

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

Application publication date: 20220114