CN113205685B - Short-term traffic flow prediction method based on global-local residual error combination model - Google Patents
Short-term traffic flow prediction method based on global-local residual error combination model Download PDFInfo
- Publication number
- CN113205685B CN113205685B CN202110480842.1A CN202110480842A CN113205685B CN 113205685 B CN113205685 B CN 113205685B CN 202110480842 A CN202110480842 A CN 202110480842A CN 113205685 B CN113205685 B CN 113205685B
- Authority
- CN
- China
- Prior art keywords
- time
- global
- feature extraction
- space
- local
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2477—Temporal data queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Evolutionary Computation (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Computing Systems (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Fuzzy Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Remote Sensing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a short-time traffic flow prediction method based on a global-local residual error combination model, which comprises the following steps: collecting traffic flow data of a city road network and transmitting the traffic flow data to a traffic big data cluster in real time, carrying out data preprocessing on original data to reduce data redundancy, and converting the preprocessed data into space-time raster data according to the longitude and latitude of the road network; carrying out standardization processing on the time-space grid data, and dividing the time-space grid data into a training set and a test set; constructing a global-local space-time residual error-based combined model; and predicting the space-time grid data of the urban road network at the next moment based on the global-local space-time residual error combination model which is trained and constructed. The invention analyzes the global and local spatial characteristics of the urban road network simultaneously on the basis of performing space-time analysis on the road network, thereby improving the capture of the global and local spatial characteristics and long-term time characteristics of the road network and further improving the short-time traffic flow prediction precision.
Description
Technical Field
The invention belongs to the field of intelligent traffic and traffic flow prediction, and particularly relates to a short-time traffic flow prediction method based on a global-local residual error combination model.
Background
With the acceleration of the urbanization process in China, the construction of traffic infrastructure is gradually difficult to meet the increasing number of automobiles, so that the problem of traffic jam is increasingly serious. The short-time traffic flow prediction is one of the important components of the intelligent traffic subsystem, can provide traffic information at future time for traffic management departments, and helps the traffic management departments to make scientific and reasonable traffic guidance and traffic scheduling. The method has the advantages that the urban traffic flow is accurately acquired in real time, a traveler can be helped to make road planning in advance, traffic management departments can be helped to make corresponding traffic management methods for different traffic flows, the intelligent level of urban traffic is greatly improved, traffic jam is relieved, and travel cost is reduced. Therefore, how to effectively improve the accuracy of the traffic flow prediction model is important.
The models for traffic flow prediction are numerous, with the rise of deep learning, a deep neural network model taking a neural network as a core is popular, the urban road network traffic flow has complex space-time characteristics, the model prediction precision is not high only by considering a certain characteristic, many models are used for analyzing the space-time characteristics of the traffic flow at present, but the long-term time characteristic and the global space characteristic are not captured, so that the models cannot adapt to the traffic flow prediction of the urban road network macroscopic angle, and the global consideration is lacked.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems, the invention introduces a short-time traffic flow prediction method based on a global-local residual error combination model. The method aims at the defect that the traditional space-time residual error model lacks capture of long-term characteristics of traffic flow when processing space-time grid data; meanwhile, the spatial features of the traffic network are affected by global and local features, and the traditional method for extracting the spatial features only analyzes one feature and ignores the effect of the other feature. Constructing a global spatial feature extraction component and a local spatial feature extraction component by utilizing a 2D convolution and residual error unit, and respectively capturing global spatial features and local spatial features of the urban road network; and a long-term time feature extraction component is constructed by utilizing the strong long-term time feature capturing capability of the GRU, so that the long-term time features of the urban road network are captured.
The technical scheme is as follows: a short-time traffic flow prediction method based on a global-local residual error combination model comprises the following steps:
step 1) collecting traffic flow data of a city road network and transmitting the traffic flow data to a traffic big data cluster in real time, carrying out data preprocessing on the traffic flow data of the original city road network to reduce data redundancy, and converting the preprocessed traffic flow data of the city road network into space-time grid data according to the longitude and latitude of the road network;
step 2) carrying out standardization processing on the time-space grid data, and dividing the time-space grid data into a training set and a test set;
step 3) constructing a global-local space-time residual error-based combined model, wherein the model consists of a global spatial feature extraction component, a local spatial feature extraction component and a long-term time feature extraction component;
and 4) training by using the training set obtained in the step 2) and predicting the space-time grid data of the city road network at the next moment based on the global-local space-time residual error combination model.
Further, in step 1, the preprocessed data is converted into space-time grid data according to the road network longitude and latitude, and the method specifically comprises the following steps: dividing the city road network into I X J network regions according to longitude and latitude to form a network X ═ Xi,jEach position in the network is regularly distributed, and the distance between adjacent positions is constant; for each position (i, j), the traffic flow data, x, for the current position are recorded at fixed time Δ t intervalst i,jRepresenting the traffic flow data counted in the position (I, J) at the time t, and representing the traffic flow data counted in the network area I J as tensorConverting traffic flow prediction problem into given historical space-time grid data { X }tI t 0, …, K, predicting the spatio-temporal raster data X at the time K + Δ tK+ΔtAnd K is the total number of samples of the collected urban road network traffic flow.
Further, in the step 2, the space-time grid data is standardized by adopting z-score standardization, and the space-time grid data { X ] obtained in the step 2 is subjected to standardizationt| t ═ 0, …, K } byCarrying out transformation; whereinxtIs the time-space grid data of a certain historical moment.
Further, in step 3, a global-local space-time residual combination-based model is constructed, and the model is composed of a global spatial feature extraction component, a local spatial feature extraction component and a long-term temporal feature extraction component, and the specific steps are as follows:
step 3-1: constructing a global spatial feature extraction component, which comprises the following specific steps:
step 3-1-1: determining a global spatial feature extraction component overall network architecture, extracting global spatial features of the time-space grid data, wherein the size of the time-space grid data is M, selecting the size of a convolution kernel as M, performing convolution operation on the time-space grid data, and setting the step length to be 0; the global spatial feature extraction component convolution operation is defined as:wherein, Xs l-1Space-time grid data to be extracted global spatial features of the first layer of convolutional layer, WsG1 lIs the convolution kernel parameter of the l-th layer global feature extraction convolution layer, the dimension and X of the parameters l-1Are equal in dimension XsG1 lIs the spatial feature extracted by the l-th layer global feature extraction convolutional layer, bl sG1Is the bias term, L, of the L-th layer global feature extraction convolutional layersG1The number of layers of convolution required by the global spatial feature extraction component;
step 3-1-2: output X of global components_G1 lInputting a residual unit, the operation being defined as:wherein XsG1 l-1Is the global spatial feature input, X, of the l-th layer residual unitsG2 lIs the global spatial feature output of the l-th layer residual unit, θsG2 lIs the set of all learnable parameters in the layer i residual unit of the global component, FGResidual mapping of the extraction component for global spatial features, LsG2The number of layers of the global component needing residual error;
step 3-1-3: setting an activation function in the global spatial feature extraction component as a Relu function, determining the global convolution depth and the number of residual error units, and determining an initialized training step length lambda;
step 3-2: constructing a local spatial feature extraction component, which comprises the following specific steps:
step 3-2-1: determining a total network architecture of a local spatial feature extraction component, wherein the local spatial feature extraction component only performs convolution operation on the spatio-temporal raster data and does not perform pooling operation, and the size of a convolution kernel is smaller than the dimensionality of the data; the local spatial feature extraction component convolution operation is defined as:wherein, Xs l -1Space-time grid data, W, of the first layer of convolutional layer to be extracted with local spatial featuressL1 lIs the convolution kernel parameter of the first layer local feature extraction convolution layer, the dimension of the parameter is less than Xs l-1Dimension of (2), XsL1 lIs the spatial feature extracted by the first layer local feature extraction convolution layer, bl sL1Is the bias term, L, of the first layer local feature extraction convolution layersL1The number of layers required for convolution of the local spatial feature extraction component;
step 3-2-2: output X of partial assemblys_L1 lInputting a residual unit, the operation being defined as:wherein, XsL1 l-1Is the local spatial feature input, X, of the l-th layer residual unitsL2 lIs the local spatial feature output of the layer I residual unit, θsL2 lIs the set of all learnable parameters in the local component layer I residual unit, FLExtracting residual mappings of components for local spatial features, LsL2The number of layers of residual errors required by local components;
step 3-2-3: setting an activation function in the local spatial feature extraction component as a Relu function, and determining the local convolution depth and the number of residual error units, the training step length and the training step length of the global component;
step 3-3: constructing a long-term time feature extraction component, which comprises the following specific steps:
step 3-3-1: determining the overall network architecture of the long-term time feature extraction component, and determining the neuron number and the hidden layer depth of an input layer and an output layer;
step 3-3-2: capturing temporal features of spatio-temporal raster data with a GRU, the temporal feature extraction component operation defined as: xtem=Re2(G(Re1(Xtem (m,n)) In a) of X), wherein Xtem (m,n)Is space-time grid data of dimension (m, n), Re1 is a matrix dimension-changing operation that changes matrix dimension from (m, n) to (1, m n), G is a GRU operation of the temporal feature extraction component, Re2 is a matrix dimension-changing operation that changes matrix dimension from (1, m n) to (m, n), X istemThe final output of the temporal feature extraction component;
step 3-3-3: setting an activation function in the long-term time feature extraction component as a Tanh function, wherein the training step length is equal to the overall component;
step 3-4: constructing a global-local space-time residual error combination model, which comprises the following specific steps:
step 3-4-1: determining a global-local space-time residual error combination model overall network architecture;
step 3-4-2: outputting the global space characteristics X by adopting a parameter matrix fusion methodsGLocal spatial feature X inputsLOutbound and long term time feature output XtemCarrying out weighted fusion, wherein the formula is as follows: xFusion=f(WsG*XsG+WsL*XsL+Wtem*Xtem) Wherein ". sup" represents the Hadamard product, WsG、WsLAnd WtemRespectively representing the proportion of the global space feature, the local space feature and the long-term time feature, f is an activation function, and the final output activation function is set to be a Sigmod function.
Further, in the step 4, the trained and constructed space-time grid data at the next moment of the urban road network is predicted based on the global-local space-time residual combination model, and the specific steps are as follows:
step 4-1: initializing model structure parameters including convolution kernel dimensionality, convolution step length, activation function, initial weight, hidden layer number, training step length, residual error unit number and the like;
step 4-2: inputting the training set into a global spatial feature extraction component to capture global road network spatial features to obtain global spatial features W of the traffic road networksG;
Step 4-3: the training set is input into a partial spatial feature extraction component to capture partial road network spatial features to obtain partial spatial features W of the traffic road networksL;
Step 4-4: inputting the training set into a long-term time feature extraction component to capture road network time features to obtain long-term time features W of the traffic road networktem;
And 4-5: performing weighted fusion on the outputs from the step 4-2 to the step 4-4, and obtaining a final predicted value X through an activation functionFusion;
And 4-6: setting iteration times, taking the root mean square error as an error evaluation standard of the model, calculating the error between a predicted value and an actual value of the model, and updating the weight value of the model by using a back propagation algorithm;
and 4-7: and after the model training is finished, testing the prediction precision of the model by using the test set.
Has the beneficial effects that: the traffic flow prediction method of the invention constructs a global space characteristic extraction component and a local space characteristic extraction component on the basis of the traditional space-time residual error model, and respectively captures global space characteristics and local space characteristics of an urban road network; the long-term time feature extraction component is constructed to capture the long-term space-time features of the urban road network, so that the capture of the global space features and the long-term time features by the model is improved, the training error is reduced, and the training precision is improved.
The method aims at the defect that the traditional space-time residual error model lacks capture of long-term characteristics of traffic flow when processing space-time grid data; meanwhile, the spatial features of the traffic network are affected by the global and local features, the traditional method for extracting the spatial features only analyzes one feature, ignores the function of the other feature, provides a global-local space-time residual error combination model, constructs a global spatial feature extraction component and a local spatial feature extraction component, and respectively captures the global spatial features and the local spatial features of the urban network; the long-term time feature extraction component is constructed to capture the long-term space-time features of the urban road network, so that the capture of the global space features and the long-term time features by the model is improved, the training error is reduced, and the training precision is improved.
Drawings
FIG. 1 is a schematic diagram of steps of a short-term traffic flow prediction method based on a global-local residual error combination model according to the present invention;
FIG. 2 is a flow chart of a short-term traffic flow prediction method based on a global-local residual error combination model according to the present invention;
FIG. 3 is a model structure diagram of a short-term traffic flow prediction method based on a global-local residual error combination model according to the present invention;
FIG. 4 is a global spatial feature extraction diagram of a short-term traffic flow prediction method based on a global-local residual error combination model according to the present invention;
FIG. 5 is a local spatial feature extraction diagram of a short-term traffic flow prediction method based on a global-local residual error combination model according to the present invention;
FIG. 6 is a comparison graph of real data and predicted data of a short-term traffic flow prediction method test set based on a global-local residual error combination model.
Detailed Description
The technical method of the present invention will be further described in detail with reference to the accompanying drawings.
As shown in fig. 1-3, a method for predicting short-term traffic flow of an urban road network by using a global-local space-time residual error combination model comprises the following steps:
step 1) collecting traffic flow data of a city road network and transmitting the traffic flow data to a traffic big data cluster in real time, carrying out data preprocessing on the traffic flow data of the original city road network to reduce data redundancy, and converting the preprocessed traffic flow data of the city road network into space-time grid data according to the longitude and latitude of the road network; (ii) a
In the step 1, the preprocessed data are converted into space-time grid data according to the longitude and latitude of the road network, and the method specifically comprises the following steps: according to longitude and latitude, the city road network is constructedNetwork region divided into I and J, forming network X ═ { Xi,jEvery position in the network is regularly distributed, and the distance between adjacent positions is constant; for each position (i, j), the traffic flow data, x, for the current position are recorded at fixed time Δ t intervalst i,jRepresenting the traffic flow data counted in the position (I, J) at the time t, and representing the traffic flow data counted in the network area I J as tensorConverting traffic flow prediction problem into given historical space-time grid data { X }tI t 0, …, K, predicting the spatio-temporal raster data X at the time K + Δ tK+ΔtAnd K is the total number of samples of the collected urban road network traffic flow.
This embodiment adopts metropolis taxi data to carry out the training and the verification of model, and the data is derived from public data set, and this experimental data record metropolis 6 am taxi locating data to 12 o' clock evening, and the date is 2014 8 month 3 days to 2014 8 month 23 days, according to the taxi distribution situation, use metropolis 3 ring to turn into traffic grid data with the original data into as the boundary, use 5 minutes as the sampling interval, 3888 traffic grid data in total, regard the data of the previous 14 days as the training set, the data of the last 7 days as the test set.
Step 2) carrying out standardization processing on the time-space grid data, and dividing the time-space grid data into a training set and a testing set according to a certain proportion;
in the step 2, the Z-score standardization is adopted to carry out standardization processing on the space-time raster data, and the space-time raster data { X ] obtained in the step 2 is subjected to standardization processingt| t ═ 0, …, K } byCarrying out transformation; whereinxtIs the time-space grid data of a certain historical moment.
Step 3) constructing a global-local space-time residual error-based combined model, wherein the model consists of a global spatial feature extraction component, a local spatial feature extraction component and a long-term time feature extraction component;
in the step 3, a global-local space-time residual error-based combined model is constructed, and the model consists of a global space feature extraction component, a local space feature extraction component and a long-term time feature extraction component, and the specific steps are as follows:
step 3-1: constructing a global spatial feature extraction component, which comprises the following specific steps:
step 3-1-1: determining a global spatial feature extraction component overall network architecture, extracting global spatial features of the time-space grid data, wherein the size of the time-space grid data is M, selecting the convolution kernel size of M to perform convolution operation on the time-space grid data, and setting the step length to be 0; the global spatial feature extraction component convolution operation is defined as:wherein, Xs l-1Space-time grid data to be extracted global spatial features of the first layer of convolutional layer, WsG1 lIs the convolution kernel parameter of the l-th layer global feature extraction convolution layer, the dimension and X of the parameters l-1Are equal in dimension XsG1 lIs the spatial feature extracted by the l-th layer global feature extraction convolutional layer, bl sG1Is the bias term, L, of the L-th layer global feature extraction convolutional layersG1The number of layers of convolution required by the global spatial feature extraction component;
step 3-1-2: output X of global components_G1 lInputting a residual unit, the operation being defined as:wherein, XsG1 l-1Is the global spatial feature input, X, of the l-th layer residual unitsG2 lIs the global spatial feature output of the l-th layer residual unit, θsG2 lIs the set of all learnable parameters in the l-th layer residual unit of the global component, FGResidual mapping of the extraction component for global spatial features, LsG2The number of layers of the global component needing residual error;
step 3-1-3: setting an activation function in the global spatial feature extraction component as a Relu function, determining the global convolution depth and the number of residual error units, and determining an initialized training step length lambda;
step 3-2: constructing a local spatial feature extraction component, which comprises the following specific steps:
step 3-2-1: determining a total network architecture of a local spatial feature extraction component, wherein the local spatial feature extraction component only performs convolution operation on the spatio-temporal raster data and does not perform pooling operation, and the size of a convolution kernel is smaller than the dimensionality of the data; the local spatial feature extraction component convolution operation is defined as:wherein, Xs l-1Space-time grid data, W, of the first layer of convolutional layer to be extracted with local spatial featuressL1 lIs the convolution kernel parameter of the first layer of local feature extraction convolution layer, the dimension of the parameter is less than Xs l-1Dimension of (2), XsL1 lIs the spatial feature extracted by the first layer local feature extraction convolution layer, bl sL1Is the bias term, L, of the first layer local feature extraction convolution layersL1The number of layers required for convolution of the local spatial feature extraction component;
step 3-2-2: output X of local components_L1 lInputting a residual unit, the operation being defined as:wherein, XsL1 l-1Is the local spatial feature input, X, of the l-th layer residual unitsL2 lIs the local spatial feature output of the l-th layer residual unit, θsL2 lIs the set of all learnable parameters in the local component layer I residual unit, FLExtracting residual mappings of components for local spatial features, LsL2The number of layers of residual errors required by local components;
step 3-2-3: setting an activation function in the local spatial feature extraction component as a Relu function, and determining the local convolution depth and the number of residual error units, the training step length and the training step length of the global component;
step 3-3: constructing a long-term time feature extraction component, which comprises the following specific steps:
step 3-3-1: determining the overall network architecture of the long-term time feature extraction component, and determining the neuron number and the hidden layer depth of an input layer and an output layer;
step 3-3-2: capturing temporal features of spatio-temporal raster data with a GRU, the temporal feature extraction component operation defined as: xtem=Re2(G(Re1(Xtem (m,n)) In a) of X), wherein Xtem (m,n)Is space-time grid data of dimension (m, n), Re1 is a matrix dimension-changing operation that changes matrix dimension from (m, n) to (1, m n), G is a GRU operation of the temporal feature extraction component, Re2 is a matrix dimension-changing operation that changes matrix dimension from (1, m n) to (m, n), X istemThe final output of the temporal feature extraction component;
step 3-3-3: setting an activation function in the long-term time feature extraction component as a Tanh function, wherein the training step length is equal to the overall component;
step 3-4: constructing a global-local space-time residual error combination model, which comprises the following specific steps:
step 3-4-1: determining a global-local space-time residual error combination model overall network architecture;
step 3-4-2: outputting the global space characteristics X by adopting a parameter matrix fusion methodsGLocal spatial feature X inputsLOutbound and long term time feature output XtemCarrying out weighted fusion, wherein the formula is as follows: xFusion=f(WsG*XsG+WsL*XsL+Wtem*Xtem) Wherein ". sup" represents the Hadamard product, WsG、WsLAnd WtemRespectively representing the proportion of the global space feature, the local space feature and the long-term time feature, f is an activation function, and the final output activation function is set to be a Sigmod function.
And 4) training by using the training set obtained in the step 2) and predicting the space-time grid data of the city road network at the next moment based on the global-local space-time residual error combination model.
In the step 4, the trained and constructed space-time grid data at the next moment of the urban road network is predicted based on the global-local space-time residual error combination model, and the specific steps are as follows:
step 4-1: initializing model structure parameters including convolution kernel dimensionality, convolution step length, activation function, initial weight, hidden layer number, training step length, residual error unit number and the like;
step 4-2: inputting historical space-time grid data into a global spatial feature extraction component to capture global road network spatial features to obtain global spatial features W of the traffic road networksG;
Step 4-3: inputting historical space-time grid data into a local spatial feature extraction component to capture local road network spatial features to obtain local spatial features W of the traffic road networksL;
Step 4-4: inputting historical space-time grid data into a long-term time feature extraction component to capture road network time features to obtain long-term time features W of a traffic road networktem;
And 4-5: performing weighted fusion on the outputs from the step 4-2 to the step 4-4, and obtaining a final predicted value X through an activation functionFusion;
And 4-6: setting iteration times, taking the root mean square error as an error evaluation standard of the model, calculating the error between a predicted value and an actual value of the model, and updating the weight value of the model by using a back propagation algorithm;
and 4-7: after the model training is completed, the prediction precision of the model is tested by using the test set, and the prediction result in the test set in a random day is shown in fig. 6.
Claims (4)
1. A short-time traffic flow prediction method based on a global-local residual error combination model is characterized by comprising the following steps: the method comprises the following steps:
step 1) collecting traffic flow data of an urban road network and transmitting the traffic flow data to a traffic big data cluster in real time, carrying out data preprocessing on the traffic flow data of the urban road network to reduce data redundancy, and converting the preprocessed traffic flow data of the urban road network into space-time grid data according to the longitude and latitude of the road network;
step 2) carrying out standardization processing on the time-space grid data, and dividing the time-space grid data into a training set and a test set;
step 3) constructing a global-local space-time residual error-based combined model, wherein the model consists of a global spatial feature extraction component, a local spatial feature extraction component and a long-term time feature extraction component;
step 4) training by using the training set obtained in the step 2) and predicting space-time grid data of the city road network at the next moment based on a global-local space-time residual error combination model;
in the step 3), a global-local space-time residual error-based combined model is constructed, and the model consists of a global space feature extraction component, a local space feature extraction component and a long-term time feature extraction component, and the specific steps are as follows:
step 3-1: constructing a global spatial feature extraction component, which comprises the following specific steps:
step 3-1-1: determining a global spatial feature extraction component overall network architecture, extracting global spatial features of the time-space grid data, wherein the size of the time-space grid data is M, selecting the convolution kernel size of M to perform convolution operation on the time-space grid data, and setting the step length to be 0; the global spatial feature extraction component convolution operation is defined as:wherein, Xs l-1Space-time grid data to be extracted global spatial features of the first layer of convolutional layer, WsG1 lIs the convolution kernel parameter of the l-th layer global feature extraction convolution layer, the dimension and X of the parameters l-1Are equal in dimension XsG1 lIs the spatial feature extracted by the l-th layer global feature extraction convolutional layer, bl sG1Is the bias term, L, of the L-th layer global feature extraction convolutional layersG1The number of layers of convolution required by the global spatial feature extraction component;
step 3-1-2: extracting output X of global space characteristic extraction components_G1 lInput residual unit, operation is defined as:wherein, XsG1 l-1Is the global spatial feature input, X, of the l-th layer residual unitsG2 lIs the global spatial feature output of the l-th layer residual unit, θsG2 lIs the set of all learnable parameters in the residual unit of the l level of the global spatial feature extraction module, FGResidual mapping of the extraction component for global spatial features, LsG2The number of layers of residual errors required by the global spatial feature extraction component is set;
step 3-1-3: setting an activation function in the global spatial feature extraction component as a Relu function, determining the global convolution depth and the number of residual error units, and determining the initialized training step length lambda;
step 3-2: constructing a local spatial feature extraction component, which comprises the following specific steps:
step 3-2-1: determining a total network architecture of a local spatial feature extraction component, wherein the local spatial feature extraction component only performs convolution operation on the spatio-temporal raster data and does not perform pooling operation, and the size of a convolution kernel is smaller than the dimensionality of the data; the local spatial feature extraction component convolution operation is defined as:wherein, Xs l-1Space-time grid data, W, of the first layer of convolutional layer to be extracted with local spatial featuressL1 lIs the convolution kernel parameter of the first layer local feature extraction convolution layer, the dimension of the parameter is less than Xs l-1Dimension of (2), XsL1 lIs the spatial feature extracted by the first layer local feature extraction convolution layer, bl sL1Is the bias term, L, of the first layer local feature extraction convolution layersL1The number of layers required for convolution of the local spatial feature extraction component;
step 3-2-2: extracting output X of local spatial feature extraction components_L1 lInput residual unit, operation is defined as:wherein, XsL1 l-1Is the local spatial feature input, X, of the l-th layer residual unitsL2 lIs the local spatial feature output of the l-th layer residual unit, θsL2 lIs the set of all learnable parameters in the residual unit of the l layer of the local spatial feature extraction module, FLExtracting residual mappings of components for local spatial features, LsL2The number of layers of residual errors required by the local spatial feature extraction component;
step 3-2-3: setting an activation function in the local spatial feature extraction component as a Relu function, determining the number of local convolution depths and residual error units, wherein the training step length is equal to that of the global spatial feature extraction component;
step 3-3: constructing a long-term time feature extraction component, which comprises the following specific steps:
step 3-3-1: determining the overall network architecture of the long-term time feature extraction component, and determining the neuron number and the hidden layer depth of an input layer and an output layer;
step 3-3-2: the GRU is used for capturing the time characteristics of the space-time grid data, and the operation of the long-term time characteristic extraction component is defined as follows: xtem=Re2(G(Re1(Xtem (m,n)) In a) of X), wherein Xtem (m,n)Is space-time grid data of dimension (m, n), Re1 is a matrix dimension-changing operation that changes the matrix dimension from (m, n) to (1, m n), G is a GRU operation of the long-term temporal feature extraction component, Re2 is a matrix dimension-changing operation that changes the matrix dimension from (1, m n) to (m, n), X2temA final output for the long-term temporal feature extraction component;
step 3-3-3: setting an activation function in the long-term time feature extraction component as a Tanh function, wherein the training step length is equal to that of the global component;
step 3-4: constructing a global-local space-time residual error combination model, which comprises the following specific steps:
step 3-4-1: determining a global-local space-time residual error combination model overall network architecture;
step 3-4-2: outputting the global space characteristics X by adopting a parameter matrix fusion methodsGLocal spatial feature X inputsLOutput and long term time characteristicsOut of XtemCarrying out weighted fusion, wherein the formula is as follows: xFusion=f(WsG*XsG+WsL*XsL+Wtem*Xtem) Wherein ". sup" represents the Hadamard product, WsG、WsLAnd WtemRespectively representing the proportion of the global space feature, the local space feature and the long-term time feature, f is an activation function, and the final output activation function is set to be a Sigmod function.
2. The short-time traffic flow prediction method based on the global-local residual error combination model according to claim 1, characterized in that: in the step 1), the preprocessed urban road network traffic flow data is converted into space-time grid data according to the longitude and latitude of the road network, and the method specifically comprises the following steps: dividing the city road network into I X J network regions according to longitude and latitude to form a network X ═ Xi,jEvery position in the network is regularly distributed, and the distance between adjacent positions is constant; for each position (i, j), the traffic flow data, x, for the current position are recorded at fixed time Δ t intervalst i,jRepresenting the traffic flow data counted in the position (I, J) at the time t, and representing the traffic flow data counted in the network area I J as tensorConverting traffic flow prediction problem into given historical space-time grid data { X }tI t 0, …, K, predicting the spatio-temporal raster data X at the time K + Δ tK+ΔtAnd K is the total number of samples of the collected urban road network traffic flow.
3. The short-time traffic flow prediction method based on the global-local residual error combination model according to claim 2, characterized in that: in the step 2), the space-time raster data is standardized by adopting z-score standardization, and the space-time raster data { X) obtained in the step 2) is subjected to standardization treatmenttI t | (0, …, K) } throughCarrying out transformation; whereinxtIs the time-space grid data of a certain historical moment.
4. The short-time traffic flow prediction method based on the global-local residual error combination model according to claim 1, characterized in that: in the step 4), the training and construction of the global-local space-time residual error combination model based on prediction of the space-time grid data of the city road network at the next moment specifically comprises the following steps:
step 4-1: initializing model structure parameters including convolution kernel dimensionality, convolution step length, activation function, initial weight, hidden layer number, training step length and residual error unit number;
step 4-2: inputting the training set into a global spatial feature extraction component to capture global road network spatial features to obtain global spatial features W of the traffic road networksG;
Step 4-3: the training set is input into a partial spatial feature extraction component to capture partial road network spatial features to obtain partial spatial features W of the traffic road networksL;
Step 4-4: inputting the training set into a long-term time feature extraction component to capture road network time features to obtain long-term time features W of the traffic road networktem;
And 4-5: performing weighted fusion on the outputs from the step 4-2 to the step 4-4, and obtaining a final predicted value X through an activation functionFusion;
And 4-6: setting iteration times, taking the root mean square error as an error evaluation standard of the model, calculating the error between a predicted value and an actual value of the model, and updating the weight value of the model by using a back propagation algorithm;
and 4-7: and after the model training is finished, testing the prediction precision of the model by using the test set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110480842.1A CN113205685B (en) | 2021-04-30 | 2021-04-30 | Short-term traffic flow prediction method based on global-local residual error combination model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110480842.1A CN113205685B (en) | 2021-04-30 | 2021-04-30 | Short-term traffic flow prediction method based on global-local residual error combination model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113205685A CN113205685A (en) | 2021-08-03 |
CN113205685B true CN113205685B (en) | 2022-06-10 |
Family
ID=77029646
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110480842.1A Active CN113205685B (en) | 2021-04-30 | 2021-04-30 | Short-term traffic flow prediction method based on global-local residual error combination model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113205685B (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110310474A (en) * | 2018-05-14 | 2019-10-08 | 桂林远望智能通信科技有限公司 | A kind of vehicle flowrate prediction technique and device based on space-time residual error network |
CN108877223A (en) * | 2018-07-13 | 2018-11-23 | 南京理工大学 | A kind of Short-time Traffic Flow Forecasting Methods based on temporal correlation |
CN109887282B (en) * | 2019-03-05 | 2022-01-21 | 中南大学 | Road network traffic flow prediction method based on hierarchical timing diagram convolutional network |
CN112071065A (en) * | 2020-09-16 | 2020-12-11 | 山东理工大学 | Traffic flow prediction method based on global diffusion convolution residual error network |
CN112466117A (en) * | 2020-11-24 | 2021-03-09 | 南通大学 | Road network short-term traffic flow prediction method based on deep space-time residual error network |
-
2021
- 2021-04-30 CN CN202110480842.1A patent/CN113205685B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113205685A (en) | 2021-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110164128B (en) | City-level intelligent traffic simulation system | |
CN111784041B (en) | Wind power prediction method and system based on graph convolution neural network | |
CN111275962B (en) | Vehicle track data aggregation effect prediction method and device | |
CN114092832B (en) | High-resolution remote sensing image classification method based on parallel hybrid convolutional network | |
CN110097755A (en) | Freeway traffic flow amount state identification method based on deep neural network | |
CN113327417B (en) | Traffic flow prediction method based on 3D dynamic space-time residual convolution associated network | |
CN110310474A (en) | A kind of vehicle flowrate prediction technique and device based on space-time residual error network | |
CN112966853A (en) | Urban road network short-term traffic flow prediction method based on space-time residual error mixed model | |
CN116681176B (en) | Traffic flow prediction method based on clustering and heterogeneous graph neural network | |
CN114913689B (en) | Traffic flow prediction method based on priori knowledge time-varying graph convolution network | |
CN112766600B (en) | Urban area crowd flow prediction method and system | |
CN113127591B (en) | Position prediction method based on Transformer and LSTM | |
CN116432870B (en) | Urban flow prediction method | |
CN115146842A (en) | Multivariate time series trend prediction method and system based on deep learning | |
CN111461426A (en) | High-precision travel time length prediction method based on deep learning | |
CN114372503A (en) | Cluster vehicle motion trail prediction method | |
CN115204477A (en) | Bicycle flow prediction method of context awareness graph recursive network | |
CN111127879A (en) | Urban traffic flow prediction method based on generative countermeasure network | |
CN115099328A (en) | Traffic flow prediction method, system, device and storage medium based on countermeasure network | |
CN115752708A (en) | Airport single-point noise prediction method based on deep time convolution network | |
CN115034254A (en) | Nuclide identification method based on HHT (Hilbert-Huang transform) frequency band energy features and convolutional neural network | |
CN116910919B (en) | Filling method and device under Gao Queshi rate of aircraft track | |
CN112201036B (en) | Urban expressway travel speed short-time prediction method based on inclusion-CNN | |
CN113205685B (en) | Short-term traffic flow prediction method based on global-local residual error combination model | |
CN116699731A (en) | Tropical cyclone path short-term forecasting method, system and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |