CN110415516B - Urban traffic flow prediction method and medium based on graph convolution neural network - Google Patents

Urban traffic flow prediction method and medium based on graph convolution neural network Download PDF

Info

Publication number
CN110415516B
CN110415516B CN201910637679.8A CN201910637679A CN110415516B CN 110415516 B CN110415516 B CN 110415516B CN 201910637679 A CN201910637679 A CN 201910637679A CN 110415516 B CN110415516 B CN 110415516B
Authority
CN
China
Prior art keywords
traffic flow
convolution
node
information
prediction model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910637679.8A
Other languages
Chinese (zh)
Other versions
CN110415516A (en
Inventor
范晓亮
闫旭
王程
程明
郑传潘
温程璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen University
Original Assignee
Xiamen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen University filed Critical Xiamen University
Priority to CN201910637679.8A priority Critical patent/CN110415516B/en
Publication of CN110415516A publication Critical patent/CN110415516A/en
Application granted granted Critical
Publication of CN110415516B publication Critical patent/CN110415516B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0137Measuring and analyzing of parameters relative to traffic conditions for specific applications
    • G08G1/0145Measuring and analyzing of parameters relative to traffic conditions for specific applications for active traffic flow control

Landscapes

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

Abstract

The invention discloses a city traffic flow prediction method and medium based on a graph convolution neural network, wherein the method comprises the following steps: acquiring original data; generating a distance matrix according to the longitude and latitude information corresponding to each node; calculating an reachable matrix according to the speed limit average value and the distance matrix; constructing an initial traffic flow prediction model for predicting traffic flow speed, and inputting traffic flow speed information and a reachable matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed predicted value according to the traffic flow speed information and the reachable matrix; training the initial traffic flow prediction model to determine a final traffic flow prediction model; inputting the traffic flow speed information to be predicted and the reachable matrix to be predicted into a traffic flow prediction model so as to predict future traffic flow through the traffic flow prediction model; the spatial characteristics of the urban traffic network are effectively extracted, the accuracy of traffic flow prediction is improved, and the universality of the prediction method is improved, so that the prediction method is convenient to popularize.

Description

Urban traffic flow prediction method and medium based on graph convolution neural network
Technical Field
The invention relates to the technical field of information processing, in particular to a graph convolution neural network-based urban traffic flow prediction method and a computer-readable storage medium.
Background
The traffic flow refers to a traffic flow formed by continuous driving of automobiles on a road, and urban traffic is gradually congested as automobiles increase day by day. Therefore, it becomes important to predict the urban traffic flow, for example, the prediction of the traffic flow facilitates the management and control of urban traffic with directionality by relevant departments; or, travel advice is provided for the automobile driver through the prediction of the traffic flow so as to save the travel time of the automobile driver and the like.
However, in the related art, it is difficult to effectively acquire unique physical characteristics of a traffic network, resulting in low accuracy of traffic flow data finally predicted; further, the information amount of the raw data is required to be too high (for example, adjacency information of the sensor node), and the universality is poor.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide an urban traffic flow prediction method based on a graph convolution neural network, which can effectively extract spatial features of an urban traffic network to improve the accuracy of traffic flow prediction, reduce the amount of information required by original data, and improve the universality of the prediction method, so that the prediction method is convenient for popularization.
A second object of the invention is to propose a computer-readable storage medium.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for predicting urban traffic flow based on a graph-convolution neural network, including the following steps: acquiring original data, wherein the original data comprises traffic flow rate information acquired by a plurality of nodes in a traffic network and longitude and latitude information corresponding to each node; calculating a distance matrix between the nodes according to the longitude and latitude information corresponding to each node; acquiring the speed limit average value of a passing road section among nodes, and calculating an inter-node reachable matrix according to the speed limit average value and the distance matrix among the nodes; constructing an initial traffic flow prediction model for predicting traffic flow speed, and inputting the traffic flow speed information and the inter-node reachable matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed predicted value according to the traffic flow speed information and the inter-node reachable matrix; comparing the predicted traffic flow speed value with the real traffic flow speed value to calculate a loss value between the predicted traffic flow speed value and the real traffic flow speed value, performing reverse error propagation according to the loss value to train the initial traffic flow prediction model, and determining a final traffic flow prediction model according to a training result; acquiring data to be predicted, and preprocessing the data to be predicted to generate traffic flow speed information to be predicted and an inter-node reachable matrix to be predicted; and inputting the traffic flow speed information to be predicted and the inter-node reachable matrix to be predicted into the traffic flow prediction model so as to predict future traffic flow through the traffic flow prediction model.
According to the urban traffic flow prediction method based on the graph convolution neural network, firstly, original data are obtained, wherein the original data comprise traffic flow speed information acquired by a plurality of nodes in a traffic network and longitude and latitude information corresponding to each node; then, calculating a distance matrix between the nodes according to the longitude and latitude information corresponding to each node; then, acquiring the speed limit average value of the passing road sections between the nodes, namely acquiring the speed limit values corresponding to the passing road sections between the nodes, calculating the average value according to a plurality of speed limit values, and then calculating the reachable matrix between the nodes according to the speed limit average value and the distance matrix between the nodes; then, constructing an initial traffic flow prediction model for predicting traffic flow speed, and inputting the traffic flow speed information and the inter-node reachable matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed prediction value according to the traffic flow speed information and the inter-node reachable matrix; then, comparing the predicted traffic flow rate value with the actual traffic flow rate value to calculate a loss value between the predicted traffic flow rate value and the actual traffic flow rate value, performing reverse error propagation according to the loss value to train the initial traffic flow prediction model, and determining a final traffic flow prediction model according to the training result; then, acquiring data to be predicted, and preprocessing the data to be predicted to generate traffic flow rate information to be predicted and an inter-node reachable matrix to be predicted; then, inputting the traffic flow speed information to be predicted and the reachable matrix between the nodes to be predicted into a traffic flow prediction model so as to predict future traffic flow through the traffic flow prediction model; therefore, the spatial characteristics of the urban traffic network are effectively extracted, the accuracy of traffic flow prediction is improved, the information quantity required by original data is reduced, the universality of the prediction method is improved, and the prediction method is convenient to popularize.
In addition, the urban traffic flow prediction method based on the graph convolution neural network according to the above embodiment of the present invention may further have the following additional technical features:
optionally, the initial traffic flow prediction model includes a space-time convolution block and an output layer, the space-time convolution block includes a first time-gated convolution, a space map convolution and a second time-gated convolution, wherein the traffic flow speed information and the inter-node reachable matrix are input to the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed prediction value according to the traffic flow speed information and the inter-node reachable matrix, including: inputting the traffic flow velocity information into the first time-gated convolution, so that the first time-gated convolution extracts the time characteristics corresponding to the traffic flow velocity information according to the traffic flow velocity information; inputting the time characteristics and the inter-node reachable matrix into a space map convolution, and taking the output of the space map convolution as the input of a second time-gated convolution, so that the second time-gated convolution outputs traffic flow speed prediction data; and inputting the traffic flow speed prediction data into an output layer so that the output layer can output a traffic flow speed prediction value according to the traffic flow speed prediction data.
Optionally, the output layer comprises a gated convolutional neural network, a Sigmoid function activated convolutional neural network, and a fully connected layer.
Optionally, the spatial graph convolution is expressed by the following formula:
W*GX=GCm=(Wgc_m⊙FFRm)X
wherein, WGX represents a space diagram convolution, GCmGraph convolution kernel, W, representing the convolution of a spatial graphgc_mA weight matrix indicating correspondence of reachable matrices between nodes,. The multiplication operation indicating corresponding elements of the matrices,. FFRmAnd representing the reachable matrix among the nodes, wherein X represents any traffic flow speed information.
Optionally, the first time-gated convolution and the second time-gated convolution are expressed by the following formula:
T*TX=(conva(X)+X)⊙σ(convb(X))
wherein, convaAnd convbDenotes a convolution operation, σ denotes a Sigmoid function, which denotes a multiplication operation of corresponding elements of the matrix, and X denotes any one traffic flow rate information.
Optionally, the space-time volume block is expressed by the following formula:
vl+1=T1*TRelu(W*G(T0*Tvl))
wherein v isl+1Representing traffic flow rate prediction data, T1A convolution kernel, T, representing a second time-gated convolution0A convolution kernel representing a first time-gated convolution, W a convolution kernel representing a spatial graph convolution, Relu a linear rectification function, vlRepresenting traffic flow rate information.
Optionally, the inter-node reachable matrix is expressed by the following formula:
Figure BDA0002130826430000031
wherein the content of the first and second substances,
Figure BDA0002130826430000032
a reachability matrix between the nodes is represented,
Figure BDA0002130826430000033
representing the average speed limit of the road sections passing between the node i and the node j, Di,jAnd representing a distance matrix between the nodes, delta t represents a preset unit time interval, and m represents the number of the preset unit time intervals.
Optionally, the traffic flow rate information includes information acquisition time of each node and a traffic flow rate value corresponding to each information acquisition time, where after the raw data is acquired, the method further includes: judging whether all nodes with traffic flow velocity values being null values exist in the traffic flow velocity information; if so, deleting the data corresponding to the node; acquiring abnormal data in the traffic flow velocity value corresponding to each node, and calculating the proportion between the abnormal data and the traffic flow velocity value corresponding to the node; judging whether the proportion between the abnormal data and the traffic flow speed value corresponding to the node is larger than a preset proportion threshold value or not; if yes, deleting the data corresponding to the node; if not, deleting the abnormal data of the node, and filling the data of the deleted part according to a linear interpolation algorithm; the traffic flow rate information is normalized using a z-score method to generate normalized traffic flow rate information.
In order to achieve the above object, a second embodiment of the present invention provides a computer-readable storage medium, on which an urban traffic flow prediction program is stored, which when executed by a processor implements the urban traffic flow prediction method based on the graph-convolution neural network as described above.
According to the computer-readable storage medium of the embodiment of the invention, the urban traffic flow prediction program based on the graph-convolution neural network is stored, so that the processor realizes the urban traffic flow prediction method based on the graph-convolution neural network when executing the program, thereby effectively extracting the spatial characteristics of the urban traffic network to improve the accuracy of traffic flow prediction, reducing the information quantity required by the original data, improving the universality of the prediction method and facilitating the popularization of the prediction method.
Drawings
FIG. 1 is a schematic flow chart of a city traffic flow prediction method based on a graph convolution neural network according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a traffic flow prediction model according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a space-time volume block according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a flow of generating a traffic flow prediction value according to an embodiment of the present invention;
fig. 5 is a flow chart illustrating a traffic flow information preprocessing according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a city traffic flow prediction method based on a graph convolution neural network according to an embodiment of the present invention, as shown in fig. 1, the city traffic flow prediction method based on the graph convolution neural network includes the following steps:
s101, acquiring original data, wherein the original data comprises traffic flow rate information acquired by a plurality of nodes in a traffic network and longitude and latitude information corresponding to each node.
That is to say, raw data for prediction is obtained, where the raw data includes traffic flow rate information collected by a plurality of nodes in a traffic network and longitude and latitude information corresponding to each node.
As an example, the traffic flow rate information collected by the plurality of nodes may include a node number, information collection times of nodes corresponding to the node number, and a traffic flow rate collected by a node corresponding to each information collection time.
And S102, calculating a distance matrix between the nodes according to the longitude and latitude information corresponding to each node.
That is, after the longitude and latitude information corresponding to each node is obtained, the distance matrix between the nodes is calculated according to the longitude and latitude information corresponding to each node.
As an example, first, an adjacency matrix A ∈ R is definedN×NRepresenting the adjacency relation of nodes, wherein if a link exists between the node i and the node j, Ai,j1, otherwise Ai,j0 (when i ═ j, ai,j0); then, based on the adjacency matrix, a link calculation equation d (v) is definedi,vj) Calculating the minimum number of links between nodes by the link calculation equation, and defining a distance matrix D ∈ RN×NWherein D isi,jAnd the minimum number of the links from the node i to the node j needs to pass through so as to complete the calculation of the distance matrix between the nodes.
S103, acquiring the speed limit average value of the passing road sections among the nodes, and calculating the reachable matrix among the nodes according to the speed limit average value and the distance matrix among the nodes.
That is, the speed limit values of the vehicles on the road sections passing between the nodes are obtained, the average speed limit value is calculated according to the obtained speed limit values of the vehicles, so that the average speed between the nodes under the conditions that traffic jam and other accidents (such as road blocking, typhoon, sand storm and the like) do not occur is obtained, and then the reachable matrix between the nodes is calculated according to the calculated average speed limit value and the distance matrix between the nodes.
The calculation method of the reachable matrix between the nodes can be various.
As an example, the inter-node reachability matrix is expressed by the following formula:
Figure BDA0002130826430000051
wherein the content of the first and second substances,
Figure BDA0002130826430000052
a reachability matrix between the nodes is represented,
Figure BDA0002130826430000053
representing the average speed limit of the road sections passing between the node i and the node j, Di,jAnd representing a distance matrix between the nodes, delta t represents a preset unit time interval, and m represents the number of the preset unit time intervals.
It should be noted that the values of m and Δ t may be determined according to the actual situation of the original data, wherein, according to the value of m, the proximity between nodes may be determined, and the larger the value of m, the more the corresponding neighbor nodes of the node i are.
S104, constructing an initial traffic flow prediction model for predicting traffic flow speed, and inputting the traffic flow speed information and the inter-node reachable matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed predicted value according to the traffic flow speed information and the inter-node reachable matrix.
That is, an initial traffic flow prediction model for predicting traffic flow rates is constructed, and after the construction of the initial traffic flow prediction model is completed, traffic flow rate information and an inter-node reachable matrix are input to the initial traffic flow prediction model as inputs, so that the initial traffic flow prediction model outputs a traffic flow prediction value based on the input traffic flow rate information and the inter-node reachable matrix.
The initial traffic flow prediction model can be constructed in various ways.
As an example, the initial traffic flow prediction model includes a space-time convolution block and an output layer, wherein the space-time convolution block includes a first time-gated convolution, a spatial map convolution and a second time-gated convolution to complete extraction of the temporal feature and the spatial feature by the space-time convolution block including the first time-gated convolution, the spatial map convolution and the second time-gated convolution, and the traffic flow velocity prediction data is output by the second time-gated convolution; then, after receiving the traffic flow speed prediction data, the output layer converts the traffic flow speed prediction data into a traffic flow speed prediction value.
The output layer may be arranged in various ways.
As an example, the output layers include a gated convolutional neural network, a Sigmoid function activated convolutional neural network, and a fully connected layer.
And S105, comparing the predicted traffic flow rate value with the actual traffic flow rate value to calculate a loss value between the predicted traffic flow rate value and the actual traffic flow rate value, performing reverse error propagation according to the loss value to train the initial traffic flow prediction model, and determining a final traffic flow prediction model according to the training result.
That is, after the predicted traffic flow value is calculated, the predicted traffic flow value is compared with the actual traffic flow value to calculate a loss value between the predicted traffic flow value and the actual traffic flow value, a reverse error ship is carried out according to the calculated loss value to train the initial traffic flow prediction model, the prediction accuracy of the initial traffic flow prediction model is obtained according to the training result of the initial traffic flow prediction model, and the initial traffic flow prediction model with the prediction accuracy meeting the requirement is used as the final traffic flow prediction model.
And S106, acquiring data to be predicted, and preprocessing the data to be predicted to generate traffic flow speed information to be predicted and an inter-node reachable matrix to be predicted.
That is to say, after the traffic flow prediction model is obtained, the data to be predicted is obtained, and the obtained data to be predicted is preprocessed to generate the traffic flow speed information to be predicted corresponding to the data to be predicted and the reachable matrix between the nodes to be predicted, so that the subsequent traffic flow prediction model can predict the future traffic flow conveniently.
And S107, inputting the traffic flow speed information to be predicted and the reachable matrix between the nodes to be predicted into a traffic flow prediction model so as to predict future traffic flow through the traffic flow prediction model.
Therefore, the graph convolution neural network is used for expressing the urban complex road network structure, and the accuracy of future traffic flow prediction can be effectively improved; the unique spatial characteristics of the complex urban traffic network can be effectively mined through the free flow reachable matrix.
In some embodiments, as shown in fig. 2, the initial traffic flow prediction model includes a spatiotemporal convolution block and an output layer, as shown in fig. 3, the spatiotemporal convolution block includes a first time-gated convolution, a spatial map convolution and a second time-gated convolution.
The spatial graph convolution can be set in various ways.
As an example, the spatial graph convolution is expressed by the following formula:
W*GX=GCm=(Wgc_m⊙FFRm)X
wherein, WGX represents a space diagram convolution, GCmGraph convolution kernel, W, representing the convolution of a spatial graphgc_mA weight matrix indicating correspondence of reachable matrices between nodes,. The multiplication operation indicating corresponding elements of the matrices,. FFRmAnd representing the reachable matrix among the nodes, wherein X represents any traffic flow speed information.
The first time-gated convolution and the second time-gated convolution may be arranged in various ways.
As an example, the first time-gated convolution and the second time-gated convolution are expressed by the following formula:
T*TX=(conva(X)+X)⊙σ(convb(X))
wherein, convaAnd convbDenotes a convolution operation, σ denotes a Sigmoid function, which denotes a multiplication operation of corresponding elements of the matrix, and X denotes any one traffic flow rate information.
The arrangement mode of the space-time volume block can be various.
As an example, the spatio-temporal convolution block is expressed by the following formula:
vl+1=T1*TRelu(W*G(T0*Tvl))
wherein v isl+1Representing traffic flow rate prediction data, T1A convolution kernel, T, representing a second time-gated convolution0A convolution kernel representing a first time-gated convolution, W a convolution kernel representing a spatial graph convolution, a Relu tableShowing the linear rectification function, vlRepresenting traffic flow rate information.
In some embodiments, as shown in fig. 4, inputting the traffic flow rate information and the inter-node reachability matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow rate prediction value according to the traffic flow rate information and the inter-node reachability matrix, includes the steps of:
s201, inputting the traffic flow velocity information into a first time gating convolution, so that the first time gating convolution extracts the time characteristics corresponding to the traffic flow velocity information according to the traffic flow velocity information.
And S202, inputting the time characteristics and the inter-node reachable matrix into a space map convolution, and taking the output of the space map convolution as the input of a second time-gated convolution so that the second time-gated convolution outputs traffic flow speed prediction data.
S203, inputting the traffic flow speed prediction data into an output layer so that the output layer outputs a traffic flow speed prediction value according to the traffic flow speed prediction data.
Therefore, the process that the initial traffic flow prediction model outputs the traffic flow prediction value according to the traffic flow speed information and the inter-node reachable matrix is completed.
In some embodiments, the traffic flow rate information includes information acquisition time of each node and a traffic flow rate value corresponding to each information acquisition time, so as to facilitate training of the initial traffic flow prediction model and enhance a training effect of the initial traffic flow prediction model, as shown in fig. 5, after the original data is acquired, the urban traffic flow prediction method based on the graph convolution neural network provided by the embodiment of the present invention further includes the following steps:
s301, judging whether all nodes with traffic flow velocity values being null values exist in the traffic flow velocity information, if so, executing the step S302, and if not, executing the step S303.
S302, deleting the data corresponding to the node.
S303, acquiring abnormal data in the traffic flow velocity value corresponding to each node, and calculating the proportion between the abnormal data and the traffic flow velocity value corresponding to the node.
S304, judging whether the proportion between the abnormal data and the traffic flow speed value corresponding to the node is larger than a preset proportion threshold value, if so, executing the step S305, and if not, executing the step S306.
S305, delete the data corresponding to the node.
S306, deleting the abnormal data of the node, and filling the data of the deleted part according to a linear interpolation algorithm.
S307, normalizing the traffic flow velocity information using the z-score method to generate normalized traffic flow velocity information.
Therefore, after the original data are obtained, the original data are preprocessed to eliminate abnormal data in the original data, missing data are supplemented, and the supplemented data are converted into traffic flow rate information in a standard format to adapt to training requirements of the initial traffic flow prediction model.
It should be noted that, when the data to be predicted is preprocessed, the steps of generating the traffic flow rate information to be predicted according to the data to be predicted are the same as those of S301 to S307, and the steps of generating the reachable matrix between the nodes to be predicted according to the data to be predicted are the same as those of S102 to S103, which are not described herein again.
In summary, according to the urban traffic flow prediction method based on the graph convolutional neural network of the embodiment of the present invention, first, original data is obtained, where the original data includes traffic flow rate information collected by a plurality of nodes in a traffic network and longitude and latitude information corresponding to each node; then, calculating the minimum link number between the nodes according to the longitude and latitude information corresponding to each node, and generating a distance matrix between the nodes according to the calculation result of the minimum link number; then, acquiring the speed limit average value of the passing road sections between the nodes, namely acquiring the speed limit values corresponding to the passing road sections between the nodes, calculating the average value according to a plurality of speed limit values, and then calculating the reachable matrix between the nodes according to the speed limit average value and the distance matrix between the nodes; then, constructing an initial traffic flow prediction model for predicting traffic flow speed, and inputting the traffic flow speed information and the inter-node reachable matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed prediction value according to the traffic flow speed information and the inter-node reachable matrix; then, comparing the predicted traffic flow rate value with the actual traffic flow rate value to calculate a loss value between the predicted traffic flow rate value and the actual traffic flow rate value, performing reverse error propagation according to the loss value to train the initial traffic flow prediction model, and determining a final traffic flow prediction model according to the training result; then, acquiring data to be predicted, and preprocessing the data to be predicted to generate traffic flow rate information to be predicted and an inter-node reachable matrix to be predicted; then, inputting the traffic flow speed information to be predicted and the reachable matrix between the nodes to be predicted into a traffic flow prediction model so as to predict future traffic flow through the traffic flow prediction model; therefore, the spatial characteristics of the urban traffic network are effectively extracted, the accuracy of traffic flow prediction is improved, the information quantity required by original data is reduced, the universality of the prediction method is improved, and the prediction method is convenient to popularize.
In order to implement the above embodiments, an embodiment of the present invention provides a computer-readable storage medium, on which an urban traffic flow prediction program is stored, which, when executed by a processor, implements the urban traffic flow prediction method based on a graph convolution neural network as described above.
According to the computer-readable storage medium of the embodiment of the invention, the urban traffic flow prediction program based on the graph-convolution neural network is stored, so that the processor realizes the urban traffic flow prediction method based on the graph-convolution neural network when executing the program, thereby effectively extracting the spatial characteristics of the urban traffic network to improve the accuracy of traffic flow prediction, reducing the information quantity required by the original data, improving the universality of the prediction method and facilitating the popularization of the prediction method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (7)

