CN109409499B - Track recovery method based on deep learning and Kalman filtering correction - Google Patents

Track recovery method based on deep learning and Kalman filtering correction Download PDF

Info

Publication number
CN109409499B
CN109409499B CN201811101999.3A CN201811101999A CN109409499B CN 109409499 B CN109409499 B CN 109409499B CN 201811101999 A CN201811101999 A CN 201811101999A CN 109409499 B CN109409499 B CN 109409499B
Authority
CN
China
Prior art keywords
sequence
time
track
model
kalman filtering
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
CN201811101999.3A
Other languages
Chinese (zh)
Other versions
CN109409499A (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.)
Beihang University
Original Assignee
Beihang 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 Beihang University filed Critical Beihang University
Priority to CN201811101999.3A priority Critical patent/CN109409499B/en
Publication of CN109409499A publication Critical patent/CN109409499A/en
Application granted granted Critical
Publication of CN109409499B publication Critical patent/CN109409499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Navigation (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a track recovery method based on deep learning and Kalman filtering correction, which comprises the following specific steps of S1 discretization of track points; s2 modeling a recurrent neural network and a track; s3 track recovery; s4, obtaining an attention model based on a sequence-to-sequence model by utilizing a space-time attention mechanism; s5, Kalman filtering and a recurrent neural network are combined, Kalman filtering optimization mean square error is introduced, Kalman filtering and the attention model are trained in a coordinated mode, and a final model is obtained. The invention provides a track recovery method based on deep learning and Kalman filtering correction, which models a transfer rule between track points through a recurrent neural network, helps track recovery by using an attention mechanism in the deep learning, and finally introduces Kalman filtering to model the movement of an object in time and space, thereby reducing the unexplainable property and the error of a deep learning model, having stronger interpretability and reducing the error of track recovery.

Description

Track recovery method based on deep learning and Kalman filtering correction
Technical Field
The invention relates to the field of track data mining, in particular to a track recovery method based on deep learning and Kalman filtering correction.
Background
The biggest difference between current solutions to the problem of track recovery compared to past track recovery solutions is that existing solutions are data driven. By mining from a large amount of historical data, analysis can be performed to restore the trajectory from a low sampling rate to a high sampling rate with great accuracy.
However, the existing solutions still have insufficient utilization of data, most solutions only simply count the data and then search out the optimal trajectory through a complex heuristic search scheme, and none of the solutions can capture the complex transfer rule between trajectory points.
On the other hand, with the rise of deep learning, although a deep learning model can capture complex rules in data and can be fused with multivariate information for help, the behavior of the deep learning model is difficult to explain, and the deep learning model cannot display modeling spatio-temporal information, which also causes problems when modeling tracks.
Therefore, it is an urgent need to solve the problem of the art to provide a trajectory recovery method based on kalman filter correction, which can capture deep information of trajectory data and has better interpretability.
Disclosure of Invention
In view of the above, the invention provides a track recovery method based on deep learning and kalman filtering correction, which models a transfer rule between track points through a recurrent neural network, helps to perform track recovery by using an attention mechanism in the deep learning, and finally introduces kalman filtering to model the movement of an object in time and space, thereby reducing the unexplainable property and the error of a deep learning model, having stronger interpretability, and reducing the error of the track recovery.
In order to achieve the above purpose, the invention provides the following technical scheme:
a track recovery method based on deep learning and Kalman filtering correction comprises the following specific steps:
discretization of the trace points of S1: dividing a geographical area into segments of length laA disjoint grid of; the set of the grids is recorded as J, the J stores the coordinates of the central points of all the grids according to rows, and the central coordinates are recorded as grid id;
s2 modeling the recurrent neural network and the track: modeling the discretized track points by utilizing a cyclic neural network to obtain an incomplete track point sequence, wherein the incomplete track point sequence does not comprise missing track points;
s3 trajectory recovery: the incomplete track point sequence is coded into a context vector by using a track recovery model from the sequence to the sequence, and then a decoder predicts the missing track points through the context vector;
s4 attention mechanism in space-time: the sequence-to-sequence trajectory recovery model focuses attention on the incomplete trajectory point sequence by utilizing spatio-temporal information, all points in the incomplete trajectory point sequence are used, but the weight of points considered to be important by an algorithm is larger, and the weight of unimportant points is smaller. By focusing the attention of the model on partial key points in the incomplete track point sequence, an attention model based on the sequence-to-sequence model can be obtained;
s5 introduces kalman filtering to modify the attention model: and combining Kalman filtering and a cyclic neural network, introducing Kalman filtering optimization mean square error, and cooperatively training Kalman filtering and the attention model to obtain a final model.
Through the technical scheme, the invention has the technical effects that: introducing attention in the track recovery task by attention mechanism, the sequence-to-sequence model can learn to focus attention on a particular portion of an incomplete track rather than relying on the hybrid output of the encoder. Further, based on the initial attention mechanism from the sequence to the sequence model, we propose a spatio-temporal attention mechanism to capture spatio-temporal variations in long-term trajectories; combining Kalman filtering and a recurrent neural network to better model a track, and introducing priori knowledge to help to evaluate the real state of a track point; in addition, the concise form of Kalman filtering can be realized by matrix operation, so that the method can be conveniently combined with a neural network, and because the Kalman filtering can be written into the form of a matrix, the neural network versicolor filtering which is efficient and supports batch processing can be obtained.
Preferably, in the above trajectory recovery method based on deep learning and kalman filter correction, the trajectory points in S1 are mapped onto a grid, and the trajectory points are represented by a grid id; the input of the recurrent neural network is a grid id, and the output of the recurrent neural network is a predicted grid id to which the position belongs; trace point piFrom a moving object and recorded in the form of a tuple (x, y, s, id); p is a radical ofiX is longitude, piY is the latitude, piS is the time stamp of this point, piId is the id of the location to which this point belongs.
Through the technical scheme, the invention has the technical effects that: the space-time efficiency of the algorithm is improved by mapping the limited individuals in the infinite space into the limited space.
Preferably, in the above trajectory recovery method based on deep learning and kalman filtering correction, the recurrent neural network in S2 includes but is not limited to: a long-time memory model and a threshold control unit model.
Through the technical scheme, the invention has the technical effects that: the two models solve the problem of gradient disappearance existing in a common recurrent neural network through a gate mechanism, so that the two models can be used for modeling a longer track sequence and capturing a longer-term dependency relationship.
Preferably, in the above-mentioned trajectory recovery method based on deep learning and kalman filter correction, in S3, the incomplete trajectory point sequence t isincAs input, the corresponding complete trajectory t is restored based on the inputcomThe method comprises the following specific steps: the encoder calculates a representation s from the input sequence, the decoder generates a word at each moment, the incomplete track point sequence is encoded into a context vector based on a track recovery model from sequence to sequence, the decoder predicts the missing points with the help of the context vector, and the conditional probability distribution is as follows:
Figure GDA0001883507410000041
wherein, tcomIs a track with the length n and is ordered according to time and keeps a constant sampling interval epsilon;
tcom=b1→b2→...→bn
tincis a complete trajectory t of size mcomA subset of (a);
tinc=aj1→aj2→...→ajm
s31 models an encoder of known sequence: the grid id is used as the input of an encoder, the input is converted into a low-dimensional vector by an embedded layer, and the low-dimensional vector is sent into a two-way long-time and short-time memory model; the bidirectional long-time and short-time memory model comprises a forward LSTM and a backward LSTM;
forward LSTM reads in sequence the input vector sequence to calculate a forward hidden state sequence
Figure GDA0001883507410000042
The incoming vector sequence is read into the LSTM in reverse order,and calculating a backward hidden state sequence
Figure GDA0001883507410000043
At j (h)kOutput of time hjkIs composed of
Figure GDA0001883507410000044
And
Figure GDA0001883507410000045
sum of, is recorded as
Figure GDA0001883507410000046
S32 decoder for reconstructing missing tracks: when the decoder generates the next point, if the point is a known track point, the known track point is selected to be copied as the output of the neural network, and the copying mechanism is formally written as:
Figure GDA0001883507410000047
suppose jk≤i<jk+1Adding end point limitation to the prediction stage to model local track information and decode missing points
Figure GDA0001883507410000048
The rewrite is:
Figure GDA0001883507410000049
hidden state hiComprises the following steps: h isi=LSTM(bi-1,ei,hi-1);(4)
eiThe method is characterized in that the method is an end point limiting vector, and the end point limiting vector comprising a local track starting point and an end point is introduced; the endpoint limit vector at time i is denoted as ei
Figure GDA0001883507410000051
geIs limited in the forward direction
Figure GDA0001883507410000056
And backward limitation
Figure GDA0001883507410000052
Capturing endpoint limit information as an input; the function consists of an embedded layer and a multilayer perceptron; all parameters of the embedding layer are shared; for the training of the sequence-to-sequence recovery model, the following is written:
Figure GDA0001883507410000053
where D represents the training set.
Through the technical scheme, the invention has the technical effects that:
preferably, in the above trajectory recovery method based on deep learning and kalman filter correction, in S4, attention is paid to the introduction of the mechanism, and formula (4) is written as:
hj=LSTM(bi-1,ei,hi-1,ci) (7);
context information ciExpression (c):
Figure GDA0001883507410000054
wherein, ciWeighting the hidden state output by the encoder i at the moment; siIncluding the state of the encoder at time i;
the weight of each hidden state is calculated via softmax:
Figure GDA0001883507410000055
wherein u isij=vTtanh(Whhi+Wssj) (10); wherein v is a meterCalculating a dimensionality reduction vector used by the inner product;
Whis a decoder output vector transform matrix; wsIs the encoder output vector transform matrix;
uik=vTtanh(Whhi+Wssk),k=1,2,…,m;
since fixed time intervals are considered, the temporal distance can be obtained by the relative position of the sequences;
in addition, the higher the similarity degree of points with similar positions; the temporal distance between the ith point to be predicted and the kth input trajectory point d
Figure GDA0001883507410000061
Is defined as:
Figure GDA0001883507410000062
distance in space
Figure GDA0001883507410000063
Is defined as
Figure GDA0001883507410000064
Converting the time distance and the space distance into vectors by using a time distance embedding matrix T and a space distance embedding matrix G, and respectively recording the vectors as
Figure GDA0001883507410000065
And
Figure GDA0001883507410000066
finally, the spatiotemporal attention weight is calculated as:
Figure GDA0001883507410000067
wherein, WtdIs a time-distance vector transformation matrix; wsdIs a spatial distance vector transformation matrix.
Through the technical scheme, the invention has the technical effects that: by means of vector addition, spatio-temporal information, position representation information or high-level semantic information is fused into the weight of the attention mechanism, so that the effect of the original attention mechanism on a track recovery task is greatly improved. From another perspective, attention weights add a temporal and spatial regularization term, which helps to alleviate overfitting problems caused by attention mechanisms.
Preferably, in the above trajectory recovery method based on deep learning and kalman filtering correction, the step S5 of introducing kalman filtering to correct the trajectory recovery model includes:
general description of the S51 kalman filter: kalman filtering will bring noisy measurement coordinates ziAnd the corresponding covariance matrix RiCalculating posterior state estimates as revenue
Figure GDA0001883507410000068
Here, the
Figure GDA0001883507410000069
And
Figure GDA00018835074100000610
the velocities in the x and y directions at time i are estimated; the output of the kalman filter at time i is recorded as:
Figure GDA00018835074100000611
wherein HiIs a measurement matrix describing the relationship between the posterior state and the measurement state, and subscripts (i, i) represent the posterior state at time i; hidden state of Kalman filtering at moment i { x(i,i),C(i,i)By x(i,i)And the corresponding covariance matrix C(i,i)Composition is carried out;
s52 measured covariance estimated at time i by soft max vector calculated by formula (3) and formula (4)
Figure GDA00018835074100000612
And estimated location
Figure GDA00018835074100000613
Written as follows:
Figure GDA0001883507410000071
Figure GDA0001883507410000072
wherein m isi=JTIi
Figure GDA0001883507410000073
In particular when
Figure GDA0001883507410000078
When generated by a copy mechanism,
Figure GDA0001883507410000074
will be set to a constant matrix close to 0; j is a matrix of n x 2 in shape, n being the number of grids; j. the design is a squarekIs the coordinates of the kth grid; i iskCalculating the kth dimension of the softmax vector for the neural network at the ith moment;
time-based backpropagation on the S53 Kalman Filter, loss function of Kalman Filter:
Figure GDA0001883507410000075
wherein o isiIs the output of Kalman filtering at time i, biIs the actual position at time i;
for the process covariance at time t, the gradient at time t + n is derived as:
Figure GDA0001883507410000076
Figure GDA0001883507410000077
s54 final loss function expression:
L=L1+L2 (21);
wherein L is1Training of a recovery model representing sequence-to-sequence; l is2Representing the mean square error used to optimize kalman filtering.
Through the technical scheme, the invention has the technical effects that: and combining Kalman filtering and a cyclic neural network, introducing Kalman filtering optimization mean square error, and cooperatively training Kalman filtering and the attention model to obtain a final model.
Preferably, in the above trajectory recovery method based on deep learning and kalman filter correction, the specific step of calculating the posterior state estimation by using the S51 kalman filter includes:
s511 predicts: the prediction process uses the a posteriori state estimate of the previous time instance { x }(i-1,i-1),C(i-1,i-1)To produce an a priori state estimate at time i x(i,i-1),C(i,i-1)};
Wherein x is(i,i-1)=Φi-1x(i-1,i-1)(22);
C(i,i-1)=Φi-1x(i-1,i-1)Φi-1 T+Qi-1(ii) a The subscript (i, i-1) is used to indicate the prior state at time i based on the posterior state at time i-1; Φ is the state transition matrix of kalman filtering;
s512, updating: the update process incorporates a priori state estimates { x }(i,i-1),C(i,i-1)And measurement state zi,RiGet the posterior state estimate { x }(i,i),C(i,i)};
Figure GDA0001883507410000081
x(i,i)=x(i,i-1)+Ki(zi-Hix(i,i-1)) (24);
C(i,i)=(I-KiHi)C(i,i-1) (25);
RiIs a constant matrix; qiIs the process covariance matrix at time i.
Through the technical scheme, the invention has the technical effects that: the covariance describes the confidence in the internal motion model of the kalman filter, and the lower the covariance, the more biased the prediction results towards the a priori state estimation of the kalman filter.
According to the technical scheme, compared with the prior art, the invention discloses a track recovery method based on deep learning and Kalman filtering correction, a transfer rule between track points is modeled through a recurrent neural network, the track recovery is assisted by an attention mechanism in the deep learning, and finally Kalman filtering is introduced to model the movement of an object in time and space, so that the unexplainable property and the error of a deep learning model are reduced, the interpretability is stronger, and the error of the track recovery is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a block diagram of an overall model of the present invention;
FIG. 2 is a block diagram of a sequence-to-sequence model of the present invention;
FIG. 3 is a drawing of an attention model of the present invention;
FIG. 4 is a model of the Kalman filtering and recurrent neural network combination of the present invention;
FIG. 5 is a graph illustrating the effect of embedding vector magnitude according to the present invention;
FIG. 6 is a graph illustrating the effect of the grid length of the present invention;
FIG. 7 is a diagram of a trace restore thumbnail of the present invention;
FIG. 8 is a graph of an attention weight visualization of the present invention;
fig. 9 is a visualization diagram of the internal state of the kalman filter on a divided grid space.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a track recovery method based on deep learning and Kalman filtering correction, wherein a transfer rule between track points is modeled through a cyclic neural network, the track recovery is assisted by an attention mechanism in the deep learning, and finally Kalman filtering is introduced to model the movement of an object in time and space, so that the unexplainable property and the error of a deep learning model are reduced, the higher interpretable property is realized, and the error of the track recovery is reduced.
And (3) construction of a data set:
to measure the trace recovery performance of our model, three real trace datasets were used for evaluation, from beijing, shenzhen and polo graphs (spanish second major city), respectively. The taxi data set from beijing is sampled once per minute, but the data set sampling frequency of shenzhen is not uniform. Since the sampling interval of the Shenzhen dataset is below five minutes, the trace is preprocessed into a five minute time interval. The public trajectory data set from the bohr diagram is provided by a trajectory prediction competition on kaggle (a well known data mining competition platform). The sampling interval of the raw data was 15 seconds, which we preprocessed into one minute intervals. The three cities have completely different road network structures and traffic conditions, and detailed statistical characteristics of the data set are summarized in detail in table 1.
In the preprocessing, we first need to divide the target region into disjoint grids and map the coordinates to grid numbers. In addition to this, it is necessary to ensure that the time intervals in one data set are consistent. Different mesh lengths are selected for different data sets. The length of grids of the Beijing and Boerhen graph data sets is 100m, and the length of the grids of the Shenzhen data set is 200 m; firstly, grid division, then trajectory discretization, next, immobile point removal, ultralong trajectory cutting, and finally, training data, verification data and test data division.
To accomplish these steps, a number of data visualization mechanisms need to be used, using a LEAFLET to construct the map, and using an online map api to access the map data and then visualize portions of the trajectory data. Meanwhile, regions corresponding to the data set are selected, and regions with sparse track points are deleted by the user, so that the calculation amount of the neural network is reduced; and finally, selecting a proper grid length for each data set. The too small grid length can cause the too large vocabulary to be processed by the neural network, and the too large vocabulary can cause the slow running speed of the neural network, greatly improve the occupied video memory and be very difficult to converge in a proper time. Too large a grid length leads to inaccurate prediction of the model, and an excessively large grid inherently brings a high error although the kalman filter can make corrections.
TABLE 1
Data set Beijing Shenzhen (Shenzhen medicine) Boer diagram
Data coverage duration One month Two weeks One year
Number of taxis 18298 17998 442
Number of tracks 313560 149230 284100
Number of tracing points 31356000 1492300 8523000
Number of positions 15870 19306 6351
Sampling interval One minute Five minutes One minute
And (3) setting a task: for each data set, the data set is divided into three parts, a training set, a verification set and a test set. The training set is used to train the model, and the hyperparameters, such as the size of embedding, or the length of the trellis, are selected by the validation set. The final results were evaluated on a test set. In all of our experiments, seventy percent of the traces were used as the training set, ten percent of the traces were used as the validation set, and the remaining twenty percent of the traces were used as the test set. For each incomplete track, it is generated by random sampling of the corresponding complete track. The sampling rate is defined as the ratio of the length of the incomplete track to the length of the complete track. To study the ratio change of the DRKF model under different environments, the change of the model effect at thirty percent, fifty percent and seventy percent sampling rate of the DRKF was tested. The constant sampling strategy can cause the deviation of results, so that each batch is sampled again in the training, verifying and testing processes. All evaluations on the test set were repeated three times.
A method of comparison is needed that compares our model with two traditional models and two deep learning models on three data sets. These methods were evaluated by four evaluation indexes. A generic sequence-to-sequence model and an attention model based on the sequence-to-sequence model are selected as the baseline model. The baseline model has a good coverage for the correlation model.
And (3) the RICK builds a routing table for the uncertain track, and is used for responding to the online inquiry of the user by searching the top-k track on the graph.
MPR: the most popular tracks can be found from a transition network based on breadth-first searching.
Seq2Seq: it uses the encoder to compress an incomplete track into a vector from which its decoder recovers a complete track.
Bahdanauthention, based on a sequence-to-sequence model, will focus attention on important points in incomplete tracks.
And setting parameters, namely all models have some parameters to be adjusted, and optimizing each model respectively according to the reported optimal parameters or through a verification set. The invention uses a two-layer LSTM with an embedding size of 512 dimensions.
Results and analysis:
the performance of all the methods has been written in table 2, and the following phenomena can be observed:
(1) first, our proposed DRKF model is stronger than other models in both three datasets and four evaluation indices. The neural network architecture of the present invention evolves from a sequence-to-sequence model and attention mechanism. Experimental results show that the traditional sequence-to-sequence model and attention mechanism are not so efficient at the trajectory recovery task, which our DRKF fits well.
(2) Second, RICK, a conventional a-algorithm based model, performed very good results in experiments, whereas a-algorithm required a long time to search for an optimal trajectory and it was very difficult to parallelize. Moreover, MPR does not work well for any situation, as it is difficult to adapt to situations with thousands of positions. Too high a calculation amount may result in MPR not giving a proper result in a proper time. The data set includes an area of hundreds of square kilometers, containing tens of thousands of locations. The temporal complexity of MPR is really so high that it is necessary to reduce the number of bins and increase the area of the bins to obtain the result in a time that can be tolerated, resulting in a very fast degradation of performance.
(3) Finally, when the data set and sampling rate are the same, the euclidean distance will always be greater than the NDTW distance, since the phenomenon of time drift is very common between the predicted trajectory and the actual trajectory. The ratio of the euclidean distance to the NDTW distance should demonstrate that the time-shift phenomenon is significant in both deep learning models. When the sampling rate is seventy percent, the ratio of euclidean distance to NDTW distance of the DRKF is smaller than the sequence-to-sequence model and the bahdana u attention mechanism, which means that the DRKF can partially mitigate this phenomenon with the help of kalman filtering. In addition, when the sampling rate increases, the error rate of the DRKF decreases faster than the MPR and RICK, which indicates that the DRKF can better utilize the information provided in the incomplete tracks.
TABLE 2
Figure GDA0001883507410000131
Analysis of the depth trajectory recovery model:
the space-time information is very important context information in the track recovery task, and a space-time attention mechanism and a Bahdana attention mechanism are compared, so that the difference of the attention mechanisms is avoided; the performance differences of the bidirectional recurrent neural network and the unidirectional recurrent neural network as encoders were also compared. Consider the variation of the effect of each model at five sampling rates, 30%, 40%, 50%, 60% and 70%, under different sampling rates. As shown in table 3, the bahdana attention mechanism may help the subsequence-to-sequence model to some extent, but this help is very limited and it is found that both temporal and spatial information can improve performance. The best performance of the spatio-temporal attention mechanism proposed in this application means that the present invention does find an effective way to introduce spatio-temporal information into the attention mechanism. The use of bi-directional LSTM does improve performance; in addition, the effect of the model is greatly improved along with the rise of the sampling rate, and the error of the two-way LSTM model is reduced fastest when the sampling rate rises, so that the characteristics can be more effectively extracted from the input sequence, the track recovery task is completed, and finally the STA + BiLSTM item is adopted in the deep learning part of the model.
TABLE 3
Figure GDA0001883507410000141
Analysis of Kalman Filter:
the percentage of error reduction is used as a measure. In table 4, comparing the difference in performance between the static method and the dynamic method, the effect of the dynamic covariance is better because the confidence of each predicted position can be evaluated by changing the covariance size. If the estimated covariance is very large, the confidence of the neural network prediction is not high, and therefore some predicted low confidence points may be modified by kalman filtering. Obviously, kalman filtering becomes more efficient as the sampling rate increases, because more samples can help kalman filtering to give a more accurate a priori state estimate, thus effectively reducing noise from the neural network. .
TABLE 4 impact of different covariance evaluation methods
Figure GDA0001883507410000142
Figure GDA0001883507410000151
And (3) optimizing parameters:
the effect of the hyper-parameters on performance was studied on the data set of Beijing. In all baseline models, the bahdana u attention mechanism performs very well and has similar superparameters as the DRKF. Therefore, bahdana u attention was made as the only reference baseline model. The Embedding dimension is a very important hyper-parameter of the recurrent neural network, and directly influences the capacity of the model. In fig. 5, the hidden state size is set to 128, 256, 384, 512, 640. Through experiments on the validation set, it was found that the Embedding dimension of 512 can provide the best performance for the two models. After the Embedding dimension is adjusted, the Embedding dimension is fixed to 512, and then the influence of different grid lengths is compared. In fig. 6, the grid lengths are set to 80m, 100m, 120m, 140m, 160 m. With a grid of 100m length giving the best results. When the grid length is reduced to 80m, the number of positions is too large, the training of the model is difficult, and therefore the prediction error starts to rise.
As shown in fig. 1, from left to right, the extraction of spatio-temporal information, the encoder composed of bi-directional LSTM, the calculation of spatio-temporal attention mechanism, and the decoder of subsequence to sequence model are sequentially performed. The legend on the right indicates the names of several neural network elements, including bi-directional LSTM, Kalman filtering, and uni-directional LSTM. As shown in fig. 2, a block diagram of the sequence-to-sequence model illustrates how sequence recovery occurs through end-point restriction and copy mechanisms. As shown in fig. 3, trajectory recovery is performed using temporal and spatial information by an attention mechanism. As shown in fig. 4, the output of the neural network is used instead of the output of the kalman filter, and a co-training algorithm is proposed. As shown in fig. 5, which shows how a complete track is restored and the change of attention weight in the restoration process, fig. 7 is a thumbnail of track restoration drawn by using a leaf, and shows the general effect of track restoration. As shown in fig. 8, the attention weight matrix is drawn by using matplotlib. The darker the color, the greater the weight of the representation, that is, the greater the input to output relationship, with the horizontal axis being the restored point and the vertical axis being the input point. An example of trace recovery is shown, where thirty sampled points are used to recover the original one hundred points. In fig. 7, the purple icon is the sampled point and the red line is the corresponding recovered trace. Fig. 8 illustrates the change in attention weight during recovery between a recovered point and an incomplete trace point. The upper matrix of FIG. 8 illustrates that it is difficult for the conventional attention mechanism to estimate the weights of all sampled points, and the lower matrix of FIG. 8 illustrates that our spatiotemporal attention mechanism can compute a more reasonable attention weight with the help of spatiotemporal information. As shown in fig. 9, the correction process of the kalman filter is demonstrated, and the two-dimensional gaussian distribution represents the prior, posterior, and measurement states of the kalman filter. The purple dots in the figure are the real dots that need to be restored. In the prediction stage, Kalman filtering makes an a priori state estimation, the result of the estimation is very close to the target position, and the prediction of the neural network deviates a lot from the target. However, after the update phase, the result of the correction is very close to the target. It can also be seen that the kalman filter is essentially a linear prediction, and based on the internal states estimated at times i-2 and i-1, the kalman filter makes a linear extrapolation, taking into account time and vehicle speed, and therefore having a considerable reference value, whereas the uncertainty of the neural network on its own prediction ultimately leads to the model decision to be more accurate than the kalman filter internally predicts. As can be seen from the figure, the Gaussian distribution predicted by Kalman filtering is obviously brighter than that predicted by a neural network, and the prior state estimation of Kalman filtering is more reliable.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A track recovery method based on deep learning and Kalman filtering correction is characterized by comprising the following specific steps:
discretization of the trace points of S1: dividing a geographical area into segments of length laA disjoint grid of; the set of the grids is recorded as J, the J stores the coordinates of the central points of all the grids according to rows, and the coordinates of the central points are recorded as grid id;
s2 modeling the recurrent neural network and the track: modeling the discretized track points by utilizing a cyclic neural network to obtain an incomplete track point sequence, wherein the incomplete track point sequence does not comprise missing track points;
s3 trajectory recovery: the incomplete track point sequence is coded into a context vector by using a track recovery model from the sequence to the sequence, and then a decoder predicts the missing track points through the context vector;
s4 attention mechanism in space-time: the sequence-to-sequence track recovery model focuses attention on the incomplete track point sequence by utilizing spatio-temporal information to obtain an attention model based on the sequence-to-sequence model;
s5 introduces kalman filtering to modify the attention model: and combining Kalman filtering and a cyclic neural network, introducing Kalman filtering optimization mean square error, and cooperatively training Kalman filtering and the attention model to obtain a final model.
2. The trajectory recovery method based on deep learning and kalman filtering correction according to claim 1, wherein the trajectory points in S1 are mapped onto a grid, and the trajectory points are represented by a grid id; the input of the recurrent neural network is a grid id, and the output of the recurrent neural network is a predicted grid id to which the position belongs; trace point piFrom a moving object and recorded in the form of a tuple (x, y, s, id); p is a radical ofiX is longitude, piY is the latitude, piS is the time stamp of this point, piId is the id of the location to which this point belongs.
3. The trajectory recovery method based on deep learning and kalman filtering modification according to claim 1, wherein the recurrent neural network in S2 includes but is not limited to: a long-time memory model and a threshold control unit model.
4. The method for trajectory recovery based on deep learning and Kalman filtering correction as claimed in claim 1, wherein in S3, the incomplete trajectory point sequence tincAs input, baseRestoring the corresponding complete trajectory t from the inputcomThe method comprises the following specific steps: the encoder calculates a representation s from the input sequence, the decoder generates a word at each moment, the incomplete track point sequence is encoded into a context vector based on a track recovery model from sequence to sequence, the decoder predicts the missing points with the help of the context vector, and the conditional probability distribution is as follows:
Figure FDA0003462215950000021
wherein, tcomIs a track with the length n and is ordered according to time and keeps a constant sampling interval epsilon; t is tcom=b1→b2→…→bn
tincIs a complete trajectory t of size mcomA subset of (a);
tinc=aj1→aj2→…→ajm
s31 models an encoder of known sequence: the grid id is used as the input of an encoder, the input is converted into a low-dimensional vector by an embedded layer, and the low-dimensional vector is sent into a two-way long-time and short-time memory model; the bidirectional long-time and short-time memory model comprises a forward LSTM and a backward LSTM;
forward LSTM reads in sequence the input vector sequence to calculate a forward hidden state sequence
Figure FDA0003462215950000022
Backward LSTM reads in the input vector sequence in reverse order and calculates a backward hidden state sequence
Figure FDA0003462215950000023
At j (h)kOutput of time of day
Figure FDA0003462215950000024
Is composed of
Figure FDA0003462215950000025
And
Figure FDA0003462215950000026
sum of, is recorded as
Figure FDA0003462215950000027
S32 decoder for reconstructing missing tracks: when the decoder generates the next point, if the point is a known track point, the known track point is selected to be copied as the output of the neural network, and the copying mechanism is formally written as:
Figure FDA0003462215950000028
suppose jk≤i<jk+1Adding end point limitation to the prediction stage to model local track information and decode missing points
Figure FDA0003462215950000031
The rewrite is:
Figure FDA0003462215950000032
hidden state hiComprises the following steps: h isi=LSTM(bi-1,ei,hi-1);(4)
eiThe method is characterized in that the method is an end point limiting vector, and the end point limiting vector comprising a local track starting point and an end point is introduced; the endpoint limit vector at time i is denoted as ei
Figure FDA0003462215950000033
geIs limited in the forward direction
Figure FDA0003462215950000034
And backward limitation
Figure FDA0003462215950000035
Capturing endpoint limit information as an input; the function consists of an embedded layer and a multilayer perceptron; all parameters of the embedding layer are shared; for the training of the sequence-to-sequence recovery model, the following is written:
Figure FDA0003462215950000036
where D represents the training set.
5. The trajectory recovery method based on deep learning and kalman filtering modification according to claim 1, wherein in S4, attention is paid to the introduction of a mechanism, and formula (4) is written as:
hj=LSTM(bi-1,ei,hi-1,ci) (7);
context information ciExpression (c):
Figure FDA0003462215950000037
wherein, ciWeighting the hidden state output by the encoder i at the moment; siIncluding the state of the encoder at time i; the weight of each hidden state is calculated via softmax:
Figure FDA0003462215950000038
wherein u isij=vTtanh(Whhi+Wssj) (10); wherein v is a dimensionality reduction vector used to compute the inner product; whIs a decoder output vector transform matrix; wsIs the encoder output vector transform matrix; u. ofik=vTtanh(Whhi+Wssk),k=1,2,…,m;tan h (·) is an arctangent function;
since fixed time intervals are considered, the temporal distance can be obtained by the relative position of the sequences;
in addition, the higher the similarity degree of points with similar positions; the temporal distance between the ith point to be predicted and the kth input trajectory point d
Figure FDA0003462215950000041
Is defined as:
Figure FDA0003462215950000042
distance in space
Figure FDA0003462215950000043
Is defined as
Figure FDA0003462215950000044
Converting the time distance and the space distance into vectors by using a time distance embedding matrix T and a space distance embedding matrix G, and respectively recording the vectors as
Figure FDA0003462215950000045
And
Figure FDA0003462215950000046
finally, the spatiotemporal attention weight is calculated as:
Figure FDA0003462215950000047
wherein, WtdIs a time-distance vector transformation matrix; wsdIs a spatial distance vector transformation matrix.
6. The method for trajectory recovery based on deep learning and kalman filter correction according to claim 1, wherein the step S5 of introducing kalman filter to correct the trajectory recovery model includes: one of S51 Kalman filteringDescription of the general terms: kalman filtering will bring noisy measurement coordinates ziAnd the corresponding covariance matrix RiCalculating posterior state estimates as revenue
Figure FDA0003462215950000048
Here, the
Figure FDA0003462215950000049
And
Figure FDA00034622159500000410
the velocities in the x and y directions at time i are estimated; the output of the kalman filter at time i is recorded as: oi=Hix(i,i)(15);
Wherein HiIs a measurement matrix describing the relationship between the posterior state and the measurement state, and subscripts (i, i) represent the posterior state at time i; hidden state of Kalman filtering at moment i { x(i,i),C(i,i)By x(i,i)And the corresponding covariance matrix C(i,i)Composition is carried out;
s52 measured covariance estimated at time i by using softmax vector calculated by equations (3) and (4)
Figure FDA00034622159500000411
And estimated location
Figure FDA00034622159500000412
Written as follows:
Figure FDA00034622159500000413
Figure FDA00034622159500000414
wherein m isi=JTIi
Figure FDA00034622159500000415
When in use
Figure FDA00034622159500000416
When generated by a copy mechanism,
Figure FDA00034622159500000417
will be set to a constant matrix close to 0; j is a matrix of n x 2 in shape, n being the number of grids; j. the design is a squarekIs the coordinates of the kth grid; i iskCalculating the kth dimension of the softmax vector for the neural network at the ith moment;
time-based backpropagation on the S53 Kalman Filter, loss function of Kalman Filter:
Figure FDA0003462215950000051
wherein o isiIs the output of Kalman filtering at time i, biIs the actual position at time i;
for the process covariance at time t, the gradient at time t + n is derived as:
Figure FDA0003462215950000052
Figure FDA0003462215950000053
s54 final loss function expression:
L=L1+L2 (21);
wherein L is1Training of a recovery model representing sequence-to-sequence; l is2Representing the mean square error used to optimize kalman filtering.
7. The trajectory recovery method based on deep learning and Kalman filtering correction according to claim 6, wherein the S51 Kalman filtering calculation posterior state estimation specific step comprises:
s511 predicts: the prediction process uses the a posteriori state estimate of the previous time instance { x }(i-1,i-1),C(i-1,i-1)To produce an a priori state estimate at time i x(i,i-1),C(i,i-1)};
Wherein x is(i,i-1)=Φi-1x(i-1,i-1) (22);
C(i,i-1)=Φi-1x(i-1,i-1)Φi-1 T+Qi-1(ii) a The subscript (i, i-1) is used to indicate the prior state at time i based on the posterior state at time i-1; Φ is the state transition matrix of kalman filtering;
s512, updating: the update process incorporates a priori state estimates { x }(i,i-1),C(i,i-1)And measurement state zi,RiGet the posterior state estimate { x }(i,i),C(i,i)};
Figure FDA0003462215950000061
x(i,i)=x(i,i-1)+Ki(zi-Hix(i,i-1)) (24);
C(i,i)=(I-KiHi)C(i,i-1) (25);
RiIs a constant matrix; qiIs the process covariance matrix at time i.
CN201811101999.3A 2018-09-20 2018-09-20 Track recovery method based on deep learning and Kalman filtering correction Active CN109409499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811101999.3A CN109409499B (en) 2018-09-20 2018-09-20 Track recovery method based on deep learning and Kalman filtering correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811101999.3A CN109409499B (en) 2018-09-20 2018-09-20 Track recovery method based on deep learning and Kalman filtering correction

Publications (2)

Publication Number Publication Date
CN109409499A CN109409499A (en) 2019-03-01
CN109409499B true CN109409499B (en) 2022-03-15

Family

ID=65465124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811101999.3A Active CN109409499B (en) 2018-09-20 2018-09-20 Track recovery method based on deep learning and Kalman filtering correction

Country Status (1)

Country Link
CN (1) CN109409499B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110070239B (en) * 2019-03-29 2021-05-11 北京航空航天大学 Personalized route recommendation method based on A star search and deep learning
CN110232169B (en) * 2019-05-09 2022-01-04 北京航空航天大学 Track denoising method based on bidirectional long-time and short-time memory model and Kalman filtering
CN110163439A (en) * 2019-05-24 2019-08-23 长安大学 A kind of city size taxi trajectory predictions method based on attention mechanism
CN110321343B (en) * 2019-07-11 2023-11-14 广东工业大学 Wearable device track prediction method, device and system
CN110460463B (en) * 2019-07-24 2021-12-14 海南大学 Service quality prediction method and system based on deep neural network
CN110555467B (en) * 2019-08-13 2020-10-23 深圳创新奇智科技有限公司 Industrial data classification method based on model migration
CN110781266B (en) * 2019-09-16 2020-06-09 北京航空航天大学 Urban perception data processing method based on time-space causal relationship
CN110928993B (en) * 2019-11-26 2023-06-30 重庆邮电大学 User position prediction method and system based on deep cyclic neural network
CN111401531A (en) * 2020-04-24 2020-07-10 中国人民解放军国防科技大学 Trajectory prediction method and system
CN111815053B (en) * 2020-07-09 2021-03-16 北京中超伟业信息安全技术股份有限公司 Prediction method and system for industrial time sequence data
CN111798492B (en) * 2020-07-16 2024-04-19 商汤国际私人有限公司 Track prediction method, track prediction device, electronic equipment and medium
CN112578419B (en) * 2020-11-24 2023-12-12 南京邮电大学 GPS data reconstruction method based on GRU network and Kalman filtering
CN112529284A (en) * 2020-12-08 2021-03-19 湖南大学 Private car residence time prediction method, device and medium based on neural network
CN112631983B (en) * 2020-12-28 2023-05-02 电子科技大学 Sparse neural network-oriented system-on-chip
CN112668804B (en) * 2021-01-11 2023-04-07 中国海洋大学 Method for predicting broken track of ground wave radar ship
CN113256681B (en) * 2021-05-26 2022-05-13 北京易航远智科技有限公司 Pedestrian trajectory prediction method based on space-time attention mechanism
CN114298881B (en) * 2021-10-29 2023-01-06 广东省国土资源测绘院 Vector map watermark processing method and terminal based on gradient lifting decision tree
CN114201695B (en) * 2021-12-17 2022-10-21 南京邮电大学 Moving track privacy protection matching method based on hotspot grid dimension conversion
CN117092610B (en) * 2023-10-18 2024-01-05 中国人民解放军63961部队 Reverse expansion Kalman trajectory extrapolation method based on long and short pulse combination design

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106097391A (en) * 2016-06-13 2016-11-09 浙江工商大学 A kind of multi-object tracking method identifying auxiliary based on deep neural network
CN107330410A (en) * 2017-07-03 2017-11-07 南京工程学院 Method for detecting abnormality based on deep learning under complex environment
CN108388900A (en) * 2018-02-05 2018-08-10 华南理工大学 The video presentation method being combined based on multiple features fusion and space-time attention mechanism

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8229163B2 (en) * 2007-08-22 2012-07-24 American Gnc Corporation 4D GIS based virtual reality for moving target prediction

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106097391A (en) * 2016-06-13 2016-11-09 浙江工商大学 A kind of multi-object tracking method identifying auxiliary based on deep neural network
CN107330410A (en) * 2017-07-03 2017-11-07 南京工程学院 Method for detecting abnormality based on deep learning under complex environment
CN108388900A (en) * 2018-02-05 2018-08-10 华南理工大学 The video presentation method being combined based on multiple features fusion and space-time attention mechanism

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于深度学习的轨迹数据恢复研究;吴翰韬;《中国优秀硕士学位论文全文数据库信息科技辑》;20180915;I138-11 *

Also Published As

Publication number Publication date
CN109409499A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109409499B (en) Track recovery method based on deep learning and Kalman filtering correction
CN111612243B (en) Traffic speed prediction method, system and storage medium
CN115240425B (en) Traffic prediction method based on multi-scale space-time fusion graph network
CN110097755A (en) Freeway traffic flow amount state identification method based on deep neural network
CN112949828B (en) Graph convolution neural network traffic prediction method and system based on graph learning
CN110991497B (en) BSVC (binary sequence video coding) -method-based urban land utilization change simulation cellular automaton method
CN114299723B (en) Traffic flow prediction method
CN110781266B (en) Urban perception data processing method based on time-space causal relationship
CN114372116B (en) Vehicle track prediction method based on LSTM and space-time attention mechanism
CN105512727A (en) Markov-based personal path prediction method
CN115510174A (en) Road network pixelation-based Wasserstein generation countermeasure flow data interpolation method
CN115829171B (en) Pedestrian track prediction method combining space-time information and social interaction characteristics
CN110990678B (en) Trajectory similarity calculation method based on enhanced recurrent neural network
Xiong et al. Contextual sa-attention convolutional LSTM for precipitation nowcasting: A spatiotemporal sequence forecasting view
CN116108984A (en) Urban flow prediction method based on flow-POI causal relationship reasoning
CN114913689B (en) Traffic flow prediction method based on priori knowledge time-varying graph convolution network
CN115206092A (en) Traffic prediction method of BiLSTM and LightGBM model based on attention mechanism
CN114461931A (en) User trajectory prediction method and system based on multi-relation fusion analysis
CN113780665B (en) Private car stay position prediction method and system based on enhanced recurrent neural network
Wang et al. Reconstruction of missing trajectory data: a deep learning approach
CN113327417B (en) Traffic flow prediction method based on 3D dynamic space-time residual convolution associated network
Kim et al. A daily tourism demand prediction framework based on multi-head attention CNN: The case of the foreign entrant in South Korea
CN117371571A (en) Regional air quality prediction model based on multi-scale dynamic synchronous diagram mechanism
Wang et al. A deep trajectory clustering method based on sequence‐to‐sequence autoencoder model
CN116777068A (en) Causal transducer-based networked data prediction method

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