CN115034478B - Traffic flow prediction method based on field self-adaption and knowledge migration - Google Patents

Traffic flow prediction method based on field self-adaption and knowledge migration Download PDF

Info

Publication number
CN115034478B
CN115034478B CN202210665488.4A CN202210665488A CN115034478B CN 115034478 B CN115034478 B CN 115034478B CN 202210665488 A CN202210665488 A CN 202210665488A CN 115034478 B CN115034478 B CN 115034478B
Authority
CN
China
Prior art keywords
time
traffic flow
domain
space
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210665488.4A
Other languages
Chinese (zh)
Other versions
CN115034478A (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.)
Southwest Jiaotong University
Original Assignee
Southwest Jiaotong University
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 Southwest Jiaotong University filed Critical Southwest Jiaotong University
Priority to CN202210665488.4A priority Critical patent/CN115034478B/en
Publication of CN115034478A publication Critical patent/CN115034478A/en
Application granted granted Critical
Publication of CN115034478B publication Critical patent/CN115034478B/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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06Q50/40
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A30/00Adapting or protecting infrastructure or their operation
    • Y02A30/60Planning or developing urban green infrastructure
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The invention discloses a traffic flow prediction method based on field self-adaption and knowledge migration, and belongs to the technical field of data mining. Firstly, the space-time characteristics of a source domain and a target domain are extracted, and meanwhile, the potential space-time pattern-based sharing space-time knowledge is learned, so that the space-time dependence is obtained, and meanwhile, the space-time pattern is mined to help to improve the prediction performance of the target domain. Secondly, a knowledge attention module is constructed to extract the movable space-time information from the shared space-time knowledge, so as to obtain a more detailed feature representation corresponding to each space-time feature. And finally, merging the extracted space-time characteristics with the movable space-time information to realize final traffic flow prediction. The invention can be used in actual scenes, can acquire the space-time characteristics in traffic flow data, and can be expanded to prediction tasks in other space-time data fields, thereby having good universality.

Description

