[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113705880A - Traffic speed prediction method and device based on space-time attention diagram convolutional network - Google Patents

Traffic speed prediction method and device based on space-time attention diagram convolutional network Download PDF

Info

Publication number
CN113705880A
CN113705880A CN202110980592.8A CN202110980592A CN113705880A CN 113705880 A CN113705880 A CN 113705880A CN 202110980592 A CN202110980592 A CN 202110980592A CN 113705880 A CN113705880 A CN 113705880A
Authority
CN
China
Prior art keywords
matrix
time
network
attention
space
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.)
Granted
Application number
CN202110980592.8A
Other languages
Chinese (zh)
Other versions
CN113705880B (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.)
Hangzhou Yuantiao Science And Technology Co ltd
Original Assignee
Hangzhou Yuantiao Science And 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 Hangzhou Yuantiao Science And Technology Co ltd filed Critical Hangzhou Yuantiao Science And Technology Co ltd
Priority to CN202110980592.8A priority Critical patent/CN113705880B/en
Publication of CN113705880A publication Critical patent/CN113705880A/en
Application granted granted Critical
Publication of CN113705880B publication Critical patent/CN113705880B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • 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/0125Traffic data processing
    • G08G1/0129Traffic data processing for creating historical data or processing based on historical data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

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

Abstract

The invention discloses a traffic speed prediction method and a device based on a space-time attention-chart convolutional network, wherein the method comprises the following steps: sampling the collected existing speed data set to obtain a component data matrix related to a time sequence; constructing a time attention network; inputting the component data matrix into a time attention network to obtain a time correlation matrix; constructing a spatial attention network; inputting the time correlation matrix into a space attention network, and fusing to obtain a space-time correlation matrix; inputting the road network topology matrix into a graph convolution network, and combining the road network topology matrix with a space-time incidence matrix to carry out model training; and carrying out speed prediction through the trained model. The time attention network and the space attention network are fused to form a space-time attention network, the relevance of the traffic network in time and space is extracted, meanwhile, the information of adjacent nodes is continuously fused by combining the graph convolution network, the traffic speed is predicted, and the accuracy of traffic speed prediction is improved.

Description

