CN112633579A - Domain-confrontation-based traffic flow migration prediction method - Google Patents
Domain-confrontation-based traffic flow migration prediction method Download PDFInfo
- Publication number
- CN112633579A CN112633579A CN202011553097.0A CN202011553097A CN112633579A CN 112633579 A CN112633579 A CN 112633579A CN 202011553097 A CN202011553097 A CN 202011553097A CN 112633579 A CN112633579 A CN 112633579A
- Authority
- CN
- China
- Prior art keywords
- traffic flow
- domain
- feature
- time
- external environment
- 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 46
- 238000013508 migration Methods 0.000 title claims abstract description 20
- 230000005012 migration Effects 0.000 title claims abstract description 20
- 238000000605 extraction Methods 0.000 claims abstract description 61
- 230000007613 environmental effect Effects 0.000 claims abstract description 43
- 238000009826 distribution Methods 0.000 claims abstract description 35
- 239000013598 vector Substances 0.000 claims abstract description 27
- 230000004927 fusion Effects 0.000 claims abstract description 17
- 230000008859 change Effects 0.000 claims abstract description 12
- 230000000737 periodic effect Effects 0.000 claims description 19
- 230000006870 function Effects 0.000 claims description 12
- 238000013507 mapping Methods 0.000 claims description 12
- 230000004913 activation Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 4
- 230000002159 abnormal effect Effects 0.000 claims description 3
- 238000013528 artificial neural network Methods 0.000 claims description 3
- 239000000284 extract Substances 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 238000012512 characterization method Methods 0.000 claims description 2
- 230000007704 transition Effects 0.000 claims 2
- 239000010410 layer Substances 0.000 description 14
- 238000010586 diagram Methods 0.000 description 6
- 238000013135 deep learning Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000013136 deep learning model Methods 0.000 description 2
- 239000002356 single layer Substances 0.000 description 2
- 101150064138 MAP1 gene Proteins 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000003344 environmental pollutant Substances 0.000 description 1
- 101150077939 mapA gene Proteins 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 231100000719 pollutant Toxicity 0.000 description 1
- 238000012731 temporal analysis Methods 0.000 description 1
- 238000000700 time series analysis Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- 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
- G06N3/045—Combinations of networks
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government or public services
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Health & Medical Sciences (AREA)
- Tourism & Hospitality (AREA)
- Human Resources & Organizations (AREA)
- General Health & Medical Sciences (AREA)
- Economics (AREA)
- Mathematical Physics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Business, Economics & Management (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Marketing (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Probability & Statistics with Applications (AREA)
- Educational Administration (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Primary Health Care (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a domain confrontation-based traffic flow migration prediction method, which comprises the following steps: respectively acquiring historical traffic flow data and external environment factors of a source domain and a target domain; rasterizing a source domain and a target domain, and dividing historical traffic flow data according to traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set; coding external environment factors of a source domain and a target domain to obtain input vectors of the external environment factors; performing shallow feature extraction on the time sequence set and the input vector of the external environmental factor to obtain a traffic flow space-time feature distribution map and an external environmental factor feature map; performing domain confrontation operation on the time-space characteristic distribution map and the external environment factor characteristic map to obtain a similar time-space characteristic map and a similar external environment factor characteristic map; and extracting the characteristics of the similar space-time characteristic map and the similar external environment factor characteristic map, performing characteristic fusion on the depth characteristics, and predicting the traffic flow of a target domain.
Description
Technical Field
The invention belongs to the traffic flow prediction problem in the technical field of traffic, and particularly relates to a domain confrontation-based traffic flow migration prediction method.
Background
In recent years, intelligent transportation systems have been vigorously developed in many countries and regions in order to expect efficient management of traffic. The traffic flow prediction is an important component of an intelligent traffic system, can help traffic departments to take certain measures in time aiming at upcoming traffic peaks to relieve traffic jam, and can also effectively estimate pollutant emission.
The main task of traffic flow prediction is to predict the number of vehicles in a certain area or on a certain road in a future period of time, given historical traffic flow data. The existing traffic flow prediction methods are mainly divided into a parameter model method and a deep learning model method. Parametric model methods such as autoregressive sliding integral models and kalman filter models rely on stationarity assumptions and do not reflect the nonlinear characteristics of traffic data. As more and more urban traffic flow data is collected and stored, deep learning is receiving more and more attention in the field of traffic flow prediction, for example, some methods consider traffic flow prediction as a time series analysis problem, and estimate the traffic flow at the next time using the time correlation of the traffic flow of the same road segment. However, the deep learning model method usually depends on a large amount of training data to obtain better performance, and it is generally difficult to obtain a good effect for some areas lacking data.
Disclosure of Invention
The present invention is directed to overcome the above-described deficiencies in the background art and to provide a highly accurate traffic flow prediction for a target area where data is scarce.
In order to achieve the above purpose, the method for predicting traffic flow migration based on domain confrontation, which performs knowledge migration from a source domain to a target domain with scarce data to predict the traffic flow of the target domain, comprises the following steps:
respectively acquiring first historical traffic flow data and first external environmental factors of a source domain and second historical traffic flow data and second external environmental factors of a target domain;
rasterizing a source domain and a target domain, and dividing first historical traffic flow data and second historical traffic flow data respectively according to traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set;
coding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factor;
performing shallow feature extraction on the time sequence set and the input vector of the external environmental factor to respectively obtain a traffic flow space-time feature distribution map and an external environmental factor feature map;
performing domain confrontation operation on the traffic flow spatio-temporal feature distribution map and the external environment factor feature map to obtain a similar spatio-temporal feature map and a similar external environment factor feature map of a source domain and a target domain in a high-dimensional feature space;
and carrying out depth feature extraction on the similar space-time feature map and the similar external environment factor feature map, carrying out feature fusion on the obtained depth features, and predicting the traffic flow of the target domain.
Further, after the obtaining of the first historical traffic flow data and the first external environment factor of the source domain, the second historical traffic flow data and the second external environment factor of the target domain, respectively, the method further includes:
and performing interpolation and abnormal value processing on the first historical traffic flow data and the second historical traffic flow data to obtain processed first historical traffic flow data and second historical traffic flow data.
Further, the rasterizing the source domain and the target domain, and dividing the first historical traffic flow data and the second historical traffic flow data according to the traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set includes:
rasterizing the source domain and the target domain based on the geographic position information, and dividing the source domain and the target domain into the same H multiplied by W grids respectively;
for each grid, dividing the first historical traffic flow data and the second historical traffic flow data into a first historical observation sequence and a second historical observation sequence according to time intervals according to the time distribution characteristic of the traffic flow;
according to the proximity time sequence length lcDividing the first and second historical observation sequences intoAndobtaining a sequence of proximity traffic
According to the length l of the periodic time sequencepDividing the first and second historical observation sequences intoAndobtain periodic alternating current sequence p*A time interval that is a periodic time slice;
according to the length l of the trend time seriesrDividing the first and second historical observation sequences intoAndobtaining a trending traffic sequencer*Is the time interval of the trending time segment.
Further, the encoding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factors includes:
coding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factors Is an input vector of the first external environmental factor,is an input vector for the second external environmental factor.
Further, the shallow feature extraction is performed on the time sequence set and the input vector of the external environment factor to obtain a traffic flow space-time feature distribution map and an external environment factor feature map respectively, and the method includes:
communicating the proximity traffic sequence HcThe periodic alternating current sequence HpAnd the trend trafficStream sequence HrRespectively sending the data into a feature extraction module of a proximity branch network, a periodic branch network and a trend branch network to carry out shallow feature extraction so as to respectively obtain a feature map of the time-space distribution of the proximity traffic flowPeriodic traffic flow space-time distribution characteristic mapTrend-based traffic flow space-time distribution characteristic map
Sending the input vector of the external environmental factor to a feature extraction module of an environmental branch network for shallow feature extraction to obtain an external environmental factor feature map
Further, the performing domain confrontation operation on the traffic flow spatio-temporal feature distribution map and the external environment factor feature map to obtain a similar spatio-temporal feature map and a similar external environment factor feature map of the source domain and the target domain in a high-dimensional feature space includes:
mapping the characteristicsAndinputting the GRL layer to perform gradient inversion to realize the domain-related adversity loss function L of the parameters of the feature extraction moduledThe updating direction is reversed to obtain a new characteristic mapWherein, thetafIs a feature extraction module fc,fp,fr,feSet of parameters of fc,fp,frFeature mapping of the proximity branch network, periodic branch network and trend branch network feature extraction modules, respectively, feIs a feature extraction module of the environment branch network;
feature maps subjected to gradient inversion As domain classifier fdObtaining the judgment of the domain type;
computing domain confrontation loss LdCountering loss L according to domaindParameters of the domain classifier and the feature extraction module are updated, and the gradient inversion and the domain classification operation form a domain countermeasure, so that the feature extraction module extracts feature maps similar to the source domain and the target domain And
further, the depth feature extraction of the similar space-time feature map and the similar external environment factor feature map, the feature fusion of the obtained depth features, and the prediction of the traffic flow of the target domain include:
feature map extracted by feature extraction module Separately input depth feature modulePerforming convolution operation to obtain proximity depth featurePeriodic depth featureAnd trending depth features
Mapping the characteristicsInput external environment factor depth feature extraction moduleCarrying out feature extraction to obtain depth features X of external environmental factorse;
Depth of proximity characterizationPeriodic depth featureAnd trending depth featuresPerforming front end fusion to obtain a traffic flow space-time sequence Xst;
Depth characteristic X of external environment factorseAnd performing rear-end fusion with the traffic flow space-time sequence after passing through the Reshape layer, and outputting a traffic flow prediction result of the target domain at the time t by using a tanh activation function.
Further, the proximity depth featurePeriodic depth featureSign forAnd trending depth featuresPerforming front end fusion to obtain a traffic flow space-time sequence XstThe method specifically comprises the following steps:
wherein, Wc,Wp,WrRespectively, learning parameters to be optimized;
the depth characteristic X of the external environment factorseAnd performing rear-end fusion with a traffic flow space-time sequence after passing through a Reshape layer, and outputting a traffic flow prediction result of the target domain at the time t by using a tanh activation function, wherein the method specifically comprises the following steps:
Ypred=tanh(Xe+Xst)
wherein, YpredIs a traffic flow prediction result of the target domain.
Further, still include: optimizing network parameters, specifically:
wherein, thetafIs fc,fp,fr,feParameter set of θdIs a set of parameters of the domain confrontation process, θyIs thatAnd a parameter set fused at the front end and the rear end, mu is a balance coefficient of the domain confrontation loss and the prediction loss, and alpha is a neural network learning rate.
Compared with the prior art, the invention has the following technical effects: the invention provides a domain confrontation-based traffic flow migration learning method, which aims to utilize a source city with abundant data to perform knowledge migration to a target city with scarce data so as to realize deep learning prediction of the traffic flow of the target city with scarce data. Considering that traffic flow has high correlation with external environmental factors such as city layout, weather change and the like, and the economic development level between regions, the city layout and the climate geographic factor have large difference, so that the characteristics of the traffic flow between different cities have large difference, and therefore, it is not easy to find a source city with high similarity to a target city in reality. By using the domain countermeasure technology, the extracted features can be aligned in feature distribution, so that the feature distribution difference between the source city and the target city is overcome, the source city and the target city have similar feature distribution, and the knowledge transfer from the source domain to the target domain is realized.
Drawings
The following detailed description of embodiments of the invention refers to the accompanying drawings in which:
fig. 1 is a flowchart of a traffic flow migration prediction method based on domain confrontation;
FIG. 2 is a network model diagram of a domain confrontation-based traffic flow migration prediction method;
FIG. 3 is a prediction error thermodynamic diagram;
fig. 4 is a true value range prediction graph.
Detailed Description
To further illustrate the features of the present invention, refer to the following detailed description of the invention and the accompanying drawings. The drawings are for reference and illustration purposes only and are not intended to limit the scope of the present disclosure.
As shown in fig. 1 to 2, the present embodiment discloses a domain confrontation-based traffic flow migration prediction method, which performs knowledge migration from a source domain with abundant data to a target domain with scarce data to implement deep learning prediction of traffic flow of the target domain with scarce data, and predicts traffic flow of the target domain, including the following steps S1 to S6:
s1, respectively acquiring first historical traffic flow data and first external environment factors of a source domain, and second historical traffic flow data and second external environment factors of a target domain;
s2, rasterizing the source domain and the target domain, and dividing the first historical traffic flow data and the second historical traffic flow data respectively according to traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set;
s3, coding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factor;
s4, performing shallow feature extraction on the time sequence set and the input vector of the external environmental factor to respectively obtain a traffic flow space-time feature distribution map and an external environmental factor feature map;
s5, performing domain confrontation operation on the traffic flow spatio-temporal feature distribution map and the external environment factor feature map to obtain a similar spatio-temporal feature map and a similar external environment factor feature map of a source domain and a target domain in a high-dimensional feature space;
s6, carrying out depth feature extraction on the similar space-time feature map and the similar external environment factor feature map, carrying out feature fusion on the obtained depth features, and predicting the traffic flow of the target domain.
It should be noted that, in the present embodiment, the external environment factor is encoded to capture the interference to the external environment factor traffic flow by rasterizing the traffic flow time series data to capture the spatial correlation. Through the domain countermeasure operation, the source domain and the target domain have similar feature distribution, and high-precision prediction is realized on the target domain with a small amount of traffic flow data.
As a more preferable embodiment, in step S1: after the first historical traffic flow data and the first external environmental factor of the source domain and the second historical traffic flow data and the second external environmental factor of the target domain are respectively obtained, the method further comprises the following steps:
and performing interpolation and abnormal value processing on the first historical traffic flow data and the second historical traffic flow data to obtain processed first historical traffic flow data and second historical traffic flow data.
It should be noted that, the present embodiment may obtain historical traffic flow data of a source domain having rich data and a target domain having only a small amount of data from a government official website, and corresponding external environmental factors, where the first external environmental factor and the second external environmental factor should have the same data type, but the time spans may not be consistent.
Accordingly, the step S2 is specifically:
and rasterizing the source domain and the target domain, and dividing the processed first historical traffic flow data and the processed second historical traffic flow data according to traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set.
As a more preferable embodiment, in step S2: rasterizing a source domain and a target domain, and dividing first historical traffic flow data and second historical traffic flow data according to traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set, wherein the method specifically comprises the following steps:
s21, rasterizing the source domain and the target domain based on the geographic position information, and dividing the source domain and the target domain into the same H multiplied by W grids respectively;
s22, for each grid, dividing the first historical traffic flow data and the second historical traffic flow data into a first historical observation sequence and a second historical observation sequence according to a time interval delta t according to the time distribution characteristic of the traffic flow, wherein the delta t is 1 hour;
s23, dividing the first historical observation sequence and the second historical observation sequence into a first historical observation sequence and a second historical observation sequence according to the length lc of the proximity time sequenceAndobtaining a sequence of proximity traffic
S24, according to the length l of the periodic time sequencepDividing the first and second historical observation sequences intoAndobtain periodic alternating current sequence p*A time interval that is a periodic time slice;
s25, length l of time series according to trendrDividing the first and second historical observation sequences intoAndobtaining a trending traffic sequencer*Is the time interval of the trending time segment.
As a more preferable embodiment, in step S3: encoding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factors, specifically:
compiling the first external environmental factor and the second external environmental factorCode for obtaining an input vector of the external environmental factor Is an input vector of the first external environmental factor,is an input vector for the second external environmental factor.
It should be noted that the external environmental factors may include weather, weekend information, time point information, and the like, and taking only the influence of the week and whether the week and the working day have on the traffic flow as an example, after one-hot encoding, an N × 8 matrix vector may be obtained, where N represents the number of instances of the sample, specifically: seven days in a week, and a judgment of whether the data is a double holiday or not, eight data in total, the Monday can be coded as 10000001, the Saturday represents 00000100, the first seven-bit data represents the corresponding day of the week, and the last bit represents whether the data is a workday or not; the weather can be divided into normal weather and severe weather, wherein the normal weather is 10, and the severe weather is 01; similarly, the time point information may be represented as a code of length 24, with the time point corresponding to the time of day being 1 and the time point corresponding to 3 am being 000100000000000000000000.
As a more preferable embodiment, in step S4: shallow feature extraction is carried out on input vectors of the time sequence set and external environment factors to respectively obtain a traffic flow space-time feature distribution map and an external environment factor feature map, and the method specifically comprises the following steps:
s41, exchanging the proximity traffic flow sequence HcThe periodic alternating current sequence HpAnd the trend traffic sequence HrRespectively sending the data into a feature extraction module of a proximity branch network, a periodic branch network and a trend branch network to carry out shallow feature extraction so as to respectively obtain a feature map of the time-space distribution of the proximity traffic flowPeriodic traffic flow space-time distribution characteristic mapTrend-based traffic flow space-time distribution characteristic map
S42, sending the input vector of the external environment factor to a feature extraction module of an environment branch network for shallow feature extraction to obtain an external environment factor feature map
It should be noted that the feature extraction modules of the periodic branch network and the trend branch network are both composed of two convolutional layers, and considering that proximity has a greater influence on the target prediction time, the feature extraction module of the proximity branch network additionally adds a ConvLSTM layer, which is composed of one ConvLSTM layer and two convolutional layers.
Through the extraction of the feature extraction module, the traffic flow space-time distribution feature maps with the proximity, periodicity and trend are obtained as follows:
wherein f isc,fp,frRespectively carrying out feature mapping on a proximity branch network, a periodic branch network and a trend branch network feature extraction module; the feature maps of the proximity time segment, the periodicity time segment and the trend time segment are respectively convolutely extracted, and then the outputs are respectively fedTo the corresponding domain confrontation module to achieve feature alignment.
It should be noted that, in this embodiment, the external environment factor feature extraction module f is designedeThe external environment factor extracting module for extracting the external environment factors of the source city and the target city is composed of two full connection layers and is obtained by mapping
As a more preferable embodiment, in step S5: carrying out domain confrontation operation on a traffic flow space-time characteristic distribution map and an external environment factor characteristic map to obtain a similar space-time characteristic map and a similar external environment factor characteristic map of a source domain and a target domain in a high-dimensional characteristic space, and concretely comprises the following steps:
s51, feature map Andinputting a GRL (Gradient reverse Layer) for Gradient inversion, and turning over the sign on the Gradient in the back propagation process to realize the domain-related resistance loss function L of the parameters of the feature extraction moduledThe update direction is reversed. ThetafIs a feature extraction module fc,fp,fr,feAfter the operation of the GRL layer, thetafWith respect to domain fight loss LdThe gradient update direction of (2) is reversed, the GRL layer only changes the gradient direction of the input data, and only plays a role in parameter update.
S52, reversing the gradient of the feature mapAs domain classifier fdObtaining the judgment of the domain type, calculating the domain confrontation loss LdCountering loss L according to domaindParameters of the domain classifier and the feature extraction network are updated.
It should be noted that the feature map subjected to gradient inversionAs domain classifier fdThe domain classifier judges whether the data comes from a source domain or a target domain, outputs a corresponding domain class label, calculates a classification error, and updates parameters of the feature extraction module and the domain classification module according to the classification error. Only when the classifier can not judge the data source, the source domain and the target domain feature map can be proved to have high enough similarity. The function of the domain classification network is to distinguish the data from the source domain or the target domain as much as possible, the function of the feature extraction module is to find a suitable high-dimensional mapping, and the distribution of the source domain and the target domain in the high-dimensional feature space can be distinguished. However, since the GRL layer performs an inverse operation on the gradient of the input features, the feature extraction network has an opposite effect, that is, a suitable feature mapping is sought, so that the feature distributions of the source domain and the target domain in the high-dimensional feature space are similar as much as possible, and thus the feature extraction module and the domain classification module form a confrontation relationship. The gradient inversion and domain classification operation form domain confrontation, and the final purpose is that the feature extraction module extracts the feature map with similar source domain and target domain And
wherein the domain classification network consists of three layers of fully connected networks, LdSelecting two-class cross entropy:
Ld=-(d0×log(z0)+(1-d0)×log(1-z0))
d0taking 0 to represent a source domain; d0Taking 1 to represent a target domain; z is a radical of0Representing the probability that the output of the domain classifier is the source domain, 1-z0And expressing the probability of the output of the domain classifier as a target domain, multiplying the probability by a multiplying sign, and performing domain confrontation operation on the extracted feature maps of the source domain and the target domain to realize feature alignment so as to bridge the feature distribution difference between the source domain and the target domain.
As a more preferable embodiment, in step S6: carrying out depth feature extraction on the similar space-time feature map and the similar external environment factor feature map, carrying out feature fusion on the obtained depth features, and predicting the traffic flow of a target domain, wherein the method specifically comprises the following steps:
s61, mapping the characteristic map Separately input depth feature modulePerforming convolution operation to obtain proximity depth featurePeriodic depth featureAnd trending depth featuresThe method specifically comprises the following steps:
map the characteristics Separately input depth feature modulePerforming convolution operation to obtain proximity, periodicity and trend deep extraction featuresThe proximity, periodicity and trend depth feature modules are formed by single-layer convolution, and the purpose is to realize depth mining of source domain and target domain traffic flow features with similar distribution based on the proximity, periodicity and trend of the traffic flow:
s62, feature map without gradient inversionInput external environment factor depth feature extraction moduleCarrying out feature extraction to obtain depth features X of external environmental factorseThe method specifically comprises the following steps:
characteristic map for external environment factorsDepth feature extraction module using single-layer full-connection network as external environment factorThe feature extraction is carried out to obtain the influence of external environment factors on the prediction result, thereby obtaining the external environmentDepth feature X of the factore:
S63, depth feature of proximityPeriodic depth featureAnd trending depth featuresPerforming front end fusion to obtain a traffic flow space-time sequence XstThe method specifically comprises the following steps:
wherein, Wc,Wp,WrRespectively, the learning parameters to be optimized.
S64, depth characteristic X of external environment factorsePerforming rear-end fusion with the traffic flow space-time sequence after passing through the Reshape layer, and outputting a traffic flow prediction result Y of the target domain at the time t by using a tanh activation functionpredSpecifically, the method comprises the following steps:
Ypred=tanh(Xe+Xst)。
as a further preferred solution, the predicted loss function L is defined asyThe MSE loss function is used, thus yielding the total loss function:
Ltotal=Ly+μLd。
as a further preferable embodiment, the method further includes: optimizing network parameters, specifically:
wherein, thetafIs fc,fp,fr,feParameter set of θdIs a set of parameters of the domain confrontation process, θyIs thatAnd a parameter set fused at the front end and the rear end, mu is a balance coefficient of the domain confrontation loss and the prediction loss, and alpha is a neural network learning rate.
The scheme of the embodiment can utilize a source city with rich historical traffic flow data to assist a target city with only a small amount of data to predict traffic flow with higher precision, and is described by a specific case as follows:
fig. 3 is a diagram a of a six-morning traffic flow prediction error thermodynamic diagram, in which relatively large errors occur in only a few regions because late-night traffic flow is small and increases significantly after six hours, and it is difficult to accurately predict early-peak traffic flow using only a small amount of traffic flow data, and a diagram b of a prediction error thermodynamic diagram at 11 pm, in which it can be seen that prediction errors in almost all regions are relatively small because the change in the traffic flow at pm is relatively gradual with respect to the steepness of the change in the early peak.
Fig. 4 shows that the predicted value has better fitting property by using the historical data of the 72-day source city and the historical data of the 9-day target city to obtain the predicted curve and the true value change curve in 24 hours, and the superiority of the method of the embodiment can be seen.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (9)
1. A domain confrontation-based traffic flow migration prediction method is characterized in that knowledge migration is carried out from a source domain to a target domain with scarce data, and the traffic flow of the target domain is predicted, and the method comprises the following steps:
respectively acquiring first historical traffic flow data and first external environmental factors of a source domain and second historical traffic flow data and second external environmental factors of a target domain;
rasterizing a source domain and a target domain, and dividing first historical traffic flow data and second historical traffic flow data respectively according to traffic flow change characteristics of the source domain and the target domain to obtain a time sequence set;
coding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factor;
performing shallow feature extraction on the time sequence set and the input vector of the external environmental factor to respectively obtain a traffic flow space-time feature distribution map and an external environmental factor feature map;
performing domain confrontation operation on the traffic flow spatio-temporal feature distribution map and the external environment factor feature map to obtain a similar spatio-temporal feature map and a similar external environment factor feature map of a source domain and a target domain in a high-dimensional feature space;
and carrying out depth feature extraction on the similar space-time feature map and the similar external environment factor feature map, carrying out feature fusion on the obtained depth features, and predicting the traffic flow of the target domain.
2. The method for predicting domain-confrontation-based traffic flow migration according to claim 1, further comprising, after the obtaining of the first historical traffic flow data and the first external environmental factor of the source domain, the second historical traffic flow data and the second external environmental factor of the target domain, respectively:
and performing interpolation and abnormal value processing on the first historical traffic flow data and the second historical traffic flow data to obtain processed first historical traffic flow data and second historical traffic flow data.
3. The method for predicting domain-confrontation-based traffic flow migration according to claim 1, wherein the rasterizing the source domain and the target domain, and dividing the first historical traffic flow data and the second historical traffic flow data according to the traffic flow change characteristics of the source domain and the target domain to obtain the time series set comprises:
rasterizing the source domain and the target domain based on the geographic position information, and dividing the source domain and the target domain into the same H multiplied by W grids respectively;
for each grid, dividing the first historical traffic flow data and the second historical traffic flow data into a first historical observation sequence and a second historical observation sequence according to time intervals according to the time distribution characteristic of the traffic flow;
according to the proximity time sequence length lcDividing the first and second historical observation sequences intoAndobtaining a sequence of proximity traffic
According to the length l of the periodic time sequencepDividing the first and second historical observation sequences intoAndobtain periodic alternating current sequence p*A time interval that is a periodic time slice;
4. The method for predicting domain-confrontation-based traffic flow transition according to claim 3, wherein the encoding the first external environmental factor and the second external environmental factor to obtain the input vector of the external environmental factors includes:
5. The method for predicting domain-confrontation-based traffic flow migration according to claim 4, wherein the shallow feature extraction is performed on the time-series set and the input vector of the external environment factor to obtain a traffic flow spatiotemporal feature distribution map and an external environment factor feature map, respectively, and includes:
communicating the proximity traffic sequence HcThe periodic alternating current sequence HpAnd the trend traffic sequence HrRespectively sending the data into a feature extraction module of a proximity branch network, a periodic branch network and a trend branch network to carry out shallow feature extraction so as to respectively obtain a feature map of the time-space distribution of the proximity traffic flowPeriodic traffic flow space-time distribution characteristic mapTrend-based traffic flow space-time distribution characteristic map
6. The method for predicting traffic flow migration based on domain confrontation according to claim 5, wherein the performing of the domain confrontation operation on the traffic flow spatiotemporal feature distribution map and the external environment factor feature map to obtain the similar spatiotemporal feature map and the similar external environment factor feature map of the source domain and the target domain in the high-dimensional feature space comprises:
mapping the characteristicsAndinputting the GRL layer to perform gradient inversion to realize the domain-related adversity loss function L of the parameters of the feature extraction moduledThe updating direction is reversed to obtain a new characteristic mapWherein, thetafIs a feature extraction module fc,fp,fr,feSet of parameters of fc,fp,frFeature mapping of the proximity branch network, periodic branch network and trend branch network feature extraction modules, respectively, feIs a feature extraction module of the environment branch network;
feature maps subjected to gradient inversionAs domain classifier fdObtaining the judgment of the domain type;
computing domain confrontation loss LdCountering loss L according to domaindParameters of the domain classifier and the feature extraction module are updated, and the gradient inversion and the domain classification operation form a domain countermeasure, so that the feature extraction module extracts feature maps similar to the source domain and the target domainAnd
7. the method for predicting domain-confrontation-based traffic flow migration according to claim 6, wherein the depth feature extraction is performed on the similar spatiotemporal feature maps and the similar external environmental factor feature maps, and the obtained depth features are subjected to feature fusion, so as to predict the traffic flow of the target domain, and the method comprises the following steps:
mapping the characteristicsSeparately input depth feature modulePerforming convolution operation to obtain proximity depth featurePeriodic depth featureAnd trending depth features
Mapping the characteristicsInput external environment factor depth feature extraction moduleCarrying out feature extraction to obtain depth features X of external environmental factorse;
Depth of proximity characterizationPeriodic depth featureAnd trending depth featuresPerforming front end fusion to obtain a traffic flow space-time sequence Xst;
Depth characteristic X of external environment factorseAnd performing rear-end fusion with the traffic flow space-time sequence after passing through the Reshape layer, and outputting a traffic flow prediction result of the target domain at the time t by using a tanh activation function.
8. The method for predicting domain-confrontation-based traffic flow migration according to claim 7, wherein the proximity depth is characterizedPeriodic depth featureAnd trending depth featuresPerforming front end fusion to obtain a traffic flow space-time sequence XstThe method specifically comprises the following steps:
wherein, Wc,Wp,WrRespectively, learning parameters to be optimized;
the depth characteristic X of the external environment factorseAnd performing rear-end fusion with a traffic flow space-time sequence after passing through a Reshape layer, and outputting a traffic flow prediction result of the target domain at the time t by using a tanh activation function, wherein the method specifically comprises the following steps:
Ypred=tanh(Xe+Xst)
wherein, YpredIs a traffic flow prediction result of the target domain.
9. The traffic flow transition prediction method based on domain confrontation according to claim 7, characterized by further comprising: optimizing network parameters, specifically:
wherein, thetafIs fc,fp,fr,feParameter set of θdIs a set of parameters of the domain confrontation process, θyIs thatAnd a parameter set fused at the front end and the rear end, mu is a balance coefficient of the domain confrontation loss and the prediction loss, and alpha is a neural network learning rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011553097.0A CN112633579B (en) | 2020-12-24 | 2020-12-24 | Traffic flow migration prediction method based on domain countermeasure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011553097.0A CN112633579B (en) | 2020-12-24 | 2020-12-24 | Traffic flow migration prediction method based on domain countermeasure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112633579A true CN112633579A (en) | 2021-04-09 |
CN112633579B CN112633579B (en) | 2024-01-12 |
Family
ID=75324455
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011553097.0A Active CN112633579B (en) | 2020-12-24 | 2020-12-24 | Traffic flow migration prediction method based on domain countermeasure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112633579B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114662805A (en) * | 2022-05-26 | 2022-06-24 | 山东融瓴科技集团有限公司 | Traffic flow prediction method based on similar time sequence comparison |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107230351A (en) * | 2017-07-18 | 2017-10-03 | 福州大学 | A kind of Short-time Traffic Flow Forecasting Methods based on deep learning |
CN109215349A (en) * | 2018-10-26 | 2019-01-15 | 同济大学 | Traffic flow forecasting method when long based on deep learning |
CN110047291A (en) * | 2019-05-27 | 2019-07-23 | 清华大学深圳研究生院 | A kind of Short-time Traffic Flow Forecasting Methods considering diffusion process |
CN110210486A (en) * | 2019-05-15 | 2019-09-06 | 西安电子科技大学 | A kind of generation confrontation transfer learning method based on sketch markup information |
WO2019228358A1 (en) * | 2018-05-31 | 2019-12-05 | 华为技术有限公司 | Deep neural network training method and apparatus |
CN110929962A (en) * | 2019-12-13 | 2020-03-27 | 中国科学院深圳先进技术研究院 | Traffic flow prediction method and device based on deep learning |
CN111243269A (en) * | 2019-12-10 | 2020-06-05 | 福州市联创智云信息科技有限公司 | Traffic flow prediction method based on depth network integrating space-time characteristics |
CN111931902A (en) * | 2020-07-03 | 2020-11-13 | 江苏大学 | Countermeasure network generation model and vehicle track prediction method using the same |
-
2020
- 2020-12-24 CN CN202011553097.0A patent/CN112633579B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107230351A (en) * | 2017-07-18 | 2017-10-03 | 福州大学 | A kind of Short-time Traffic Flow Forecasting Methods based on deep learning |
WO2019228358A1 (en) * | 2018-05-31 | 2019-12-05 | 华为技术有限公司 | Deep neural network training method and apparatus |
CN109215349A (en) * | 2018-10-26 | 2019-01-15 | 同济大学 | Traffic flow forecasting method when long based on deep learning |
CN110210486A (en) * | 2019-05-15 | 2019-09-06 | 西安电子科技大学 | A kind of generation confrontation transfer learning method based on sketch markup information |
CN110047291A (en) * | 2019-05-27 | 2019-07-23 | 清华大学深圳研究生院 | A kind of Short-time Traffic Flow Forecasting Methods considering diffusion process |
CN111243269A (en) * | 2019-12-10 | 2020-06-05 | 福州市联创智云信息科技有限公司 | Traffic flow prediction method based on depth network integrating space-time characteristics |
CN110929962A (en) * | 2019-12-13 | 2020-03-27 | 中国科学院深圳先进技术研究院 | Traffic flow prediction method and device based on deep learning |
CN111931902A (en) * | 2020-07-03 | 2020-11-13 | 江苏大学 | Countermeasure network generation model and vehicle track prediction method using the same |
Non-Patent Citations (3)
Title |
---|
ZHANGGUO S.等: "A novel learning method for multi-intersections aware traffic flow forecasting", NEUROCOMPUTING, pages 477 - 484 * |
代亮 等: "基于生成对抗网络的大规模路网交通流预测算法", 控制与决策, pages 1 - 9 * |
王川;张宝文;: "基于小波分析与隐马尔科夫模型的短时交通流预测", 交通节能与环保, no. 01 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114662805A (en) * | 2022-05-26 | 2022-06-24 | 山东融瓴科技集团有限公司 | Traffic flow prediction method based on similar time sequence comparison |
CN114662805B (en) * | 2022-05-26 | 2022-09-13 | 山东融瓴科技集团有限公司 | Traffic flow prediction method based on similar time sequence comparison |
Also Published As
Publication number | Publication date |
---|---|
CN112633579B (en) | 2024-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109658695B (en) | Multi-factor short-term traffic flow prediction method | |
CN110570651B (en) | Road network traffic situation prediction method and system based on deep learning | |
CN110991713A (en) | Irregular area flow prediction method based on multi-graph convolution sum GRU | |
CN115440032B (en) | Long-short-period public traffic flow prediction method | |
CN112419710B (en) | Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium | |
EP4016412A1 (en) | Traffic prediction | |
CN114299723B (en) | Traffic flow prediction method | |
CN110738355A (en) | urban waterlogging prediction method based on neural network | |
CN113159403A (en) | Method and device for predicting pedestrian track at intersection | |
CN114202120A (en) | Urban traffic travel time prediction method aiming at multi-source heterogeneous data | |
CN112633579A (en) | Domain-confrontation-based traffic flow migration prediction method | |
CN114493034A (en) | Space-time global semantic representation learning method for regional flow prediction | |
CN113327417B (en) | Traffic flow prediction method based on 3D dynamic space-time residual convolution associated network | |
Zhou et al. | ST-Attn: Spatial-temporal attention mechanism for multi-step citywide crowd flow prediction | |
CN115796259A (en) | Model training method, data processing method, prediction device and equipment | |
CN115565376A (en) | Vehicle travel time prediction method and system fusing graph2vec and double-layer LSTM | |
CN113962460A (en) | Urban fine-grained flow prediction method and system based on space-time contrast self-supervision | |
CN114091772A (en) | Multi-angle fusion road traffic flow prediction method based on encoder and decoder | |
Zhou et al. | a Method for Traffic Flow Forecasting in a Large-Scale Road Network Using Multifeatures | |
CN113496305A (en) | Data processing method and device | |
Tekin et al. | Cs559 project report forecasting of tropical cyclone trajectories with deep learning | |
CN115713155A (en) | Traffic sequence prediction method based on multivariate time sequence data analysis | |
CN117912234A (en) | Traffic flow data complement method, model training method, device and equipment | |
YooSeok et al. | Application of Deep Learning to Missing Data Imputation: A Case Study of Highway Traffic in South Korea | |
Akhtar et al. | Traffic Forecasting in a Freeway Corridor using Seasonal ARIMA Model |
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 |