CN112668797A - Long-term and short-term traffic prediction method - Google Patents
Long-term and short-term traffic prediction method Download PDFInfo
- Publication number
- CN112668797A CN112668797A CN202011641479.9A CN202011641479A CN112668797A CN 112668797 A CN112668797 A CN 112668797A CN 202011641479 A CN202011641479 A CN 202011641479A CN 112668797 A CN112668797 A CN 112668797A
- Authority
- CN
- China
- Prior art keywords
- traffic
- traffic prediction
- convolution
- term
- characteristic
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000007774 longterm Effects 0.000 title claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 49
- 239000011159 matrix material Substances 0.000 claims description 33
- 238000009792 diffusion process Methods 0.000 claims description 27
- 230000004913 activation Effects 0.000 claims description 12
- 238000012549 training Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 7
- 239000000284 extract Substances 0.000 claims description 6
- 230000007704 transition Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000012546 transfer Methods 0.000 claims description 4
- 238000000605 extraction Methods 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 2
- 238000009825 accumulation Methods 0.000 abstract description 9
- 230000006870 function Effects 0.000 description 9
- 230000003044 adaptive effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000001364 causal effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Traffic Control Systems (AREA)
Abstract
The application discloses a long-term and short-term traffic prediction method, which comprises the steps of obtaining first historical traffic data of nodes in a constructed traffic network graph, and performing convolution processing on the first historical traffic data through a first convolution layer in a preset traffic prediction model; performing traffic prediction on the convolved first historical traffic data through a first iterative RNN operator in the model, outputting a traffic prediction result of a first time step, and inputting the traffic prediction result of the first time step into a next iterative RNN operator for traffic prediction until the Tth time steppOutput of the iterative RNN operatorpThe traffic prediction result of each time step is obtained by splicing the T in the modelpThe traffic prediction results of each time step are spliced and input intoAnd the second convolution layer performs convolution processing and outputs a final traffic prediction result. The method and the device solve the technical problems that the existing traffic prediction method is high in prediction error accumulation and cannot give consideration to long-term and short-term prediction accuracy at the same time.
Description
Technical Field
The application relates to the technical field of traffic prediction, in particular to a long-term and short-term traffic prediction method.
Background
Traffic prediction is a classic space-time prediction problem, and is widely applied to actual life, such as intelligent city road network planning, intelligent travel path planning, urban public transport systems and the like. Because traffic data has a high degree of non-linearity and complexity, the prior art mainly solves the traffic prediction problem through deep learning. The existing traffic prediction method has the problems of high prediction error accumulation and incapability of simultaneously considering long-term and short-term prediction accuracy.
Disclosure of Invention
The application provides a long-term and short-term traffic prediction method, which is used for solving the technical problems that the existing traffic prediction method is high in prediction error accumulation and cannot give consideration to long-term and short-term prediction accuracy at the same time.
In view of the above, a first aspect of the present application provides a long-term and short-term traffic prediction method, including:
constructing a traffic network into a graph structure to obtain a traffic network graph;
acquiring first historical traffic data of nodes in the traffic network graph;
inputting the first historical traffic data into a first convolutional layer, TpThe iterative RNN operators, the splicing module and a preset traffic prediction model of the second convolutional layer enable the first convolutional layer to carry out convolution processing on the first historical traffic data, the first iterative RNN operator carries out traffic prediction on the first historical traffic data after convolution processing, a traffic prediction result of a first time step is output, the traffic prediction result of the first time step is input to the next iterative RNN operator to carry out traffic prediction until the Tth time steppOutput of the iterative RNN operatorpThe traffic prediction result of each time step, the splicing module pair TpAnd splicing the traffic prediction results of each time step, performing convolution processing on the spliced traffic prediction results by the second convolution layer, and outputting a final traffic prediction result.
Optionally, the iterative RNN operator includes a gate-controlled linear unit, a diffusion convolution layer, and a full-link layer;
the first iteration RNN operator carries out traffic prediction on the first historical traffic data after convolution processing, and outputs a traffic prediction result of a first time step, and the method comprises the following steps:
the gate control linear unit extracts the time dependence relationship of the first historical traffic data after convolution processing and outputs a first characteristic;
extracting the spatial dependence relation of the first characteristic by the diffusion convolution layer, and outputting a second characteristic;
and the full-connection layer carries out traffic prediction on the second characteristic and outputs a traffic prediction result of the first time step.
Optionally, the gate control linear unit extracts a time dependency relationship of the first historical traffic data after the convolution processing, and outputs a first feature, including:
the gate control linear unit performs one-dimensional convolution processing on the first historical traffic data after convolution processing to obtain a first convolution characteristic and a second convolution characteristic,
the gate control linear unit carries out activation processing on the second convolution characteristic through an activation function, and calculates a Hadamard product of the first convolution characteristic and the second convolution characteristic after the activation processing;
and the gate control linear unit carries out residual error connection on the first historical traffic data after convolution processing and the Hadamard product, and outputs a first characteristic.
Optionally, the extracting, by the diffusion convolution layer, the spatial dependency relationship of the first feature, and outputting a second feature includes:
and the diffusion convolution layer performs diffusion convolution characteristic extraction with a self-adaptive matrix on the first characteristic and outputs a second characteristic.
Optionally, the second characteristic is:
wherein Z is a second feature, PfA/rowsum (a) is a forward transition matrix, a is a weight adjacency matrix; pb=AT/rowsum(AT) Is a backward transfer matrix; x is a first characteristic, W is a parameter matrix of the diffusion convolution layer, and K is a constant;to adapt the matrix, E1、E2Respectively embedding a source node and embedding a target node.
Optionally, the method further includes:
calculating the weight adjacency matrix based on the traffic network graph, wherein the calculation formula of the weights in the weight adjacency matrix is as follows:
wherein ,aijIs the weight of the edge between the neighboring nodes i, j in the traffic network graph, dijIs the distance between neighboring nodes i, j, δ is the threshold parameter, and ε is the hyperparameter.
Optionally, the first historical traffic data is input into a first convolutional layer, TpThe iterative RNN operators, the splicing module and the preset traffic prediction model of the second convolution layer comprise the following steps:
and preprocessing the first historical traffic data.
Optionally, the configuration process of the preset traffic prediction model is as follows:
acquiring second historical traffic data of nodes in the traffic network graph;
and training a traffic prediction network through the second historical traffic data to obtain the preset traffic prediction model.
Optionally, the loss function of the traffic prediction network is:
wherein ,is predicted TpThe traffic data for each time step is,for the future TpReal traffic data per time step, WθTraining parameters of the network are predicted for traffic.
According to the technical scheme, the method has the following advantages:
the application provides a long-term and short-term traffic prediction method, which comprises the following steps: constructing a traffic network into a graph structure to obtain a traffic network graph; acquiring first historical traffic data of nodes in a traffic network graph; inputting the first historical traffic data into a first convolutional layer, TpThe iterative RNN operators, the splicing module and the preset traffic prediction model of the second convolution layer enable the first convolution layer to carry out convolution processing on the first historical traffic data, the first iterative RNN operator carries out traffic prediction on the first historical traffic data after convolution processing, the traffic prediction result of the first time step is output, the traffic prediction result of the first time step is input to the next iterative RNN operator to carry out traffic prediction until the Tth time steppOutput of the iterative RNN operatorpTraffic prediction result of each time step, and splicing module pair TpAnd splicing the traffic prediction results of each time step, performing convolution processing on the spliced traffic prediction results by the second convolution layer, and outputting a final traffic prediction result.
According to the traffic prediction method, the acquired first historical traffic data is input into a preset traffic prediction model, one time step prediction is carried out through iterative RNN operators, each time of traffic prediction result is input into the next iterative RNN operator to carry out the next time step prediction, and meanwhile, the traffic prediction result is used as a part of the final output result, and the one time step prediction is carried out through each iterative RNN operator, so that effective long-term and short-term traffic space-time information can be extracted, the phenomenon of error accumulation is reduced, and the short-term traffic prediction precision is improved; the traffic prediction results of all time steps are spliced through the splicing module, and then the spliced traffic prediction results are subjected to convolution processing to output the final traffic prediction result, so that the long-term and short-term traffic prediction result is obtained, and the long-term and short-term traffic prediction precision is taken into consideration, thereby solving the technical problems that the existing traffic prediction method is high in prediction error accumulation and cannot take the long-term and short-term prediction precision into consideration.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a long-term and short-term traffic prediction method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a traffic network sensor distribution according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an RNN structure according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a gate linear unit according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a preset traffic prediction network model according to an embodiment of the present application;
fig. 6 is a schematic flow chart of traffic prediction performed by the first iterative RNN operator according to the embodiment of the present application.
Detailed Description
The application provides a long-term and short-term traffic prediction method, which is used for solving the technical problems that the existing traffic prediction method is high in prediction error accumulation and cannot give consideration to long-term and short-term prediction accuracy at the same time.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
For easy understanding, referring to fig. 1, an embodiment of a long-short term traffic prediction method provided by the present application includes:
In the embodiment of the present application, a traffic network may be constructed as a directed graph structure, and a traffic network graph G is obtained as (V, E, a), where V is a node set, that is, a set of sensors on the traffic network, and reference may be made to fig. 2, where each sensor records historical traffic data, such as speed, traffic flow, and the like. E is an edge set between nodes, A belongs to RN×NIs a weight adjacency matrix of the traffic network graph G.
Further, the calculation formula of the weights in the weight adjacency matrix is:
wherein ,aijIs the weight of the edge between the neighboring nodes i, j in the traffic network graph, dijThe distance between the neighboring nodes i and j is delta, which is a threshold parameter and can be set to 0.1, epsilon is a hyper-parameter, and a specific value can be set according to the actual situation. The weight adjacency matrix A is formed by the weights of edges between all the neighbor nodes i and j in the traffic network graph.
After the traffic network graph G is obtained, the first historical traffic data may be obtained through nodes therein.Traffic data for the ith node at the t-th time step, xt∈RNTraffic data for all nodes at the t-th time step. In the embodiment of the application, the T in the future is predicted by acquiring tau traffic data of the historypTraffic data for each time step. Therefore, the first historical traffic data acquired in the embodiment of the present application may be expressed as:
X=(x1,x2,…,xτ)∈RN×τ;
the traffic data that needs to be predicted into the future may be expressed as:
RNNs are a class of neural networks used to process sequence data, and differ from other basic neural networks that establish connections only between layers in that RNNs also establish connections between neurons between layers because data later in the sequence data is also closely related to data earlier in the sequence data, as shown in fig. 3.
The embodiment of the application is based on RNN thought, one iteration prediction process is used as an iteration RNN operator, the output prediction result is used as a part of the final output result, and the single-step prediction result is input into the next iteration RNN operator at the same timepIterative RNN operator for predicting future TpTraffic data for each time step. The iterative RNN operator in the embodiment of the present application is different from the conventional RNN structure in which each RNN operator shares a parameter, but the embodiment of the present application does not use the same parameterThe iterative RNN operator comprises a time and space module (namely a linear gating unit and a diffusion convolution layer) for primary prediction and the like, which are respectively used for extracting a time dependency relationship and a space dependency relationship to complete single-step prediction, and parameters of different iterative RNN operators are different.
The preset traffic prediction model in the embodiment of the application comprises a first convolution layer and a T layerpThe iterative RNN operator, the concatenation module and the second convolution layer, can refer to fig. 5. Predicting future T by inputting acquired first historical traffic data into preset traffic prediction modelpThe traffic data of each time step is specifically that convolution processing is carried out on the first historical traffic data through a first convolution layer, traffic prediction is carried out on the convolved first historical traffic data through a first iteration RNN operator, the traffic prediction result of the first time step is output, the traffic prediction result of the first time step is input into a next iteration RNN operator for traffic prediction until the Tth time steppOutput of the iterative RNN operatorpThe traffic prediction result of each time step is compared with the T by a splicing modulepAnd splicing the traffic prediction results of each time step, performing convolution processing on the spliced traffic prediction results through the second convolution layer, and outputting a final traffic prediction result.
Further, the first historical traffic data is input to a data processing system including a first convolutional layer, TpThe iteration RNN operator, the splicing module and the preset traffic prediction model of the second convolution layer further comprise the following steps: the first historical traffic data is preprocessed. Specifically, the linear difference method may be used to fill in the missing nulls in the first historical traffic data, and the Z-Score method may be used to remove outliers.
Further, the iterative RNN operator in the embodiment of the present application includes a gated linear unit, a diffusion convolution layer, and a fully connected layer. Referring to fig. 6, the specific steps of performing traffic prediction on the convolved first historical traffic data by the first iterative RNN operator and outputting a traffic prediction result at the first time step include:
and S1031, extracting the time dependence relationship of the first historical traffic data after convolution processing by a gate control linear unit, and outputting a first characteristic.
In the embodiment of the application, the gate control linear unit performs one-dimensional convolution processing on the first historical traffic data after convolution processing to obtain a first convolution characteristic and a second convolution characteristic; the gate control linear unit carries out activation processing on the second convolution characteristic through an activation function, and calculates the Hadamard product of the first convolution characteristic and the second convolution characteristic after the activation processing; and the gate control linear unit carries out residual error connection on the first historical traffic data after convolution processing and the Hadamard product, and outputs a first characteristic.
The gated linear unit in the embodiment of the present application captures dynamic information of the first historical traffic data in the time dimension through a convolution structure, and reference may be made to fig. 4. Specifically, a one-dimensional convolution process is performed by a one-dimensional causal convolution layer, the causal convolution layer having a convolution kernel width of KtUnder the action of convolution kernel, the time sequence length of input data after convolution processing is shortened by Kt-1. Convolution processed first historical traffic data for inputCiFor the dimension of the first historical traffic data after convolution processing, the size of the convolution kernel of the causal convolution layer in the embodiment of the application isAfter the gate control linear unit carries out one-dimensional convolution processing on the first historical traffic data after the convolution processing, the obtained convolution result isAnd dividing the convolution result into a front part and a rear part to obtain a first convolution characteristic P and a second convolution characteristic Q, wherein the characteristic numbers of the first convolution characteristic P and the second convolution characteristic Q are consistent with the input characteristic number before convolution.
In the embodiment of the present application, it is preferable that a sigmoid activation function is adopted to activate the second convolution feature Q, which is used to gate the first convolution feature P, i.e., the hadamard products P [ [ sigma ] (Q) ] of the first convolution feature and the activated second convolution feature are calculated, which are hadamard products. And the gate control linear unit further performs residual error connection on the first historical traffic data after convolution processing and the Hadamard product obtained through calculation, and outputs a first characteristic.
S1032, the diffusion convolution layer extracts the spatial dependence relation of the first feature and outputs a second feature.
The diffusion convolution layer in the embodiment of the application is a diffusion convolution layer with an adaptive matrix, and the diffusion convolution layer performs diffusion convolution characteristic extraction with the adaptive matrix on the first characteristic and outputs a second characteristic.
In the given node structure information, a diffusion process of a signal can be simulated by adopting K finite steps, node characteristics are extracted, and the diffusion convolution characteristics obtained by diffusion convolution processing are as follows:
wherein ,PkThe transition matrix is calculated from the weighted adjacency matrix a as a power series of the transition matrix. In the embodiment of the present application, since the traffic network structure is a directed graph, the diffusion process has two directions, i.e. a forward transition matrix PfA backward transfer matrix P ═ a/rowsum (a)b=AT/rowsum(AT) Thus, the diffusion convolution signature can be expressed as:
where X is the first characteristic of the input and W is the parameter matrix of the diffusion convolution layer.
At given node structure information, hidden spatial information can be acquired through an adaptive matrix, wherein the adaptive matrix is as follows:
in the formula, adaptive matrixIncluding two randomly initialized learnable parameters E1、E2∈RN×cIn particular, E1For source node embedding, E2For target node embedding, by E1、E2Multiplying to obtain a spatial dependence weight between the source node and the target node, eliminating weak connection of the weight through a ReLU activation function, normalizing the weight processed by the ReLU activation function through a SoftMax function, and taking the adaptive matrix as a transfer matrix in a hidden diffusion process.
In the embodiment of the application, explicit graph structure association is captured by adopting diffusion convolution, implicit graph structure association is captured by adopting a self-adaptive matrix, and spatial dependency relationship, namely graph structure information of a given node, is captured by combining the explicit graph structure association and the implicit graph structure association, and finally output second characteristics are as follows:
and S1033, the full connection layer carries out traffic prediction on the second characteristic and outputs a traffic prediction result of the first time step.
The full-connection layer carries out traffic prediction on the input second characteristic and outputs a traffic prediction result y of the first time step1。
The specific processing procedure of the other iterative RNN operators is similar to that of the first iterative RNN operator, except that the input data and the output data of different iterative RNN operators are different.
Further, the configuration process of the preset traffic prediction model in the embodiment of the present application is as follows: acquiring second historical traffic data of nodes in the traffic network graph; and training the traffic prediction network through the second historical traffic data to obtain a preset traffic prediction model.
After the second historical traffic data is acquired, the time interval may be set to 5 minutes, that is, there will be 12 historical traffic data in one hour, and there will be 288 historical traffic data in a day. The second historical traffic data may be preprocessed, specifically, the missing null values in the second historical traffic data are complemented by using a linear interpolation method, and the outliers are removed by using a Z-Score method.
Wherein the second historical traffic data is longer in time period from the current time than the first historical traffic data. For example, a sensor in a certain traffic network records historical traffic data for 62 days, and historical traffic data for the previous 50 days can be used as a training set to obtain second historical traffic data; historical traffic data from day 51 to day 56 may be used as a verification set to obtain a third historical traffic data; the historical traffic data for the last 6 days may be used as a test set to obtain first historical traffic data. Of course, those skilled in the art can flexibly divide the data according to actual situations, and the data is not specifically limited herein.
And training the traffic prediction network through the second historical traffic data until the preset iteration times are reached, stopping training to obtain a preset traffic prediction model, and performing model verification by adopting third historical traffic data in the training process.
During training, the loss value can be calculated through the loss function, and parameters of each layer of the traffic prediction network are updated through back propagation of the loss value. The loss function of the traffic prediction network may be:
wherein ,is predicted TpThe traffic data for each time step is,for the future TpReal traffic data per time step, WθTraining parameters of the network are predicted for traffic.
The long-short-term traffic prediction method in the embodiment of the application combines the advantages of iterative prediction and one-time prediction together, and ensures the accuracy of a long-short-term traffic prediction result; in addition, the preset traffic prediction model in the embodiment of the application can simultaneously give consideration to the accuracy of long-term and short-term prediction and can reduce the accumulation of iterative prediction errors, because the error of a prediction result is adjusted according to a real value in each step of prediction during training.
According to the traffic prediction method in the embodiment of the application, the acquired first historical traffic data is input into a preset traffic prediction model, one time step prediction is carried out through iterative RNN operators, each time of traffic prediction result is input into the next iterative RNN operator to carry out the next time step prediction, and meanwhile, the traffic prediction result is used as a part of a final output result, and the one time step prediction is carried out through each iterative RNN operator, so that effective long-term and short-term traffic space-time information can be extracted, the phenomenon of error accumulation is reduced, and the short-term traffic prediction precision is improved; the traffic prediction results of all time steps are spliced through the splicing module, and then the spliced traffic prediction results are subjected to convolution processing to output the final traffic prediction result, so that the long-term and short-term traffic prediction result is obtained, and the long-term and short-term traffic prediction precision is taken into consideration, thereby solving the technical problems that the existing traffic prediction method is high in prediction error accumulation and cannot take the long-term and short-term prediction precision into consideration.
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. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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, may be located in one place, or may be 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, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for executing all or part of the steps of the method described in the embodiments of the present application through a computer device (which may be a personal computer, a server, or a network device). And the aforementioned storage medium includes: a U disk, a removable hard disk, 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.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
Claims (9)
1. A long-term and short-term traffic prediction method, comprising:
constructing a traffic network into a graph structure to obtain a traffic network graph;
acquiring first historical traffic data of nodes in the traffic network graph;
inputting the first historical traffic data into a first convolutional layer, TpThe iterative RNN operators, the splicing module and a preset traffic prediction model of the second convolutional layer enable the first convolutional layer to carry out convolution processing on the first historical traffic data, the first iterative RNN operator carries out traffic prediction on the first historical traffic data after convolution processing, a traffic prediction result of a first time step is output, the traffic prediction result of the first time step is input to the next iterative RNN operator to carry out traffic prediction until the Tth time steppOutput of the iterative RNN operatorpThe traffic prediction result of each time step, the splicing module pair TpAnd splicing the traffic prediction results of each time step, performing convolution processing on the spliced traffic prediction results by the second convolution layer, and outputting a final traffic prediction result.
2. The long-term and short-term traffic prediction method of claim 1, characterized in that the iterative RNN operator comprises gated linear units, diffusion convolutional layers and fully-connected layers;
the first iteration RNN operator carries out traffic prediction on the first historical traffic data after convolution processing, and outputs a traffic prediction result of a first time step, and the method comprises the following steps:
the gate control linear unit extracts the time dependence relationship of the first historical traffic data after convolution processing and outputs a first characteristic;
extracting the spatial dependence relation of the first characteristic by the diffusion convolution layer, and outputting a second characteristic;
and the full-connection layer carries out traffic prediction on the second characteristic and outputs a traffic prediction result of the first time step.
3. The long-short term traffic prediction method according to claim 2, wherein the gated linear unit extracts the time dependency relationship of the first historical traffic data after convolution processing, and outputs a first feature, including:
the gate control linear unit performs one-dimensional convolution processing on the first historical traffic data after convolution processing to obtain a first convolution characteristic and a second convolution characteristic,
the gate control linear unit carries out activation processing on the second convolution characteristic through an activation function, and calculates a Hadamard product of the first convolution characteristic and the second convolution characteristic after the activation processing;
and the gate control linear unit carries out residual error connection on the first historical traffic data after convolution processing and the Hadamard product, and outputs a first characteristic.
4. The long-term and short-term traffic prediction method of claim 3, wherein the diffusion convolutional layer extracts the spatial dependency of the first feature and outputs a second feature, comprising:
and the diffusion convolution layer performs diffusion convolution characteristic extraction with a self-adaptive matrix on the first characteristic and outputs a second characteristic.
5. The long and short term traffic prediction method according to claim 4, characterized in that the second feature is:
wherein Z is a second feature, PfA/rowsum (a) is a forward transition matrix, a is a weight adjacency matrix; pb=AT/rowsum(AT) Is a backward transfer matrix; x is a first characteristic, W is a parameter matrix of the diffusion convolution layer, and K is a constant;to adapt the matrix, E1、E2Respectively embedded into source nodesAnd embedding the target node.
6. The long and short term traffic prediction method according to claim 5, characterized in that the method further comprises:
calculating the weight adjacency matrix based on the traffic network graph, wherein the calculation formula of the weights in the weight adjacency matrix is as follows:
wherein ,aijIs the weight of the edge between the neighboring nodes i, j in the traffic network graph, dijIs the distance between neighboring nodes i, j, δ is the threshold parameter, and ε is the hyperparameter.
7. The long term and short term traffic prediction method according to any of claim 1, characterized in that said inputting of said first historical traffic data into a traffic prediction system comprising a first convolutional layer, TpThe iterative RNN operators, the splicing module and the preset traffic prediction model of the second convolution layer comprise the following steps:
and preprocessing the first historical traffic data.
8. The long and short term traffic prediction method according to any of claims 1-7, characterized in that the preset traffic prediction model is configured by the following process:
acquiring second historical traffic data of nodes in the traffic network graph;
and training a traffic prediction network through the second historical traffic data to obtain the preset traffic prediction model.
9. The long and short term traffic prediction method according to claim 8, characterized in that the loss function of the traffic prediction network is:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011641479.9A CN112668797B (en) | 2020-12-31 | 2020-12-31 | Long-short-period traffic prediction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011641479.9A CN112668797B (en) | 2020-12-31 | 2020-12-31 | Long-short-period traffic prediction method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112668797A true CN112668797A (en) | 2021-04-16 |
CN112668797B CN112668797B (en) | 2023-06-16 |
Family
ID=75413867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011641479.9A Active CN112668797B (en) | 2020-12-31 | 2020-12-31 | Long-short-period traffic prediction method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112668797B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113505536A (en) * | 2021-07-09 | 2021-10-15 | 兰州理工大学 | Optimized traffic flow prediction model based on space-time diagram convolution network |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110491129A (en) * | 2019-09-24 | 2019-11-22 | 重庆城市管理职业学院 | The traffic flow forecasting method of divergent convolution Recognition with Recurrent Neural Network based on space-time diagram |
CN110674987A (en) * | 2019-09-23 | 2020-01-10 | 北京顺智信科技有限公司 | Traffic flow prediction system and method and model training method |
CN110717627A (en) * | 2019-09-29 | 2020-01-21 | 浙江大学 | Full traffic prediction method based on dual graph framework |
WO2020040411A1 (en) * | 2018-08-21 | 2020-02-27 | 한국과학기술정보연구원 | Device for predicting traffic state information, method for predicting traffic state information, and storage medium for storing program for predicting traffic state information |
US20200135017A1 (en) * | 2018-10-29 | 2020-04-30 | Beihang University | Transportation network speed foreeasting method using deep capsule networks with nested lstm models |
CN111292562A (en) * | 2020-05-12 | 2020-06-16 | 北京航空航天大学 | Aviation flow prediction method |
CN111899510A (en) * | 2020-07-28 | 2020-11-06 | 南京工程学院 | Intelligent traffic system flow short-term prediction method and system based on divergent convolution and GAT |
CN111968375A (en) * | 2020-08-27 | 2020-11-20 | 北京嘀嘀无限科技发展有限公司 | Traffic flow prediction method and device, readable storage medium and electronic equipment |
CN112071065A (en) * | 2020-09-16 | 2020-12-11 | 山东理工大学 | Traffic flow prediction method based on global diffusion convolution residual error network |
-
2020
- 2020-12-31 CN CN202011641479.9A patent/CN112668797B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020040411A1 (en) * | 2018-08-21 | 2020-02-27 | 한국과학기술정보연구원 | Device for predicting traffic state information, method for predicting traffic state information, and storage medium for storing program for predicting traffic state information |
US20200135017A1 (en) * | 2018-10-29 | 2020-04-30 | Beihang University | Transportation network speed foreeasting method using deep capsule networks with nested lstm models |
CN110674987A (en) * | 2019-09-23 | 2020-01-10 | 北京顺智信科技有限公司 | Traffic flow prediction system and method and model training method |
CN110491129A (en) * | 2019-09-24 | 2019-11-22 | 重庆城市管理职业学院 | The traffic flow forecasting method of divergent convolution Recognition with Recurrent Neural Network based on space-time diagram |
CN110717627A (en) * | 2019-09-29 | 2020-01-21 | 浙江大学 | Full traffic prediction method based on dual graph framework |
CN111292562A (en) * | 2020-05-12 | 2020-06-16 | 北京航空航天大学 | Aviation flow prediction method |
CN111899510A (en) * | 2020-07-28 | 2020-11-06 | 南京工程学院 | Intelligent traffic system flow short-term prediction method and system based on divergent convolution and GAT |
CN111968375A (en) * | 2020-08-27 | 2020-11-20 | 北京嘀嘀无限科技发展有限公司 | Traffic flow prediction method and device, readable storage medium and electronic equipment |
CN112071065A (en) * | 2020-09-16 | 2020-12-11 | 山东理工大学 | Traffic flow prediction method based on global diffusion convolution residual error network |
Non-Patent Citations (2)
Title |
---|
朱凯利等: "基于图卷积神经网络的交通流量预测", 《智能计算机与应用》, no. 06, pages 175 - 177 * |
闫旭;范晓亮;郑传潘;臧?;王程;程明;陈龙彪;: "基于图卷积神经网络的城市交通态势预测算法", 浙江大学学报(工学版), no. 06, pages 104 - 112 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113505536A (en) * | 2021-07-09 | 2021-10-15 | 兰州理工大学 | Optimized traffic flow prediction model based on space-time diagram convolution network |
Also Published As
Publication number | Publication date |
---|---|
CN112668797B (en) | 2023-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111177792B (en) | Method and device for determining target business model based on privacy protection | |
US8606732B2 (en) | Methods and systems for reward-modulated spike-timing-dependent-plasticity | |
US20190156209A1 (en) | Scalable neural hardware for the noisy-or model of bayesian networks | |
KR20180045635A (en) | Device and method to reduce neural network | |
CN113095370B (en) | Image recognition method, device, electronic equipment and storage medium | |
CN112990444B (en) | Hybrid neural network training method, system, equipment and storage medium | |
CN111860787A (en) | Short-term prediction method and device for coupling directed graph structure flow data containing missing data | |
CN111783713A (en) | Weak supervision time sequence behavior positioning method and device based on relation prototype network | |
CN115482656B (en) | Traffic flow prediction method by using space dynamic graph convolutional network | |
CN113362491A (en) | Vehicle track prediction and driving behavior analysis method | |
CN113947182A (en) | Traffic flow prediction model construction method based on double-stage stack graph convolution network | |
CN113935475A (en) | Simulation and training method of pulse neural network with pulse time offset | |
CN116844041A (en) | Cultivated land extraction method based on bidirectional convolution time self-attention mechanism | |
Orouskhani et al. | A hybrid method of modified cat swarm optimization and gradient descent algorithm for training ANFIS | |
CN112668797B (en) | Long-short-period traffic prediction method | |
CN110289987B (en) | Multi-agent system network anti-attack capability assessment method based on characterization learning | |
CN113269113B (en) | Human behavior recognition method, electronic device, and computer-readable medium | |
CN115131558A (en) | Semantic segmentation method under less-sample environment | |
CN112966595B (en) | Sensor network data abnormity judgment method based on graph neural network | |
CN112489420A (en) | Road traffic state prediction method, system, terminal and storage medium | |
CN115830865A (en) | Vehicle flow prediction method and device based on adaptive hypergraph convolution neural network | |
CN115409262A (en) | Railway data center key performance index trend prediction method and abnormity identification method | |
CN117743852A (en) | Traffic missing data filling method based on diffusion neural network | |
CN117171543A (en) | Space-time data prediction method and data acquisition monitoring system | |
Dawwd et al. | Time sharing based parallel implementation of CNN on low cost FPGA |
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 |