Traffic speed prediction method and device based on space-time attention diagram convolutional network
Technical Field
The invention relates to the field of intelligent transportation and the field of deep learning, in particular to a traffic speed prediction method and a related device based on a space-time attention-driven convolutional network.
Background
With the continuous improvement of the income per capita, the urban traffic becomes more and more crowded, the traffic prediction also becomes an increasingly important research subject, and the accurate and timely prediction of the traffic condition not only provides an effective treatment means for the management of traffic management departments, but also provides a reasonable plan for travelers. Traffic prediction is of great significance to city planning, traffic management, traffic administration and property safety. However, due to the complexity of traffic situations both temporally and spatially, spatio-temporal prediction has been a challenging issue.
Early traffic speeds were based primarily on some statistical methods or simple machine learning methods. Representative of these methods are autoregressive integrated moving average (ARIMA), Vector Autoregressive (VAR), K-nearest neighbor (KNN), and Support Vector Regression (SVR). Although these methods can predict traffic speed, the accuracy of prediction is low as the space complexity of a traffic network increases and the relevance in time increases. The traditional traffic speed prediction is difficult to mine the correlation in time and space, and the performance of the time-space mining is greatly limited.
Therefore, how to design a speed prediction method comprehensively considering the space-time correlation in the traffic state is a technical problem to be solved urgently by the technical personnel in the field.
Disclosure of Invention
In view of the above problems, it is an object of the present invention to provide a traffic speed prediction method and related apparatus based on a spatio-temporal attention-driven convolutional network, so that the prediction of traffic speed is more accurate.
The invention provides a traffic speed prediction method based on a space-time attention-graph convolutional network, which comprises the following steps of:
sampling the collected existing speed data set to obtain a component data matrix related to a time sequence;
constructing a time attention network;
inputting the component data matrix into the time attention network to obtain a time correlation matrix;
constructing a spatial attention network;
inputting the time correlation matrix into the space attention network, and fusing to obtain a space-time correlation matrix;
inputting a road network topology matrix into a graph convolution network, and combining the road network topology matrix with the space-time incidence matrix to carry out model training;
and carrying out speed prediction through the trained model.
In this scheme, the inputting the component data matrix into the time attention network to obtain a time correlation matrix specifically includes:
inputting the component data matrix into the time attention network to obtain a time attention matrix T:
Figure BDA0003228963260000021
wherein, Ke、L1、L2、L3、VeFor a learnable parameter, σ denotes the sigmoid activation function,
Figure BDA0003228963260000022
for the matrix of the component data it is,
Figure BDA0003228963260000023
Cr-1indicating the number of channels, T, of input data of the r-th layerr-1Representing the length of the input data time dimension of the r-th layer;
after the time attention matrix T is normalized, capturing the correlation strength between the nodes according to the time attention moment matrix:
Figure BDA0003228963260000024
Ti,jreflecting the time correlation strength between the times i, j, and multiplying the time correlation strength by the component data matrix to obtain a time correlation matrix
Figure BDA0003228963260000025
Figure BDA0003228963260000026
In this scheme, the inputting the time correlation matrix into the spatial attention network, and the fusing to obtain the space-time correlation matrix specifically includes:
inputting the time correlation matrix into the spatial attention network to obtain a space-time attention matrix S:
Figure BDA0003228963260000027
wherein, Ks、H1、H2、H3、VsIs a learnable parameter;
calculating a time correlation matrix S' according to the space-time attention matrix S:
Figure BDA0003228963260000028
in this scheme, the inputting the road network topology matrix into the graph convolution network, and combining with the space-time correlation matrix to perform model training, and obtaining the predicted speed specifically includes:
inputting a road network topology matrix into a Laplace matrix L:
Figure BDA0003228963260000029
wherein A represents the input wayA network topology matrix, D being a degree matrix, in particular a diagonal matrix, the elements of the diagonal being
Figure BDA0003228963260000031
AijRepresenting the elements in the ith row and the j column;
the graph convolution network is specifically a graph convolution network in the form of chebyshev polynomial, and is expressed as:
Figure BDA0003228963260000032
where G denotes the convolution operation of a graph,
Figure BDA0003228963260000033
is a scaled normalized Laplace matrix, λmaxIs the maximum eigenvalue of L, θ'k(K-0, 1, … K) is a coefficient of the K-th term of the chebyshev polynomial, which is a learnable parameter;
the chebyshev polynomial of order K is defined as follows:
Tk(x)=2xTk-1(x)-Tk-2(x);
and combining the input road network topology matrix and the space-time incidence matrix to obtain a final graph convolution formula:
Figure BDA0003228963260000034
and after model training is carried out on the graph convolution formula, speed prediction is carried out through the trained model.
In this embodiment, the sampling the existing velocity data set to obtain the component data matrix related to the time sequence specifically includes:
sampling three dimensions of the existing speed data set to respectively obtain a time component data matrix, a day component data matrix and a week component data matrix of a relevant time sequence;
the inputting of the road network topology matrix into the graph convolution network and the combining with the space-time incidence matrix, and the model training specifically comprises:
and inputting the road network topology matrix into a graph convolution network, respectively combining the road network topology matrix with the three-dimensional space-time correlation matrix, respectively performing model training by adopting the three-dimensional component data matrix, and performing fusion output.
In this scheme, before the speed prediction is performed by the trained model, the method further includes:
constructed loss function
Figure BDA0003228963260000035
Wherein, YtIs representative of the actual speed of the traffic,
Figure BDA0003228963260000036
indicates the predicted speed, LregTo avoid overfitting parameters, ω is an over-parameter used to reduce prediction error.
The second aspect of the present invention also provides a traffic speed prediction system based on a spatio-temporal attention diagram convolutional network, which includes a memory and a processor, wherein the memory includes a traffic speed prediction method program based on the spatio-temporal attention diagram convolutional network, and when the processor executes the traffic speed prediction method program based on the spatio-temporal attention diagram convolutional network, the following steps are implemented:
sampling the collected existing speed data set to obtain a component data matrix related to a time sequence;
constructing a time attention network;
inputting the component data matrix into the time attention network to obtain a time correlation matrix;
constructing a spatial attention network;
inputting the time correlation matrix into the space attention network, and fusing to obtain a space-time correlation matrix;
inputting a road network topology matrix into a graph convolution network, and combining the road network topology matrix with the space-time incidence matrix to carry out model training;
and carrying out speed prediction through the trained model.
In this embodiment, the sampling the existing velocity data set to obtain the component data matrix related to the time sequence specifically includes:
sampling three dimensions of the existing speed data set to respectively obtain a time component data matrix, a day component data matrix and a week component data matrix of a relevant time sequence;
the inputting of the road network topology matrix into the graph convolution network and the combining with the space-time incidence matrix, and the model training specifically comprises:
and inputting the road network topology matrix into a graph convolution network, respectively combining the road network topology matrix with the three-dimensional space-time correlation matrix, respectively performing model training by adopting the three-dimensional component data matrix, and performing fusion output.
In this scheme, before carrying out speed prediction through the trained model, the method further comprises:
established loss function
Figure BDA0003228963260000041
Wherein, YtIs representative of the actual speed of the traffic,
Figure BDA0003228963260000042
indicates the predicted speed, LregTo avoid overfitting parameters, ω is an over-parameter used to reduce prediction error.
A third aspect of the present invention provides a computer-readable storage medium, which includes a program of a traffic speed prediction method based on a spatio-temporal attention-graph convolutional network of a machine, and when the program of the traffic speed prediction method based on the spatio-temporal attention-graph convolutional network is executed by a processor, the steps of the traffic speed prediction method based on the spatio-temporal attention-graph convolutional network as described in any one of the above are implemented.
The invention discloses a traffic speed prediction method based on a space-time attention-chart convolutional network and a related device, wherein the method comprises the following steps: sampling the collected existing speed data set to obtain a component data matrix related to a time sequence; constructing a time attention network; inputting the component data matrix into a time attention network to obtain a time correlation matrix; constructing a spatial attention network; inputting the time correlation matrix into a space attention network, and fusing to obtain a space-time correlation matrix; inputting the road network topology matrix into a graph convolution network, and combining the road network topology matrix with a space-time incidence matrix to carry out model training; and carrying out speed prediction through the trained model. The time attention network and the space attention network are fused to form a space-time attention network, the relevance of the traffic network in time and space is extracted, meanwhile, the information of adjacent nodes is continuously fused by combining the graph convolution network, the traffic speed is predicted, and the accuracy of traffic speed prediction is improved.
Drawings
FIG. 1 is a flow chart of a traffic speed prediction method based on a spatiotemporal attention-graph convolutional network according to the present application;
FIG. 2 is a block diagram of a traffic speed prediction system based on a spatiotemporal attention-graph convolutional network in accordance with the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Fig. 1 shows a flow chart of a traffic speed prediction method based on a spatiotemporal attention-driven convolutional network according to the present application.
As shown in fig. 1, the present application discloses a traffic speed prediction method based on a spatio-temporal attention-driven convolutional network, comprising the following steps:
s102, sampling the acquired existing speed data set to obtain a component data matrix related to a time sequence;
s104, constructing a time attention network;
s106, inputting the component data matrix into the time attention network to obtain a time correlation matrix;
s108, constructing a spatial attention network;
s110, inputting the time correlation matrix into the space attention network, and fusing to obtain a space-time correlation matrix;
s112, inputting the road network topology matrix into a graph convolution network, and combining the road network topology matrix with the space-time correlation matrix to carry out model training;
and S114, predicting the speed through the trained model.
It should be noted that, first, data sampling is performed according to the obtained data, data related to a time sequence is obtained, and a speed feature is extracted from the sampled data; and constructing a time attention network, inputting the sampled data into the constructed time attention network, and extracting the time correlation among the speeds. And then constructing a space attention network, taking the result obtained after further processing as input, inputting the result into the constructed space attention network, and fusing and extracting the space-time correlation.
Next, a space-time attention map convolution model is constructed from the road network matrix, and model training is performed by combining the space-time correlation data obtained by graph convolution network GCN training with the road network topology map. And finally, predicting the speed according to the trained model.
The invention provides a traffic speed prediction method based on a space-time attention diagram convolutional network, which is characterized in that a time attention network and a space attention network are fused to form the space-time attention network, the relevance of the traffic network in terms of time and space is extracted, meanwhile, the information of adjacent nodes is continuously fused by combining a diagram convolutional network (GCN) to predict traffic speed, and the accuracy of traffic speed prediction is improved by capturing the space-time relevance among traffic networks.
According to an embodiment of the present invention, the sampling an existing velocity data set to obtain a component data matrix related to a time series specifically includes:
sampling three dimensions of the existing speed data set to respectively obtain a time component data matrix, a day component data matrix and a week component data matrix of a relevant time sequence;
the inputting of the road network topology matrix into the graph convolution network and the combining with the space-time incidence matrix, and the model training specifically comprises:
and inputting the road network topology matrix into a graph convolution network, respectively combining the road network topology matrix with the three-dimensional space-time correlation matrix, respectively performing model training by adopting the three-dimensional component data matrix, and performing fusion output.
It should be noted that, according to the rule of data set acquisition, data of three time dimensions are acquired on a data set: respectively collecting data of three different time dimensions, specifically Yh、YdAnd YwWherein Y ishTime component data matrix representing the most recent time, YdRepresenting the most recent day component data matrix, YwRepresenting the most recent component data matrix, the three time components share the same network structure. Sampling batches with three different time dimensions can be divided according to the regularity that sampling data is collected every 5 minutes. And processing the sampled data, extracting speed characteristics, and constructing a training set and a test set according to the speed characteristics. In the embodiment of the present invention, the traffic speed of one hour in the future can be predicted, so the time window takes 12, and the last 12 time steps are taken as the test samples on the basis.
According to an embodiment of the present invention, the inputting the component data matrix into the time attention network to obtain a time correlation matrix specifically includes:
inputting the component data matrix into the time attention network to obtain a time attention matrix T:
Figure BDA0003228963260000071
wherein, Ke、L1、L2、L3、VeFor a learnable parameter, σ denotes the sigmoid activation function,
Figure BDA0003228963260000072
for the matrix of the component data it is,
Figure BDA0003228963260000073
Cr-1indicating the number of channels, T, of input data of the r-th layerr-1Representing the length of the input data time dimension of the r-th layer;
after the time attention matrix T is normalized, capturing the correlation strength between the nodes according to the time attention moment matrix:
Figure BDA0003228963260000074
Ti,jreflecting the time correlation strength between the times i, j, and multiplying the time correlation strength by the component data matrix to obtain a time correlation matrix
Figure BDA0003228963260000075
Figure BDA0003228963260000076
It should be noted that, in the time dimension, there is a correlation between traffic conditions in different time periods, and the correlation also changes in different cases. Likewise, temporal correlations between data are adaptively captured using a temporal attention mechanism.
A time attention network is constructed mainly by the following steps: inputting the node speed matrix of the time sequence obtained by sampling into the constructed time attention network to obtain
Figure BDA0003228963260000077
Dynamically calculating a time attention matrix T according to the input of the current layer, wherein Ke、L1、L2、L3、VeAre learnable parameters. σ denotes the sigmoid activation function, defined as follows:
Figure BDA0003228963260000078
Figure BDA0003228963260000079
represented is a temporal correlation module at layer r. Cr-1Indicating the number of channels, T, of input data of the r-th layerr-1Representing the length of the input data time dimension at the r-th level.
The T matrix is normalized and then captures the correlation strength between nodes according to the calculated time attention matrix:
Figure BDA00032289632600000710
Ti,jdynamically reflecting the time correlation strength between the times i and j, and multiplying an original sampling matrix to obtain a complete time correlation matrix:
Figure BDA00032289632600000711
according to the embodiment of the present invention, the inputting the time correlation matrix into the spatial attention network, and the fusing to obtain the space-time correlation matrix specifically includes:
inputting the time correlation matrix into the spatial attention network to obtain a space-time attention matrix S:
Figure BDA0003228963260000081
wherein, Ks、H1、H2、H3、VsIs a learnable parameter;
calculating a time correlation matrix S' according to the space-time attention matrix S:
Figure BDA0003228963260000082
it should be noted that, in the spatial dimension, the traffic conditions at different positions affect each other. The embodiment of the invention uses a space attention mechanism to adaptively capture the dynamic phase among nodes in the space dimension, and fuses the matrix with the time attention and the space attention network to obtain the space-time attention matrix.
Inputting the output (time correlation matrix) obtained by the time attention network into the space attention network to further fuse to obtain a space-time attention matrix S:
Figure BDA0003228963260000083
dynamically computing a spatiotemporal attention S based on an input of a temporal attention matrix, wherein K iss、H1、H2、H3、VsAre learnable parameters.
Capturing the correlation strength between the nodes according to the calculated space-time attention matrix:
Figure BDA0003228963260000084
s' dynamically reflects the space-time correlation strength between the times i and j;
and dynamically adjusting the weight value according to the obtained space-time correlation matrix S' and the input road network adjacent matrix to generate the attention coefficient of the node. Through the space-time correlation, the correlation of the road network speed on the time space can be better grasped, and a wider view field is provided for the speed prediction.
According to the embodiment of the invention, the step of inputting the road network topology matrix into the graph convolution network, combining the road network topology matrix with the space-time correlation matrix and carrying out model training to obtain the predicted speed specifically comprises the following steps:
inputting a road network topology matrix into a Laplace matrix L:
Figure BDA0003228963260000085
wherein, A represents the input road network topological matrix, D is degree matrix, specifically diagonal matrix, and the diagonal elements are
Figure BDA0003228963260000086
AijRepresenting the elements in the ith row and the j column;
the graph convolution network is specifically a graph convolution network in the form of chebyshev polynomial, and is expressed as:
Figure BDA0003228963260000091
where G denotes the convolution operation of a graph,
Figure BDA0003228963260000092
is a scaled normalized Laplace matrix, λmaxIs the maximum eigenvalue of L, θ'k(K-0, 1, … K) is a coefficient of the K-th term of the chebyshev polynomial, which is a learnable parameter;
the chebyshev polynomial of order K is defined as follows:
Tk(x)=2xTk-1(x)-Tk-2(x);
and combining the input road network topology matrix and the space-time incidence matrix to obtain a final graph convolution formula:
Figure BDA0003228963260000093
and after model training is carried out on the graph convolution formula, speed prediction is carried out through the trained model.
The traffic speed prediction based on the graph convolution network is to predict the future traffic conditions according to historical traffic data, and construct a space-time attention-driven convolution network (STA-GCN) model through a space-time correlation matrix and a road network topology matrix.
In order to capture the relevance of the road network, the invention adopts a graph volume of Chebyshev polynomial to accumulate the information of the neighbor nodes. Using laplace matrices from road network:
Figure BDA0003228963260000094
a represents the input road network topological matrix, D is degree matrix, and is a diagonal matrix, the diagonal elements are
Figure BDA0003228963260000095
AijRepresentative is the element in row i and column j.
The graph convolution network in the form of a chebyshev polynomial is represented as:
Figure BDA0003228963260000096
where G denotes the convolution operation of a graph. Since the convolution operation of the graph signals is equal to the product graph Fourier transform of these signals, which have been converted into the spectral domain, the above formula can be understood as the Fourier transform of gΘAnd x are respectively converted into spectral domains, and then the spectral domains are multiplied and subjected to inverse Fourier transform to obtain the final result of the convolution operation. However, it is difficult to directly perform eigenvalue decomposition on the laplacian matrix, especially for the road network. The present invention therefore approximates but effectively solves this problem with chebyshev polynomials,
Figure BDA0003228963260000097
is a scaled normalized Laplace matrix, λmaxIs the maximum of LCharacteristic value of θ'k(K-0, 1, … K) is the coefficient of the K-th term of the chebyshev polynomial, which is a learnable parameter that is continuously updated iteratively by optimizing a loss function during the model training process. The chebyshev polynomial of order K is defined as follows:
Tk(x)=2xTk-1(x)-Tk-2(x);
solving this formula using an approximate expansion of the chebyshev polynomial corresponds to extracting information for each node around.
And combining the input road network adjacent matrix with the obtained space-time correlation matrix to obtain a final graph convolution formula:
Figure BDA0003228963260000101
and (3) extracting the relevance of the road network in space and time through a space-time attention mechanism, modeling by combining a road network matrix, and training the networks with three different time dimensions.
After learning according to the same network of three different time dimensions, fusion output is carried out:
Figure BDA0003228963260000102
for three time dimensions, the predicted nodes have different dependence on each dimension, so the influence weights of the three components of each node are different, and the historical data should be learned. Wherein £ is the hadamard product. Wh、WdAnd WwIs a learning parameter that reflects the degree of influence of the three-dimensional time component on the prediction target. And obtaining the predicted speed according to the final fusion output.
According to the embodiment of the present invention, before the predicting the speed by the trained model, the method further includes:
constructed loss function
Figure BDA0003228963260000103
Wherein, YtIs representative of the actual speed of the traffic,
Figure BDA0003228963260000104
indicates the predicted speed, LregTo avoid overfitting parameters, ω is an over-parameter used to reduce prediction error.
It should be noted that, according to the difference comparison between the predicted speed and the actual speed of the space-time attention-driven convolution model, a new loss function calculation method is provided, which is continuously updated during each iteration to accelerate the model training speed, and the method can make the networks of three different time dimensions converge simultaneously.
The constructed loss function is defined as follows:
constructed loss function of
Figure BDA0003228963260000105
Wherein Y istIs representative of the actual speed of the traffic,
Figure BDA0003228963260000106
which is indicative of the predicted speed of the vehicle,
Figure BDA0003228963260000107
for minimizing the error between the actual traffic speed and the prediction. L isregHelps to avoid the over-fitting problem, and omega is an over-parameter, and minimizes the error prediction between the actual traffic speed and the actual traffic speed.
The time-space attention mechanism can learn implicit time-space correlation among nodes according to the characteristics of each node in input data, and attention scores among the nodes are dynamically calculated according to input, so that the attention score can be captured when the topological structure of a road network changes; in addition, since the spatial self-attention concentrates on aggregating the information of all nodes, it can also capture the spatial correlation of the road network from the global.
FIG. 2 is a block diagram of a traffic speed prediction system based on a spatiotemporal attention-graph convolutional network in accordance with the present invention.
As shown in fig. 2, the present invention discloses a traffic speed prediction system 2 based on a spatio-temporal attention-seeking convolutional network, which comprises a memory 21 and a processor 22, wherein the memory 21 comprises a traffic speed prediction method program based on the spatio-temporal attention-seeking convolutional network, and when the traffic speed prediction method program based on the spatio-temporal attention-seeking convolutional network is executed by the processor 22, the following steps are implemented:
sampling the collected existing speed data set to obtain a component data matrix related to a time sequence;
constructing a time attention network;
inputting the component data matrix into the time attention network to obtain a time correlation matrix;
constructing a spatial attention network;
inputting the time correlation matrix into the space attention network, and fusing to obtain a space-time correlation matrix;
inputting a road network topology matrix into a graph convolution network, and combining the road network topology matrix with the space-time incidence matrix to carry out model training;
and carrying out speed prediction through the trained model.
It should be noted that, first, data sampling is performed according to the obtained data, data related to a time sequence is obtained, and a speed feature is extracted from the sampled data; and constructing a time attention network, inputting the sampled data into the constructed time attention network, and extracting the time correlation among the speeds. And then constructing a space attention network, taking the result obtained after further processing as input, inputting the result into the constructed space attention network, and fusing and extracting the space-time correlation.
Next, a space-time attention map convolution model is constructed from the road network matrix, and model training is performed by combining the space-time correlation data obtained by graph convolution network GCN training with the road network topology map. And finally, predicting the speed according to the trained model.
The invention provides a traffic speed prediction method based on a space-time attention diagram convolutional network, which is characterized in that a time attention network and a space attention network are fused to form the space-time attention network, the relevance of the traffic network in terms of time and space is extracted, meanwhile, the information of adjacent nodes is continuously fused by combining a diagram convolutional network (GCN) to predict traffic speed, and the accuracy of traffic speed prediction is improved by capturing the space-time relevance among traffic networks.
According to an embodiment of the present invention, the sampling an existing velocity data set to obtain a component data matrix related to a time series specifically includes:
sampling three dimensions of the existing speed data set to respectively obtain a time component data matrix, a day component data matrix and a week component data matrix of a relevant time sequence;
the inputting of the road network topology matrix into the graph convolution network and the combining with the space-time incidence matrix, and the model training specifically comprises:
and inputting the road network topology matrix into a graph convolution network, respectively combining the road network topology matrix with the three-dimensional space-time correlation matrix, respectively performing model training by adopting the three-dimensional component data matrix, and performing fusion output.
It should be noted that, according to the rule of data set acquisition, data of three time dimensions are acquired on a data set: respectively collecting data of three different time dimensions, specifically Yh、YdAnd YwWherein Y ishTime component data matrix representing the most recent time, YdRepresenting the most recent day component data matrix, YwRepresenting the most recent component data matrix, the three time components share the same network structure. Sampling batches with three different time dimensions can be divided according to the regularity that sampling data is collected every 5 minutes. And processing the sampled data, extracting speed characteristics, and constructing a training set and a test set according to the speed characteristics. In the embodiment of the present invention, the traffic speed of one hour in the future can be predicted, so the time window takes 12, and the last 12 time steps are taken as the test samples on the basis.
According to an embodiment of the present invention, the inputting the component data matrix into the time attention network to obtain a time correlation matrix specifically includes:
inputting the component data matrix into the time attention network to obtain a time attention matrix T:
Figure BDA0003228963260000121
wherein, Ke、L1、L2、L3、VeFor a learnable parameter, σ denotes the sigmoid activation function,
Figure BDA0003228963260000122
for the matrix of the component data it is,
Figure BDA0003228963260000123
Cr-1indicating the number of channels, T, of input data of the r-th layerr-1Representing the length of the input data time dimension of the r-th layer;
after the time attention matrix T is normalized, capturing the correlation strength between the nodes according to the time attention moment matrix:
Figure BDA0003228963260000124
Ti,jreflecting the time correlation strength between the times i, j, and multiplying the time correlation strength by the component data matrix to obtain a time correlation matrix
Figure BDA0003228963260000125
Figure BDA0003228963260000126
It should be noted that, in the time dimension, there is a correlation between traffic conditions in different time periods, and the correlation also changes in different cases. Likewise, temporal correlations between data are adaptively captured using a temporal attention mechanism.
A time attention network is constructed mainly by the following steps: inputting the node speed matrix of the time sequence obtained by sampling into the constructed time attention network to obtain
Figure BDA0003228963260000131
Dynamically calculating a time attention matrix T according to the input of the current layer, wherein Ke、L1、L2、L3、VeAre learnable parameters. σ denotes the sigmoid activation function, defined as follows:
Figure BDA0003228963260000132
Figure BDA0003228963260000133
represented is a temporal correlation module at layer r. Cr-1Indicating the number of channels, T, of input data of the r-th layerr-1Representing the length of the input data time dimension at the r-th level.
The T matrix is normalized and then captures the correlation strength between nodes according to the calculated time attention matrix:
Figure BDA0003228963260000134
Ti,jdynamically reflecting the time correlation strength between the times i and j, and multiplying an original sampling matrix to obtain a complete time correlation matrix:
Figure BDA0003228963260000135
according to the embodiment of the present invention, the inputting the time correlation matrix into the spatial attention network, and the fusing to obtain the space-time correlation matrix specifically includes:
inputting the time correlation matrix into the spatial attention network to obtain a space-time attention matrix S:
Figure BDA0003228963260000136
wherein, Ks、H1、H2、H3、VsIs a learnable parameter;
calculating a time correlation matrix S' according to the space-time attention matrix S:
Figure BDA0003228963260000137
it should be noted that, in the spatial dimension, the traffic conditions at different positions affect each other. The embodiment of the invention uses a space attention mechanism to adaptively capture the dynamic phase among nodes in the space dimension, and fuses the matrix with the time attention and the space attention network to obtain the space-time attention matrix.
Inputting the output (time correlation matrix) obtained by the time attention network into the space attention network to further fuse to obtain a space-time attention matrix S:
Figure BDA0003228963260000138
dynamically computing a spatiotemporal attention S based on an input of a temporal attention matrix, wherein K iss、H1、H2、H3、VsAre learnable parameters.
Capturing the correlation strength between the nodes according to the calculated space-time attention matrix:
Figure BDA0003228963260000141
s' dynamically reflects the space-time correlation strength between the times i and j;
and dynamically adjusting the weight value according to the obtained space-time correlation matrix S' and the input road network adjacent matrix to generate the attention coefficient of the node. Through the space-time correlation, the correlation of the road network speed on the time space can be better grasped, and a wider view field is provided for the speed prediction.
According to the embodiment of the invention, the step of inputting the road network topology matrix into the graph convolution network, combining the road network topology matrix with the space-time correlation matrix and carrying out model training to obtain the predicted speed specifically comprises the following steps:
inputting a road network topology matrix into a Laplace matrix L:
Figure BDA0003228963260000142
wherein, A represents the input road network topological matrix, D is degree matrix, specifically diagonal matrix, and the diagonal elements are
Figure BDA0003228963260000143
AijRepresenting the elements in the ith row and the j column;
the graph convolution network is specifically a graph convolution network in the form of chebyshev polynomial, and is expressed as:
Figure BDA0003228963260000144
where G denotes the convolution operation of a graph,
Figure BDA0003228963260000145
is a scaled normalized Laplace matrix, λmaxIs the maximum eigenvalue of L, θ'k(K-0, 1, … K) is a coefficient of the K-th term of the chebyshev polynomial, which is a learnable parameter;
the chebyshev polynomial of order K is defined as follows:
Tk(x)=2xTk-1(x)-Tk-2(x);
and combining the input road network topology matrix and the space-time incidence matrix to obtain a final graph convolution formula:
Figure BDA0003228963260000146
and after model training is carried out on the graph convolution formula, speed prediction is carried out through the trained model.
The traffic speed prediction based on the graph convolution network is to predict the future traffic conditions according to historical traffic data, and construct the STA-GCN model through a space-time association matrix and a road network topology matrix.
In order to capture the relevance of the road network, the invention adopts a graph volume of Chebyshev polynomial to accumulate the information of the neighbor nodes. Using laplace matrices from road network:
Figure BDA0003228963260000147
a represents the input road network topological matrix, D is degree matrix, and is a diagonal matrix, the diagonal elements are
Figure BDA0003228963260000148
AijRepresentative is the element in row i and column j.
The graph convolution network in the form of a chebyshev polynomial is represented as:
Figure BDA0003228963260000149
where G denotes the convolution operation of a graph. Since the convolution operation of the graph signals is equal to the product graph Fourier transform of these signals, which have been converted into the spectral domain, the above formula can be understood as the Fourier transform of gΘAnd x are respectively converted into spectral domains, and then the spectral domains are multiplied and subjected to inverse Fourier transform to obtain the final result of the convolution operation. However, it is difficult to directly perform eigenvalue decomposition on the laplacian matrix, especially for the road network. Therefore, the invention adoptsApproximating but effectively solving this problem with chebyshev polynomials,
Figure BDA0003228963260000151
is a scaled normalized Laplace matrix, λmaxIs the maximum eigenvalue of L, θ'k(K-0, 1, … K) is the coefficient of the K-th term of the chebyshev polynomial, which is a learnable parameter that is continuously updated iteratively by optimizing a loss function during the model training process. The chebyshev polynomial of order K is defined as follows:
Tk(x)=2xTk-1(x)-Tk-2(x);
solving this formula using an approximate expansion of the chebyshev polynomial corresponds to extracting information for each node around.
And combining the input road network adjacent matrix with the obtained space-time correlation matrix to obtain a final graph convolution formula:
Figure BDA0003228963260000152
and (3) extracting the relevance of the road network in space and time through a space-time attention mechanism, modeling by combining a road network matrix, and training the networks with three different time dimensions.
After learning according to the same network of three different time dimensions, fusion output is carried out:
Figure BDA0003228963260000153
for three time dimensions, the predicted nodes have different dependence on each dimension, so the influence weights of the three components of each node are different, and the historical data should be learned. Wherein £ is the hadamard product. Wh、WdAnd WwIs a learning parameter that reflects the degree of influence of the three-dimensional time component on the prediction target. And obtaining the predicted speed according to the final fusion output.
According to the embodiment of the present invention, before the predicting the speed by the trained model, the method further includes:
constructed loss function
Figure BDA0003228963260000154
Wherein, YtIs representative of the actual speed of the traffic,
Figure BDA0003228963260000155
indicates the predicted speed, LregTo avoid overfitting parameters, ω is an over-parameter used to reduce prediction error.
It should be noted that, according to the difference comparison between the predicted speed and the actual speed of the space-time attention-driven convolution model, a new loss function calculation method is provided, which is continuously updated during each iteration to accelerate the model training speed, and the method can make the networks of three different time dimensions converge simultaneously.
The constructed loss function is defined as follows:
constructed loss function of
Figure BDA0003228963260000161
Wherein Y istIs representative of the actual speed of the traffic,
Figure BDA0003228963260000162
which is indicative of the predicted speed of the vehicle,
Figure BDA0003228963260000163
for minimizing the error between the actual traffic speed and the prediction. L isregHelps to avoid the over-fitting problem, and omega is an over-parameter, and minimizes the error prediction between the actual traffic speed and the actual traffic speed.
The time-space attention mechanism can learn implicit time-space correlation among nodes according to the characteristics of each node in input data, and attention scores among the nodes are dynamically calculated according to input, so that the attention score can be captured when the topological structure of a road network changes; in addition, since the spatial self-attention concentrates on aggregating the information of all nodes, it can also capture the spatial correlation of the road network from the global.
A third aspect of the present invention provides a computer-readable storage medium, which includes a program of a traffic speed prediction method based on a spatio-temporal attention-graph convolutional network of a machine, and when the program of the traffic speed prediction method based on the spatio-temporal attention-graph convolutional network is executed by a processor, the steps of the traffic speed prediction method based on the spatio-temporal attention-graph convolutional network as described in any one of the above are implemented.
The invention discloses a traffic speed prediction method based on a space-time attention-chart convolutional network and a related device, wherein the method comprises the following steps: sampling the collected existing speed data set to obtain a component data matrix related to a time sequence; constructing a time attention network; inputting the component data matrix into a time attention network to obtain a time correlation matrix; constructing a spatial attention network; inputting the time correlation matrix into a space attention network, and fusing to obtain a space-time correlation matrix; inputting the road network topology matrix into a graph convolution network, and combining the road network topology matrix with a space-time incidence matrix to carry out model training; and carrying out speed prediction through the trained model. The time attention network and the space attention network are fused to form a space-time attention network, the relevance of the traffic network in time and space is extracted, meanwhile, the information of adjacent nodes is continuously fused by combining a Graph Convolution Network (GCN) to predict the traffic speed, and the accuracy of traffic speed prediction is improved by capturing the space-time relevance between the traffic networks.
The following is an application example of the traffic speed prediction method based on the spatio-temporal attention-chart convolutional network provided by the invention:
1. pre-processing of data
Experiments were performed on the pemd 4 and pemd 8 datasets. The PEMSD4 data set contains traffic data (including traffic volume, speed, lane occupancy) for 307 ring detectors in the san francisco bay area from 1/2018 to 28/2/2018. The pemd 8 data set contains traffic data (including traffic, speed, lane occupancy) collected by 170 annular detectors in the san benadino region from 1/7/2016 to 31/8/2016. The raw data includes two parts, one is traffic data and the other is the distance between the various sensors. The data preprocessing comprises the steps of segmenting a data set, making training and testing samples.
2. Model training
And loading the processed data set to the formula (1) to the formula (5) in the embodiment to obtain a space-time correlation matrix S' between the nodes.
And (3) inputting the space-time correlation matrix S' into a formula (6) to carry out model training by combining the input road network correlation matrix A. Then 2 performance indexes of the average absolute error MAE and the root mean square error RMSE are calculated, wherein the 2 performance indexes are defined as follows:
Figure BDA0003228963260000171
Figure BDA0003228963260000172
wherein Xi
Figure BDA0003228963260000173
Respectively representing the ith element in the real value and the predicted value, and n represents the total number of the elements.
TABLE 1 comparison of the present invention with HA, ARIMA, VAR on PEMSD4 data
Figure BDA0003228963260000174
TABLE 2 comparison of the present invention with HA, ARIMA, VAR on PEMSD8 data
Figure BDA0003228963260000175
It can be found that the prediction of the invention in all degrees achieves better effect. The graph network fused with the space-time correlation has good effect on the accuracy of prediction, and has certain reference value and actual economic benefit.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.

Claims (10)

1. A traffic speed prediction method based on a space-time attention-driven convolutional network is characterized by comprising the following steps:
sampling the collected existing speed data set to obtain a component data matrix related to a time sequence;
constructing a time attention network;
inputting the component data matrix into the time attention network to obtain a time correlation matrix;
constructing a spatial attention network;
inputting the time correlation matrix into the space attention network, and fusing to obtain a space-time correlation matrix;
inputting a road network topology matrix into a graph convolution network, and combining the road network topology matrix with the space-time incidence matrix to carry out model training;
and carrying out speed prediction through the trained model.
2. The method of predicting traffic speed based on the spatiotemporal attention-graph convolutional network of claim 1, wherein the inputting the component data matrix into the temporal attention network to obtain the time correlation matrix specifically comprises:
inputting the component data matrix into the time attention network to obtain a time attention matrix T:
Figure FDA0003228963250000011
wherein, Ke、L1、L2、L3、VeFor a learnable parameter, σ denotes the sigmoid activation function,
Figure FDA0003228963250000012
for the matrix of the component data it is,
Figure FDA0003228963250000013
Cr-1indicating the number of channels, T, of input data of the r-th layerr-1Representing the length of the input data time dimension of the r-th layer;
after the time attention matrix T is normalized, capturing the correlation strength between the nodes according to the time attention moment matrix:
Figure FDA0003228963250000014
Ti,jreflecting the time correlation strength between the times i, j, and multiplying the time correlation strength by the component data matrix to obtain a time correlation matrix
Figure FDA0003228963250000015
Figure FDA0003228963250000016
3. The traffic speed prediction method based on the spatio-temporal attention-graph convolutional network as claimed in claim 2, wherein the inputting the time correlation matrix into the spatial attention network, and the fusing to obtain the spatio-temporal correlation matrix specifically comprises:
inputting the time correlation matrix into the spatial attention network to obtain a space-time attention matrix S:
Figure FDA0003228963250000021
wherein, Ks、H1、H2、H3、VsIs a learnable parameter;
calculating a time correlation matrix S' according to the space-time attention matrix S:
Figure FDA0003228963250000022
4. the traffic speed prediction method based on the spatio-temporal attention-diagram convolutional network as claimed in claim 3, wherein the step of inputting the road network topology matrix into the graph convolutional network, and performing model training by combining the road network topology matrix with the spatio-temporal correlation matrix to obtain the predicted speed specifically comprises the steps of:
inputting a road network topology matrix into a Laplace matrix L:
Figure FDA0003228963250000023
wherein, A represents the input road network topological matrix, D is degree matrix, specifically diagonal matrix, and the diagonal elements are
Figure FDA0003228963250000024
AijRepresenting the elements in the ith row and the j column;
the graph convolution network is specifically a graph convolution network in the form of chebyshev polynomial, and is expressed as:
Figure FDA0003228963250000025
where G denotes the convolution operation of a graph,
Figure FDA0003228963250000026
is a scaled normalized Laplace matrix, λmaxIs the maximum eigenvalue of L, θ'k(K-0, 1, … K) is a coefficient of the K-th term of the chebyshev polynomial, which is a learnable parameter;
the chebyshev polynomial of order K is defined as follows:
Tk(x)=2xTk-1(x)-Tk-2(x);
and combining the input road network topology matrix and the space-time incidence matrix to obtain a final graph convolution formula:
Figure FDA0003228963250000027
and after model training is carried out on the graph convolution formula, speed prediction is carried out through the trained model.
5. The traffic speed prediction method based on the spatio-temporal attention-graph convolutional network of claim 4, wherein the sampling the existing speed data set to obtain the component data matrix related to the time series specifically comprises:
sampling three dimensions of the existing speed data set to respectively obtain a time component data matrix, a day component data matrix and a week component data matrix of a relevant time sequence;
the inputting of the road network topology matrix into the graph convolution network and the combining with the space-time incidence matrix, and the model training specifically comprises:
and inputting the road network topology matrix into a graph convolution network, respectively combining the road network topology matrix with the three-dimensional space-time correlation matrix, respectively performing model training by adopting the three-dimensional component data matrix, and performing fusion output.
6. The method of predicting traffic speed based on spatio-temporal attention-graph convolutional network of claim 5, further comprising, before the predicting speed by the trained model:
constructed loss function
Figure FDA0003228963250000031
Wherein, YtIs representative of the actual speed of the traffic,
Figure FDA0003228963250000032
indicates the predicted speed, LregTo avoid overfitting parameters, ω is an over-parameter used to reduce prediction error.
7. A traffic speed prediction system based on a spatio-temporal attention-graph convolutional network comprises a memory and a processor, wherein the memory comprises a traffic speed prediction method program based on the spatio-temporal attention-graph convolutional network, and the traffic speed prediction method program based on the spatio-temporal attention-graph convolutional network realizes the following steps when the processor executes the program:
sampling the collected existing speed data set to obtain a component data matrix related to a time sequence;
constructing a time attention network;
inputting the component data matrix into the time attention network to obtain a time correlation matrix;
constructing a spatial attention network;
inputting the time correlation matrix into the space attention network, and fusing to obtain a space-time correlation matrix;
inputting a road network topology matrix into a graph convolution network, and combining the road network topology matrix with the space-time incidence matrix to carry out model training;
and carrying out speed prediction through the trained model.
8. The system of claim 7, wherein the sampling of the existing speed data set to obtain the component data matrix with respect to the time series comprises:
sampling three dimensions of the existing speed data set to respectively obtain a time component data matrix, a day component data matrix and a week component data matrix of a relevant time sequence;
the inputting of the road network topology matrix into the graph convolution network and the combining with the space-time incidence matrix, and the model training specifically comprises:
and inputting the road network topology matrix into a graph convolution network, respectively combining the road network topology matrix with the three-dimensional space-time correlation matrix, respectively performing model training by adopting the three-dimensional component data matrix, and performing fusion output.
9. The system of claim 7, further comprising, prior to performing the speed prediction using the trained model:
established loss function
Figure FDA0003228963250000041
Wherein, YtIs representative of the actual speed of the traffic,
Figure FDA0003228963250000042
indicates the predicted speed, LregTo avoid overfitting parameters, ω is an over-parameter used to reduce prediction error.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium includes a program of a traffic speed prediction method based on a spatio-temporal attention-graph convolutional network, and when the program of the traffic speed prediction method based on the spatio-temporal attention-graph convolutional network is executed by a processor, the steps of the traffic speed prediction method based on the spatio-temporal attention-graph convolutional network as claimed in any one of claims 1 to 6 are implemented.
CN202110980592.8A 2021-08-25 2021-08-25 Traffic speed prediction method and device based on space-time attention force diagram convolution network Active CN113705880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110980592.8A CN113705880B (en) 2021-08-25 2021-08-25 Traffic speed prediction method and device based on space-time attention force diagram convolution network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110980592.8A CN113705880B (en) 2021-08-25 2021-08-25 Traffic speed prediction method and device based on space-time attention force diagram convolution network

Publications (2)

Publication Number Publication Date
CN113705880A true CN113705880A (en) 2021-11-26
CN113705880B CN113705880B (en) 2024-09-20

Family

ID=78654602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110980592.8A Active CN113705880B (en) 2021-08-25 2021-08-25 Traffic speed prediction method and device based on space-time attention force diagram convolution network

Country Status (1)

Country Link
CN (1) CN113705880B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113962495A (en) * 2021-12-21 2022-01-21 华控清交信息科技(北京)有限公司 Wind power plant power prediction method and device and electronic equipment
CN114038200A (en) * 2021-11-29 2022-02-11 东北大学 Attention mechanism-based time-space synchronization map convolutional network traffic flow prediction method
CN114511154A (en) * 2022-02-22 2022-05-17 南通大学 Traffic flow prediction method based on space-time complex graph convolution network
CN114529081A (en) * 2022-02-18 2022-05-24 哈尔滨工程大学 Space-time combined traffic flow prediction method and device
CN114743374A (en) * 2022-04-01 2022-07-12 清华大学深圳国际研究生院 Multi-element traffic flow prediction method based on graph network
CN114900357A (en) * 2022-05-07 2022-08-12 长三角信息智能创新研究院 Method, equipment and storage medium for detecting flooding attack of time-space diagram neural network link
CN115063972A (en) * 2022-05-18 2022-09-16 浙江工业大学 Traffic speed prediction method and system based on graph convolution and gate control cyclic unit
CN115081717A (en) * 2022-06-27 2022-09-20 北京建筑大学 Rail transit passenger flow prediction method integrating attention mechanism and graph neural network
CN115169426A (en) * 2022-02-22 2022-10-11 国网山东省电力公司信息通信公司 Anomaly detection method and system based on similarity learning fusion model
CN115307780A (en) * 2022-09-29 2022-11-08 中国海洋大学 Sea surface temperature prediction method, system and application based on time-space information interaction fusion
CN115758173A (en) * 2022-11-16 2023-03-07 西华大学 Cloud platform system anomaly detection method and device based on parallel graph attention network
CN116109021A (en) * 2023-04-13 2023-05-12 中国科学院大学 Travel time prediction method, device, equipment and medium based on multitask learning
CN117133129A (en) * 2023-10-26 2023-11-28 山东科技大学 Traffic speed prediction method based on multi-component attention-seeking neural network
US20240129211A1 (en) * 2022-10-12 2024-04-18 Hyundai Motor Company Apparatus for Predicting Traffic Speed and Method Thereof
CN118171938A (en) * 2024-05-13 2024-06-11 深圳市城市交通规划设计研究中心股份有限公司 Traffic fusion prediction method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368815A (en) * 2020-05-28 2020-07-03 之江实验室 Pedestrian re-identification method based on multi-component self-attention mechanism
CN112071065A (en) * 2020-09-16 2020-12-11 山东理工大学 Traffic flow prediction method based on global diffusion convolution residual error network
CN112183862A (en) * 2020-09-29 2021-01-05 长春理工大学 Traffic flow prediction method and system for urban road network
CN112241814A (en) * 2020-10-20 2021-01-19 河南大学 Traffic prediction method based on reinforced space-time diagram neural network
CN112801404A (en) * 2021-02-14 2021-05-14 北京工业大学 Traffic prediction method based on self-adaptive spatial self-attention-seeking convolution
CN112905379A (en) * 2021-03-10 2021-06-04 南京理工大学 Traffic big data restoration method based on graph self-encoder of self-attention mechanism
CN113128237A (en) * 2021-04-09 2021-07-16 青岛海大新星软件咨询有限公司 Semantic representation model construction method for service resources

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368815A (en) * 2020-05-28 2020-07-03 之江实验室 Pedestrian re-identification method based on multi-component self-attention mechanism
CN112071065A (en) * 2020-09-16 2020-12-11 山东理工大学 Traffic flow prediction method based on global diffusion convolution residual error network
CN112183862A (en) * 2020-09-29 2021-01-05 长春理工大学 Traffic flow prediction method and system for urban road network
CN112241814A (en) * 2020-10-20 2021-01-19 河南大学 Traffic prediction method based on reinforced space-time diagram neural network
CN112801404A (en) * 2021-02-14 2021-05-14 北京工业大学 Traffic prediction method based on self-adaptive spatial self-attention-seeking convolution
CN112905379A (en) * 2021-03-10 2021-06-04 南京理工大学 Traffic big data restoration method based on graph self-encoder of self-attention mechanism
CN113128237A (en) * 2021-04-09 2021-07-16 青岛海大新星软件咨询有限公司 Semantic representation model construction method for service resources

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114038200A (en) * 2021-11-29 2022-02-11 东北大学 Attention mechanism-based time-space synchronization map convolutional network traffic flow prediction method
CN113962495A (en) * 2021-12-21 2022-01-21 华控清交信息科技(北京)有限公司 Wind power plant power prediction method and device and electronic equipment
CN114529081A (en) * 2022-02-18 2022-05-24 哈尔滨工程大学 Space-time combined traffic flow prediction method and device
CN115169426A (en) * 2022-02-22 2022-10-11 国网山东省电力公司信息通信公司 Anomaly detection method and system based on similarity learning fusion model
CN114511154A (en) * 2022-02-22 2022-05-17 南通大学 Traffic flow prediction method based on space-time complex graph convolution network
CN115169426B (en) * 2022-02-22 2023-10-13 国网山东省电力公司信息通信公司 Anomaly detection method and system based on similarity learning fusion model
CN114743374A (en) * 2022-04-01 2022-07-12 清华大学深圳国际研究生院 Multi-element traffic flow prediction method based on graph network
CN114900357A (en) * 2022-05-07 2022-08-12 长三角信息智能创新研究院 Method, equipment and storage medium for detecting flooding attack of time-space diagram neural network link
CN115063972B (en) * 2022-05-18 2024-06-11 浙江工业大学 Traffic speed prediction method and system based on graph convolution and gating circulation unit
CN115063972A (en) * 2022-05-18 2022-09-16 浙江工业大学 Traffic speed prediction method and system based on graph convolution and gate control cyclic unit
CN115081717A (en) * 2022-06-27 2022-09-20 北京建筑大学 Rail transit passenger flow prediction method integrating attention mechanism and graph neural network
CN115307780A (en) * 2022-09-29 2022-11-08 中国海洋大学 Sea surface temperature prediction method, system and application based on time-space information interaction fusion
CN115307780B (en) * 2022-09-29 2023-01-06 中国海洋大学 Sea surface temperature prediction method, system and application based on time-space information interaction fusion
US20240129211A1 (en) * 2022-10-12 2024-04-18 Hyundai Motor Company Apparatus for Predicting Traffic Speed and Method Thereof
CN115758173B (en) * 2022-11-16 2023-09-26 西华大学 Cloud platform system anomaly detection method and device based on parallel graph attention network
CN115758173A (en) * 2022-11-16 2023-03-07 西华大学 Cloud platform system anomaly detection method and device based on parallel graph attention network
CN116109021B (en) * 2023-04-13 2023-08-15 中国科学院大学 Travel time prediction method, device, equipment and medium based on multitask learning
CN116109021A (en) * 2023-04-13 2023-05-12 中国科学院大学 Travel time prediction method, device, equipment and medium based on multitask learning
CN117133129A (en) * 2023-10-26 2023-11-28 山东科技大学 Traffic speed prediction method based on multi-component attention-seeking neural network
CN117133129B (en) * 2023-10-26 2024-01-30 山东科技大学 Traffic speed prediction method based on multi-component attention-seeking neural network
CN118171938A (en) * 2024-05-13 2024-06-11 深圳市城市交通规划设计研究中心股份有限公司 Traffic fusion prediction method
CN118171938B (en) * 2024-05-13 2024-08-13 深圳市城市交通规划设计研究中心股份有限公司 Traffic fusion prediction method

Also Published As

Publication number Publication date
CN113705880B (en) 2024-09-20

Similar Documents

Publication Publication Date Title
CN113705880A (en) Traffic speed prediction method and device based on space-time attention diagram convolutional network
CN110675623B (en) Short-term traffic flow prediction method, system and device based on hybrid deep learning
Liu et al. Reliability of response region: a novel mechanism in visual tracking by edge computing for IIoT environments
WO2021218517A1 (en) Method for acquiring neural network model, and image processing method and apparatus
WO2021238366A1 (en) Neural network construction method and apparatus
CN112990211B (en) Training method, image processing method and device for neural network
WO2021129668A1 (en) Neural network training method and device
EP4235506A1 (en) Neural network model training method, image processing method, and apparatus
CN113807399A (en) Neural network training method, neural network detection method and neural network detection device
EP4105828A1 (en) Model updating method and related device
CN113988263A (en) Knowledge distillation-based space-time prediction method in industrial Internet of things edge equipment
WO2023207411A1 (en) Traffic determination method and apparatus based on spatio-temporal data, and device and medium
CN111047078A (en) Traffic characteristic prediction method, system and storage medium
CN113536970A (en) Training method of video classification model and related device
CN117156442A (en) Cloud data security protection method and system based on 5G network
CN113887704A (en) Traffic information prediction method, device, equipment and storage medium
WO2024040941A1 (en) Neural architecture search method and device, and storage medium
CN117077928A (en) Network appointment vehicle demand prediction method, device, equipment and storage medium
CN113128285A (en) Method and device for processing video
Ma et al. Heterogeneous data fusion considering spatial correlations using graph convolutional networks and its application in air quality prediction
CN115080795A (en) Multi-charging-station cooperative load prediction method and device
Bhaumik et al. STLGRU: Spatio-temporal lightweight graph GRU for traffic flow prediction
CN116432736A (en) Neural network model optimization method and device and computing equipment
Xu et al. Multi‐Dimensional Attention Based Spatial‐Temporal Networks for Traffic Forecasting
CN117095541A (en) Method, device, equipment and storage medium for predicting space-time feature fusion traffic flow

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