CN112633579A - Domain-confrontation-based traffic flow migration prediction method - Google Patents

Domain-confrontation-based traffic flow migration prediction method Download PDF

Info

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
Application number
CN202011553097.0A
Other languages
Chinese (zh)
Other versions
CN112633579B (en
Inventor
康宇
刘斌琨
许镇义
赵振怡
裴丽红
曹洋
吕文君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN202011553097.0A priority Critical patent/CN112633579B/en
Publication of CN112633579A publication Critical patent/CN112633579A/en
Application granted granted Critical
Publication of CN112633579B publication Critical patent/CN112633579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing

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

Domain-confrontation-based traffic flow migration prediction method
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 into
Figure BDA0002857753860000031
And
Figure BDA0002857753860000032
obtaining a sequence of proximity traffic
Figure BDA0002857753860000033
According to the length l of the periodic time sequencepDividing the first and second historical observation sequences into
Figure BDA0002857753860000034
And
Figure BDA0002857753860000035
obtain periodic alternating current sequence
Figure BDA0002857753860000036
Figure BDA0002857753860000037
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 into
Figure BDA0002857753860000038
And
Figure BDA0002857753860000039
obtaining a trending traffic sequence
Figure BDA00028577538600000310
r*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
Figure BDA00028577538600000311
Figure BDA00028577538600000312
Is an input vector of the first external environmental factor,
Figure BDA00028577538600000313
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 flow
Figure BDA0002857753860000041
Periodic traffic flow space-time distribution characteristic map
Figure BDA0002857753860000042
Trend-based traffic flow space-time distribution characteristic map
Figure BDA0002857753860000043
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
Figure BDA0002857753860000044
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 characteristics
Figure BDA0002857753860000045
And
Figure BDA0002857753860000046
inputting 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 map
Figure BDA0002857753860000047
Wherein, 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
Figure BDA0002857753860000048
Figure BDA0002857753860000049
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
Figure BDA00028577538600000410
Figure BDA00028577538600000411
And
Figure BDA00028577538600000412
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
Figure BDA0002857753860000051
Figure BDA0002857753860000052
Separately input depth feature module
Figure BDA00028577538600000514
Performing convolution operation to obtain proximity depth feature
Figure BDA0002857753860000053
Periodic depth feature
Figure BDA0002857753860000054
And trending depth features
Figure BDA0002857753860000055
Mapping the characteristics
Figure BDA0002857753860000056
Input external environment factor depth feature extraction module
Figure BDA00028577538600000515
Carrying out feature extraction to obtain depth features X of external environmental factorse
Depth of proximity characterization
Figure BDA0002857753860000057
Periodic depth feature
Figure BDA0002857753860000058
And trending depth features
Figure BDA0002857753860000059
Performing 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 feature
Figure BDA00028577538600000510
Periodic depth featureSign for
Figure BDA00028577538600000511
And trending depth features
Figure BDA00028577538600000512
Performing front end fusion to obtain a traffic flow space-time sequence XstThe method specifically comprises the following steps:
Figure BDA00028577538600000513
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:
Figure BDA0002857753860000061
Figure BDA0002857753860000062
Figure BDA0002857753860000063
wherein, thetafIs fc,fp,fr,feParameter set of θdIs a set of parameters of the domain confrontation process, θyIs that
Figure BDA0002857753860000064
And 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 sequence
Figure BDA0002857753860000091
And
Figure BDA0002857753860000092
obtaining a sequence of proximity traffic
Figure BDA0002857753860000093
S24, according to the length l of the periodic time sequencepDividing the first and second historical observation sequences into
Figure BDA0002857753860000094
And
Figure BDA0002857753860000095
obtain periodic alternating current sequence
Figure BDA0002857753860000096
Figure BDA0002857753860000097
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 into
Figure BDA0002857753860000098
And
Figure BDA0002857753860000099
obtaining a trending traffic sequence
Figure BDA00028577538600000910
r*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
Figure BDA00028577538600000911
Figure BDA00028577538600000912
Is an input vector of the first external environmental factor,
Figure BDA00028577538600000913
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 flow
Figure BDA0002857753860000101
Periodic traffic flow space-time distribution characteristic map
Figure BDA0002857753860000102
Trend-based traffic flow space-time distribution characteristic map
Figure BDA0002857753860000103
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
Figure BDA0002857753860000104
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:
Figure BDA0002857753860000105
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;
Figure BDA0002857753860000106
Figure BDA0002857753860000107
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
Figure BDA0002857753860000111
Figure BDA0002857753860000112
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
Figure BDA0002857753860000113
Figure BDA0002857753860000114
And
Figure BDA0002857753860000115
inputting 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 map
Figure BDA0002857753860000116
As 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 inversion
Figure BDA0002857753860000117
As 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
Figure BDA0002857753860000121
Figure BDA0002857753860000122
And
Figure BDA0002857753860000123
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
Figure BDA0002857753860000124
Figure BDA0002857753860000125
Separately input depth feature module
Figure BDA00028577538600001213
Performing convolution operation to obtain proximity depth feature
Figure BDA0002857753860000126
Periodic depth feature
Figure BDA0002857753860000127
And trending depth features
Figure BDA0002857753860000128
The method specifically comprises the following steps:
map the characteristics
Figure BDA0002857753860000129
Figure BDA00028577538600001210
Separately input depth feature module
Figure BDA00028577538600001214
Performing convolution operation to obtain proximity, periodicity and trend deep extraction features
Figure BDA00028577538600001211
The 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:
Figure BDA00028577538600001212
s62, feature map without gradient inversion
Figure BDA0002857753860000131
Input external environment factor depth feature extraction module
Figure BDA00028577538600001310
Carrying out feature extraction to obtain depth features X of external environmental factorseThe method specifically comprises the following steps:
characteristic map for external environment factors
Figure BDA0002857753860000132
Depth feature extraction module using single-layer full-connection network as external environment factor
Figure BDA00028577538600001311
The 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
Figure BDA0002857753860000133
S63, depth feature of proximity
Figure BDA0002857753860000134
Periodic depth feature
Figure BDA0002857753860000135
And trending depth features
Figure BDA0002857753860000136
Performing front end fusion to obtain a traffic flow space-time sequence XstThe method specifically comprises the following steps:
Figure BDA0002857753860000137
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:
Figure BDA0002857753860000138
Figure BDA0002857753860000139
Figure BDA0002857753860000141
wherein, thetafIs fc,fp,fr,feParameter set of θdIs a set of parameters of the domain confrontation process, θyIs that
Figure BDA0002857753860000142
And 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 into
Figure FDA0002857753850000021
And
Figure FDA0002857753850000022
obtaining a sequence of proximity traffic
Figure FDA0002857753850000023
According to the length l of the periodic time sequencepDividing the first and second historical observation sequences into
Figure FDA0002857753850000024
And
Figure FDA0002857753850000025
obtain periodic alternating current sequence
Figure FDA0002857753850000026
Figure FDA0002857753850000027
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 into
Figure FDA0002857753850000028
And
Figure FDA0002857753850000029
obtaining a trending traffic sequence
Figure FDA00028577538500000210
r*Is the time interval of the trending time segment.
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:
coding the first external environment factor and the second external environment factor to obtain an input vector of the external environment factors
Figure FDA0002857753850000031
Figure FDA0002857753850000032
Is an input vector of the first external environmental factor,
Figure FDA0002857753850000033
is an input vector for the second external environmental factor.
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 flow
Figure FDA0002857753850000034
Periodic traffic flow space-time distribution characteristic map
Figure FDA0002857753850000035
Trend-based traffic flow space-time distribution characteristic map
Figure FDA0002857753850000036
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
Figure FDA0002857753850000037
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 characteristics
Figure FDA0002857753850000038
And
Figure FDA0002857753850000039
inputting 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 map
Figure FDA0002857753850000041
Wherein, 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
Figure FDA0002857753850000042
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
Figure FDA0002857753850000043
And
Figure FDA0002857753850000044
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 characteristics
Figure FDA0002857753850000045
Separately input depth feature module
Figure FDA0002857753850000046
Performing convolution operation to obtain proximity depth feature
Figure FDA0002857753850000047
Periodic depth feature
Figure FDA0002857753850000048
And trending depth features
Figure FDA0002857753850000049
Mapping the characteristics
Figure FDA00028577538500000410
Input external environment factor depth feature extraction module
Figure FDA00028577538500000411
Carrying out feature extraction to obtain depth features X of external environmental factorse
Depth of proximity characterization
Figure FDA00028577538500000412
Periodic depth feature
Figure FDA00028577538500000413
And trending depth features
Figure FDA00028577538500000414
Performing 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 characterized
Figure FDA0002857753850000051
Periodic depth feature
Figure FDA0002857753850000052
And trending depth features
Figure FDA0002857753850000053
Performing front end fusion to obtain a traffic flow space-time sequence XstThe method specifically comprises the following steps:
Figure FDA0002857753850000054
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:
Figure FDA0002857753850000055
Figure FDA0002857753850000056
Figure FDA0002857753850000057
wherein, thetafIs fc,fp,fr,feParameter set of θdIs a set of parameters of the domain confrontation process, θyIs that
Figure FDA0002857753850000058
And 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.
CN202011553097.0A 2020-12-24 2020-12-24 Traffic flow migration prediction method based on domain countermeasure Active CN112633579B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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