1. A city traffic flow prediction method based on a graph convolution neural network is characterized by comprising the following steps:
acquiring original data, wherein the original data comprises traffic flow rate information acquired by a plurality of nodes in a traffic network and longitude and latitude information corresponding to each node;
calculating a distance matrix between the nodes according to the longitude and latitude information corresponding to each node;
acquiring the speed limit average value of a passing road section among nodes, and calculating an inter-node reachable matrix according to the speed limit average value and the distance matrix among the nodes;
constructing an initial traffic flow prediction model for predicting traffic flow speed, and inputting the traffic flow speed information and the inter-node reachable matrix into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed predicted value according to the traffic flow speed information and the inter-node reachable matrix;
comparing the predicted traffic flow speed value with the real traffic flow speed value to calculate a loss value between the predicted traffic flow speed value and the real traffic flow speed value, performing reverse error propagation according to the loss value to train the initial traffic flow prediction model, and determining a final traffic flow prediction model according to a training result;
acquiring data to be predicted, and preprocessing the data to be predicted to generate traffic flow speed information to be predicted and an inter-node reachable matrix to be predicted;
inputting the traffic flow speed information to be predicted and the reachable matrix between the nodes to be predicted into the traffic flow prediction model so as to predict future traffic flow through the traffic flow prediction model;
wherein the initial traffic flow prediction model comprises a space-time convolution block and an output layer, the space-time convolution block comprises a first time-gated convolution, a space diagram convolution and a second time-gated convolution, wherein the traffic flow speed information and the inter-node reachable matrix are input into the initial traffic flow prediction model so that the initial traffic flow prediction model outputs a traffic flow speed prediction value according to the traffic flow speed information and the inter-node reachable matrix, and the method comprises the following steps:
inputting the traffic flow velocity information into the first time-gated convolution, so that the first time-gated convolution extracts the time characteristics corresponding to the traffic flow velocity information according to the traffic flow velocity information;
inputting the time characteristics and the inter-node reachable matrix into a space map convolution, and taking the output of the space map convolution as the input of a second time-gated convolution, so that the second time-gated convolution outputs traffic flow speed prediction data;
inputting the traffic flow speed prediction data into an output layer so that the output layer can output a traffic flow speed prediction value according to the traffic flow speed prediction data;
wherein the spatial graph convolution is expressed by the following formula:
W*GX=GCm=(Wgc_m⊙FFRm)X
wherein, WGX represents a space diagram convolution, GCmGraph convolution kernel, W, representing the convolution of a spatial graphgc_mA weight matrix indicating correspondence of reachable matrices between nodes,. The multiplication operation indicating corresponding elements of the matrices,. FFRmAnd representing the reachable matrix among the nodes, wherein X represents any traffic flow speed information.
2. The urban traffic flow prediction method based on the graph-convolution neural network according to claim 1,
the output layer comprises a gated convolutional neural network, a Sigmoid function activated convolutional neural network and a full-connection layer.
3. The method for urban traffic flow prediction based on the graph-convolution neural network according to claim 1, wherein the first time-gated convolution and the second time-gated convolution are expressed by the following formula:
T*TX=(conva(X)+X)⊙σ(convb(X))
wherein, convaAnd convbDenotes a convolution operation, σ denotes a Sigmoid function, which denotes a multiplication operation of corresponding elements of the matrix, and X denotes any one traffic flow rate information.
4. The method for predicting urban traffic flow based on the graph convolution neural network according to claim 1, wherein the space-time convolution block is expressed by the following formula:
vl+1=T1*T Relu(W*G(T0*T vl))
wherein v isl+1Representing traffic flow rate prediction data, T1A convolution kernel, T, representing a second time-gated convolution0A convolution kernel representing a first time-gated convolution, W a convolution kernel representing a spatial graph convolution, Relu a linear rectification function, vlRepresenting traffic flow rate information.
5. The method for predicting urban traffic flow based on the graph-convolution neural network according to any one of claims 1 to 4, wherein the inter-node reachable matrix is expressed by the following formula:
Figure FDA0002969862750000021
wherein the content of the first and second substances,
Figure FDA0002969862750000022
a reachability matrix between the nodes is represented,
Figure FDA0002969862750000023
representing the average speed limit of the road sections passing between the node i and the node j, Di,jAnd representing a distance matrix between the nodes, delta t represents a preset unit time interval, and m represents the number of the preset unit time intervals.
6. The urban traffic flow prediction method based on the graph-convolution neural network according to any one of claims 1 to 4, wherein the traffic flow rate information includes an information acquisition time of each node and a traffic flow rate value corresponding to each information acquisition time, and wherein after acquiring the raw data, the method further includes:
judging whether all nodes with traffic flow velocity values being null values exist in the traffic flow velocity information;
if so, deleting the data corresponding to the node;
acquiring abnormal data in the traffic flow velocity value corresponding to each node, and calculating the proportion between the abnormal data and the traffic flow velocity value corresponding to the node;
judging whether the proportion between the abnormal data and the traffic flow speed value corresponding to the node is larger than a preset proportion threshold value or not;
if yes, deleting the data corresponding to the node;
if not, deleting the abnormal data of the node, and filling the data of the deleted part according to a linear interpolation algorithm;
the traffic flow rate information is normalized using a z-score method to generate normalized traffic flow rate information.
7. A computer-readable storage medium, on which a map-convolution neural network-based urban traffic flow prediction program is stored, which, when executed by a processor, implements the map-convolution neural network-based urban traffic flow prediction method according to any one of claims 1 to 6.
CN201910637679.8A 2019-07-15 2019-07-15 Urban traffic flow prediction method and medium based on graph convolution neural network Active CN110415516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910637679.8A CN110415516B (en) 2019-07-15 2019-07-15 Urban traffic flow prediction method and medium based on graph convolution neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910637679.8A CN110415516B (en) 2019-07-15 2019-07-15 Urban traffic flow prediction method and medium based on graph convolution neural network