Traffic flow prediction method based on field self-adaption and knowledge migration
Technical Field
The invention belongs to the technical field of data mining, and particularly relates to a cross-domain knowledge migration method.
Background
The construction of the smart city greatly improves the living standard of urban residents, and the traffic flow prediction has important positions in the smart city. The accurate traffic flow prediction plays a guiding role in relieving urban traffic jams and planning traffic roads. Because of its great practical value, many scholars have conducted intensive studies on traffic flow predictions. In recent years, with the rapid increase in traffic flow data volume, deep learning is widely applied to traffic flow prediction tasks in smart cities. In particular, a cyclic convolutional neural network (recurrent neural network, RNN) and its variant model: gated convolutional networks (gate recurrent unit, GRU) and long-term memory networks (LSTM), which perform well in terms of capture time dependence. For urban traffic flow prediction based on grid data, convolutional neural networks (convolutional neural network, CNN) are often used to extract local features to model spatiotemporal correlations. However, the data acquisition sensors in cities typically exhibit an irregular distribution, constituting a structure other than euclidean space, and CNNs have difficulty processing the data of the non-euclidean structure. The graph rolling network (graph convolutionalnetwork, GCN) greatly improves traffic flow prediction performance due to its strong ability to process non-euclidean structural data. The combined model of GCN, CNN and RNN also achieves a remarkable effect on traffic flow prediction problems. Although the conventional works have achieved excellent prediction effects, the following problems still remain: first, deep learning-based methods rely heavily on the amount of training data, and if there is only a small amount of training data, their predictive performance will be greatly degraded. In practical applications, however, we often face the problem of data volume shortages, such as new smart cities or cities that can only provide small amounts of available data due to data privacy, which makes training these deep learning based models very difficult. Secondly, most of the existing traffic flow prediction models based on transfer learning are aimed at cities based on grid data, and the transfer learning method based on graph structures is rarely considered. Second, the data distribution differences that exist between different cities are ignored, which may lead to negative migration or instability of the migration effect. Therefore, it is very interesting to explore traffic flow prediction methods based on graph neural networks that can reduce the data distribution differences.
1. Traffic flow prediction
Through searching and finding of the existing patent and related technology, the existing methods related to traffic flow prediction are as follows:
(1) Zhang Xu, zhang Langwen, xie Wei, wang Yaochu, ran Jielong, sun Jinhui, chen Zhile. A traffic flow prediction method based on dynamic spatiotemporal correlation [ P ]. Guangdong province: CN113112793a,2021-07-13 proposes a traffic flow prediction method based on dynamic spatiotemporal correlation. According to the method, the dynamic similarity between the traffic point positions is learned through a flow gating mechanism, and the attention transfer mechanism is introduced to process time transfer, so that regional traffic flow prediction is realized.
(2) He Hong, wang Xinfeng, sun Xiaoxiao, dong. Multi-directional traffic flow prediction method based on Point-of-interest space-time residual neural network [ P ]. Zhejiang province: CN114154740a,2022-03-08 proposes a point-of-interest based spatio-temporal residual neural network model. The model enhances the space-time characteristics by adding time signals and interest point signals; further, extracting space-time characteristics by adopting a 3D convolutional neural network; and finally, compressing all the space-time characteristic information by a weighting method, thereby realizing regional traffic flow prediction.
The current traffic flow prediction method based on the graph neural network thoroughly considers the space-time dependence existing in the traffic flow data, but does not consider how to realize accurate traffic flow prediction under the condition of data volume shortage.
2. Migration learning
Through the search discovery of the prior patent and the related technology, the prior traffic flow prediction method related to the transfer learning comprises the following steps:
(1) Wang Senzhang, yin Chengyu, miao Hao A joint prediction method of cross-city traffic flow based on deep transfer learning [ P ]. Jiangsu province: CN110148296a,2019-08-20, proposes a depth knowledge migration model. The model uses a convolution long-short time network model ConvLSTM and a method of maximum average difference of conditions, and applies the idea of transfer learning to urban traffic flow prediction, thereby realizing urban traffic flow prediction based on grid data.
(2) Xuan Fan, xu Cui, strong nest country, liu Xincheng, zhou Guodong. Traffic flow prediction method based on deep migration fusion learning [ P ]. Jiangsu province: CN112862084B,2021-11-30, proposes a traffic flow prediction method based on deep migration fusion learning. The method combines the space-time characteristics, the characteristic transformation, the deep neural network and the migration learning algorithm, thereby realizing the prediction of traffic flow.
However, most of the above methods are based on grid data, so these methods are not directly applicable to traffic flow prediction tasks based on graph data. Meanwhile, the methods do not consider the problem of data distribution difference between the source domain and the target domain. Therefore, we consider the problem of domain difference and combine the graph neural network to provide a traffic flow prediction method based on domain self-adaption and knowledge migration.
Disclosure of Invention
The invention aims to provide a field-adaptive traffic flow prediction method, which can effectively solve the technical problem that accurate traffic flow prediction cannot be realized in cities with insufficient data volume.
The technical route for realizing the invention is as follows:
a traffic flow prediction method based on field self-adaption and knowledge migration comprises the following steps:
step 1, preprocessing traffic flow data, including:
1.1, using sensors in urban road network, taking data volume of urban traffic flow measured in months or years as source domain, taking data volume of urban traffic flow less than thirty days as target domain, recording traffic flow condition in a period of history time, defining the traffic flow data volume as follows:
Figure GDA0004075720150000021
Figure GDA0004075720150000022
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA0004075720150000027
representing real numbers, X S Is traffic flow data of the whole city as a source domain, < > for the whole city>
Figure GDA0004075720150000023
Is traffic flow data of a source domain at a time t, wherein t represents the current time and N S Is the number of the whole urban traffic flow sensors as the source domain, P S Total number of time slices, X, of traffic flow data of source domain C Traffic flow data of the whole city, which is the target domain, < >>
Figure GDA0004075720150000024
Is traffic flow data of a target domain at a time t, N C Number of traffic flow sensors, P, being target domain C The total number of time slices of the traffic flow data of the target domain, D represents the characteristic dimension of the traffic flow data;
1.2, aiming at the defect value in the traffic flow data, filling the data defect value by using a linear interpolation method, and carrying out normalization processing on the filled data by using zero-mean normalization;
1.3 building model input data: the traffic flow data of the source domain and the target domain are arranged, P represents the historical time steps of the input model, Q represents the future time steps needing to be predicted, the historical data of the previous P time steps from the current moment t are overlapped according to time sequence, and the historical traffic flow data of the P time steps of the source domain are respectively formed
Figure GDA0004075720150000025
And historical traffic flow data for P time steps of the target domain +.>
Figure GDA0004075720150000026
Taking the historical traffic flow data of P time steps before the time t of the source domain and the target domain as model input, and taking the model output as the traffic flow of Q future time steps after the time t of the source domain and the target domain;
step 2, setting the maximum training frequency as e=100;
step 3, constructing a time-space sub-network: the network is used for extracting space-time characteristics and shared space-time knowledge, constructing the relevance of space-time sub-network processing time and space by using a cyclic recurrent neural network GRU and a graph convolution network GCN, learning an adaptive shared space-time knowledge, and expressing all model parameters of the space-time sub-network as theta f The specific process comprises the following steps:
3.1 taking the historical data of the source domain and the target domain as the input of the space-time subnetwork in a cascading mode, and recording as X= [ X ] S ;X C ]X represents the cascading result of traffic flow data of the source domain and the target domain; firstly, mapping original features into a feature space through a full connection layer FC; secondly, to capture the time dependence in the data, the mapped embedded features are input into the recurrent neural network GRU, and finally, the modified linear unit ReLU is adopted as an activation function, and the process is described as follows:
H( l) =ReLU(GRU(FC(X)) (3)
wherein H is (l) A hidden feature representation representing a first layer of the spatio-temporal subnetwork;
3.2 to further mine spatial dependencies in the data, spatial correlations in the data are extracted using a graph rolling network GCN:
H (l+1) =GCN(H (l) ) (4)
wherein H is (l+1) A hidden feature representation representing the (l+1) th layer output of the spatio-temporal subnetwork;
3.3 learning an adaptive shared spatiotemporal knowledge in order to mine potential spatiotemporal patterns in source and target domains, first, randomly initializing the shared spatiotemporal knowledge, parameterizing it, and noting it as
Figure GDA0004075720150000031
Wherein G is k Representing the number of classes, d, of potential spatial modes k Is a feature dimension that shares spatiotemporal knowledge; then, along with iterative training of the space-time subnetwork, a gradient descent algorithm is adopted to update parameterized shared space-time knowledge K;
step 4, constructing a field discriminator: in order to obtain domain-invariant spatio-temporal characteristics, a domain-adaptive method is used to reduce the data distribution difference between the source domain and the target domain; the method specifically comprises the following steps:
defining a two-class domain discriminator, and expressing all model parameters of the domain discriminator as theta adv Setting the real domain label of the source domain as 1 and the real domain label of the target domain as 0; predicting the domain label probability with input characteristics through a domain discriminator, and calculating a domain self-adaptive loss function L according to the predicted domain label probability and the real domain label adv
Figure GDA0004075720150000032
Wherein q j Representing the predictive field label probability, d, for the jth sample j A true domain label representing the jth sample, n representing the total number of samples; j= {1,2,., n };
step 5, constructing a predictor: the predictor includes a knowledge attention module and a fully-connected layer, representing all model parameters of the predictor as θ g The method comprises the steps of carrying out a first treatment on the surface of the The specific process is as follows:
5.1 first, the time-space characteristics are linearly changed, namely:
Figure GDA0004075720150000033
where i represents an i-th traffic flow sensor, i= {1,2, (N S +N C )},
Figure GDA0004075720150000034
Represents the ithThe time-space characteristics of the traffic flow sensor at the time t; />
Figure GDA0004075720150000035
d h Representing hidden feature dimensions; />
Figure GDA0004075720150000036
Representing the characteristic linear change result of the ith traffic flow sensor at the moment t, ++>
Figure GDA0004075720150000037
5.2 in order to obtain the movable time-space information provided by the traffic flow sensor, a knowledge attention module needs to be constructed, and the specific process comprises the following steps: features of time and space
Figure GDA0004075720150000041
As query items to query for migratable information in shared spatiotemporal knowledge, the process of building an attention module is represented as follows:
Figure GDA0004075720150000042
Figure GDA0004075720150000043
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA0004075720150000044
characteristic value of ith traffic flow sensor at t moment and g k Similarity score, g ', for each potential spatial pattern' k Index representing potential spatial modes, exp (·) representing an exponential function based on a natural constant e, ++>
Figure GDA0004075720150000045
Is the movable time-space information of the ith traffic flow sensor at the time t;
5.3 space-time TexSign of sign
Figure GDA0004075720150000046
And migratable spatiotemporal information->
Figure GDA0004075720150000047
As input to the final prediction module, and then outputs the prediction result using the fully connected layer FC, namely:
Figure GDA0004075720150000048
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA0004075720150000049
representing a predicted value of an ith traffic flow sensor at a time t;
5.4 calculating a prediction loss function of the Source Domain from the prediction result
Figure GDA00040757201500000410
And predictive loss function of the target domain->
Figure GDA00040757201500000411
Figure GDA00040757201500000412
Figure GDA00040757201500000413
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA00040757201500000414
is the true value of the ith traffic flow sensor in the source domain at time t,/->
Figure GDA00040757201500000415
Is the predicted value of the ith traffic flow sensor in the source domain at time t, +.>
Figure GDA00040757201500000416
Is the true value of the ith traffic flow sensor in the target domain at time t,
Figure GDA00040757201500000417
is the predicted value of the ith traffic flow sensor in the target domain at the moment t, and simultaneously calculates the loss functions of the source domain and the target domain
Figure GDA00040757201500000418
And->
Figure GDA00040757201500000419
Step 6, calculating a final loss function L:
Figure GDA00040757201500000420
wherein λ is a super parameter that adjusts the predictive loss function and the domain adaptive loss function, λ ε (0, 1);
step 7, updating model parameters theta of the space-time subnetwork by using gradient descent method f Model parameters θ of domain discriminator adv Model parameters θ of predictor g The specific process can be expressed as:
Figure GDA00040757201500000421
Figure GDA00040757201500000422
Figure GDA00040757201500000423
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA00040757201500000424
represents partial differential operation, μ represents the learning rate of the gradient descent algorithm;
and 8, repeating the steps 3, 4, 5, 6 and 7 until the training times are equal to E, and finally outputting a trained traffic flow prediction model based on field self-adaption and knowledge migration.
Compared with the prior art, the invention has the advantages and effects that:
(1) The invention provides a field self-adaptive model aiming at the problem that accurate traffic flow prediction cannot be realized due to small urban data quantity, and the model can simultaneously acquire space-time characteristics in space-time data, has small prediction error and higher accuracy. (2) The shared space-time knowledge provided by the invention can effectively capture the potential space-time knowledge and realize the knowledge migration of the potential space-time model among different cities. (3) The framework provided by the invention can be expanded to other related urban space-time data fields, solves similar problems and has universality.
Drawings
Figure 1 is a block diagram of the framework of the invention,
figure 2 is a block diagram of a knowledge attention module in accordance with the present invention,
FIG. 3 is a schematic diagram of correlation of model input values, predicted values, and true values in the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
1. Traffic flow prediction model framework based on domain adaptation and knowledge migration:
the whole framework structure of the invention is shown in fig. 1, namely a traffic flow prediction model based on domain adaptation and knowledge migration. It is mainly divided into three parts: (i) And a spatiotemporal sub-network for extracting spatiotemporal features in traffic flow and learning shared spatiotemporal knowledge. (ii) The domain discriminator is used for classifying the space-time characteristics generated by the source domain and the target domain to restrict the space-time sub-network to extract the space-time characteristics unchanged in the domain and reduce the characteristic distribution difference between the source domain and the target domain. (iii) a predictor, the module consisting essentially of two parts: the knowledge attention module is connected with the full connection layer. The knowledge attention module is used for mining the migratable space-time information in the shared space-time knowledge and used for predicting the target domain. And the full connection layer carries out linear mapping on the extracted hidden representation to obtain a final target domain prediction result.
2. Knowledge attention module:
as shown in fig. 2, the detailed procedure of the knowledge attention module is as follows: first, the spatiotemporal characteristics of the ith traffic flow sensor at time t are input
Figure GDA0004075720150000051
At the same time input g k Shared spatiotemporal knowledge of the individual potential spatiotemporal patterns +.>
Figure GDA0004075720150000052
The space-time characteristic is linearly changed through the full connection layer to obtain the space-time characteristic embedded +.>
Figure GDA0004075720150000053
Next, the +_s>
Figure GDA0004075720150000054
And->
Figure GDA0004075720150000055
Multiplying, scaling, normalizing exponential function SoftMax to obtain attention fraction ++>
Figure GDA0004075720150000056
Multiplying the score by the spatiotemporal knowledge to obtain final migratable spatiotemporal information>
Figure GDA0004075720150000057
3. Model input value, predicted value, true value:
as shown in fig. 3, the model inputs include a source domain input and a target domain input, the model predictions include a source domain predicted value and a target domain predicted value, and the true values include a source domain true value and a target domain true value.
Examples
A traffic flow prediction method based on field self-adaption and knowledge migration comprises the following steps:
step 1, preprocessing traffic flow data, including:
1.1, using sensors in urban road network, taking data volume of urban traffic flow measured in months or years as source domain, taking data volume of urban traffic flow less than thirty days as target domain, recording traffic flow condition in a period of history time, defining the traffic flow data volume as follows:
Figure GDA0004075720150000058
Figure GDA0004075720150000059
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA00040757201500000510
representing real numbers, X S Is traffic flow data of the whole city as a source domain, < > for the whole city>
Figure GDA00040757201500000511
Is traffic flow data of a source domain at a time t, wherein t represents the current time and N S Is the number of the whole urban traffic flow sensors as the source domain, P S Total number of time slices, X, of traffic flow data of source domain C Traffic flow data of the whole city, which is the target domain, < >>
Figure GDA0004075720150000061
Is traffic flow data of a target domain at a time t, N C Number of traffic flow sensors, P, being target domain C The total number of time slices of the traffic flow data of the target domain, D represents the characteristic dimension of the traffic flow data;
1.2, aiming at the defect value in the traffic flow data, filling the data defect value by using a linear interpolation method, and carrying out normalization processing on the filled data by using zero-mean normalization;
1.3 building model input data: the traffic flow data of the source domain and the target domain are arranged, P represents the historical time steps of the input model, Q represents the future time steps needing to be predicted, the historical data of the previous P time steps from the current moment t are overlapped according to time sequence, and the historical traffic flow data of the P time steps of the source domain are respectively formed
Figure GDA0004075720150000062
And historical traffic flow data for P time steps of the target domain +.>
Figure GDA0004075720150000063
Taking the historical traffic flow data of P time steps before the time t of the source domain and the target domain as model input, and taking the model output as the traffic flow of Q future time steps after the time t of the source domain and the target domain;
step 2, setting the maximum training frequency as e=100;
step 3, constructing a time-space sub-network: the network is used for extracting space-time characteristics and shared space-time knowledge, constructing the relevance of space-time sub-network processing time and space by using a cyclic recurrent neural network GRU and a graph convolution network GCN, learning an adaptive shared space-time knowledge, and expressing all model parameters of the space-time sub-network as theta f The specific process comprises the following steps:
3.1 taking the historical data of the source domain and the target domain as the input of the space-time subnetwork in a cascading mode, and recording as X= [ X ] S ;X C ]X represents the cascading result of traffic flow data of the source domain and the target domain; firstly, mapping original features into a feature space through a full connection layer FC; secondly, to capture the time dependence in the data, the mapped embedded features are input into the recurrent neural network GRU, and finally, the modified linear unit ReLU is adopted as an activation function, and the process is described as follows:
H (l) =ReLU(GRU(FC(X)) (3)
wherein H is (l) A hidden feature representation representing a first layer of the spatio-temporal subnetwork;
3.2 to further mine spatial dependencies in the data, spatial correlations in the data are extracted using a graph rolling network GCN:
H (l+1) =GCN(H (l) ) (4)
wherein H is (l+1) A hidden feature representation representing the (l+1) th layer output of the spatio-temporal subnetwork;
3.3 learning an adaptive shared spatiotemporal knowledge in order to mine potential spatiotemporal patterns in source and target domains, first, randomly initializing the shared spatiotemporal knowledge, parameterizing it, and noting it as
Figure GDA0004075720150000064
Wherein G is k Representing the number of classes, d, of potential spatial modes k Is a feature dimension that shares spatiotemporal knowledge; then, along with iterative training of the space-time subnetwork, a gradient descent algorithm is adopted to update parameterized shared space-time knowledge K;
step 4, constructing a field discriminator: in order to obtain domain-invariant spatio-temporal characteristics, a domain-adaptive method is used to reduce the data distribution difference between the source domain and the target domain; the method specifically comprises the following steps:
defining a two-class domain discriminator, and expressing all model parameters of the domain discriminator as theta adv Setting the real domain label of the source domain as 1 and the real domain label of the target domain as 0; predicting the domain label probability with input characteristics through a domain discriminator, and calculating a domain self-adaptive loss function L according to the predicted domain label probability and the real domain label adv
Figure GDA0004075720150000071
Wherein q j Representing the predictive field label probability, d, for the jth sample j True field label representing the jth sample, n representing the total of samplesA number; j= {1,2,., n };
step 5, constructing a predictor: the predictor includes a knowledge attention module and a fully-connected layer, representing all model parameters of the predictor as θ g The method comprises the steps of carrying out a first treatment on the surface of the The specific process is as follows:
5.1 first, the time-space characteristics are linearly changed, namely:
Figure GDA0004075720150000072
where i represents an i-th traffic flow sensor, i= {1,2, (N S +N C )},
Figure GDA0004075720150000073
Representing the time-space characteristics of the ith traffic flow sensor at the time t; />
Figure GDA0004075720150000074
d h Representing hidden feature dimensions; />
Figure GDA0004075720150000075
Representing the characteristic linear change result of the ith traffic flow sensor at the moment t, ++>
Figure GDA0004075720150000076
5.2 in order to obtain the movable time-space information provided by the traffic flow sensor, a knowledge attention module needs to be constructed, and the specific process comprises the following steps: features of time and space
Figure GDA0004075720150000077
As query items to query for migratable information in shared spatiotemporal knowledge, the process of building an attention module is represented as follows:
Figure GDA0004075720150000078
Figure GDA0004075720150000079
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA00040757201500000710
characteristic value of ith traffic flow sensor at t moment and g k Similarity score, g ', for each potential spatial pattern' k Index representing potential spatial modes, exp (·) representing an exponential function based on a natural constant e, ++>
Figure GDA00040757201500000711
Is the movable time-space information of the ith traffic flow sensor at the time t;
5.3 spatiotemporal characterization
Figure GDA00040757201500000712
And migratable spatiotemporal information->
Figure GDA00040757201500000713
As input to the final prediction module, and then outputs the prediction result using the fully connected layer FC, namely:
Figure GDA00040757201500000714
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA00040757201500000715
representing a predicted value of an ith traffic flow sensor at a time t;
5.4 calculating a prediction loss function of the Source Domain from the prediction result
Figure GDA00040757201500000716
And predictive loss function of the target domain->
Figure GDA00040757201500000717
Figure GDA00040757201500000718
Figure GDA00040757201500000719
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA00040757201500000720
is the true value of the ith traffic flow sensor in the source domain at time t,/->
Figure GDA00040757201500000721
Is the predicted value of the ith traffic flow sensor in the source domain at time t, +.>
Figure GDA00040757201500000722
Is the true value of the ith traffic flow sensor in the target domain at time t,
Figure GDA00040757201500000723
is the predicted value of the ith traffic flow sensor in the target domain at the moment t, and simultaneously calculates the loss functions of the source domain and the target domain
Figure GDA00040757201500000724
And->
Figure GDA00040757201500000725
Step 6, calculating a final loss function L:
Figure GDA00040757201500000726
wherein λ is a super parameter that adjusts the predictive loss function and the domain adaptive loss function, λ ε (0, 1);
step 7, updating model parameters theta of the space-time subnetwork by using gradient descent method f Domain discriminatorModel parameters theta of (2) adv Model parameters θ of predictor g The specific process can be expressed as:
Figure GDA0004075720150000081
Figure GDA0004075720150000082
Figure GDA0004075720150000083
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure GDA0004075720150000084
represents partial differential operation, μ represents the learning rate of the gradient descent algorithm;
and 8, repeating the steps 3, 4, 5, 6 and 7 until the training times are equal to E, and finally outputting a trained traffic flow prediction model based on field self-adaption and knowledge migration.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The scope of the invention is indicated by the appended claims rather than by the foregoing description, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (1)

1. A traffic flow prediction method based on field self-adaption and knowledge migration comprises the following steps:
step 1, preprocessing traffic flow data, including:
1.1, using sensors in urban road network, taking data volume of urban traffic flow measured in months or years as source domain, taking data volume of urban traffic flow less than thirty days as target domain, recording traffic flow condition in a period of history time, defining the traffic flow data volume as follows:
Figure QLYQS_1
Figure QLYQS_2
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure QLYQS_3
representing real numbers, X S Is traffic flow data of the whole city as a source domain, < > for the whole city>
Figure QLYQS_4
Is traffic flow data of a source domain at a time t, wherein t represents the current time and N S Is the number of the whole urban traffic flow sensors as the source domain, P S Total number of time slices, X, of traffic flow data of source domain C Traffic flow data of the whole city, which is the target domain, < >>
Figure QLYQS_5
Is traffic flow data of a target domain at a time t, N C Number of traffic flow sensors, P, being target domain C The total number of time slices of the traffic flow data of the target domain, D represents the characteristic dimension of the traffic flow data;
1.2, aiming at the defect value in the traffic flow data, filling the data defect value by using a linear interpolation method, and carrying out normalization processing on the filled data by using zero-mean normalization;
1.3 building model input data: the traffic flow data of the source domain and the target domain are arranged, P represents the historical time steps of the input model, Q represents the future time steps needing to be predicted, the historical data of the previous P time steps from the current moment t are overlapped according to time sequence, and the historical traffic flow data of the P time steps of the source domain are respectively formed
Figure QLYQS_6
And historical traffic flow data for P time steps of the target domain +.>
Figure QLYQS_7
Taking the historical traffic flow data of P time steps before the time t of the source domain and the target domain as model input, and taking the model output as the traffic flow of Q future time steps after the time t of the source domain and the target domain;
step 2, setting the maximum training frequency as e=100;
step 3, constructing a time-space sub-network: the network is used for extracting space-time characteristics and shared space-time knowledge, constructing the relevance of space-time sub-network processing time and space by using a cyclic recurrent neural network GRU and a graph convolution network GCN, learning an adaptive shared space-time knowledge, and expressing all model parameters of the space-time sub-network as theta f The specific process comprises the following steps:
3.1 taking the historical data of the source domain and the target domain as the input of the space-time subnetwork in a cascading mode, and recording as X= [ X ] S ;X C ]X represents the cascading result of traffic flow data of the source domain and the target domain; firstly, mapping original features into a feature space through a full connection layer FC; secondly, to capture the time dependence in the data, the mapped embedded features are input into the recurrent neural network GRU, and finally, the modified linear unit ReLU is adopted as an activation function, and the process is described as follows:
H (l) =ReLU(GRU(FC(X))) (3)
wherein H is (l) A hidden feature representation representing a first layer of the spatio-temporal subnetwork;
3.2 to further mine spatial dependencies in the data, spatial correlations in the data are extracted using a graph rolling network GCN:
H (l+1) =GCN(H (l) ) (4)
wherein H is (l+1) A hidden feature representation representing the (l+1) th layer output of the spatio-temporal subnetwork;
3.3 to mine potential spatiotemporal patterns in the Source and target DomainsLearning an adaptive shared spatiotemporal knowledge, first, randomly initializing the shared spatiotemporal knowledge, parameterizing it, and recording it as
Figure QLYQS_8
Wherein G is k Representing the number of classes, d, of potential spatial modes k Is a feature dimension that shares spatiotemporal knowledge; then, along with iterative training of the space-time subnetwork, a gradient descent algorithm is adopted to update parameterized shared space-time knowledge K;
step 4, constructing a field discriminator: in order to obtain domain-invariant spatio-temporal characteristics, a domain-adaptive method is used to reduce the data distribution difference between the source domain and the target domain; the method specifically comprises the following steps:
defining a two-class domain discriminator, and expressing all model parameters of the domain discriminator as theta adv Setting the real domain label of the source domain as 1 and the real domain label of the target domain as 0; predicting the domain label probability with input characteristics through a domain discriminator, and calculating a domain self-adaptive loss function L according to the predicted domain label probability and the real domain label adv
Figure QLYQS_9
Wherein q j Representing the predictive field label probability, d, for the jth sample j A true domain label representing the jth sample, n representing the total number of samples; j= {1,2,., n };
step 5, constructing a predictor: the predictor includes a knowledge attention module and a fully-connected layer, representing all model parameters of the predictor as θ g The method comprises the steps of carrying out a first treatment on the surface of the The specific process is as follows:
5.1 first, the time-space characteristics are linearly changed, namely:
Figure QLYQS_10
where i represents the i-th traffic flow sensor, i= {1,2 "...,(N S +N C )},
Figure QLYQS_11
Representing the time-space characteristics of the ith traffic flow sensor at the time t; />
Figure QLYQS_12
d h Representing hidden feature dimensions; />
Figure QLYQS_13
Representing the characteristic linear change result of the ith traffic flow sensor at the moment t, ++>
Figure QLYQS_14
5.2 in order to obtain the movable time-space information provided by the traffic flow sensor, a knowledge attention module needs to be constructed, and the specific process comprises the following steps: features of time and space
Figure QLYQS_15
As query items to query for migratable information in shared spatiotemporal knowledge, the process of building an attention module is represented as follows:
Figure QLYQS_16
Figure QLYQS_17
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure QLYQS_18
characteristic value of ith traffic flow sensor at t moment and g k Similarity score, g ', for each potential spatial pattern' k Index representing potential spatial modes, exp (·) representing an exponential function based on a natural constant e, ++>
Figure QLYQS_19
Is the movable time-space information of the ith traffic flow sensor at the time t;
5.3 spatiotemporal characterization
Figure QLYQS_20
And migratable spatiotemporal information->
Figure QLYQS_21
As input to the final prediction module, and then outputs the prediction result using the fully connected layer FC, namely:
Figure QLYQS_22
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure QLYQS_23
representing a predicted value of an ith traffic flow sensor at a time t;
5.4 calculating a prediction loss function of the Source Domain from the prediction result
Figure QLYQS_24
And predictive loss function of the target domain->
Figure QLYQS_25
Figure QLYQS_26
Figure QLYQS_27
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure QLYQS_28
is the true value of the ith traffic flow sensor in the source domain at time t,/->
Figure QLYQS_29
Is the predicted value of the ith traffic flow sensor in the source domain at time t, +.>
Figure QLYQS_30
Is the true value of the ith traffic flow sensor in the target domain at time t,/>
Figure QLYQS_31
Is the predicted value of the ith traffic flow sensor in the target domain at the moment t, and simultaneously calculates the loss functions of the source domain and the target domain +.>
Figure QLYQS_32
And->
Figure QLYQS_33
Step 6, calculating a final loss function L:
Figure QLYQS_34
wherein λ is a super parameter that adjusts the predictive loss function and the domain adaptive loss function, λ ε (0, 1);
step 7, updating model parameters theta of the space-time subnetwork by using gradient descent method f Model parameters θ of domain discriminator adv Model parameters θ of predictor g The specific process can be expressed as:
Figure QLYQS_35
Figure QLYQS_36
Figure QLYQS_37
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure QLYQS_38
represents partial differential operation, μ represents the learning rate of the gradient descent algorithm;
and 8, repeating the steps 3, 4, 5, 6 and 7 until the training times are equal to E, and finally outputting a trained traffic flow prediction model based on field self-adaption and knowledge migration.
CN202210665488.4A 2022-06-14 2022-06-14 Traffic flow prediction method based on field self-adaption and knowledge migration Active CN115034478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210665488.4A CN115034478B (en) 2022-06-14 2022-06-14 Traffic flow prediction method based on field self-adaption and knowledge migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210665488.4A CN115034478B (en) 2022-06-14 2022-06-14 Traffic flow prediction method based on field self-adaption and knowledge migration

Publications (2)

Publication Number Publication Date
CN115034478A CN115034478A (en) 2022-09-09
CN115034478B true CN115034478B (en) 2023-06-23

Family

ID=83124472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210665488.4A Active CN115034478B (en) 2022-06-14 2022-06-14 Traffic flow prediction method based on field self-adaption and knowledge migration

Country Status (1)

Country Link
CN (1) CN115034478B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011209818A (en) * 2010-03-29 2011-10-20 Denso It Laboratory Inc Traffic volume prediction device, traffic volume prediction method and program
CN110148296A (en) * 2019-04-16 2019-08-20 南京航空航天大学 A kind of trans-city magnitude of traffic flow unified prediction based on depth migration study
CN112801404A (en) * 2021-02-14 2021-05-14 北京工业大学 Traffic prediction method based on self-adaptive spatial self-attention-seeking convolution

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1021190A (en) * 1996-07-02 1998-01-23 Nippon Telegr & Teleph Corp <Ntt> Method and equipment for agent communication
JP5070574B2 (en) * 2008-06-30 2012-11-14 学校法人早稲田大学 Local traffic prediction program generation device, local traffic prediction device, local traffic prediction program generation method, local traffic prediction method and program
CN113128783A (en) * 2021-05-06 2021-07-16 大连理工大学 Traffic prediction method based on graph migration learning
CN113887704A (en) * 2021-09-29 2022-01-04 南方科技大学 Traffic information prediction method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011209818A (en) * 2010-03-29 2011-10-20 Denso It Laboratory Inc Traffic volume prediction device, traffic volume prediction method and program
CN110148296A (en) * 2019-04-16 2019-08-20 南京航空航天大学 A kind of trans-city magnitude of traffic flow unified prediction based on depth migration study
CN112801404A (en) * 2021-02-14 2021-05-14 北京工业大学 Traffic prediction method based on self-adaptive spatial self-attention-seeking convolution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Reasoning Traffic Pattern Knowledge Graph in Predicting Real-Time Traffic Congestion Propagation;Qingyuan Ji et al.;《IFAC-PapersOnLine》;第53卷(第5期);第 578-581 页 *
基于交通参数预测的城市快速路交通状态判别研究;张源;《中国优秀硕士学位论文全 文数据库 工程科技Ⅱ辑》(第1期);第 1-103 页 *

Also Published As

Publication number Publication date
CN115034478A (en) 2022-09-09

Similar Documents

Publication Publication Date Title
Dou et al. A hybrid CEEMD-GMM scheme for enhancing the detection of traffic flow on highways
Ren et al. Mtrajrec: Map-constrained trajectory recovery via seq2seq multi-task learning
CN111382676B (en) Sand grain image classification method based on attention mechanism
CN113538910B (en) Self-adaptive full-chain urban area network signal control optimization method
Yan et al. Spatial-temporal chebyshev graph neural network for traffic flow prediction in iot-based its
CN108764298B (en) Electric power image environment influence identification method based on single classifier
Yan et al. Convolutional residual-attention: A deep learning approach for precipitation nowcasting
CN113487066A (en) Long-time-sequence freight volume prediction method based on multi-attribute enhanced graph convolution-Informer model
Bao et al. Spatial–temporal complex graph convolution network for traffic flow prediction
CN111723660A (en) Detection method for long ground target detection network
CN114944053A (en) Traffic flow prediction method based on spatio-temporal hypergraph neural network
Yu et al. 3D CNN-based accurate prediction for large-scale traffic flow
CN116108984A (en) Urban flow prediction method based on flow-POI causal relationship reasoning
CN114943365A (en) Rainfall estimation model establishing method fusing multi-source data and rainfall estimation method
Lowphansirikul et al. 3D Semantic segmentation of large-scale point-clouds in urban areas using deep learning
Wang et al. A hybrid air quality index prediction model based on CNN and attention gate unit
Abdalla et al. Deep learning weather forecasting techniques: literature survey
Nie et al. An effective recognition of moving target seismic anomaly for security region based on deep bidirectional LSTM combined CNN
Tian et al. Semantic segmentation of remote sensing image based on GAN and FCN network model
CN115034478B (en) Traffic flow prediction method based on field self-adaption and knowledge migration
Wencan et al. Segmentation of points in the future: Joint segmentation and prediction of a point cloud
CN115497006B (en) Urban remote sensing image change depth monitoring method and system based on dynamic mixing strategy
Li et al. Cross-modal collaborative representation and multi-level supervision for crowd counting
Wang et al. Contrastive GNN-based Traffic Anomaly Analysis Against Imbalanced Dataset in IoT-based ITS
CN115828990A (en) Time-space diagram node attribute prediction method for fused adaptive graph diffusion convolution network

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