Aircraft trajectory prediction method based on trajectory clustering and spatial-temporal feature network
Through the methods of trajectory clustering and spatiotemporal feature network, combined with CNN and BiLSTM, the spatiotemporal features of aircraft trajectory are extracted, and the self-attention mechanism is introduced, which solves the problem of insufficient aircraft trajectory prediction accuracy in the existing technology, and achieves more efficient and accurate trajectory prediction.
Patent Information
- Application Number
- CN202510479293.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-01
AI Technical Summary
When handling complex and nonlinear aircraft trajectory prediction methods, existing aircraft trajectory prediction methods cannot effectively capture long-term dependencies and spatial characteristics, resulting in insufficient prediction accuracy, especially in flight scenarios with large dynamic changes, with weak generalization capabilities.
The method based on trajectory clustering and spatiotemporal feature network is adopted to group similar trajectory clustering, combine convolutional neural networks (CNNs) and bidirectional long and short-term memory networks (BiLSTMs) to extract the spatiotemporal features of trajectories, and introduce self-attention mechanisms to dynamically adjust the weights to build a personalized prediction model.
It significantly improves the accuracy and efficiency of aircraft trajectory prediction, can better adapt to complex flight paths and variable environments, enhances the generalization ability and robustness of the model, and reduces the impact of data noise.
Smart Images

Figure CN120408230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network, belonging to the aviation field and used for aircraft trajectory prediction. Background Technique
[0002] Existing aircraft trajectory prediction technologies rely on a variety of methods, among which traditional mathematical models such as Markov chains and Kalman filters are widely used in track prediction. However, the applicability of these traditional methods is limited, especially when dealing with complex and non-linear aircraft trajectories. The Markov chain model assumes that the future state of the aircraft is only related to the current state, which makes it have significant limitations in capturing the long-term dependencies of the trajectory, resulting in the prediction results being unable to accurately reflect the movement trends of the aircraft at different time periods. Kalman filter can effectively smooth trajectory data in the case of low noise, but it performs poorly on trajectories with large dynamic changes (such as high-speed maneuvers of aircraft). In addition, the spatial characteristics and complex environmental impacts in these traditional flight paths further limit their prediction accuracy.
[0003] With the progress of deep learning technology, data-driven aircraft trajectory prediction methods have gradually become the focus of research. The long short-term memory network (LSTM) has become a common method for solving aircraft trajectory prediction problems because it can effectively process time series data. LSTM can capture the long-term time dependencies in trajectory data through its gating mechanism, so it shows good results in predicting aircraft trajectories. Nevertheless, LSTM's understanding of spatial information is limited. When considering factors such as spatial position, heading, and speed in aircraft trajectories, the LSTM model often can only capture the dynamic characteristics of the time series and is difficult to comprehensively reflect the spatial distribution of the trajectory.
[0004] To make up for this deficiency, researchers have proposed bidirectional long short-term memory. This model effectively solves the problem of information loss in LSTM when dealing with long time series by considering both forward and backward time information, further improving the prediction accuracy. In addition to BiLSTM, hybrid models combining convolutional neural network (CNN) and LSTM have been widely used. CNN is mainly used to extract the spatial features of trajectory data, while LSTM is responsible for time series modeling. The combination of the two enables the model to capture both the spatial structure and time changes of the trajectory, significantly improving the prediction performance.
[0005] However, although these deep learning methods have made certain progress, they are still unable to fully utilize the commonalities between different air routes when dealing with highly complex and non-linear flights, resulting in weak generalization ability of the model in different flight scenarios.
[0006] Therefore, it is necessary to design a new aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network to overcome the above problems. Summary of the Invention
[0007] The object of the present invention is to overcome the defects of the prior art, and provides an aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network, which can improve the accuracy and efficiency of aircraft trajectory prediction.
[0008] The present invention is implemented as follows:
[0009] The present invention provides an aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network, including the following steps:
[0010] Step 1, dataset preparation: The dataset mainly includes the spatial information and time information of aircraft trajectories, and preprocesses the data;
[0011] Step 2, trajectory clustering: Group similar trajectories through trajectory clustering;
[0012] Step 3, spatio-temporal feature extraction: Extract the spatio-temporal features of trajectory data by combining a convolutional neural network and a bidirectional long short-term memory network; wherein, the convolutional neural network is used to extract the spatial features of the trajectory, and by converting the trajectory data into an image or grid form, learn the local spatial patterns of the trajectory; the bidirectional long short-term memory network is used to process the time series features of the trajectory, and by considering the forward and backward time information simultaneously, capture the dynamic time dependencies in the trajectory;
[0013] Step 4, construct a trajectory prediction model based on trajectory clustering and spatio-temporal feature network, train and save the model with the best performance on the validation set, and realize the targeted prediction of different time-series data trajectories under complex paths and changing environments.
[0014] Further, in Step 1, the spatial information of the aircraft trajectory includes the dynamic data of the longitude and latitude position, flight speed, heading angle and flight height of the aircraft, and the time information involves the time stamp of the trajectory data, which is used to identify the specific position of the aircraft at each moment; it is necessary to perform operations such as screening, cleaning, reconstruction, missing value filling and standardization on the data to provide accurate input data for subsequent trajectory clustering and prediction model training.
[0015] Further, for the aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network as described in claim 1, it is characterized in that: in Step 1, the following contents are included in the preprocessing and reconstruction of trajectory data: Integrate different types of data into a unified framework for processing; adopt the method of weighted average to fuse data of different modalities, and assume there are n modal datasets , and its fusion result is:
[0016] ;
[0017] Wherein, is the modality weight, satisfying , and is used to control the contribution of different modality data to the final result; on this basis, a self-attention mechanism is introduced to enable the model to dynamically assign different weights according to the importance of the input data, and its calculation formula is:
[0018] ;
[0019] where is the attention score, is the weighted sum of , is the weight matrix, is the final attention coefficient, q is the hidden layer state of the bidirectional long short-term memory network, T is the transpose operation, ensuring that multiplication calculations can be performed between vectors and matrices, is corresponding to the input data attention score, j is an index representing each element in all input vectors; in the formula, the value range of j is 1 ≤ j ≤ n, where n is the total number of input data.
[0020] Furthermore, in step two, a measurement method based on the Hausdorff distance is used to determine the similarity between trajectories. By calculating the bidirectional Hausdorff distance, the maximum deviation between two trajectories can be obtained, and then the similarity between trajectories can be evaluated. Its calculation formula is:
[0021] ;
[0022] where A and B are different clustering trajectories, h(A, B) is the measure of the maximum difference in the Euclidean distance between trajectory points, and H(A, B) is the bidirectional Hausdorff distance with better robustness after measuring by combining the maximum deviation between trajectories;
[0023] When processing n trajectories, using the bidirectional Hausdorff distance to calculate the similarity can obtain an n * n two-dimensional distance matrix; for the trajectory set , the distance matrix of the calculation result is shown as follows, where is the similarity between the first trajectory and n trajectories;
[0024] ;
[0025] The clustering results are evaluated by the silhouette coefficient SC, which measures the quality of clustering from the perspectives of intra-cluster compactness and inter-cluster separation, and provides an evaluation criterion for the quality of clustering. As shown in the following formula, where a(x) is the average distance from the sample point x to other trajectories within the cluster, and the value of a(x) reflects the compactness of the cluster to which the sample point belongs. The smaller the value, the closer the points within the cluster; while b(x) is the minimum value among the average distances from the sample point x to all other clusters. The larger the value, the better the inter-cluster separation; the closer the silhouette coefficient is to 1, the more ideal the clustering effect is.
[0026] 。
[0027] Furthermore, in step three, first, through a convolutional neural network composed of an input data matrix, a convolutional layer, a pooling layer, and a fully connected layer, the processed data matrix extracts features through convolutional operations, and then downsamples and reduces the dimension through the pooling layer; finally, the extracted high-dimensional features are input into the fully connected layer, and finally, the final output is obtained through the activation function.
[0028] Furthermore, in step three, the bidirectional long short-term memory network will further extract the clustering data features initially processed by the convolutional neural network. There are three gate structures inside the long short-term memory network: the forget gate used to determine which information in the cell state to discard and the degree of its discard, the update gate used to determine which information will be stored in the cell state and the output gate used to determine which information will be output; the long short-term memory network model receives three inputs at each time step: the input at the current moment, the cell state and the hidden layer state at the previous moment; the network update process is completed using the following formula, where , , and are coefficient matrices, , , and are bias matrices, and σ represents the sigmoid activation function;
[0029] ;
[0030] The long short-term memory network maintains long-term memory between sequences by increasing the cell state ; at each time step, the long short-term memory network simultaneously receives three inputs: the input at the current moment, the cell state and the hidden layer state ; Long short-term memory networks can effectively handle long-term dependencies in time series data.
[0031] Furthermore, the attention mechanism in the trajectory prediction model is used to enhance the influence of key features of the input data, thereby improving the prediction effect of the model. Its calculation formula is as follows:
[0032]
[0033] where q is the state of the hidden layer of the convolutional neural network, is the input data at the i-th time, is the calculated weight value;
[0034] The final output is obtained by performing a weighted sum of the attention weights and the model input
[0035] The present invention has the following beneficial effects:
[0036] The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network provided by the embodiments of the present invention has the following beneficial effects compared with the prior art:
[0037] 1. It fills the accuracy gap of existing trajectory prediction methods in dealing with complex flight trajectories. In response to the problem that traditional methods cannot effectively capture non-linear dynamic changes and long-term dependencies, an innovative solution based on trajectory clustering and spatio-temporal feature extraction network is proposed, which promotes the precise and intelligent development of trajectory prediction technology.
[0038] 2. It improves the accuracy of trajectory prediction. By combining a convolutional neural network (CNN) and a bidirectional long short-term memory network (BiLSTM) to extract spatio-temporal features, it can simultaneously capture the spatial patterns and time dynamics of the trajectory, significantly improving the prediction accuracy of the model and its adaptability to complex trajectories.
[0039] 3. The proposed trajectory prediction model based on the self-attention mechanism can more accurately process multi-dimensional data of flight paths, and in real-time combine information such as aircraft trajectories, meteorological conditions, and air routes to achieve more efficient and accurate predictions. By dynamically assigning weights to different parts of the input data through the self-attention mechanism, the prediction ability and accuracy of the model in diverse flight paths and different environmental conditions are significantly improved.
[0040] 4. The constructed personalized prediction model based on trajectory clustering can effectively distinguish different flight paths and dynamic environmental conditions, enhancing the generalization ability and robustness of the model. For different types of trajectory data, the proposed classification and prediction methods can significantly reduce the influence of data noise, improving the accuracy and adaptability of the model in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0042] Figure 1 Schematic diagram of the CNN model provided by the embodiment of the present invention;
[0043] Figure 2 Schematic diagram of the LSTM unit provided by the embodiment of the present invention;
[0044] Figure 3 Schematic diagram of the BiLSTM model provided by the embodiment of the present invention;
[0045] Figure 4 Schematic diagram of the attention model provided by the embodiment of the present invention;
[0046] Figure 5 Schematic diagram of the model of the aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network provided by the embodiment of the present invention;
[0047] Figure 6 Schematic diagram of the global trajectory distribution provided by the embodiment of the present invention;
[0048] Figure 7 Schematic diagram of the trajectory reconstruction comparison provided by the embodiment of the present invention;
[0049] Figure 8 Schematic diagram of the comparison before and after linear interpolation provided by the embodiment of the present invention;
[0050] Figure 9 Schematic diagram of the determined value of K provided by the embodiment of the present invention;
[0051] Figure 10 Schematic diagram of the silhouette coefficient of different K values provided by the embodiment of the present invention;
[0052] Figure 11 Schematic diagram of the comparison before and after trajectory clustering provided by the embodiment of the present invention;
[0053] Figure 12 Schematic diagrams of various trajectory distributions provided by the embodiment of the present invention
[0054] Figure 13 Schematic diagram of the sliding time window provided by the embodiment of the present invention
[0055] Figure 14 Experimental flowchart provided by the embodiment of the present invention
[0056] Figure 15 Schematic diagram for comparison of five models provided by embodiments of the present invention
[0057] Figure 16 Scatter plot of errors of five models provided by embodiments of the present invention Detailed implementation manners
[0058] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0059] The present invention provides a technical solution of the present invention, which is an aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network, and includes the following steps:
[0060] Step 1, dataset preparation. The dataset mainly includes the spatial information and time information of aircraft trajectories. The spatial information includes dynamic data such as the latitude and longitude position, flight speed, heading angle, and flight altitude of the aircraft, while the time information involves the timestamps of the trajectory data, which are used to identify the specific position of the aircraft at each moment. In addition, the data also includes the relationships between the aircraft and other entities (such as airports, military bases, air routes, etc.). To ensure the integrity and consistency of the data, this step performs operations such as data screening, cleaning, reconstruction, missing value filling, and standardization processing on the data to provide accurate input data for subsequent trajectory clustering and prediction model training.
[0061] Further, the trajectory data preprocessing and reconstruction in Step 1 includes the following contents:
[0062] For flight trajectories in complex environments, in addition to spatial and temporal data, meteorological data (such as wind speed, air pressure, etc.) and the real-time state of the aircraft (such as speed, acceleration, etc.) are also key factors. To better utilize multi-modal information, the present invention proposes a multi-modal information fusion model to fuse these different types of data in a unified framework for processing. This method uses the weighted average method to fuse data of different modalities. Suppose there are n modal datasets , and its fusion result is:
[0063]
[0064] where is the weight of modality , and satisfies , which is used to control the contribution of different modal data to the final result. On this basis, this method introduces a self-attention mechanism to enable the model to dynamically assign different weights according to the importance of the input data. Its calculation formula is:
[0065] ;
[0066] Among them, is the attention score, is the weighted sum of , is the weight matrix, is the final attention coefficient, q is the hidden layer state of the bidirectional long short-term memory network, T is the transpose operation to ensure that multiplication can be performed between vectors and matrices, is the attention score corresponding to the input data , and j is an index representing each element in all input vectors.
[0067] In the formula, j ranges from 1 ≤ j ≤ n, where n is the total number of input data.
[0068] Step two, trajectory clustering. Similar trajectories are grouped through trajectory clustering to design personalized prediction models for each type of trajectory. The inventor of the present invention uses the Hausdorff distance as a similarity metric, which can effectively handle the time inhomogeneity and morphological changes between trajectories. The clustering uses the K-Medoids algorithm. Compared with K-Means, K-Medoids selects actual trajectory points as cluster centers, enhancing the robustness, and further improving the clustering accuracy by comprehensively considering dynamic features such as spatial coordinates, speed, and heading, as well as external factors such as meteorological data and flight areas. Through this clustering step, the present invention constructs dedicated prediction models for different types of flight trajectories, thereby improving the prediction accuracy and efficiency.
[0069] The trajectory clustering in step two includes the following steps:
[0070] Due to the complexity and high-dimensionality of trajectories, the present invention uses a metric method based on the Hausdorff distance to determine the similarity between trajectories. By calculating the bidirectional Hausdorff distance, the maximum deviation between two trajectories can be obtained, and then the similarity between trajectories can be evaluated. Its calculation formula is:
[0071] ;
[0072] Among them, A and B are different clustering trajectories, h(A, B) is the measure of the maximum difference in the Euclidean distance between trajectory points, and H(A, B) is the bidirectional Hausdorff distance with better robustness after being measured by combining the maximum deviation between trajectories.
[0073] When processing trajectories with a quantity of n, using the bidirectional Hausdorff distance to calculate similarity can obtain an n*n two-dimensional distance matrix. For a trajectory set , the distance matrix of the calculation result is shown as follows, where is the similarity between the first trajectory and n trajectories.
[0074] ;
[0075] The clustering result is usually evaluated by the Silhouette Coefficient. This method measures the quality of clustering from the perspectives of intra-cluster compactness and inter-cluster separation, and provides an evaluation criterion for the quality of the clustering effect, as shown in the following formula, where a(x) is the average distance from the sample point x to other trajectories within the cluster. The value of a(x) reflects the compactness of the cluster to which the sample point belongs. The smaller the value, the closer the points within the cluster; while b(x) is the minimum value among the average distances from the sample point x to all other clusters. The larger the value, the better the inter-cluster separation. The closer the Silhouette Coefficient is to 1, the more ideal the clustering effect.
[0076] ;
[0077] Step 3: Spatiotemporal feature extraction. The spatiotemporal features of trajectory data are extracted by combining a Convolutional Neural Network (CNN) and a Bidirectional Long Short-Term Memory Network (BiLSTM). CNN is used to extract the spatial features of the trajectory. By converting the trajectory data into an image or grid form, it learns the local spatial patterns of the trajectory (such as the starting point, ending point, and path curvature). BiLSTM, on the other hand, processes the time series features of the trajectory. By considering both forward and backward time information simultaneously, it captures the dynamic time dependencies in the trajectory (such as acceleration, deceleration, turning, etc.). This joint extraction of spatiotemporal features can comprehensively characterize the spatial and temporal characteristics of the trajectory data and provide rich input features for subsequent trajectory prediction.
[0078] The spatiotemporal feature extraction in Step 3 includes the following steps:
[0079] First, it goes through a structure consisting of an input data matrix, a convolutional layer, a pooling layer, and a fully connected layer as shown in Figure 1The CNN network shown extracts features from the processed data matrix through convolution operations and then downsamples and reduces the dimensions through the pooling layer. The convolution and pooling operations can be repeated multiple times. After each processing, the extracted features become more abstract. Finally, the extracted high-dimensional features are input into the fully connected layer, and the final output is obtained through the activation function. It should be noted that 1DCNN can be well applied to time series analysis. By setting the size of the convolution kernel and sliding the convolution operation on the time series, it can effectively extract the relevant features in the time series, with a strong advantage in local feature extraction, providing more effective data for the subsequent model.
[0080] The BiLSTM network will further extract the features of the clustered data initially processed by the CNN network. LSTM is an improved recurrent neural network (RNN) model specifically designed to handle problems related to time series. There are three gate structures inside LSTM: the forget gate used to determine which information in the cell state to discard and the degree of its discard, the update gate used to determine which information will be stored in the cell state and the output gate used to determine which information will be output. The LSTM model can solve the problems of gradient vanishing and gradient explosion in RNN. The structure of the LSTM cell is as Figure 2 shown.
[0081] Figure 2 shows that the LSTM model receives three inputs at each time step: the input at the current moment , the cell state and the hidden layer state at the previous moment . The network update process is completed using the following formula, where , , and are coefficient matrices, , , and are bias matrices, and σ represents the sigmoid activation function.
[0082] ;
[0083] LSTM maintains the long-term memory between sequences by adding the cell state . At each time step, LSTM receives three inputs simultaneously: the input at the current moment , the cell state and the hidden layer state at the previous moment 。The network update process is as follows and is completed through the above formula. Through these formulas, LSTM can effectively handle long-term dependencies in time series data.
[0084] BiLSTM can solve the problem of forgetting initial trajectory information caused by the long trajectory of the aircraft, and can effectively extract time features and maintain long-term memory. Compared with the unidirectional LSTM structure, BiLSTM uses both forward trajectory information and backward trajectory information at the same time. After the clustered trajectory data passes through the BiLSTM network, it can further extract features that help improve the prediction accuracy of the model. The BiLSTM structure is as Figure 3 shown.
[0085] Step 4: Construct a trajectory prediction model based on trajectory clustering and spatio-temporal feature network, train and save the model with the best performance on the validation set, and achieve targeted prediction of trajectories of different time-series data under complex paths and changing environments.
[0086] Furthermore, constructing the trajectory prediction model based on trajectory clustering and spatio-temporal feature network in Step 4 includes the following steps:
[0087] Use the historical trajectory points of the aircraft as the input of the model. The shape of the input data is (none, 10, 4), where "none" represents the batch size, 10 represents the time step for each input, and 4 represents the number of features for each time step (such as longitude, latitude, speed, and heading). The core of the model is 1D CNN, BiLSTM, and Attention. First, input the data into the CNN model. The trajectory data first passes through a 1D convolutional layer (Cov1d), where the activation function is ReLU, and then through a max pooling layer. Repeat the above convolution, activation, and pooling operations, and then the data passes through a 1D average pooling layer; through the above processing, the spatial features between trajectories can be better extracted. Then, input the output of the CNN model into the BiLSTM model to extract the time-correlated features between trajectories. Next, input the trajectory output reflecting the spatio-temporal information obtained by BiLSTM and the final hidden state hn into the attention layer; through the dot product, calculate the attention scores and process them using SoftMax to obtain the attention weights.
[0088] Since the proportions of various features in the complex environment are different, when constructing the model, the self-attention mechanism is introduced as a way to imitate the way humans observe objects, which can extract key features from a large amount of information and assign greater weights to important features, making them play a more crucial role in the final output. The attention mechanism in the trajectory prediction model can enhance the influence of the key features of the input data, thereby improving the prediction effect of the model. The calculation formula is as follows:
[0089] ;
[0090] where q is the state of the BiLSTM hidden layer, is the input data at the i-th time, is the calculated weight value. The working principle of the attention mechanism in this step is as Figure 4 shown.
[0091] The final output is obtained by weighted summation of the attention weights and the model input. The attention mechanism is to learn the importance of different trajectory points and adjust the weight values of each trajectory point, thereby improving the accuracy of trajectory prediction. The model framework in this paper is as [[ID= shown.
[0092] The present invention simulates aircraft trajectory prediction in a complex environment through an improved trajectory clustering and spatio-temporal feature network trajectory prediction model. Experiments are carried out on the aircraft trajectory clustering data set provided by OpenSky. After applying the improved method of the present invention, the prediction accuracy has been improved to a certain extent:
[0093] 0.0215 0.0245 0.0614 0.0139 0.0176 0.0151 0.0096 0.0115 0.0271 0.0095 0.0121 0.0105 0.0086 0.0019 0.0243 0.0084 0.0114 0.0092 0.0077 0.0099 0.0218 0.0081 0.0114 0.0088 0.0068 0.0090 0.0192 0.0075 0.0106 0.0081
[0094] As shown in Table 1 above, it is a comparison of four model evaluation indicators.
[0095] The following further illustrates the technical solution of the present invention with specific embodiments:
[0096] This example contains 5,868 aircraft trajectory data. The present invention proposes an aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network, which combines the convolutional neural network (CNN) and bidirectional long short-term memory network (BiLSTM) in deep learning to effectively extract the spatial and temporal features of trajectories. By using the K-Medoids trajectory clustering algorithm, the model can identify trajectories with similar flight paths and divide them into different categories for targeted prediction. In order to further improve the prediction accuracy, the inventor of the present invention also introduces an attention mechanism, enabling the model to dynamically adjust the weights of different trajectory points, enhancing the prediction accuracy and robustness. The specific steps implemented by the present invention are as follows:
[0097] Step 1: Dataset preparation. The dataset of this example comes from the public dataset of Automatic Dependent Surveillance - Broadcast (ADS - B) from January to May 2021 provided by the OpenSky website. The data structure is as shown in the following table:
[0098] 35.05178833 -90.35195487 144.7865144 288.4349488
[0099] Table 2 Example of ADS - B data samples
[0100] The data provided by the OpenSky website is the global flight trajectory per hour. Taking one hour of data as an example, as As shown, it can be clearly seen that at latitudes 20 - 40° and longitudes -100 - 80°, the trajectory distribution is denser. This indicates that there is frequent aircraft movement in this area and a large number of different trajectories are available for model training. In deep learning, data quality determines the effect and efficiency of model training. Therefore, the ADS-B data of the above latitudes and longitudes is initially screened.
[0101] First step, screen the data. The data provided by the OpenSky website is arranged in chronological order and contains flight data of various types of aircraft. The inventor first compared the relationship between the aircraft type and the call sign provided by the website and screened the data according to the latitude and longitude ranges to obtain trajectory data with aircraft type labels. In order to highlight the trajectory characteristics during the aircraft flight, the inventor selected and used four parameters related to spatial information: longitude, latitude, speed, and heading. Therefore, the aircraft trajectory data can be expressed as , where n represents the total number of sampling points of the aircraft trajectory, represents the sampling point of the aircraft trajectory at time t, where , , and represent the latitude, longitude, speed, and heading of the sampling point at time t, respectively.
[0102] Second step, clean and reconstruct the data. To improve the performance of the model, it is necessary to ensure that the available training data is correct. First, invalid values are excluded from the ADS-B data, including those points with the same latitude and longitude and the missing values between two adjacent points. Second, noisy trajectories are removed. Trajectories containing less than 30 trajectory points are regarded as noise data and deleted. Finally, the inventor uses a distance-based trajectory reconstruction method for processing. The threshold set for trajectory reconstruction is 30 kilometers. If the distance between two adjacent points exceeds this threshold, it is marked as an intermittent point. If the number of data points between adjacent intermittent points is greater than 30, the trajectory between the two intermittent points is saved as a new trajectory. The effect of trajectory cleaning and reconstruction is as shown.
[0103] Third step, perform linear interpolation on the data. After the above data cleaning and reconstruction steps, the timestamps of two adjacent trajectory points may be discontinuous. Considering that the time interval between adjacent data is short, it can be assumed that the aircraft moves in a straight line at a constant speed in a short time. Therefore, the inventor uses linear interpolation to supplement the missing data. The reception interval of the ADS-B data used in this article is 10 seconds, denoted as Δt. The timestamp difference between adjacent data points is denoted as T, and T / Δt represents the number of missing data points between adjacent points. The sampling data at time is denoted as , T / Δt is the adjacent timestamp, and the sampling data is As shown in the following formula, the interpolation data between two timestamps can be calculated. when.
[0104] ;
[0105] The trajectory after interpolation is as shown. It can be seen that after completing the supplementation of the missing timestamps, the trajectory becomes more continuous, and the motion trend of the original trajectory is maintained, making full preparations for the subsequent trajectory sample segmentation. At this time, the trajectory can be re-expressed as , where the aircraft trajectory of each sampling point can be expressed as . After trajectory cleaning, reconstruction, and interpolation, a trajectory with continuous points and suitable for model training is obtained.
[0106] Step 2, trajectory clustering.
[0107] When performing K-Medoids clustering, the main problem is how to select the desired number of clusters K. In this paper, the Elbow method is used to preliminarily determine the number of clusters. When using this method, the SSE (Sum of Squared Errors) index is used to calculate the loss value, as shown in the following formula, where represents the i-th cluster, which is the sample point in the cluster , is the center point of the cluster . When the number of clusters increases, the change of the SSE value tends to be stable. When the change range of SSE tends to be stable, the K value is the desired number of clusters, as shown.
[0108] ;
[0109] To more accurately determine the value of K, gives the silhouette coefficients under different K values. It can be seen that when K = 6, the silhouette coefficient SC = 0.379. Therefore, K = 6 is selected as the optimal number of clusters
[0110] shows the comparison of the trajectories before and after clustering. It can be seen that before clustering, various trajectories are intertwined and the distinction of paths is not obvious. For example, in the entire airspace, the flight paths of aircraft are affected by terrain or flight purposes, and it is difficult to construct an effective prediction model in the whole area. However, through trajectory clustering, the trajectories in the entire airspace are divided into six routes, each representing an airway. Trajectory clustering can reveal the potential laws of trajectories in the airspace model, which cannot be discovered by manual observation. Making full use of these potential laws will greatly improve the accuracy of trajectory prediction. Shows the distribution of various trajectories. Through trajectory clustering, it can be seen that the air routes entering the airspace from different directions can be distinguished, which reflects specific flight purposes and achieves the expected effect.
[0111] Step 3, spatio-temporal feature extraction.
[0112] In this step, the goal of spatio-temporal feature extraction is to extract the spatial and temporal features in the aircraft trajectory by combining a convolutional neural network (CNN) and a bidirectional long short-term memory network (BiLSTM). To improve the accuracy of trajectory prediction, the model of the present invention fully mines the spatial and temporal information in the trajectory data through multi-level spatio-temporal feature extraction.
[0113] In the spatial feature extraction stage, the inventor of the present invention uses CNN to capture the spatial patterns of the trajectories. Given a trajectory dataset, where each data point , the inventor of the present invention first represents it as a matrix, where each column represents the spatial features (longitude, latitude, speed, heading).
[0114] To process the spatial features of the trajectories, the model converts the trajectory data into a two-dimensional image or grid form, and CNN extracts features through convolutional layers and pooling layers. For example, for a trajectory sequence, the input spatial data matrix (where n is the number of trajectory points, and 4 represents four features such as latitude, longitude, speed, and heading), the inventor of the present invention extracts local spatial features through a one-dimensional convolutional operation Conv1D:
[0115] ;
[0116] Among them, W is the convolutional kernel, and b is the bias term. The size of the convolutional kernel is usually k = 3 to ensure capturing the local spatial features of the trajectories. The feature map Y output by the convolutional layer is sent to the pooling layer for downsampling to reduce the data dimension.
[0117] Next, BiLSTM (bidirectional long short-term memory network) is used to model the temporal dependence of the trajectories. Based on the traditional LSTM, BiLSTM adds a backward propagation mechanism, enabling it to consider both forward and backward temporal information simultaneously, enhancing the model's ability to capture long-term dependence relationships. For the given time series trajectory data , ,... , the input of BiLSTM is:
[0118] ;
[0119] Among them, represents the output hidden state at time t, and respectively represent the forward and reverse LSTM networks. The LSTM determines the retention and update of information through its gating mechanism (including the forget gate, input gate, and output gate), and the formula is as follows:
[0120] ;
[0121] where, , , are the activation values of the forget gate, input gate, and output gate respectively, is the cell state, is the hidden state, and W and b are the weights and bias terms.
[0122] After the CNN extracts the spatial features and the BiLSTM extracts the temporal features, the present invention uses the self-attention mechanism to further fuse the spatio-temporal features. The self-attention mechanism dynamically adjusts the importance of different trajectory points by calculating the attention weights of each trajectory point. Given the trajectory point , its attention score is calculated through the dot product:
[0123] ;
[0124] where, is the similarity between the current trajectory point and its corresponding spatio-temporal features, usually obtained by calculating the dot product:
[0125] ;
[0126] Then, the SoftMax is used to normalize the scores to obtain the attention weights of the trajectory points. Finally, the spatio-temporal features are combined into a comprehensive feature vector through weighted summation:
[0127]
[0128] This way can ensure that when the model processes complex trajectories, it gives priority to focusing on the trajectory points that have a greater impact on the prediction, thereby improving the prediction accuracy.
[0129] Step 4, construct a trajectory prediction model based on trajectory clustering and spatio-temporal feature network.
[0130] After performing trajectory clustering processing, the number of each type of trajectory is determined as shown in the following table. In this part, in order to ensure the effect of model training, the inventor of the present invention selects the fifth type of data in the clustering results to construct the dataset , because the fifth type of data is the largest one. In order to compare the influence of clustering on the prediction results, the inventor of the present invention selects data with the same size as other clustering result data and defines it as the dataset 。The test set consists of 100 trajectories that are not included in the training data of the fifth type of trajectory. At the same time, in order to compare the impact of classification model construction on prediction accuracy, the inventor also used the data of classes 1 to 6 in the clustering results as the training data for model training and compared the prediction accuracies of different models. The training set and the validation set are divided according to the 8:2 ratio of the dataset. To prevent the model from overfitting during training, the inventor randomly shuffled the training set to increase the randomness of the samples. The deep learning framework used in this experiment is PyTorch, the number of iterations is 150, the batch size is 256, and the learning rate is set to 0.0001.
[0131] 3641 2903 3400 3639 5868 3323
[0132] Table 3 Number of Trajectories in Each Class
[0133] After trajectory clustering, the trajectory features at each sampling point still contain four-dimensional data. To eliminate the difficulties brought by the dimensional differences between different features to model training, the following formula is used to process the trajectory features to obtain the standardized trajectories.
[0134] ;
[0135] where x is the original trajectory information, and μ(x) and σ(x) represent the mean and variance in the data respectively, is the trajectory information obtained after normalization.
[0136] Trajectory prediction is a supervised learning method that requires dividing the data into training samples and labels. In this paper, the sliding window method is used to segment the trajectory sequence, as shown. Here, , , ,... represents the trajectory points, and the size of the time window is set to 10. The trajectory at time t can be expressed as , that is, each trajectory consists of ten consecutive points, and the time sliding window slides forward continuously for segmentation until the last trajectory point. The segmented trajectories can be expressed as , where t = 10, 11, 12,..., n. The experimental process is as shown.
[0137] The inventor used the root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) as evaluation indicators to measure the quality of trajectory prediction. At the same time, the inventor used the mean deviation (MEDV) to more intuitively show the prediction accuracy of the model. The above four indicators are used to evaluate the effectiveness of the prediction model, and the calculation formulas are as follows:
[0138] ;
[0139] where n is the number of samples, is the predicted trajectory, is the actual trajectory; "distance" is used to calculate the geographical distance between two points. The smaller the values of the four evaluation metrics, the smaller the gap between the predicted trajectory and the actual trajectory, and the better the prediction effect.
[0140] The experimental results show that compared with the BP model, the performance of the other four prediction models has been significantly improved. Compared with the LSTM model, BiLSTM-Attention has improved by 5.5% and 6.1% in latitude and longitude respectively. This shows that the BiLSTM model and the attention mechanism contribute to improving the performance. Compared with the BiLSTM-Attention model, the CNN-lstm model has improved by 10.1% in latitude, indicating that the CNN model can better extract the spatial information in the trajectory data. Compared with the LSTM, BiLSTM-Attention and CNN-LSTM models, the CNN-BiLSTM-Attention model used in this paper has improved by 27.7%, 17.4% and 10% in latitude prediction accuracy respectively, and by 14.1% and 7.5% in longitude prediction accuracy respectively. This shows that making full use of the relationship between adjacent trajectory points can better improve the prediction accuracy. Taking a test trajectory as an example, shows the prediction results of each model for this trajectory. shows the trajectory prediction error distribution of the four models. It can be seen from the figure that the above models can all predict the overall trend of the trajectory, but the model in this paper can better fit the actual trajectory when the trajectory changes suddenly, and the average distance deviation is small, meeting the accuracy requirements of trajectory prediction. In addition, the research results show that using the attention mechanism can focus on the important information in the trajectory, so as to obtain more accurate prediction results.
[0141] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network, characterized in that It includes the following steps: Step 1, dataset preparation: The dataset mainly includes the spatial information and time information of aircraft trajectories, and preprocesses the data; Step 2, trajectory clustering: Group similar trajectories through trajectory clustering; Step 3, spatio-temporal feature extraction: Extract the spatio-temporal features of trajectory data by combining a convolutional neural network and a bidirectional long short-term memory network; among them, the convolutional neural network is used to extract the spatial features of the trajectory, by converting the trajectory data into an image or grid form to learn the local spatial patterns of the trajectory; the bidirectional long short-term memory network is used to process the time series features of the trajectory, by considering the forward and backward time information simultaneously to capture the dynamic time dependencies in the trajectory; Step 4, construct a trajectory prediction model based on trajectory clustering and spatio-temporal feature network, train and save the model with the best performance on the validation set, and realize the targeted prediction of different time-series data trajectories under complex paths and changing environments.
2. The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network according to claim 1, wherein: In Step 1, the spatial information of the aircraft trajectory includes the longitude and latitude positions, flight speed, heading angle, and flight altitude dynamic data of the aircraft, and the time information involves the timestamp of the trajectory data, which is used to identify the specific position of the aircraft at each moment; it is necessary to perform operations such as data screening, cleaning, reconstruction, missing value filling, and standardization processing to provide accurate input data for the subsequent trajectory clustering and prediction model training.
3. The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network according to claim 1, characterized in that: In step one, the trajectory data preprocessing and reconstruction includes the following: integrating different types of data into a unified framework for processing; using the weighted average method to fuse data of different modalities, with modal datasets , and the fusion result is: ; Among them, is the weight of the modality and satisfies , which is used to control the contribution of different modality data to the final result; on this basis, the self-attention mechanism is introduced to enable the model to dynamically assign different weights according to the importance of the input data, and its calculation formula is: ; Among them, is the attention score, is the weighted sum of and is the weight matrix, is the final attention coefficient, q is the hidden layer state of the bidirectional long short-term memory network, T is the transpose operation to ensure that multiplication can be performed between vectors and matrices, is the attention score corresponding to the input data and j is an index representing each element in all input vectors; in the formula, j ranges from 1 ≤ j ≤ n, where n is the total number of input data.
4. The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network according to claim 1, characterized in that: In Step 2, a metric method based on the Hausdorff distance is used to determine the similarity between trajectories. By calculating the bidirectional Hausdorff distance, the maximum deviation between two trajectories can be obtained, and then the similarity between trajectories can be evaluated. The calculation formula is: ; where A and B are different clustering trajectories, h(A,B) is the measure of the maximum difference in the Euclidean distance between trajectory points, and H(A,B) is the bidirectional Hausdorff distance with better robustness after combining the maximum deviation between trajectories for measurement; When processing trajectories with a quantity of n, using the bidirectional Hausdorff distance to calculate the similarity can obtain an n*n two-dimensional distance matrix; for the trajectory set , the distance matrix of the calculation result is shown in the following formula, where is the similarity between the first trajectory and the n trajectories; ; The clustering result is evaluated by the silhouette coefficient SC, which measures the quality of clustering from the perspectives of intra-cluster compactness and inter-cluster separation, and provides an evaluation criterion for the quality of the clustering effect. As shown in the following formula, where a(x) is the average distance from the sample point x to other trajectories within the cluster, and the value of a(x) reflects the compactness of the cluster to which the sample point belongs. The smaller the value, the closer the points within the cluster; while b(x) is the minimum value among the average distances from the sample point x to all other clusters. The larger the value, the better the inter-cluster separation; the closer the silhouette coefficient is to 1, the more ideal the clustering effect; 。 5. The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network according to claim 1, characterized in that: In Step 3, first pass through a convolutional neural network composed of an input data matrix, a convolutional layer, a pooling layer, and a fully connected layer. The processed data matrix extracts features through convolutional operations, and then downsamples and reduces the dimension through the pooling layer; finally, the extracted high-dimensional features are input into the fully connected layer, and finally the final output is obtained through the activation function.
6. The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network according to claim 5, wherein: In Step 3, the bidirectional long short-term memory network will further extract the features of the clustered data preliminarily processed by the convolutional neural network. There are three gate structures inside the long short-term memory network: the forget gate which is used to determine which information in the cell state to discard and the degree of its discard, the update gate which is used to determine which information will be stored in the cell state and the output gate which is used to determine which information will be output; the long short-term memory network model receives three inputs at each time step: the input at the current moment , the cell state and the hidden layer state at the previous moment ; the network update process is completed using the following formula, where , , and are coefficient matrices, , , and are bias matrices, and σ represents the sigmoid activation function; ; Long short-term memory networks maintain long-term memory between sequences by adding a cell state ; At each time step, the long short-term memory network receives three inputs simultaneously: the input at the current moment , the cell state and the hidden layer state at the previous moment ; Long short-term memory networks can effectively handle long-term dependencies in time series data.
7. The aircraft trajectory prediction method based on trajectory clustering and spatio-temporal feature network according to claim 1, characterized in that: The attention mechanism in the trajectory prediction model is used to enhance the influence of key features of the input data, thereby improving the prediction effect of the model. The calculation formula is as follows: ; where q is the state of the hidden layer of the convolutional neural network, is the input data for the i-th time, is the calculated weight value; The final output is obtained by performing a weighted sum of the attention weights and the model input.
Citation Information
Cited By
Multi-target trajectory prediction method and system for security unmanned aerial vehicle
CN121030246A
A security unmanned aerial vehicle multi-target trajectory prediction method and system
CN121030246B