Publications (2)

Publication Number Publication Date
CN110415516A CN110415516A (en) 2019-11-05
CN110415516B true CN110415516B (en) 2021-06-22

Family

ID=68361492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910637679.8A Active CN110415516B (en) 2019-07-15 2019-07-15 Urban traffic flow prediction method and medium based on graph convolution neural network

Country Status (1)

Country Link
CN (1) CN110415516B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111079975A (en) * 2019-11-14 2020-04-28 青岛海信网络科技股份有限公司 Traffic data prediction method and device and vehicle control method
CN115423190A (en) * 2019-11-27 2022-12-02 第四范式(北京)技术有限公司 Method and system for training model and method and system for predicting sequence data
CN111126704B (en) * 2019-12-25 2022-07-29 河海大学常州校区 Multi-region precipitation prediction model construction method based on multi-graph convolution and memory network
CN111260919B (en) * 2020-01-15 2021-06-22 厦门大学 Traffic flow prediction method
CN111210633B (en) * 2020-02-09 2021-01-05 北京工业大学 Short-term traffic flow prediction method based on deep learning
CN111414989B (en) * 2020-02-13 2023-11-07 山东师范大学 User trust relationship network link prediction method and system based on gating mechanism
CN111540198B (en) * 2020-04-17 2021-07-27 浙江工业大学 Urban traffic situation recognition method based on directed graph convolution neural network
CN111785014B (en) * 2020-05-26 2021-10-29 浙江工业大学 Road network traffic data restoration method based on DTW-RGCN
CN111783262B (en) * 2020-06-17 2022-10-18 北京航空航天大学 Road network representation learning method based on hierarchical graph neural network
CN111784041B (en) * 2020-06-28 2024-02-09 中国电力科学研究院有限公司 Wind power prediction method and system based on graph convolution neural network
CN111833605B (en) * 2020-07-10 2022-04-26 北京嘀嘀无限科技发展有限公司 Road condition prediction method, road condition prediction model training device and storage medium
CN112489420B (en) * 2020-11-17 2022-06-21 中国科学院深圳先进技术研究院 Road traffic state prediction method, system, terminal and storage medium
CN112529311B (en) * 2020-12-16 2024-05-24 南京中兴力维软件有限公司 Road flow prediction method and device based on graph convolution analysis
EP4016412A1 (en) * 2020-12-18 2022-06-22 Imec VZW Traffic prediction
CN112784121B (en) * 2021-01-28 2022-06-17 浙江工业大学 Traffic accident prediction method based on space-time diagram representation learning
CN112966595B (en) * 2021-03-04 2022-04-05 桂林电子科技大学 Sensor network data abnormity judgment method based on graph neural network
CN113159428A (en) * 2021-04-26 2021-07-23 青岛大学 Traffic flow prediction method, electronic device, and storage medium
CN113808396B (en) * 2021-09-01 2022-06-21 浙江工业大学 Traffic speed prediction method and system based on traffic flow data fusion
CN114973653B (en) * 2022-04-27 2023-12-19 中国计量大学 Traffic flow prediction method based on space-time diagram convolutional network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10551842B2 (en) * 2017-06-19 2020-02-04 Hitachi, Ltd. Real-time vehicle state trajectory prediction for vehicle energy management and autonomous drive
CN108492568B (en) * 2018-04-25 2020-06-12 南京邮电大学 Short-term traffic flow prediction method based on time-space characteristic analysis
CN108510741B (en) * 2018-05-24 2020-10-30 浙江工业大学 Conv1D-LSTM neural network structure-based traffic flow prediction method
CN109285346B (en) * 2018-09-07 2020-05-05 北京航空航天大学 Urban road network traffic state prediction method based on key road sections
CN109493599A (en) * 2018-11-16 2019-03-19 南京航空航天大学 A kind of Short-time Traffic Flow Forecasting Methods based on production confrontation network

Also Published As

Publication number Publication date
CN110415516A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110415516B (en) Urban traffic flow prediction method and medium based on graph convolution neural network
CN107945507B (en) Travel time prediction method and device
CN110852342B (en) Road network data acquisition method, device, equipment and computer storage medium
CN109117987B (en) Personalized traffic accident risk prediction recommendation method based on deep learning
WO2021249071A1 (en) Lane line detection method, and related apparatus
CN102087788B (en) Method for estimating traffic state parameter based on confidence of speed of float car
CN112071062B (en) Driving time estimation method based on graph convolution network and graph attention network
CN114529081B (en) Space-time combined traffic flow prediction method and device
CN111710162B (en) Urban road network traffic operation condition monitoring method and system
CN110889444B (en) Driving track feature classification method based on convolutional neural network
CN112434260A (en) Road traffic state detection method and device, storage medium and terminal
CN112542049A (en) Comprehensive management and control platform for intelligent traffic
CN113780665B (en) Private car stay position prediction method and system based on enhanced recurrent neural network
CN115100867B (en) Urban intelligent traffic simulation method based on digital twins
CN116824861B (en) Method and system for scheduling sharing bicycle based on multidimensional data of urban brain platform
CN114360239A (en) Traffic prediction method and system for multilayer space-time traffic knowledge map reconstruction
CN113643532A (en) Regional traffic prediction method and device
CN113744541A (en) Road network discharge loss space-time distribution reconstruction method and system for confrontation graph convolution network
CN115762147B (en) Traffic flow prediction method based on self-adaptive graph meaning neural network
CN117576891A (en) Highway traffic condition prediction method, device, electronic equipment and storage medium
CN116861262A (en) Perception model training method and device, electronic equipment and storage medium
CN114724414B (en) Method and device for determining urban air traffic sharing rate, electronic equipment and medium
CN113971885A (en) Vehicle speed prediction method, device and system
CN115985132A (en) Roadside parking availability prediction method based on graph neural network
CN114548608B (en) Model processing method and device, target traffic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant