A prediction method for non-uniform trajectory sequences

By designing a space-time embedding module in the Transformer network and predicting precise time trajectories, the problem of uneven time intervals of aircraft trajectory data and precise time prediction is solved, achieving accurate prediction of aircraft trajectories, improving prediction accuracy and its application value in the field of civil aviation. .

CN114239935BActive Publication Date: 2024-09-06NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111478015.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-09-06
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

The uneven time intervals of aircraft trajectory data and the need to predict trajectories at precise times are difficult to effectively handle with existing methods, resulting in low prediction accuracy.

Method used

Transformer (TF) network is used to design a spatio-temporal embedding module and predict precise time trajectories. The spatio-temporal embedding module is used to extract and process features of aircraft trajectory data, and time embedding is added to the encoder and decoder to improve the network structure to achieve precise time. Trajectory prediction.

Benefits of technology

It achieves accurate prediction of aircraft trajectory, improves prediction accuracy, and can play a huge role in conflict detection and route planning in the civil aviation field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239935B
    Figure CN114239935B
Patent Text Reader

Abstract

The present invention discloses a prediction method for non-uniform trajectory sequences, which uses a Transformer (TF) network for natural language processing to model trajectory sequences. Aiming at the two major difficulties of uneven time intervals of aircraft trajectory data and the need to predict trajectories with precise time, the present invention improves the network structure, designs a spatiotemporal embedding module and predicts precise time trajectories, proposes a non-uniform trajectory sequence prediction method, realizes precise time trajectory prediction of aircraft, fully mines its deep features and knowledge, and thus accurately predicts aircraft trajectories, which can play a huge role in conflict detection and route planning in the civil aviation field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic technology, and more particularly to a prediction method for a non-uniform trajectory sequence. Background Art

[0002] Compared with other fields, aircraft trajectory prediction has two major difficulties. First, the time intervals of aircraft trajectory data are uneven. Aircraft trajectory data is usually measured in seconds. Due to the fact that the data source is not single, the sensor working efficiency, and the lack of data feature information are serious, the time intervals between adjacent trajectory points in the aircraft trajectory data are usually inconsistent. Time has a serious impact on position information, so how to process time and accurately extract time information is a difficulty; second, the aircraft trajectory needs to be predicted at a precise time. Aircraft trajectory prediction has more precise prediction requirements. Due to the high speed of the aircraft, the aircraft position will change greatly even in a short period of time. Therefore, the aircraft trajectory prediction needs to be accurate to seconds, and it must be able to predict the aircraft position at a specified moment, which undoubtedly increases the difficulty of aircraft trajectory prediction.

[0003] Trajectory prediction has experienced a steady development from hand-crafted energy-based linear optimization methods to data-driven optimization methods. Two prediction methods are generally used. The first prediction is to use trajectory prediction based on multivariate linear regression, such as Kalman filter, linear or Gaussian regression model, time series analysis and autoregressive model, to optimize the hand-crafted energy function to achieve the prediction and discrimination of aircraft trajectory; the second prediction is to use trajectory prediction based on neural network. Neural network has achieved better results in trajectory prediction tasks due to its better learning nonlinear ability. The regression model mainly uses LSTM and RNN models and uses a large amount of data for training.

[0004] However, the above methods have the following disadvantages: The core of trajectory prediction methods based on multivariate linear regression is to use regression models to optimize hand-crafted energy functions to achieve trajectory prediction. However, the trajectory of aircraft is ever-changing, and linear models are difficult to apply to complex nonlinear trajectories; the typical representative of nonlinear regression models is LSTM, which can be used to directly regress predicted values, or generate means and (diagonal) covariances on x and y coordinates to express the uncertainty associated with the prediction. This model is called Gaussian LSTM. LSTM processes observations sequentially before starting automatic regression prediction, but cannot view all available observations and weight them according to the attention mechanism.

[0005] Therefore, how to solve the problem of uneven time intervals of aircraft trajectory data and improve prediction accuracy is an urgent problem that technicians in this field need to solve. Summary of the invention

[0006] In view of this, the present invention provides a prediction method for non-uniform trajectory sequences, using the Transformer (TF) network for natural language processing to model the trajectory sequence. Aiming at the two major difficulties of uneven time intervals of aircraft trajectory data and the need to predict precise time trajectories, the present invention improves the network structure, designs a spatiotemporal embedding module and predicts precise time trajectories, and proposes a non-uniform trajectory sequence prediction method. The precise time trajectory prediction of the aircraft is achieved, and its deep features and knowledge are fully mined, so as to accurately predict the aircraft trajectory, which can play a huge role in conflict detection and route planning in the civil aviation field.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] A prediction method for a non-uniform trajectory sequence comprises the following steps:

[0009] Step 1: Collect aircraft trajectory point data and perform preprocessing to obtain aircraft trajectory data of various aircraft;

[0010] Step 2: Using a sliding window to sample the aircraft trajectory data to obtain sampled data, and performing feature extraction on the sampled data to obtain prediction model input data;

[0011] Step 3: The prediction model inputs data and the time to be predicted as input T f The architecture model outputs the trajectory prediction results through the spatiotemporal embedding module, encoder and decoder in sequence.

[0012] Preferably, the pretreatment process in step 1 includes:

[0013] Step 11: Perform factor analysis on the collected aircraft trajectory point data, establish a table structure, use ES distributed database for data storage, and obtain a cold storage;

[0014] Step 12: Distinguish the aircraft types from the cold storage according to the type field, extract the aircraft trajectory point data of various types of target aircraft, construct a table for each type of aircraft trajectory point data and store it in the MySQL database to obtain a hot storage; since the type field information is missing in the original data, the trajectory point cannot be extracted through the type field, so the other characteristic information of the aircraft in the obtained data is reversely extracted and confirmed in the cold storage to complete the missing trajectory points of each type of aircraft; other characteristic information of the aircraft includes accuracy, dimension and call sign, etc.;

[0015] Step 13: Filter each type of the aircraft trajectory point data in the heat library, and generate each type of aircraft trajectory data using set rules to obtain aircraft trajectory data that combines trajectory points in chronological order.

[0016] Preferably, the setting rule is to uniquely determine the aircraft trajectory point by the call sign and type field, sort the aircraft trajectory point data by time, and if the time interval between two trajectory points is greater than two hours, then they are divided into different trajectories.

[0017] Preferably, in step 2, the sliding window size is 36 and the step size is 2; direct feature extraction and indirect feature extraction are performed on the sampled data to obtain trajectory features, and the trajectory features are divided into an observation sequence and a real sequence to be predicted; the observation sequence is used as input data for the prediction model; the trajectory features include aircraft number, time, longitude and latitude, altitude, speed, acceleration, heading, mean and variance.

[0018] Preferably, in step 3, the prediction model input data and the time to be predicted t are input. d , through the spatiotemporal embedding module After the encoder and decoder, the trajectory prediction result P' is obtained red , the T f The architecture model is shown in formula (1):

[0019]

[0020] Among them, O bd is the observation sequence; t d is the time to be predicted; is the spatiotemporal embedding module; Encoder is the encoder; Decoder is the decoder; P' red is the trajectory prediction result; input the time to be predicted for prediction time embedding, and process the time to be predicted into time intervals for embedding. The time to be predicted is the time point specified by the user to be predicted. If the user does not specify, the default is to predict every five minutes within one hour;

[0021] The spatiotemporal embedding module As shown in formula (2), the output spatiotemporal embedding result I np :

[0022]

[0023] The encoder input is the spatiotemporal embedding result I np , l e represents the number of encoder layers, W e is the encoder network weight parameter, δ e is the encoder activation function, bias e is the encoder bias parameter, and the encoder output is the attention information Attn, as shown in formula (3):

[0024] Attn = Encoder (I np ; l e ,W e ,δ e ,bias e ) (3);

[0025] The decoder input is the attention information Attn,l d represents the number of layers of the decoder module, W d is the decoder network weight parameter, δ d is the decoder activation function, bias d is the decoder deviation parameter, and the decoder output result is the trajectory prediction result P' red , as shown in formula (4):

[0026] P' red =Decoder(Attn; l d ,W d ,δ d ,bias d ) (4).

[0027] Preferably, in step 3, T f The architecture model uses an objective function to optimize the model. The objective function formula is shown in formula (5):

[0028]

[0029] Minimize the true sequence y to be predicted by back propagation k And trajectory prediction results The variance of T is used to find f The optimal network weight parameter of the architecture model W = (W i ,W e ,W d ) and the network bias parameter bias=(bias i ,bias e ,bias d ) so that the model can accurately predict the position sequence of the aircraft within a certain time range.

[0030] Preferably, the spatiotemporal embedding module embeds the input data of the prediction model from three aspects: time feature, other features and location feature, and the output feature dimensions of the output are all 512, and the output features of the three aspects are fused to obtain the output data;

[0031] When embedding the time feature, the time feature value of the first trajectory point is subtracted from the time feature value of other trajectory points to get the time interval of the entire trajectory. The time feature value of the first trajectory point is set to 0, and then a dictionary is created for this time interval. Onehot method is used for multi-dimensional embedding with a dimension of 512.

[0032] The other features are other trajectory information excluding time in the prediction model input data. The full-link network is used for dimension transformation so that the output dimension is 512 dimensions. The weight parameters and bias information in the full-link network are continuously updated during training, that is, in the T f The network weight parameters and network bias parameters in the architecture model are continuously updated during optimization;

[0033] The position feature is embedded to generate the position of each track point of the input track and the specific dimension information of each track point. The position feature is embedded by the sine cosine function to generate a position space map of sequence length × feature dimension. The formula for embedding the position feature by the sine cosine function is shown in formula (6):

[0034]

[0035] Among them, pos represents the specific position of the trajectory point; 2i and 2i+1 represent the dimensions of the trajectory point in the even column and odd column after embedding, respectively, and the sin function and cos function are used for mapping respectively; d model is the dimension of model embedding, i.e., 512; 1000 indicates the maximum length of trajectory sequence.

[0036] Preferably, the encoder has 6 encoding layers with completely identical structures and different parameters. The encoding layer is composed of 4 modules, which are respectively composed of 1 multi-head self-attention module, 2 residuals and layer normalizations, and 1 feedforward network connected in series in sequence. The input feature dimension and output feature dimension of each encoding layer are completely identical, thereby ensuring that multiple encoding layers can be connected in series;

[0037] The input end of the multi-head self-attention module is three linear layers, which pass through the scaled dot product attention layer and the merging layer in sequence, and are output at the linear layer of the output end. The three linear layers at the input end respectively input the query vector Q, the key vector K and the value vector V, which are respectively the spatiotemporal embedding results multiplied by the matrix W Q , W k , W v Get, where W Q , W k , W v are different weight matrices, which realize different linear transformations on the trajectory feature matrix and map it to different subspaces;

[0038] The scaled dot product attention layer is mainly a self-attention operation, which is a mapping from a query (Q) to a series of (KV) pairs; the self-attention operation includes the following steps:

[0039] Step 31: Calculate the similarity between the query vector Q and each key vector K, and obtain the weight by using the dot product method;

[0040] Step 32: Use the softmax function to normalize the weights;

[0041] Step 33: Perform weighted summation on the weight and the corresponding value vector V to obtain the final self-attention vector. The formula for the self-attention operation is as follows:

[0042]

[0043] where d k is the dimension of vector Q, Scaling plays a role in distracting attention, making the model more generalizable; K is the key vector K, K T is the transpose of the key vector K, so that it can be matrix multiplied;

[0044] The convolutional attention mechanism has a multi-head structure because several attention layers perform different linear transformations on the same input and stack them. This stacking helps the model capture information in various dimensions of the input and improves the model's feature extraction capabilities. Figure 6 A represents the number of attention heads, and the value of A is 8. The merging layer merges the results of multiple attention heads, as shown in formulas (8) and (9):

[0045] MultiHead(Q,K,V)=Concat(head1,…,head h )W o (8);

[0046]

[0047] Among them, the Multihead function is a splitting layer, which divides the data input into eight independent calculations. There are a total of 8 heads, each responsible for one head; W o is the transformation parameter of the data; W Q , W K , W V are the transformation parameters of the query vector Q, key vector K and value vector V respectively;

[0048] The concat function is Figure 6 In the merging layer, the generated results of each attention head are merged; the linear layer performs another spatial mapping on the merged result and outputs the attention information, and its output is the output result of the multi-head self-attention module.

[0049] Preferably, the feedforward network is used to approximate any mapping function, including linear transformation and activation function; in the feedforward neural network, the dimension d of the input vector is transformed by linear transformation model To expand the dimension, 4*d model The activation function uses the GELU activation function of the Bert model, and the formula is shown in (10):

[0050]

[0051] Among them, x is the input, which is the data flowing in the model;

[0052] Preferably, residual and layer normalization are performed between the multi-head self-attention module and the feedforward network; the residual network is easy to optimize and can improve accuracy by increasing the depth. The residual block inside it uses skip links, which alleviates the problem of gradient vanishing caused by increasing the depth in the deep neural network and the problem of information loss and loss in the traditional neural network when transmitting information. The residual network makes it feasible to train models with a high number of layers; layer normalization is normalization in the dimension of feature dimension, which can convert features into normal distribution and pull data back to the unsaturated interval of the activation function, which has the effect of slowing down gradient vanishing, increasing model accuracy and speeding up training;

[0053] The residual and layer normalization formula is shown in formula (11):

[0054] sub_layer_output=LayerNorm(x+SubLayer(x)) (11)

[0055] Where x is the input, SubLayer is the residual operation, and LayerNorm is the layer normalization operation.

[0056] Preferably, the decoder has 6 layers of decoding layers with completely identical structures and different parameters; the 6 decoding layers are connected in series, the output of the previous layer is the input of the next layer, the decoding layer is composed of 1 multi-head self-attention module, 1 multi-head attention module, 1 feedforward network layer and three residual and layer normalization layers, and the data will be subjected to residual and layer normalization each time it passes through the attention module or the feedforward network layer; the multi-head self-attention module inputs the query vector Q, key vector K and value vector V of the input to be predicted time obtained by linear transformation of three different linear layers; the multi-head attention module inputs the attention information output by the encoder and the information of the time to be predicted processed by the multi-head self-attention module and a residual and layer normalization layer; the decoder has two inputs, namely the attention information output by the encoder and the high-dimensional embedding of the time to be predicted, and the attention information Attn is the bridge between the encoder and the decoder; the input feature dimension and output feature dimension of each decoding layer are exactly the same, ensuring that multiple decoding layers can be connected in series. The difference between the encoding layer and the decoding layer is the two attention modules, and the rest is exactly the same as the encoding layer.

[0057] Preferably, the multi-head self-attention module of the decoding layer ensures that when predicting each trajectory point, only the current position and the previous position can be seen. It is an inverted triangular matrix, and the length and width are the length of the input data of the prediction model, that is, the length of the observation sequence. The MASK mechanism is used to ensure that when predicting each trajectory point, only the current position and the previous position can be seen, and each trajectory point and the previous ones are not blocked, and the trajectory point behind is blocked, thereby ensuring that the model sees the subsequent input of the current position.

[0058] Preferably, the multi-head attention formula of the decoding layer is shown in formula (12), where Q D is the query feature of the decoding layer; K E and V E Both are linear change data of the attention information Attn output by the encoder; d k is the embedding dimension 512; Attention is the predicted trajectory point position; in this module, the decoding layer uses the attention information output by the encoder, which is actually the stored observation sequence O bd The characteristics and rules of the trajectory are used to make the decoding layer fully utilize the observed trajectory information and predict the precise position of the next trajectory point;

[0059]

[0060] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a prediction algorithm for non-uniform trajectory sequences, models the trajectory based on the neural network Transformer (TF) network, fully mines the feature information of each dimension in the non-uniform trajectory sequence data and the complex motion pattern of the aircraft trajectory, and improves the network model to address the two major difficulties of uneven time intervals of aircraft trajectory data and the need to predict the trajectory of precise time. A spatiotemporal embedding module is added to the model and the input of the decoder is changed to achieve accurate time trajectory prediction of the aircraft. Among them, in order to better represent the input trajectory and extract sufficient feature information, the spatiotemporal embedding module is used to learn the representation of the input trajectory in order to solve the problem of uneven time intervals of aircraft trajectory data. The spatiotemporal embedding module consists of three parts: 1. Time feature generation, which processes the time feature to generate the time interval, and then generates an accurate time interval feature representation based on the first trajectory point; 2. Trajectory feature generation, for trajectory information such as longitude, latitude, altitude, acceleration, mean, variance, etc., a fully linked network is used for linear mapping to generate high-dimensional trajectory features; 3. Position feature generation, which embeds the position according to the length and position of the trajectory sequence, and generates a unique data texture for each embedding dimension of each position to distinguish them. Finally, these three features are fused as the output of the spatiotemporal embedding module. The existing TF network structure usually outputs a predicted sequence in sequence. The first position is obtained by the initial symbol and the feature matrix generated by the coding layer through the decoder. After that, each position is predicted by all the sequences generated by the previous model and the feature matrix of the coding layer through the decoder. This prediction method only has the order of trajectory points, and there is no precise time information that needs to be predicted. The present invention changes the input of the decoder in the TF network. In addition to the feature matrix generated by the encoder, the precise time that needs to be predicted is also time-embedded as an additional input. The encoder predicts the aircraft position at a specific moment through the feature matrix and precise time information. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0062] Figure 1 The accompanying drawing is a schematic diagram of the trajectory data preprocessing process provided by the present invention;

[0063] Figure 2 The accompanying drawing is a schematic diagram of a generated trajectory sample provided by the present invention;

[0064] Figure 3The accompanying drawing is a schematic diagram of sliding window sampling and feature extraction provided by the present invention;

[0065] Figure 4 The accompanying drawings are provided by the present invention f Schematic diagram of the architecture model;

[0066] Figure 5 The accompanying drawing is a schematic diagram of the structure of the spatiotemporal embedding module provided by the present invention;

[0067] Figure 6 The accompanying drawing is a schematic diagram of the coding layer structure provided by the present invention;

[0068] Figure 7 The accompanying drawing is a schematic diagram of the decoding layer structure provided by the present invention;

[0069] Figure 8 The accompanying drawing is a schematic diagram of the decoding layer MASK mechanism provided by the present invention. DETAILED DESCRIPTION

[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] The embodiment of the present invention discloses a prediction method for a non-uniform trajectory sequence.

[0072] S1: Data preprocessing;

[0073] Aircraft trajectory point data is a mixture of all aircraft trajectory point data arranged in time. There are problems such as large data volume and missing data information. A series of data preprocessing processes are used to generate trajectories of various aircraft. The trajectory data preprocessing process is as follows: Figure 1 As shown;

[0074] The preprocessing steps are as follows:

[0075] (1) Analyze the obtained data elements and establish the corresponding table structure. Since the amount of data is billions or more, in order to ensure query efficiency, the ES distributed database is used to store the data. This database is rarely used and is called a cold storage;

[0076] (2) The aircraft types are distinguished from the cold storage according to the type field, and the trajectory point data of various target aircraft are extracted. A table of each type is stored in the MySQL database. Since the type field information is missing in the original data, the trajectory point cannot be extracted through the type field. Therefore, the other characteristic information of the aircraft in the obtained data is reversely extracted and confirmed in the cold storage to complete the missing trajectory points of each type of aircraft. This database is used frequently and is called the hot database.

[0077] (3) We filter, remove duplicates, and clean the trajectory data of each type of aircraft in the heat library to improve data quality and reduce the impact of noise. On this basis, we use specific setting rules to generate trajectory data for each type of aircraft. The visualization of aircraft trajectories is shown below: Figure 2 As shown in the figure, a trajectory point is generated every 5 minutes or so, and the trajectory points are combined in time order to obtain the trajectory of the aircraft. The set rules are as follows: first, all the trajectory points of the trajectory data are classified according to the aircraft category, and the trajectory points of each category are classified according to the specific flight number of the aircraft, so as to obtain the trajectory points of each aircraft in each category; then, the trajectory points of each aircraft are sorted according to time, and then the sorted sequence is segmented at two-hour intervals to obtain each trajectory of all aircraft;

[0078] S2: Feature extraction;

[0079] For the purpose of data enhancement and neural network batch training alignment, a sliding window method is used to sample the aircraft trajectory. The sliding window size is 36 and the step length is 2. The sliding window is shown in the figure below: Figure 3 As shown in Figure 2, among the 36 sampled trajectory points, the first 24 trajectory points are used as the basis for training, which we call observation sequence O. bd ,The last 12 trajectory points are the real trajectories that need to be predicted, which we call the real sequence to be predicted y;

[0080] For the sampling results, it is necessary to extract features as the input of the model, such as aircraft number, time, longitude and latitude, altitude, speed, acceleration, heading, mean, variance, etc. Some of the features can be directly obtained from the trajectory data, and the remaining features need to be generated. After feature extraction for each trajectory, it is used as the input of the prediction model;

[0081] S3: Build a model and predict trajectory;

[0082] The overall structure of the entire trajectory prediction model is as follows: Figure 4 As shown, the left part is the ENCODER encoder and the right part is the DECODER decoder. The input track is O bd, which is used as the input of the encoding layer after passing through the spatiotemporal embedding module; the encoder has a total of 6 encoding layers, each layer has a detailed structure, and the output of each layer is used as the input of the next layer. The attention matrix of the last layer is O bd The information depth extraction result generated in the encoding layer is called attention information Attn. The decoder has two inputs, one is Attn, and the other is the result of time embedding for the time to be predicted. The decoder has a total of 6 decoding layers, and the structure of each layer is exactly the same. The output of the previous layer is used as the input of the next layer. The output result of the last layer is the predicted trajectory sequence P red ';

[0083] The whole model is expressed as shown in formula (1), T f It means that the model adopts the transforemer architecture, and the input is the observation sequence O bd and the time to be predicted t d , through the spatiotemporal embedding module After the encoder and decoder, the trajectory prediction result P' is obtained red ;

[0084] The spatiotemporal embedding module is shown in formula (2), and its input is the observation sequence O bd , W i is the weight parameter of the module, bias i is the deviation parameter of the module, and the output result I after passing through the spatiotemporal module np As encoder input;

[0085] The encoding layer module is shown in formula (3), and the input is the spatiotemporal embedding result I np , l e represents the number of encoder layers, W e is the encoder network weight parameter, δ e is the encoder activation function, bias e is the encoder bias parameter, and the encoder output is the attention information Attn;

[0086] The decoder is shown in formula (4), and the input is the attention information Attn, l d represents the number of layers of the decoder module, W d is the decoder network weight parameter, δ d is the decoder activation function, bias d is the decoder bias parameter, and the decoder output is the attention information P' red ;

[0087]

[0088]

[0089] Attn = Encoder (I np ; l e ,W e ,δ e ,bias e ) (3)

[0090] P′ red =Decoder(Attn; l d ,W d ,δ d ,bias d ) (4)

[0091] Theoretically, neural networks can infinitely approximate any continuous mapping. For this regression task, a mapping function that meets the requirements can be obtained by training the neural network. The objective function is shown in formula (5), which minimizes the true value y through back propagation. k and predicted values The variance of T is used to find f The most suitable network weight parameter of the model is W = (W i ,W e ,W d ) and the network bias parameter bias=(bias i ,bias e ,bias d ) so that the model can accurately predict the position sequence of the aircraft within a certain time range;

[0092]

[0093] S31: spatiotemporal embedding module;

[0094] Since trajectory data has some missing feature values ​​and uneven time intervals between trajectory points, in order to better represent the input trajectory and extract sufficient feature information, a spatiotemporal embedding module is designed to learn the representation of the input trajectory. Figure 5 As shown in the figure, this module embeds the input data of the prediction model (i.e., observation sequence) independently from three aspects: time, other features, and location. The output feature dimensions are all 512. Then, these three features are fused to obtain the output.

[0095] Time characteristics:

[0096] Since the time feature value of the trajectory data is the timestamp, the value of the timestamp is based on a very large cardinality, which has no practical effect on trajectory prediction but increases noise interference. Therefore, the time feature value of the first trajectory point is subtracted from the time feature value of other trajectory points to get the time interval of the entire trajectory. The time feature value of the first trajectory point is 0, and then a dictionary is established for this time interval. Onehot is used for multi-dimensional embedding with a dimension of 512. Figure 5 The figure shows the effect of reducing the dimension of the data to 3 dimensions through PCA after embedding.

[0097] Other features:

[0098] Other features are other trajectory information in the prediction model input data excluding time, such as longitude, latitude, altitude, speed, heading, acceleration, mean, variance, etc. Since these feature values ​​are all floating-point numbers, the fully linked network is directly used for dimension transformation, so that the output dimension is 512. The weight parameters and bias information of the network can be continuously updated during training;

[0099] Location:

[0100] Use position embedding to generate the position of each track point in the input trajectory and the specific dimension information of each track point. The input dimension and the dimension to be embedded are obtained through the input trajectory. Then, a position space map of sequence length X feature dimension is generated through sine and cosine functions, so as to ensure that different dimensions of different track points have unique position texture information. The position space map is as follows: Figure 5 As shown in , the specific implementation of position embedding is shown in formula (6):

[0101]

[0102] Among them, pos represents the specific position of the trajectory point, 2i and 2i+1 represent the dimensions of the trajectory point in the even column and odd column after embedding, respectively, and the sin function and cos function are used for mapping, respectively. model is the dimension of model embedding, i.e., 512, and 1000 represents the maximum length of trajectory sequence;

[0103] S32: encoder;

[0104] Each encoder has 6 layers of coding with the same structure but different parameters. Figure 6As shown in the figure, the encoding layer consists of four modules, which are respectively composed of a multi-head convolution self-attention block, two residual and layer normalization sub-layers, and a feed-forward network. The input feature dimension and output feature dimension of each encoding layer are exactly the same, thus ensuring that multiple encoding layers can be connected in series.

[0105] Multi-head self-attention mechanism:

[0106] The details of the multi-head self-attention module are as follows Figure 6 As shown on the right, Q, K, and V are the track feature matrix multiplied by the matrix W. Q , W k , W v We get query features (query), key features (key) and value features (value). Q , W k , W v are different weight matrices, which perform different linear transformations on the trajectory feature matrix and map it to different subspaces;

[0107] like Figure 6 The zoom-click self-attention layer is mainly a self-attention operation, which can be described as a mapping from a query (Q) to a series of (KV) pairs. The self-attention operation is mainly divided into three steps. The first step is to calculate the similarity between Q and each K to obtain the weight. The experiment uses the dot product method to obtain the weight; then the second step is generally to use the softmax function to normalize these weights; finally, the weight and the corresponding key value are weighted and summed to obtain the final self-attention vector. The formula for the self-attention operation is as follows:

[0108]

[0109] Among them, K is the key vector K, K T is the transpose of the key vector K, so that it can be matrix multiplied; d k is the dimension of vector Q, Scaling plays a role in distracting attention, making the model more generalizable. The convolutional attention mechanism has a multi-head structure because several attention layers perform different linear transformations on the same input and stack them. This stacking helps the model capture information in various dimensions of the input and improves the model's feature extraction capabilities. Figure 6 A represents the number of attention heads. In this experiment, A is set to 8. The merging layer is to merge the results of multiple attention heads. The formulas are shown in (8) and (9):

[0110] MultiHead(Q,K,V)=Concat(head1,…,head h )W o (8)

[0111]

[0112] Among them, the Multihead function is a splitting layer, which divides the data input into eight independent calculations. There are a total of 8 heads, each responsible for one head; W o is the transformation parameter of the data; W Q , W K , W V are the transformation parameters of the query vector Q, key vector K and value vector V respectively; the concat function is Figure 6 In the merging layer, the generated results of each attention head are merged, and the linear layer performs another spatial mapping on the merged result, and its output is the output result of the multi-head self-attention module.

[0113] Feedforward Network:

[0114] Feedforward networks are used to approximate arbitrary mapping functions. Figure 6 The feedforward network layer in contains linear transformation and activation function; in the feedforward network, the dimension d of the input vector is transformed by linear transformation. model To expand the dimension, the experiment used 4*d model Dimension; In the selection of activation function, the GELU activation function of the Bert model is adopted. The approximate formula used in the present invention is shown in (10):

[0115]

[0116] Among them, x is the input, which is the data flowing in the model.

[0117] Residual and layer normalization:

[0118] Residual connection and layer normalization are performed between the multi-head self-attention module and the feedforward network. The residual network is easy to optimize and can improve accuracy by increasing the depth. The residual block inside it uses skip connections, which alleviates the problem of gradient vanishing caused by increasing the depth in the deep neural network and the problem of information loss and loss in traditional neural networks when transmitting information. The residual network makes it feasible to train models with a high number of layers. Layer normalization is normalization in the feature dimension, which can convert the features into a normal distribution and pull the data back to the unsaturated interval of the activation function, which has the effect of slowing down the gradient vanishing, increasing the model accuracy and speeding up the training.

[0119] The residual and normalization layer formula is shown in formula (11):

[0120] sub_layer_output=LayerNorm(x+SubLayer(x)) (11)

[0121] Where x is the input, SubLayer is the residual operation, and LayerNorm is the layer normalization operation;

[0122] S33: Decoder:

[0123] Like the encoder, each decoder has 6 layers of decoding with the same structure but different parameters. The 6 decoding layers are connected in series, and the output of the previous layer is the input of the next layer. The structure of the decoding layer is as follows: Figure 7 As shown in the figure, unlike the encoding layer structure, the decoding layer consists of 1 multi-head self-attention module, 1 multi-head attention module, 1 feedforward network layer and three residual and layer normalization layers; each time the data passes through the attention layer or feedforward network layer, the residual and layer normalization will be performed; unlike the single input of the encoder, the decoder has two inputs, which are the attention information output by the encoder and the high-dimensional embedding of the time to be predicted. The attention information Attn is the bridge between the encoder and the decoder. The input feature dimension and output feature dimension of each decoding layer are exactly the same, ensuring that multiple decoding layers can be connected in series; the difference between the encoding layer and the decoding layer lies in the two attention modules, and the rest is exactly the same as the encoding layer;

[0124] Multi-head self-attention module (MASK):

[0125] The multi-head self-attention module (MASK) is similar to the multi-head self-attention module of the encoding layer, the main difference lies in the different MASK mechanism;

[0126] When the model is being trained, the decoder inputs the entire trajectory to be predicted at one time. For example, if the sequence of trajectories to be predicted is 12, and the first five have been predicted, and the sixth needs to be predicted, then if the model can see all the input trajectories to be predicted, then it can directly see the sixth input, which is the answer. This is equivalent to the model not having to update and optimize, but only needs to find the answer from the input sequence. This "lazy" behavior is not what we want to see. In order to prevent the model from seeing the answer that needs to be predicted later at the current position, the MASK mechanism is used to ensure that when predicting each trajectory point, only the current position and the previous ones can be seen. The MASK mechanism is as follows: Figure 8As shown in the figure, it is an inverted triangular matrix with the length and width being the length of the input trajectory sequence. Dark colors represent no occlusion, and light colors represent occlusion. Each trajectory point and the previous ones are not occluded, and the ones behind the trajectory point are occluded, thus ensuring that the model sees the subsequent input at the current position. The MASK mechanism acts after calculating the dot product of Q and K. The value of the dark position remains unchanged, and the value of the light position becomes an infinitesimal number, set to 10. -6 ;

[0127] Multi-head attention module:

[0128] The multi-head attention formula of the decoding layer is shown in formula (12), where Q D is the query feature of the decoding layer, K E and V E Both are linear changes of the attention information Attn output by the encoder, d k is the embedding dimension 512; in this module, the decoding layer uses the attention information output by the encoder, which is actually the stored observation sequence O bd The characteristics and rules of the trajectory are used to make the decoding layer fully utilize the observed trajectory information and predict the precise position of the next trajectory point;

[0129]

[0130] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0131] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A prediction method for non-uniform trajectory sequences, characterized in that: The following steps are involved: Step 1: Collect aircraft trajectory point data and perform preprocessing to obtain aircraft trajectory data of various aircraft; Step 2: Using a sliding window to sample the aircraft trajectory data to obtain sampled data, and performing feature extraction on the sampled data to obtain prediction model input data; The sliding window size is 36 and the step size is 2; direct feature extraction and indirect feature extraction are performed on the sampled data to obtain trajectory features, and the trajectory features are divided into an observation sequence and a real sequence to be predicted; the observation sequence is used as the input data of the prediction model; the trajectory features include aircraft number, time, longitude and latitude, altitude, speed, acceleration, heading, mean and variance; Step 3: The prediction model inputs data and the time to be predicted as input T f The architecture model outputs trajectory prediction results through the spatiotemporal embedding module, encoder and decoder in sequence; The T f The architecture model is shown in formula (1): Among them, O bd is the observation sequence; t d is the time to be predicted; is the spatiotemporal embedding module; Encoder is the encoder; Decoder is the decoder; P' red Predicting a result for the trajectory; The spatiotemporal embedding module is shown in formula (2), and the output spatiotemporal embedding result I np , W i is the weight parameter of the spatiotemporal embedding module, bias i is the bias parameter of the spatiotemporal embedding module: The encoder input is the spatiotemporal embedding result I np , l e represents the number of encoder layers, W e is the encoder network weight parameter, δ e is the encoder activation function, bias e is the encoder bias parameter, and the encoder output is the attention information Attn, as shown in formula (3): Attn=Encoder(I np ;l e ,W e ,δ e ,bias e ) (3); The decoder input is the attention information Attn,l d represents the number of layers of the decoder module, W d is the decoder network weight parameter, δ d is the decoder activation function, bias d is the decoder deviation parameter, and the decoder output result is the trajectory prediction result P' red , as shown in formula (4): P' red =Decoder(Attn;l d ,W d ,d d ,bias d ) (4); The encoder has 6 encoding layers with exactly the same structure and different parameters. The encoding layer is composed of a multi-head self-attention module, two residual and layer normalization, and a feedforward network connected in series. The input feature dimension and output feature dimension of each encoding layer are exactly the same. The decoder has 6 decoding layers with exactly the same structure but different parameters. The 6 decoding layers are connected in series, and the output of the previous layer is the input of the next layer. The decoding layer includes 1 multi-head self-attention module, 1 multi-head attention module, 1 feedforward network and three residual and layer normalization layers. Every time the data passes through the attention module or feedforward network, residual and layer normalization are performed. The spatiotemporal embedding module embeds the input data of the prediction model from three aspects: time feature, other features and location feature. The output feature dimensions of the output are all 512. The output features of the three aspects are fused to obtain the output data. When embedding the time feature, the time feature value of the first trajectory point is subtracted from the time feature value of other trajectory points to get the time interval of the entire trajectory. The time feature value of the first trajectory point is set to 0, and then a dictionary is created for this time interval. Onehot method is used for multi-dimensional embedding with a dimension of 512. The other features are other trajectory information excluding time in the prediction model input data, and the full-link network is used for dimension transformation so that the output latitude is 512 dimensions. The network weight parameters and network bias parameters in the full-link network are continuously updated in the Tf architecture model optimization; The position feature is embedded to generate the position of each track point of the input track and the specific dimension information of each track point. The position feature is embedded by the sine cosine function to generate a position space map of sequence length × feature dimension. The formula for embedding the position feature by the sine cosine function is shown in formula (6): Among them, pos represents the specific position of the trajectory point; 2i and 2i+1 represent the dimensions of the trajectory point in the even column and odd column after embedding, respectively, and the sin function and cos function are used for mapping respectively; d model is the dimension of model embedding, i.e., 512; 1000 indicates the maximum length of trajectory sequence.

2. A prediction method for non-uniform trajectory sequences according to claim 1, characterized in that: The pretreatment process in step 1 includes: Step 11: Perform factor analysis on the collected aircraft trajectory point data, establish a table structure, use ES distributed database for data storage, and obtain a cold storage; Step 12: Distinguish the aircraft types from the cold storage according to the type field, extract various types of aircraft trajectory point data, construct a table for each type of aircraft trajectory point data and store it in the MySQL database to obtain a hot storage; Step 13: Filter each type of the aircraft trajectory point data in the heat library, and generate each type of aircraft trajectory data using set rules to obtain aircraft trajectory data that combines trajectory points in chronological order.

3. A prediction method for non-uniform trajectory sequences according to claim 1, characterized in that: In step 3, T f The architecture model uses an objective function to optimize the model. The objective function formula is shown in formula (5): Minimize the true sequence y to be predicted by back propagation k And trajectory prediction result P' redk The variance of T f The optimal network weight parameter W of the architecture model is W = (W i ,W e ,W d ) and the network bias parameter bias=(bias i ,bias e ,bias d ).

4. A prediction method for non-uniform trajectory sequences according to claim 1, characterized in that: The multi-head self-attention module of the encoder has three linear layers at the input end, which are sequentially passed through the scaled dot product attention layer and the merging layer, and output at the linear layer at the output end. The three linear layers at the input end respectively input the query vector Q, the key vector K and the value vector V, which are respectively the spatiotemporal embedding results multiplied by the matrix W Q , W k , W v Get, where W Q , W k , W v are different weight matrices; The scaled dot product attention layer is mainly a self-attention operation, which includes the following steps: Step 31: Calculate the similarity between the query vector Q and each key vector K, and obtain the weight by using the dot product method; Step 32: Use the softmax function to normalize the weights; Step 33: Perform weighted summation on the weight and the corresponding value vector V to obtain the final self-attention vector. The formula for the self-attention operation is as follows: where d k is the dimension of vector Q; Scaling plays a role in distracting attention; K is the key vector K, K T is the transpose of the key vector K; The merging layer merges the results of multiple attention heads. The formulas are shown in (8) and (9): MultiHead(Q,K,V)=Concat(head1,…,head h )W o (8); Among them, W o is the transformation parameter of the data; W Q , W K , W V are the transformation parameters of the query vector Q, key vector K and value vector V respectively; The concat function is a merging layer that merges the generated results of each attention head. The linear layer performs another spatial mapping on the merged result and outputs the attention information. Its output is the output result of the multi-head self-attention module. The feedforward network contains linear transformation and activation function; in the feedforward network, the dimension d of the input vector is transformed by linear transformation model To expand the dimension, 4*d model The activation function uses the GELU activation function of the Bert model, and the formula is shown in (10): Where x is the input; Residual and layer normalization Residual and layer normalization operations are performed between the multi-head self-attention module and the feedforward network; the residual and layer normalization formulas are shown in formula (11): sub_layer_output=LayerNorm(x+SubLayer(x)) (11) Where x is the input, SubLayer is the residual operation, and LayerNorm is the layer normalization operation.

5. The prediction method for non-uniform trajectory sequence according to claim 1, characterized in that: The multi-head self-attention module of the decoding layer inputs the time to be predicted, and obtains the input query vector Q, key vector K and value vector V respectively through three different linear layers; the multi-head attention module inputs the attention information output by the encoder and the time information to be predicted processed by the multi-head self-attention module and a residual and layer normalization layer.

6. A prediction method for non-uniform trajectory sequences according to claim 5, characterized in that: The multi-head self-attention module mechanism of the decoding layer is an inverted triangular matrix, the length and width of which are both the length of the prediction model input data; The multi-head attention formula used by the multi-head attention module of the decoding layer is shown in formula (12): Among them, Q D is the query feature of the decoding layer; K E and V E Both are linear change data of the attention information Attn output by the encoder; d k is the embedding dimension 512; Attention is the predicted trajectory point position.

Citation Information

Patent Citations

  • User track position prediction method based on space-time embedding Self-Attention

    CN111400620A

  • Ship trajectory prediction method and system based on automatic encoder and bidirectional LSTM

    CN111783960A

  • Trajectory prediction method, system and equipment for hypersonic flight vehicle and medium

    CN113269363A