A flight trajectory similarity calculation method based on representation learning
The FT2Vec model addresses inefficiencies in aviation trajectory similarity calculations by learning fine-grained spatiotemporal features through segmentation, deformation, and attention mechanisms, enhancing computational efficiency and accuracy in aviation trajectory similarity analysis.
Patent Information
- Application Number
- CN202410435047.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-04-11
AI Technical Summary
Existing methods for calculating flight trajectory similarity have high computational costs and are inefficient, particularly when applied to aviation trajectories, due to information loss and over-reliance on road networks, which limits their scalability and accuracy.
A flight trajectory similarity calculation method using the FT2Vec model, comprising a trajectory enhancement module, feature extraction module, and trajectory encoding module, which learns fine-grained spatiotemporal features through segmentation, deformation, and twin attention mechanisms to generate comprehensive trajectory representations.
FT2Vec effectively captures complex spatiotemporal features, improving computational efficiency and accuracy in aviation trajectory similarity calculations, outperforming competitors in effectiveness and efficiency, and providing robustness across multiple metrics.
Smart Images

Figure CN118427628B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of flight safety, and in particular relates to a flight trajectory similarity calculation method based on representation learning. Background Art
[0002] Aviation safety has always been a core issue in the civil aviation industry. With the rapid development of modern global air traffic systems, the processing and analysis of flight trajectories have become a key component of the intelligent and information-based air traffic system; as the core of trajectory analysis, trajectory similarity calculation has become a basic task in air traffic scenarios. This trend has been further strengthened mainly due to the integration of quick access recorder (QAR) data, which provides a series of flight-specific parameters that are critical to improving the accuracy of trajectory similarity calculations and provides a basis for in-depth understanding of flight behavior. Trajectory similarity calculations play a key role in many downstream air traffic tasks, including flight safety analysis, air traffic management, and fuel consumption analysis, and benefit substantially from the depth and accuracy of QAR data. Using QAR data to efficiently and accurately calculate aviation trajectory similarity is essential to maintaining the safety and smoothness of air traffic.
[0003] Some classic distance metrics, including DTW, Frechet, LCSS, Hausdorff and ERP, are often used to measure the similarity between trajectories. Existing traditional methods aim to make heuristic improvements based on classic metrics and optimize their computational efficiency.
[0004] However, these traditional methods still have high computational costs because they usually try to form pairs of matches between sample points in two trajectories, use dynamic programming to find the best match, accumulate information between all matching points, and finally calculate the distance between them. This process will produce quadratic or even super-quadratic time complexity. When processing large-scale trajectory data, the high computational cost of these methods becomes a bottleneck, limiting the scalability of many trajectory mining algorithms on large data sets. At the same time, these methods can often only calculate one distance metric and cannot be widely applied to the multiple classic distance metrics mentioned above.
[0005] With the development of deep learning, many trajectory representation learning methods based on neural networks have been proposed in recent years to solve the efficiency problems of traditional methods. The core idea of these methods is to embed the spatiotemporal features of trajectories into low-dimensional vector space, thereby improving the computational efficiency of trajectory similarity, and to represent similar relationships through learnable functions, so that trajectories that are similar in the actual space are still similar in the vector space.
[0006] Although existing studies have proposed many methods to calculate trajectory similarity, these studies are all aimed at ground vehicle trajectories and cannot be applied to aerial flight trajectories due to the following limitations.
[0007] The first aspect: serious information loss. Existing methods usually first divide an urban area into uniform grids, and replace the trajectory sampling points that fall in the same grid with the center position of the grid, so as to process the original GPS trajectory into a trajectory in a gridded map. On this basis, these methods align the gridded trajectory points with the vertices in the road network through some map road network matching methods, thereby converting each original GPS trajectory into a directed path in the graph. Further, these methods divide the trajectory into equal trajectory sub-segments, and take the average value of all sampling points in each sub-segment as the representative value of this sub-segment. In the experiments of existing methods, k is usually set to 5. This processing method will cause serious fine-grained information loss in the model flow of the real trajectory data, and fine-grained information is particularly important for aviation trajectories, because aviation trajectories usually only show fine-grained differences, especially when the trajectory data comes from the same route. Applying this data processing method to aviation trajectories will result in obvious similarities between trajectories from the same route, making the similarity calculation of these trajectories meaningless.
[0008] The second aspect: over-reliance on the road network. Since the urban road planning model has a fundamental impact on the vehicle driving characteristics, the spatiotemporal characteristics of ground traffic trajectories are largely constrained by the urban road network. Considering the spatial characteristics of the urban road network is crucial for analyzing the similarity of ground traffic trajectories. Therefore, it is reasonable for the existing similarity calculation methods for ground trajectories to use road network trajectory data. But at the same time, the quality of road network matching also seriously affects the accuracy of the model, making the existing methods too dependent on road network matching methods. Although aviation flight trajectories are also subject to route constraints, one of the application scenarios of aviation trajectory similarity calculation is to calculate the similarity between flight trajectories from the same route. At this time, the specified route cannot be used to match the original flight trajectory. Summary of the invention
[0009] In view of this, the purpose of the present invention is to provide a flight trajectory similarity calculation method based on representation learning. The present invention aims to solve the problem that the existing method has high calculation cost, low efficiency and is difficult to be used for aviation flight trajectory calculation.
[0010] The present invention provides a flight trajectory similarity calculation method based on representation learning, comprising the following steps:
[0011] S1. constructing a FT2Vec model, wherein the FT2Vec model includes a trajectory enhancement module, a feature extraction module and a trajectory encoding module;
[0012] The FT2Vec model learns trajectory representation with fine-grained spatiotemporal features through a trajectory enhancement module, a feature extraction module, and a trajectory encoding module;
[0013] S2. Input the original trajectory, use the trajectory enhancement module to create different variants of the original trajectory, and enhance the trajectory;
[0014] S3. receiving different enhanced variants of the original trajectory generated by the trajectory enhancement module through the feature extraction module, and extracting fine-grained features of the trajectory position;
[0015] S4. Aggregate the output of the feature extraction module through the twin attention mechanism of the trajectory encoding module, and then generate the final spatiotemporal trajectory representation through LSTM;
[0016] S5. Train and optimize the FT2Vec model.
[0017] Furthermore, in step S2, the trajectory enhancement module creates different variants of the original trajectory through trajectory segmentation and trajectory deformation.
[0018] Furthermore, the trajectory segmentation is to segment the original trajectory into k equal parts, and calculate the average value of the trajectory points in each part to obtain representative points, and then use the representative points to construct a new trajectory with the same length;
[0019] Assume that the original trajectory is a trajectory consisting of n position points: T = [l1, l2, ..., l i ,…,l n ];
[0020] The original trajectory T is segmented into variants T s It is expressed as:
[0021]
[0022] Among them, l i =(lon i ,lat i , alt i ) is a track position point expressed in latitude, longitude and altitude;
[0023] Further, the trajectory deformation is to add a random offset to the coordinates of each position point in the original flight trajectory;
[0024] Assume that the original trajectory is a trajectory consisting of n position points: T = [l1, l2, ..., l i ,…,l n ];
[0025] The original trajectory T is segmented into variants T d It is expressed as:
[0026]
[0027]
[0028] Where Δx i , Δy i and Δz i Represents the offset of latitude, longitude and altitude respectively; is a bounded Gaussian distribution; γ1 and γ2 are the maximum position offsets, and λ1 and λ2 are normalization parameters.
[0029] Further, the feature extraction module is expressed as:
[0030] h(i)=TCN(x,i)
[0031] Where x, h(i)∈R 3×n , n is the length of the trajectory, 3 represents the coordinate dimension of the trajectory point described by the true values of latitude, longitude and altitude in the flight trajectory; TCN(·, i) represents a feature extraction module with i layers of filters.
[0032] Furthermore, the feature extraction module comprises multiple layers of a fully connected network FCN using one-dimensional convolution 1-D, and the 1-D FCN maps variable-length input into fixed-length output using zero-value padding, residual block connection and dilated causal convolution;
[0033] The residual block between two adjacent layers learns the mapping F(·) from the output x of the previous layer and generates the following feature map:
[0034] h = ReLU(F(x)+x)
[0035] F(x)=D(W(Conv(A(W(Conv(x))))))
[0036] Where h is the hidden output vector; F(x) represents a series of operations including dilated causal convolution Conυ(·), weight normalization W(·), temporary backoff D(·), and activation function A(·) using rectified linear unit ReLU.
[0037] Furthermore, in step S3, two parallel feature extraction modules are used to learn the enhanced trajectories of trajectory segmentation and trajectory deformation respectively, and the time information capture capability of the feature extraction module is utilized to embed the two enhanced trajectories into a vector representation and Thus, the fine-grained spatiotemporal features of the trajectory are preserved.
[0038] Further, the step S4 includes the following sub-steps:
[0039] S4.1 Design a twin attention mechanism to enhance the output of the feature extraction module;
[0040] The twin attention mechanism is described as follows:
[0041]
[0042]
[0043]
[0044]
[0045] F(x)=D(L(A(L(x))))
[0046] Where W d is a matrix used to transform vector and W Q and W K They are respectively d Matrices of the same shape; and yes and F(x) is a feed-forward network consisting of a linear layer L(·), a temporal regression method D(·), and an activation function A(·) using a rectified linear unit (ReLU).
[0047] S4.2 selects LSTM with self-attention mechanism to learn the final trajectory representation;
[0048] At each time step i, an LSTM unit converts the current input vector x i and the state vector i-1 of the previous step as input, and output the state vector of the current step i. The recursive steps of LSTM are as follows:
[0049] h i =LSTM(t′ i ,h i-1 ,i i , f i , o i , m i )
[0050] In the formula, i i , f i , o i and m i Represent the input gate, forget gate, output gate and storage unit of the LSTM unit respectively. In the LSTM layer, t′ i Represents the original time t i The corresponding learned temporal embedding;
[0051] S4.3 uses the self-attention mechanism to capture the fine-grained correlation between flight trajectory position points;
[0052] The improved state representation in the LSTM cell is calculated as follows:
[0053]
[0054]
[0055]
[0056] Where att(·,·) represents the attention mechanism; w1 is the learnable parameter vector; W1 and W2 are the learnable parameter matrices; h k The hidden state vector output by the LSTM unit;
[0057] S4.4 Input the vector embedding enhanced by the twin attention mechanism into the LSTM model with self-attention mechanism to obtain a unified final spatiotemporal trajectory representation v T ;
[0058] The representation of the last time step is used to encode the complete flight trajectory, which is defined as follows:
[0059]
[0060] Among them, + represents the splicing operation.
[0061] Further, the step S5 includes the following sub-steps:
[0062] S5.1 Construct triple sample: T a , T p and T n ;
[0063] T a is the trajectory selected as the anchor data;
[0064] T p It is a trajectory that is relatively similar to the anchor point trajectory, that is, the positive sample trajectory;
[0065] T n is a randomly selected trajectory, i.e., a negative sample trajectory;
[0066] S2. Triplet-based pairing loss function Guide FT2Vec model learning;
[0067]
[0068] In the formula, and are the true values of the distances between the anchor point trajectory and the positive sample trajectory and the negative sample trajectory in the i-th triplet; and is the distance between trajectory representations learned by the FT2Vec model;
[0069] v ap =exp(-||T a -T p ||2)
[0070] v an =exp(-||T a -T n ||2)
[0071] In the formula, v ap The distance between the vector representation of the anchor point trajectory and the vector representation of the positive sample trajectory; v an The distance between the vector representation of the anchor trajectory and the vector representation of the negative sample trajectory.
[0072] Beneficial effects:
[0073] 1. The present invention fully considers the characteristics of flight trajectories in aviation business scenarios, deeply explores the problem scenarios of flight trajectory similarity calculation, and the proposed method effectively solves existing problems in the industry, providing a new technical reference for research related to flight trajectory analysis and similarity calculation.
[0074] 2. The FT2Vec proposed in the present invention is the first representation learning model designed specifically for flight trajectory similarity calculation. FT2Vec consists of three modules, which are used to encode flight trajectories into vector representations. It is good at capturing complex spatiotemporal features, identifying the intrinsic similarities between flight trajectories, and is applicable to multiple classic trajectory similarity metrics. Experimental results obtained from two real trajectory datasets show that FT2Vec is significantly superior to its competitors in terms of effectiveness and efficiency, while also showing lower parameter sensitivity and robustness. The present invention not only provides a novel research idea for flight trajectory similarity calculation, but also provides a technical reference for other flight trajectory analysis research, and has good theoretical and application value.
[0075] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 A flowchart of a flight trajectory similarity calculation method based on representation learning of the present invention;
[0077] Figure 2 Schematic diagram of a TCN residual block;
[0078] Figure 3 Schematic diagram of TCN architecture with expansion factor d=1,2,3 and filter size k=3;
[0079] Figure 4 For model efficiency comparison;
[0080] Figure 5 Parameter sensitivity analysis on the PEK dataset;
[0081] Figure 6 It is the parameter sensitivity analysis on the WHU dataset;
[0082] Figure 7 It is the top-k query on the PEK dataset;
[0083] Figure 8 For top-k queries on the WHU dataset. DETAILED DESCRIPTION
[0084] In order to make the technical solutions, advantages and purposes of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of this application.
[0085] like Figure 1 As shown, the present invention provides a flight trajectory similarity calculation method based on representation learning, comprising the following steps:
[0086] S1. Construct the FT2Vec model, which includes a trajectory enhancement module, a feature extraction module and a trajectory encoding module;
[0087] FT2Vec adopts a representation learning framework. The FT2Vec model learns trajectory representations with fine-grained spatiotemporal features through trajectory enhancement modules, feature extraction modules, and trajectory encoding modules.
[0088] Trajectory Augmentation Module (TAM): Through segmentation and deformation, TAM creates different variations of the original trajectory, making the model more robust and efficient.
[0089] Feature Extraction Module (FEM): Two parallel TCNs are used to receive different enhanced variants of the original trajectory generated by TAM. Thanks to the larger receptive field brought by the dilated convolution in TCN, FEM can extract fine-grained features of the trajectory location.
[0090] Trajectory Encoding Module (TEM): The output of FEM is aggregated by the twin attention mechanism in TEM and the final spatiotemporal trajectory representation is generated by LSTM. These three modules together form a trajectory encoder E:T→vT, which maps the original trajectory T to a low-dimensional representation vector vT∈Rd containing the comprehensive features of the flight trajectory.
[0091] S2. Input the original trajectory, use the trajectory enhancement module to create different variants of the original trajectory, and enhance the trajectory;
[0092] In step S2, the trajectory enhancement module creates different variants of the original trajectory through trajectory segmentation and trajectory deformation.
[0093] Trajectory segmentation uses a simple yet efficient trajectory simplification technique to segment the trajectory into k segments. Trajectory segmentation is a compression technique that aims to reduce the size of a trajectory while maintaining its essential structure. In this method, the original trajectory is segmented into k equal parts, and the average of the trajectory points within each part is calculated to obtain representative points, which are then used to construct new trajectories of consistent length;
[0094] Assume that the original trajectory is a trajectory consisting of n position points: T = [l1, l2, ..., l i ,…,l n ];
[0095] The original trajectory T is segmented into variants T s It is expressed as:
[0096]
[0097] Among them, l i =(lon i ,lat i , alt i ) is a track position point expressed in latitude, longitude and altitude;
[0098] Trajectory deformation is to add a random offset to the coordinates of each position point in the original flight trajectory, which is designed to help the model identify similar trajectories when there are only slight differences in the trajectory positions and enhance the robustness of the learned trajectory representation to noisy data;
[0099] Assume that the original trajectory is a trajectory consisting of n position points: T = [l1, l2, ..., l i ,…,ln ];
[0100] The original trajectory T is segmented into variants T d It is expressed as:
[0101]
[0102]
[0103] Where Δx i , Δy i and Δz i Represents the offset of latitude, longitude and altitude respectively; is a bounded Gaussian distribution; γ1 and γ2 are the maximum position offsets, λ1 and λ2 are normalization parameters. Since the data error recorded by QAR is not too large, this embodiment sets γ1 to 0.001 degrees and γ2 to 100 feet in the experiment and uses the distribution
[0104] S3. receiving different enhanced variants of the original trajectory generated by the trajectory enhancement module through the feature extraction module, and extracting fine-grained features of the trajectory position;
[0105] A temporal convolutional network model (TCN) is used to extract local fine-grained features of the flight trajectory. The main reason for choosing TCN is that compared with traditional recurrent neural networks (such as LSTM), TCN has stronger memory capacity in various tasks and datasets (especially flight data), and it can also skillfully handle high-dimensional data through convolution operations.
[0106] The feature extraction module of this embodiment is expressed as:
[0107] h(i)=TCN(x,i)
[0108] Where x, h(i)∈R 3×n , n is the length of the trajectory, 3 represents the coordinate dimension of the trajectory point described by the true values of latitude, longitude and altitude in the flight trajectory; TCN(·, i) represents a feature extraction module with i layers of filters.
[0109] like Figure 2 and Figure 3 As shown in the figure, the feature extraction module contains multiple layers of fully connected networks (FCN) using one-dimensional convolution 1-D. 1-DFCN uses zero-value padding, residual block connection and dilated causal convolution to map variable-length input into fixed-length output; zero-value padding is specifically used to maintain a consistent sequence length in subsequent layers.
[0110] The residual block between two adjacent layers learns the mapping F(·) from the output x of the previous layer and generates the following feature map:
[0111] h = ReLU(F(x)+x)
[0112] F(x)=D(W(Conv(A(W(Conv(x))))))
[0113] Where h is the hidden output vector; F(x) represents a series of operations including dilated causal convolution Conυ(·), weight normalization W(·), temporary backoff D(·), and activation function A(·) using rectified linear unit ReLU.
[0114] Given a trajectory T = [l1, l2, ..., l i ,…,l n ], thus obtaining the segmentation trajectory T s and deformation trajectory T d Then, two parallel TCN modules TCN = {TCN1, TCN2} are used to learn the two enhanced trajectories respectively. Using TCN's excellent ability to capture temporal information, the two enhanced trajectories are embedded into vector representations. and Thus, the fine-grained spatiotemporal characteristics of the trajectory are preserved.
[0115] S4. Aggregate the output of the feature extraction module through the twin attention mechanism of the trajectory encoding module, and then generate the final spatiotemporal trajectory representation through LSTM;
[0116] Step S4 includes the following sub-steps:
[0117] S4.1 designs a twin attention mechanism to enhance the output of the feature extraction module, aiming to improve the fine-grained spatiotemporal representation in the flight trajectory;
[0118] The twin attention mechanism is described as follows:
[0119]
[0120]
[0121]
[0122]
[0123] F(x)=D(L(A(L(x))))
[0124] Where W d is a matrix used to transform vector and W Q and W K They are respectively d Matrices of the same shape; and yes and F(x) is a feed-forward network consisting of a linear layer L(·), a temporal regression method D(·), and an activation function A(·) using a rectified linear unit (ReLU).
[0125] S4.2 selects LSTM with self-attention mechanism to learn the final trajectory representation;
[0126] At each time step i, an LSTM unit converts the current input vector x i and the state vector i-1 of the previous step as input, and output the state vector of the current step i. The recursive steps of LSTM are as follows:
[0127] h i =LSTM(t′ i ,h i-1 ,i i , f i , o i , m i )
[0128] In the formula, i i , f i , o i and m i Represent the input gate, forget gate, output gate and storage unit of the LSTM unit respectively. In the LSTM layer, t′ i Represents the original time t i The corresponding learned time embedding. The LSTM unit uses the embedded time, the previous hidden state and the cell state to calculate the new hidden state and update the cell state. Subsequently, the final hidden state vector is used as the representation of the flight trajectory because it encompasses comprehensive fine-grained information. This recursive procedure effectively learns a flight trajectory representation that preserves fine-grained information by processing enhanced trajectory embeddings and capturing the correlations between them.
[0129] S4.3 uses the self-attention mechanism to capture the fine-grained correlation between flight trajectory position points;
[0130] The improved state representation in the LSTM cell is calculated as follows:
[0131]
[0132]
[0133]
[0134] Where att(·,·) represents the attention mechanism; w1 is the learnable parameter vector; W1 and W2 are the learnable parameter matrices; h kThe hidden state vector output by the LSTM unit;
[0135] S4.4 Input the vector embedding enhanced by the twin attention mechanism into the LSTM model with self-attention mechanism to obtain a unified final spatiotemporal trajectory representation v T ;
[0136] By integrating the self-attention mechanism, key positions in the trajectory can be identified, thereby improving model performance. It should be noted that the representation of the last time step is used to encode the complete flight trajectory, which is defined as follows:
[0137]
[0138] Among them, + represents the splicing operation.
[0139] S5. Train and optimize the FT2Vec model;
[0140] S5.1 Construct triple sample: T a , T p and T n ,The triplet samples provide a combination of similar and dissimilar trajectory samples, which enhances the effectiveness and robustness of the training model;
[0141] T a is the trajectory selected as the anchor data;
[0142] T p It is a trajectory that is relatively similar to the anchor point trajectory, that is, the positive sample trajectory;
[0143] T n is a randomly selected trajectory, i.e., a negative sample trajectory;
[0144] S2. Triplet-based pairing loss function Guide FT2Vec model learning;
[0145] Given a set of flight trajectory triplets Triplet-based pairing loss function The purpose of is to guide the model to learn that the distance between similar trajectory pairs is smaller than the distance between dissimilar trajectory pairs and maximize their number. Specifically, the formula of the loss function is as follows:
[0146]
[0147] In the formula, and are the true values of the distances between the anchor point trajectory and the positive sample trajectory and the negative sample trajectory in the i-th triplet; and is the distance between trajectory representations learned by the FT2Vec model;
[0148] v ap =exp(-||T a -T p ||2)
[0149] v an =exp(-||T a -T n ||2)
[0150] In the formula, v ap The distance between the vector representation of the anchor point trajectory and the vector representation of the positive sample trajectory; v an The distance between the vector representation of the anchor trajectory and the vector representation of the negative sample trajectory.
[0151] Experimental setup
[0152] Datasets: Two QAR datasets, WHU and PEK, are used in the experimental study, and both are divided into training and test sets in a ratio of 7:3. WHU contains 18,466 A320 flight trajectory data that takes off from Wuhan and lands at domestic airports in China, collected in 2018. PEK contains 3,003 A320 flights that take off from Beijing and land in Hangzhou. All trajectories are from the same route, so there are only fine-grained differences.
[0153] Benchmark Model
[0154] In the experiment, five recently proposed deep learning-based methods were extended as benchmark models to demonstrate the performance of the proposed method. The specific contents of these methods are summarized as follows:
[0155] SRN: It is a time series learning method based on twin networks, which uses cross entropy as the objective function to train the model.
[0156] SRN-T: We implemented a twin recurrent network by using TCN as the base network and named it SRN-T.
[0157] t2vec: is a seq2seq based model that uses novel embedding techniques, including data augmentation methods to handle sampling rate variations and noisy samples.
[0158] Variation and noise sampling points.
[0159] E 2 DTC: used their Seq2Seq model in the pre-training stage, which uses the same backbone encoder as t2vec to learn trajectory representations.
[0160] ST2Vec: replaces the GCN in its spatial modeling module with TCN to make it applicable to flight trajectories.
[0161] Evaluation Metrics
[0162] Similarity search is used to evaluate the performance of the above trajectory representation learning methods, with HR@10, HR@50 and R10@50 as evaluation indicators. Specifically, HR@k examines the overlap between the top k results returned by the trajectory representation learning method and the true value; Rk@t evaluates the coverage of the top t results generated by different methods over the top k true value results. The true value results of similarity search are obtained using traditional heuristic measurement methods, including dynamic time warping (DTW), Fréchet distance (Fréchet), real sequence edit distance (EDR) and Hausdorff distance (Hausdorff). The closer HR@10, HR@50 and R10@50 are to 1, the higher the effectiveness of the model.
[0163] Model setup
[0164] The model hyperparameter settings are as follows: The TCN used by FT2Vec has K=64 filters (filter size k=5) and 3 hidden layers, and the expansion factor d={1, 2, 4}. The final trajectory embedding representation dimension is set to 128. In addition, the present invention uses the Adam optimizer for training, and the learning rate is set to 0.001. The batch size of the training is 128.
[0165] Finally, FT2Vec is implemented in Python and Pytorch. All experiments are performed on a server equipped with an Intel(R) Core(TM) i9-10900X, 3.70GHz CPU and a GeForce RTX3090 GPU. For the compared methods, their parameters are tuned to achieve the best performance in the dataset.
[0166] Model comparison results
[0167] The results of model performance evaluation under DTW, Fréchet, EDR and Hausdorff are shown in Table 1, and the best results are highlighted.
[0168] Based on these results, the following observations and analyses were made. FT2Vec consistently outperforms other methods, indicating that the proposed module is effective and superior. SRN-T outperforms SRN because SRN uses a simple recurrent network as the base network of the twin structure, while SRN-T is implemented using the TCN of the present invention, indicating that TCN has a stronger ability to extract fine-grained features from flight trajectories. E2DTC and T2Vec show similar performance because they rely on a similar backbone network that cannot fully capture the spatiotemporal characteristics of flight trajectories. Although incorporating TCN into the spatial modeling module of the ST2Vec architecture improves the feature extraction capability of flight trajectories, its temporal modeling module has difficulty capturing temporal features, which affects the quality of the final trajectory representation. It is worth noting that, compared with the WHU dataset, except for FT2Vec, the performance of other models in the PEK dataset is poor. This is because the trajectories in the PEK dataset all come from the same flight route and therefore only show fine-grained position differences, which are difficult for other models to effectively extract and embed into trajectory representations.
[0169] Table 1 Model comparison results
[0170]
[0171] Evaluate the efficiency of the model in terms of training and testing time, Figure 4 The results of various methods on the two datasets are shown, with the Y axis being the scaled difference. It can be seen that on the WHU dataset, FT2vec completes each round of training in less than 30 seconds, and on the PEK dataset in less than 10 seconds, which is slightly slower than E 2 DTC and T2Vec. This slight difference can be attributed to the fact that FT2Vec uses three modules to obtain comprehensive, high-quality trajectory representations. We also noticed that SRN is faster to train and test, which is due to the fact that SRN uses a relatively simple RNN-based Siamese network structure to embed trajectories, which also leads to its poor performance. SRN-T is slightly slower to train than SRN because it uses TCN as the backbone of its Siamese network structure. E 2 The efficiency of DTC and T2Vec is comparable because E 2 DTC adopts the encoder-decoder architecture of T2Vec for trajectory embedding. On the other hand, since the temporal modeling module of ST2Vec requires additional time, ST2Vec is significantly slower in both training and testing phases compared to other methods.
[0172] Ablation experiment
[0173] To further investigate the effectiveness of each key design in FT2Vec, we compare FT2Vec and its following four ablation variants on two datasets.
[0174] (a) FT2VecNoSeg: This variant excludes trajectory segmentation from the trajectory enhancement module of our invention while preserving trajectory deformation.
[0175] (b) FT2Vec-NoDT: This variant removes trajectory deformation but preserves trajectory segmentation.
[0176] (c) FT2Vec-NoAug: This variant removes the trajectory augmentation module and uses the feature extraction module to directly receive the input trajectory.
[0177] (d) FT2Vec-NoSA: This variant cancels the twin attention mechanism in the trajectory encoding module and utilizes LSTM to encode the output of the feature extraction module into the final trajectory representation.
[0178] The results are shown in Table 2. Taking the results under Fréchet distance on the PEK dataset as an example, it can be seen that by combining the twin attention mechanism, FT2Vec improves the R10@50 of FT2VecNoSA from 0.7781 to 0.8661. After adding the trajectory enhancement module, FT2Vec improves the R10@50 of FT2VecNoAug from 0.8381 to 0.8661. This trend persists in the WHU dataset and the other three similarity indicators. It can be seen that the trajectory variants generated by the trajectory enhancement module provide the model with more extensive information, thereby enhancing the robustness of the model. In addition, the twin attention mechanism helps to adaptively modify the output results of the feature extraction module, so that the features of the two trajectory variants can be integrated, thereby improving the effectiveness of the final trajectory representation.
[0179] Table 2 Ablation experiment results
[0180]
[0181] Parameter sensitivity analysis
[0182] like Figure 5 and Figure 6 As shown, parameter sensitivity analysis is performed to gain insight into the key components of FT2Vec. Specifically, the performance of the model is explored under different parameter settings: TCN filter size k (l=3, n=64, d=128); TCN hidden layer size l (k=5, n=64, d=128); number of TCN filters n (k=5, l=3, d=128) and the final embedding dimension d (k=5, l=3, n=64) of the trajectory representation. Due to limited space, Figure 6Only the experimental results under Fréchet distance are shown.
[0183] Overall, HR@10 is more sensitive to parameter changes, while R10@50 shows greater robustness. When the filter size k deviates from 5, the performance of the model decreases significantly, which is particularly evident in HR@10, indicating that the model can achieve optimal performance with relatively few convolution operations. When k increases from 9 to 13, the model performance improves significantly; however, further increasing k leads to diminishing returns, indicating that additional convolution operations do not effectively improve feature extraction capabilities.
[0184] When the hidden layer size l is set to 3, 7, or 9, the model performs relatively well. It is worth noting that adjusting l directly affects the dilation factor, thereby ensuring the entire input receptive field. For example, the dilation factor corresponding to the hidden layer size l = 3 is d = {1, 2, 4}, while the dilation factor of 7 hidden layers is d = {1, 2, 4, 8, 16, 32, 64}. In practical applications, larger hidden layer sizes may not be desirable, and larger l values seem to be more advantageous, so setting l = 3 can achieve a reasonable balance between performance and computational efficiency.
[0185] Increasing the number of filters n can usually extract trajectory features more comprehensively, thereby improving model performance. However, the larger the value of n, the more convolution operations there are, which increases model complexity and computational cost, and is not recommended in practical applications. In the model configuration, it is recommended to set n = 64, which can achieve good performance without incurring excessive computational overhead.
[0186] Similar to the number of filters n, the model performance improves with the increase of trajectory dimension d, reaching a peak at d = 128, but drops significantly at d = 256. The reason is that parameter d controls the complexity of FT2Vec. The larger the parameter value, the stronger the model's ability to capture the intrinsic structure and fine-grained features of the trajectory. However, due to limited training data, too large a d value will increase the risk of overfitting.
[0187] Example Analysis
[0188] To demonstrate the effectiveness of FT2Vec in downstream tasks, top-k queries are performed on the PEK and WHU datasets. A random track is selected as the query track, and the top 2 results retrieved from the true value and FT2Vec are displayed. Specifically, Figure 7 As shown in Figure 2, among all flight trajectories from Beijing to Hangzhou, FT2Vec retrieves results that closely match the query trajectory at a fine-grained level. Figure 8 The query trajectory from Wuhan to Qingdao is shown, and we can see that FT2Vec correctly identified two other similar 3-flight trajectories on the same route.
[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the protection scope of the present invention.
Claims
1. A flight trajectory calculation method based on representation learning, characterized in that: The following steps are involved: S1. constructing a FT2Vec model, wherein the FT2Vec model includes a trajectory enhancement module, a feature extraction module and a trajectory encoding module; The FT2Vec model learns trajectory representation with fine-grained spatiotemporal features through a trajectory enhancement module, a feature extraction module, and a trajectory encoding module; S2. Input the original trajectory, use the trajectory enhancement module to create different variants of the original trajectory, and enhance the trajectory; S3. receiving different enhanced variants of the original trajectory generated by the trajectory enhancement module through the feature extraction module, and extracting fine-grained features of the trajectory position; The feature extraction module: that is, using two parallel temporal convolutional network models TCN to receive different enhanced variants of the original trajectory generated by the trajectory enhancement module, so as to extract fine-grained features of the trajectory position; S4. Aggregate the output of the feature extraction module through the twin attention mechanism of the trajectory encoding module, and then generate the final spatiotemporal trajectory representation through LSTM; S5. Train and optimize the FT2Vec model.
2. The flight trajectory calculation method based on representation learning according to claim 1, characterized in that: In step S2, the trajectory enhancement module creates different variants of the original trajectory through trajectory segmentation and trajectory deformation.
3. The flight trajectory calculation method based on representation learning according to claim 2, characterized in that: The trajectory segmentation is to segment the original trajectory into k equal parts, and calculate the average value of the trajectory points in each part to obtain representative points, and then use the representative points to construct a new trajectory with the same length; Assume that the original trajectory is a trajectory consisting of n position points: T = [l1,l2,…,l i ,…,l n ]; The original trajectory T is segmented into variants T s It is expressed as: Among them, l i =(lon i ,lat i ,alt i ) is a track position point expressed in latitude, longitude and altitude; 4. The flight trajectory calculation method based on representation learning according to claim 3, characterized in that: The trajectory deformation is to add a random offset to the coordinates of each position point in the original flight trajectory; Assume that the original trajectory is a trajectory consisting of n position points: T = [l1,l2,…,l i ,…,l n ]; The original trajectory T is deformed into a variant T d It is expressed as: Where Δx i , Δy i and Δz i Represents the offset of latitude, longitude and altitude respectively; is a bounded Gaussian distribution; γ1 and γ2 are the maximum position offsets, and λ1 and λ2 are normalization parameters.
5. The flight trajectory calculation method based on representation learning according to claim 4, characterized in that: The feature extraction module is expressed as: h(i)=TCN(x,i) Where x,h(i)∈R 3×n , n is the length of the trajectory, 3 represents the coordinate dimension of the trajectory point described by the true values of longitude, latitude and altitude in the flight trajectory; TCN(·,i) represents a feature extraction module with i layers of filters.
6. The flight trajectory calculation method based on representation learning according to claim 5, characterized in that: The feature extraction module includes multiple layers of a fully connected network (FCN) using one-dimensional convolution 1-D, and the 1-D FCN maps variable-length inputs into fixed-length outputs using zero-value padding, residual block connections, and dilated causal convolutions; The residual block between two adjacent layers learns the mapping F(·) from the output x of the previous layer and generates the following feature map: h = ReLU(F(x)+x) Ft(x)=D(W(Conv(A(W(conv(x)))))) Where h is the hidden output vector; F(x) represents a series of operations including dilated causal convolution Conυ(·), weight normalization W(·), temporary backoff D(·), and activation function A(·) using rectified linear unit ReLU.
7. The flight trajectory calculation method based on representation learning according to claim 6, characterized in that: In step S3, two parallel feature extraction modules are used to learn the enhanced trajectories of trajectory segmentation and trajectory deformation respectively, and the time information capture capability of the feature extraction module is used to embed the two enhanced trajectories into a vector representation. and Thus, the fine-grained spatiotemporal features of the trajectory are preserved.
8. The flight trajectory calculation method based on representation learning according to claim 7, characterized in that: The step S4 comprises the following sub-steps: S4.1 Design a twin attention mechanism to enhance the output of the feature extraction module; The twin attention mechanism is described as follows: F(x)=D(L(A(L(x))))) Where W d is a matrix used to transform vector and W Q and W K They are respectively d Matrices of the same shape; and yes and F(x) is a feed-forward network consisting of a linear layer L(·), a temporal regression method D(·), and an activation function A(·) using a rectified linear unit (ReLU). S4.2 selects LSTM with self-attention mechanism to learn the final trajectory representation; At each time step i, an LSTM unit converts the current input vector x i and the state vector i-1 of the previous step as input, and output the state vector of the current step i. The recursive steps of LSTM are as follows: h i =LSTM(t’ i ,h i-1 ,i i ,f i ,o i ,m i ) In the formula, i i , f i , o i and m i Represent the input gate, forget gate, output gate and storage unit of the LSTM unit respectively; in the LSTM layer, t' i Represents the original time t i The corresponding learned temporal embedding; S4.3 uses the self-attention mechanism to capture the fine-grained correlation between flight trajectory position points; The improved state representation in the LSTM cell is calculated as follows: Where att(·,·) represents the attention mechanism; w1 is the learnable parameter vector; W1 and W2 are learnable parameter matrices; h k The hidden state vector output by the LSTM unit; S4.4 Input the vector embedding enhanced by the twin attention mechanism into the LSTM model with self-attention mechanism to obtain a unified final spatiotemporal trajectory representation v T ; The representation of the last time step is used to encode the complete flight trajectory, which is defined as follows: Among them, + represents the splicing operation.
9. The flight trajectory calculation method based on representation learning according to claim 8, characterized in that: The step S5 comprises the following sub-steps: S5.1 Construct triple sample: T a , T p and T n ; T a is the trajectory selected as the anchor data; T p It is a trajectory that is relatively similar to the anchor point trajectory, that is, the positive sample trajectory; T n is a randomly selected trajectory, i.e., a negative sample trajectory; S2. Triplet-based pairing loss function Guide FT2Vec model learning; In the formula, and are the true values of the distances between the anchor point trajectory and the positive sample trajectory and the negative sample trajectory in the i-th triplet; and is the distance between trajectory representations learned by the FT2Vec model; v ap =exp(-||T a -T p ||2) v an =exp(-||T a -T n ||2) In the formula, v ap The distance between the vector representation of the anchor point trajectory and the vector representation of the positive sample trajectory; v an The distance between the vector representation of the anchor trajectory and the vector representation of the negative sample trajectory.
Citation Information
Patent Citations
Sub-segment similarity matching method based on multi-level track coding tree
CN111475596A
Trajectory data enhancement and trajectory identification method based on embedding-mixing
CN112949628A
Trajectory representation method and system based on deep learning
CN114067069A
TCN-GRU ship trajectory prediction method, system and device based on coding-decoding structure, and medium
CN116342657A
Track similarity measurement method based on multichannel feature learning
CN117034025A
