Flight training trajectory generation method fusing attention mechanism
By combining multi-source data fusion and dynamic weight fusion algorithms with AF-LDM and the Performer model, diverse, smooth and continuous flight training trajectories are generated, solving the problems of data scarcity, poor quality and insufficient real-time performance in traditional flight training trajectory generation, and achieving high-quality flight training results.
Patent Information
- Application Number
- CN202511299249.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Traditional flight training trajectory generation technologies suffer from problems such as scarce data, poor quality, insufficient methodological flexibility, poor real-time performance, and lack of smoothness and continuity. They are unable to generate diverse, personalized, and high-quality flight training trajectories, thus failing to meet the needs of high-quality training.
The multi-level feature extraction method includes: acquiring multi-source flight data during flight training, generating fused data through preprocessing, and processing it using a dynamic weighted fusion algorithm and a prediction model based on AF-LDM and Performer to generate diverse, smooth and continuous flight training trajectories.
By using multi-source data fusion and dynamic weight fusion algorithms, data quality and continuity are improved. Combined with the stochastic feature attention mechanism of the Performer model, computational complexity is reduced, enabling the real-time generation of smooth and continuous flight training trajectories, thus improving the stability and safety of training.
Smart Images

Figure CN120805077B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of aviation flight training technology, and specifically relates to a method for generating flight training trajectories by incorporating attention mechanisms. Background Technology
[0002] In the field of aviation flight training, traditional flight training trajectory generation mainly relies on two types of technical solutions: 1. Flight simulator-based solutions: Flight simulators consist of a hardware system (simulated cockpit, flight control equipment, display equipment, etc.) and a software system (flight simulation software). The flight control equipment is connected to the simulated cockpit. Pilot input commands are transmitted through the simulated cockpit to the flight simulation software. The software calculates the flight status based on a preset physical model and weather conditions, and then feeds it back to the display device for display. Each component has a clear division of labor: the simulated cockpit provides the operating environment, the flight control equipment is used for command input, the display device presents the flight status, and the flight simulation software serves as the core for simulating the flight process.
[0003] II. Technical solution based on historical flight data: The process includes data collection (obtaining information such as aircraft position and speed from airlines, training institutions, etc.), storage (storing data in a database), retrieval and analysis (querying and analyzing flight phase parameters as needed), and trajectory generation (selecting or modifying historical trajectories to generate training trajectories).
[0004] Although the above technologies are widely used in flight training trajectory generation, they have significant shortcomings:
[0005] 1. Data scarcity: High-quality historical flight data is limited by sensor costs (e.g., small aircraft lack high-precision sensors due to cost constraints, resulting in data loss) and security and confidentiality requirements (sensitive data is not disclosed), making it difficult to cover all scenarios and special situations;
[0006] 2. Inconsistent data quality: During data collection and storage, sensor failures, transmission errors, and human mistakes can easily introduce outliers. Furthermore, the lack of an effective cleaning and preprocessing mechanism means that low-quality data enters the trajectory generation process, affecting accuracy.
[0007] 3. Insufficient method flexibility: Flight simulators rely on fixed physical models and rules, making it difficult to dynamically adapt to special training scenarios (such as flight performance trajectories); early machine learning methods (such as linear regression) only handle simple linear relationships and cannot cope with complex flight requirements;
[0008] 4. Poor real-time performance of the method: Traditional methods require a lot of computation to generate trajectories (simulating complex flight conditions and considering multiple factors), and complex machine learning algorithms (such as traditional self-attention mechanisms, whose computational complexity increases with the time step) are inefficient in processing large-scale data and cannot meet the requirements of real-time training.
[0009] 5. Insufficient smoothness and continuity of the method: The modeling and data processing do not fully consider the physical characteristics of the trajectory, and simple interpolation to fill missing values can easily lead to abrupt changes in the trajectory; the lack of a smoothing optimization mechanism results in discontinuities and jitter in the generated trajectory, affecting the safety and stability of training.
[0010] The aforementioned deficiencies make it difficult to meet the needs of diverse, personalized, and high-quality flight training trajectories, thus limiting the level of flight training and urgently requiring technological breakthroughs. Summary of the Invention
[0011] To address the aforementioned problems in existing technologies, namely the scarcity and poor quality of data in traditional flight training trajectory generation techniques, as well as insufficient flexibility, poor real-time performance, and lack of smooth continuity, making it difficult to generate diverse, personalized, and high-quality flight training trajectories and thus failing to meet the demands of high-quality training, this invention, in its first aspect, proposes a flight training trajectory generation method incorporating an attention mechanism. This method includes the following steps:
[0012] Step S100: Acquire multi-source flight data during flight training and preprocess it to obtain a flight trajectory dataset;
[0013] Step S200: The flight trajectory dataset is fused using a dynamic weighted fusion algorithm to generate fused data.
[0014] Step S300: The fused data is input into a prediction model based on AF-LDM and Performer for processing to obtain the final predicted flight training trajectory sequence; the prediction model includes, in sequence:
[0015] An encoder based on random feature attention is configured to perform multi-level feature extraction on individual trajectory segments in the fused data, thereby obtaining the latent space representation of each trajectory segment.
[0016] The multi-level feature extraction includes a random feature attention layer, which comprises: integrating a key matrix with real-time aerodynamic parameters to form an extended key matrix; performing random feature mapping on the query and the extended key matrix based on a Gaussian random matrix and random bias to generate a query and key after random feature mapping; and calculating an aerodynamic perception attention score by combining the aerodynamic consistency coefficient; the aerodynamic perception attention score and the value vector are weighted and summed to generate a context-aware feature representation, thereby obtaining the latent space representation of each trajectory segment;
[0017] The decoder is configured to process the latent space representation and noise vector to obtain an initial predicted flight training trajectory sequence; to suppress high-frequency noise by applying a weighted sinc filter function with velocity adaptive cutoff frequency adjustment to the initial predicted flight training trajectory sequence to obtain a preliminary denoised trajectory sequence; and to perform feature enhancement and residual noise filtering on the preliminary denoised trajectory sequence by using nonlinear filtering to obtain the final predicted flight training trajectory sequence.
[0018] The beneficial effects of this invention are:
[0019] 1) By integrating multi-source data (GPS, IMU, flight simulator, historical data) and combining segmented dynamic threshold cleaning, trend constraint interpolation with normalization and smoothing, the limitations of a single data source are overcome and the data quality is improved.
[0020] 2) Aerodynamic parameters are integrated into the attention mechanism to dynamically adjust the score-related physical characteristics; the model generates diverse trajectories on demand to cover special scenarios; multi-dimensional loss constraints solve attitude changes, improve continuity, and meet personalized training needs.
[0021] 3) By leveraging the stochastic feature attention mechanism of the Performer model, the computational complexity of trajectory generation is reduced. Combined with the stable data input of the dynamic weight fusion algorithm in complex scenarios, the trajectory generation speed is improved, and the real-time training requirement is met.
[0022] 4) The velocity adaptive filtering of the AF-LDM model reduces high-frequency jitter in the trajectory, and the attitude angle continuity is improved by combining the attitude and position covariance loss function. The generated trajectory is smooth and continuous and strictly follows the laws of aerodynamics. This fundamentally solves the problems of traditional trajectory jitter and attitude change, and greatly improves the stability and safety of flight training. Attached Figure Description
[0023] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0024] Figure 1 This is a flowchart of the steps of the flight training trajectory generation method that integrates attention mechanism according to the present invention. Detailed Implementation
[0025] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] To more clearly explain the flight training trajectory generation method incorporating the attention mechanism of this invention, the following will be combined with... Figure 1 The steps in the embodiments of the present invention will be described in detail below.
[0028] The flight training trajectory generation method based on the fusion attention mechanism proposed in the first embodiment of this invention is described in [reference needed]. Figure 1 The method includes the following steps:
[0029] Step 1: Acquire multi-source flight data during flight training and preprocess it to obtain a flight trajectory dataset;
[0030] In this embodiment, multi-source flight data is acquired during flight training, including GPS data (providing longitude, latitude, and altitude information), IMU sensor data (providing velocity and acceleration information, in time series format, with each time point containing position, velocity, and acceleration information), flight simulator data (the flight simulator can generate virtual flight trajectory data according to different flight missions and scenarios, used for training and testing models); it also includes historical flight data (a large amount of historical flight data stored by airlines and flight training institutions, which needs to be preprocessed to ensure data quality and consistency). Among them, GPS data and IMU sensor data are collectively referred to as aircraft sensor data. Multi-source data breaks through the limitations of a single data source, expands the data coverage, solves the problem of data scarcity, and enables training data to cover all scenarios of takeoff, cruise, and landing, as well as special flight situations.
[0031] The preprocessing includes data cleaning, normalization, smoothing, and segmentation.
[0032] The data cleaning includes removing abnormal flight data based on segmented dynamic thresholds and filling flight data by interpolation based on flight trend constraints; the former can accurately remove abnormal values introduced by sensor failures, transmission errors, etc., while the latter avoids trajectory abrupt changes caused by simple interpolation. Both work together to improve data quality.
[0033] The method for removing abnormal flight data based on segmented dynamic thresholds is as follows:
[0034] Flight phases are defined by physical constraint thresholds; flight phases include: takeoff ( ),cruise( ),landing( Three stages; the physical constraint threshold for each stage is:
[0035] Takeoff phase: Vertical acceleration gravitational acceleration ,speed ;
[0036] Cruise Phase: Vertical Acceleration ,speed ;
[0037] Landing Phase: Vertical Acceleration ,speed ;
[0038] The mean value of the trajectory parameters is calculated based on data points within the flight phase. and standard deviation ;
[0039] Weights are assigned to each flight phase based on its safety sensitivity. Specifically, takeoff ,cruise ,landing Enhance near-ground security;
[0040] The outlier is calculated based on the mean, the standard deviation, and the weights. The expression is: ,in, The stage weights are s, where s is 1, 2, or 3.
[0041] Outliers are removed based on the aforementioned anomaly level; specifically, when... When this happens, it is considered an outlier;
[0042] The method for interpolating and filling flight data based on flight trend constraints is as follows:
[0043] Based on target time Calculate the average velocity based on the actual velocity at the first G time steps. The displacement increment is obtained by calculating the integral of the average velocity over time. For example, when N=5, , for The actual speed at any given moment (original speed). Meanwhile, to ensure that the fill value conforms to the aircraft's inertia (such as during the cruise phase), The rate of change of the actual filling speed does not exceed )
[0044] The target time The true location of the previous moment Adding the displacement increment to obtain the target time. Filling position Then, interpolation is performed; The expression is:
[0045] ;
[0046] The normalization includes location normalization, specifically, normalizing longitude, latitude, and altitude to... Within the range, let the location be... The minimum position is The maximum position is Then the normalized position for: ;
[0047] The normalization includes velocity normalization, specifically, the velocity... Normalization to Within the range, let the minimum speed be... The maximum speed is Then the normalized velocity for: ;
[0048] The normalization includes acceleration normalization, specifically, normalizing the acceleration... Normalization to Within the range, let the minimum acceleration be... The maximum acceleration is Then the normalized acceleration for: ;
[0049] The smoothing process includes smoothing the trajectory data using a moving average filter, with the moving window size set to [value missing]. The data sequence is The smoothed data for: Among them, the sliding window size It must be an odd number to ensure symmetry, for example: The corresponding window contains ), In order to Centered on the left and right Summing the data within a window of points;
[0050] The segmentation process involves dividing the flight trajectory data into three parts: 70% (training set), 15% (validation set), and 15% (test set).
[0051] Normalization unifies the data scale, and moving average smoothing reduces raw noise. The dataset is split into training / validation / test sets to provide standardized data for model training and further ensure data consistency.
[0052] Based on the positioning standard deviation, the reliability value of the GPS data is obtained through mapping; the specific expression is: In the formula, This represents the reliability value of the GPS data. To determine the standard deviation, such as for urban areas ,but ;
[0053] Based on the rate of change of acceleration, the reliability value of the IMU sensor data is obtained through mapping; the specific expression is: In the formula, The confidence value of the IMU sensor data. The rate of change of acceleration measures the degree of drift in IMU sensor data, such as during steady flight. ,but ;
[0054] Based on the established mapping relationship between the fixed coefficient and the flight simulator data, the fixed coefficient is obtained and used as the reliability value of the flight simulator data. , ;
[0055] The quantification of data source reliability (GPS based on positioning standard deviation, IMU based on acceleration rate of change) provides a basis for subsequent dynamic fusion, ensuring that data reliability assessment can be quantified;
[0056] Step 2: The data in the flight trajectory dataset is fused using a dynamic weighted fusion algorithm to generate fused data. Specifically, the flight trajectory dataset is obtained; the flight trajectory dataset includes GPS data, IMU sensor data, and flight simulator data.
[0057] Based on the reliability values of each data source, dynamic weights are fused from each data source in the flight trajectory dataset to generate fused data; the purpose is to address situations where GPS signals are weak (such as in mountainous areas). ), automatically increase IMU weights (e.g. This ensures data continuity, enables intelligent complementarity of multi-source data, solves the data breakage problem in unstable signal scenarios under traditional fixed-weight fusion, improves data continuity in complex environments, and provides stable input for subsequent trajectory generation. The specific expression is as follows:
[0058] ;
[0059] In the formula, The point in time after fusion Data, These are raw data from GPS, IMU sensor, and flight simulator, respectively.
[0060] Step 3: To address the problems of traditional methods such as "insufficient flexibility (inability to correlate with physical characteristics), poor real-time performance (complex computation), and insufficient smoothness and continuity (trajectory jitter, attitude abrupt changes)," the fused data is input into a prediction model based on AF-LDM and Performer for processing to obtain the final predicted flight training trajectory sequence; the prediction model includes, in sequence:
[0061] The encoder is configured to perform multi-level feature extraction on individual trajectory segments in the fused data, thereby obtaining the latent space representation of each trajectory segment;
[0062] The multi-level feature extraction includes a random feature attention layer, which comprises: integrating a key matrix with real-time aerodynamic parameters to form an extended key matrix; performing random feature mapping on the query and the extended key matrix based on a Gaussian random matrix and random bias to generate a query and key after random feature mapping; and calculating an aerodynamic perception attention score by combining the aerodynamic consistency coefficient; the aerodynamic perception attention score and the value vector are weighted and summed to generate a context-aware feature representation, thereby obtaining the latent space representation of each trajectory segment;
[0063] In this embodiment, the method for obtaining the latent space representation of each trajectory segment is as follows:
[0064] The input layer receives trajectory segments, and the feature dimension of a single trajectory segment is T×F, where T is the time step and F is the number of features;
[0065] A linear transformation of the embedding layer is used to map the feature dimension to the latent space dimension d, and positional encoding is added to obtain a position-enhanced embedding representation;
[0066] Multi-head random feature attention processing is employed to decompose the position-enhanced embedding representation into query (Q), key (K), and value (V), with each head having a dimension of d / 8 (64). The key incorporates real-time aerodynamic parameters, forming a key (K) incorporating these parameters. A Gaussian random matrix is constructed based on the d / 8 dimension. Random feature mapping is then applied to the query (Q) and key (K) based on this Gaussian random matrix and a random bias, generating the randomly feature-mapped query Q and key K, i.e. (K) and (Q), the The dimension of (Q) is T×m; based on the above (K) (Q) and aerodynamic consistency coefficient are used to calculate the aerodynamic perception attention score; the aerodynamic perception attention score and value vector V Perform weighted summation to generate context-aware feature representations;
[0067] The context-aware feature representations of each head in the output layer are concatenated along the feature dimension, linearly transformed, and then the linearly transformed feature representations are residually connected with the position-enhanced embedding representations. Finally, the first normalized feature is obtained through layer normalization.
[0068] A feedforward network is used to sequentially perform linear transformation, ReLU activation processing, and linear transformation on the first normalized feature, and layer normalization is performed after the residual connection of the first normalized feature to obtain the second normalized feature, which is the latent space representation of the trajectory segment.
[0069] The basis of (K) (Q) and the aerodynamic consistency coefficient are used to calculate the aerodynamic perception attention score, which is implemented through the aerodynamic perception attention function, namely:
[0070] ;
[0071] In the formula, The score is given for aerodynamic perception and attention. For querying the matrix, i.e., time points. eigenvectors; The key matrix, i.e., time points. eigenvectors; , All are random feature mapping functions; , For input, including or Output high-dimensional random features. It is a random matrix. ; For random bias, ; This is the aerodynamic consistency coefficient; , They are time points respectively , The lift coefficient, ,in, air density, For wing area, The slope of the lift line;
[0072] The expression for the key that integrates real-time aerodynamic parameters is:
[0073] ;
[0074] In the formula, For time points The drag coefficient, ,in, Zero-lift drag coefficient, It is the induced resistance factor; Angle of attack (real-time measurement, range) ); These are the original eigenvectors of the key matrix;
[0075] The structure of the feedforward network is as follows:
[0076] ;
[0077] in, This is the output of the feedforward network; For network weights; These are bias parameters;
[0078] Thus, the random feature attention mechanism replaces the traditional self-attention mechanism, reducing computational complexity, solving the problem of low efficiency in large-scale time series processing, improving trajectory generation speed, and meeting the needs of real-time training.
[0079] The key vector incorporates real-time aerodynamic parameters (lift coefficient CL, drag coefficient CD, angle of attack α), and combines them with aerodynamic perception attention scores (controlled by λ to attenuate lift differences), enabling trajectory generation to correlate with flight physics characteristics. This solves the problem of insufficient flexibility caused by traditional methods deviating from physical rules and improves the matching degree between the trajectory and actual flight laws.
[0080] The decoder is configured to process the latent space representation and noise vector to obtain an initial predicted flight training trajectory sequence. ;
[0081] In this embodiment, the method for obtaining the initial predicted flight training trajectory sequence is as follows:
[0082] The latent space representation of the encoder output is received at the input layer, and the noise vector introduced by AF-LDM is used.
[0083] A masked multi-head random feature self-attention layer is employed to ensure that the decoder can only acquire and process historical information when generating the trajectory at the current time step. This multi-head mechanism captures local temporal dependencies across different dimensions in parallel, and combined with random feature mapping, achieves efficient computation (adapted to the Performer framework). This layer strictly guarantees this causal relationship by applying a mask during attention calculation, ensuring the temporal causality of trajectory generation. Specifically, in the decoder, the calculation of the self-attention score requires the application of a mask matrix. To achieve causality:
[0084] ;in, This indicates a masked attention mechanism. Indicates the scaling factor. Representing feature dimension, It is a lower triangular matrix, with the portion above its diagonal being negative infinity, making it impossible for the model to focus on future time steps. express and The dot product of the transpose of ;
[0085] As the underlying temporal constraint module of the decoder, its output provides local temporal features filtered by causality for the subsequent cross-attention layer, which is the basis for ensuring the temporal consistency of the trajectory sequence.
[0086] A multi-head random feature cross-attention layer is employed to associate the sequence generated by the decoder with the latent space representation output by the encoder, thereby integrating global contextual information to obtain fused features and preventing trajectory generation from being limited to local temporal sequences and deviating from the global target. Specifically, the cross-attention layer integrates the decoder's query... key with encoder Sum Perform matching (Note that the encoder's internal self-attention only uses its own features K and V as keys and values respectively, and the context is limited to within the module, so no additional "enc" annotation is needed; while the cross-attention here requires the decoder to...) Since the encoder and decoder interact with each other using two key-value pairs ("enc source" and "decoder source"), the encoder key and value are indexed with "enc" to clearly indicate the source of information and avoid confusion with the decoder's key and value. The calculation method is as follows:
[0087] ;
[0088] in, This represents the cross-attention mechanism. Indicates the scaling factor. Representing feature dimension, express and The dot product of the transpose of ;
[0089] This is also achieved through random feature mapping to maintain computational efficiency;
[0090] Based on the local temporal features output by the self-attention layer of the multi-head mask, the global information provided by the encoder is introduced for feature enhancement, which is the key link connecting local temporal generation and global constraints.
[0091] A feedforward network (FFN) is used to perform a nonlinear transformation on the fused features to further refine the feature representation; its structure is the same as that of the feedforward network in the encoder.
[0092] Output layer: Maps the feature representations extracted by the feedforward network to the initially predicted trajectory sequence;
[0093] The random feature mapping function used in the decoder is consistent with that in the encoder, ensuring the consistency of model parameters and computational logic;
[0094] The loss function used in the training process is the same as that used in the encoder, ensuring that the entire model learns under a unified optimization objective;
[0095] The predicted flight training trajectory sequence is subjected to a weighted sinc filter function with adaptive velocity cutoff frequency adjustment to suppress high-frequency noise, resulting in a preliminary denoised trajectory sequence. Then, a nonlinear filter is used to enhance the features and filter residual noise of the preliminary denoised trajectory sequence to obtain the final predicted flight training trajectory sequence.
[0096] The speed adaptive cutoff frequency for:
[0097] ;
[0098] The weighted sinc filter function for:
[0099] ;
[0100] In the formula, This represents the weighted sinc filter function. For the sinc function, its "main lobe" is the range of maximum peak values on both sides of the zero point, representing the passband of the filter. This is the phase term of the sinc function. It is an exponentially decaying term. This is the attenuation coefficient (which increases linearly with the cutoff frequency to suppress the sidelobe energy of the filter). Represents a time variable. Indicates flight speed;
[0101] Fixed ideal sampling filter , ,in Indicates the convolution operation;
[0102] To differentiate the filtering requirements based on flight speed and address the issues of traditional fixed filtering that either over-smooths and loses detail or leaves residual noise, nonlinear filtering is employed for feature enhancement and residual noise filtering. This approach suppresses noise while preserving key signal details. Specifically, a nonlinear activation function is introduced. The nonlinear filtering method is as follows:
[0103] ;
[0104] in, This is a trajectory sequence for initial denoising. The weighted sinc filter function, It is a non-linear activation function. This is the result of nonlinear filtering, i.e., the final predicted flight training trajectory sequence. ;
[0105] Compared with fixed filtering, it reduces high-frequency jitter (such as gust interference) in the trajectory by 42% and improves the retention rate of trajectory details in the low-speed phase (such as takeoff) by 35%;
[0106] The prediction model has the following loss function during training: based on the final predicted flight training trajectory sequence and the actual flight trajectory sequence, the reconstruction loss is calculated using the reconstruction loss function; based on the attitude angle translation constraint, the attitude change loss is calculated using the attitude change loss function; based on the position translation constraint, the attitude change loss is calculated using the position change loss function; and based on the reconstruction loss, the attitude change loss, and the position change loss, the total loss is calculated using the total loss function.
[0107] In this embodiment, the loss function expression is:
[0108] ;
[0109] ;
[0110] ;
[0111] ;
[0112] in, Indicates the total loss. Indicates attitude change loss. Indicates positional variation loss. Indicates the reconstruction loss. The position-dependent weight can be 0.5. For attitude-dependent weighting, since attitude has a greater impact on flight safety, its weight is higher, which can be 0.8. For the final predicted flight training trajectory sequence, This is a sequence of actual flight trajectories. To account for the error in the full-time trajectory calculation, This represents the total number of time steps for calculating the full-time trajectory. For a moment The attitude angle sequence, , For pitch angle, For roll angle, For heading angle, For attitude translation operation, ,in, For attitude increment, , First of all Perform translation operation Perform translation, then pass through the decoder Output trajectory features, First, the decoder is used to ensure that the attitude angles remain consistent after translation, such as pitch angle translation. The decoder output should also be offset synchronously. Output the trajectory features, and then perform a translation operation on the trajectory features. For the first position sequence The translation operation is performed to perform the translation, and the trajectory features are then output by the decoder. The trajectory features are first output by the decoder, and then a translation operation is performed on the trajectory features. The square of the Euclidean distance;
[0113] Reconstruction loss ensures overall trajectory accuracy, while attitude / position covariance loss constrains the continuity of attitude angles and position, solving the problem of "smooth position but abrupt attitude changes" in traditional loss, improving attitude angle continuity by 57%, and significantly enhancing the smoothness and physical safety of the generated trajectory.
[0114] The gradient descent method is used to calculate the gradient between the total loss and the parameters of the prediction model, and the parameters of the prediction model are updated based on the gradient. ,in It's the learning rate. For model parameters, It is the gradient of the total loss function with respect to the model parameters;
[0115] This also includes evaluating the performance of the prediction model on the validation set and tuning hyperparameters (such as learning rate, weights). (etc.) to optimize model performance; evaluate the final performance of the model on the test set to ensure the model's generalization ability;
[0116] Integrating the trained model into the flight training system provides pilots with diverse training scenarios, generates flight trajectories in real time, improves the flexibility and efficiency of training, and solves the problem that traditional simulators have fixed rules and are difficult to adapt to personalized training.
[0117] In summary, multi-source data preprocessing addresses the issues of data scarcity and quality, dynamic fusion ensures data continuity, and the Performer and AF-LDM models overcome bottlenecks in real-time performance, flexibility, and smoothness. Ultimately, this achieves the technical goal of "generating diverse, smooth, continuous, and physically consistent real-time flight trajectories on demand," providing high-quality data support and efficient generation capabilities for flight training.
[0118] Although the steps in the above embodiments are described in the above order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not need to be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order. These simple variations are all within the protection scope of this invention.
[0119] The flight training trajectory generation system based on the fusion attention mechanism of the second embodiment of the present invention includes: a multi-source data acquisition module, configured to acquire multi-source flight data during flight training and obtain a flight trajectory dataset after preprocessing;
[0120] The dynamic fusion module is configured to use a dynamic weighted fusion algorithm to fuse the centralized data of the flight trajectory dataset to generate fused data;
[0121] A prediction model module is configured to input the fused data into a prediction model for processing, wherein the prediction model comprises, in sequence:
[0122] The encoder is configured to perform multi-level feature extraction on individual trajectory segments in the fused data, thereby obtaining the latent space representation of each trajectory segment;
[0123] The multi-level feature extraction includes a random feature attention layer, which includes: integrating a key matrix with real-time aerodynamic parameters to form an extended key matrix; performing random feature mapping on the query and the extended key matrix based on a Gaussian random matrix and random bias to generate a query and key after random feature mapping; and calculating an aerodynamic perception attention score by combining the aerodynamic consistency coefficient; the aerodynamic perception attention score is weighted and summed to generate a context-aware feature representation.
[0124] The decoder is configured to process the latent space representation and noise vector to obtain a sequence of predicted flight training trajectories;
[0125] The AF-LDM model is configured to perform velocity adaptive cutoff frequency adjustment on the predicted flight training trajectory sequence and use a weighted sinc filter function to suppress high-frequency noise to obtain the final predicted flight training trajectory sequence.
[0126] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the system described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0127] It should be noted that the flight training trajectory generation system with fused attention mechanism provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the various modules or steps and are not considered as an improper limitation of the present invention.
[0128] An electronic device according to a third embodiment of the present invention includes: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to implement the flight training trajectory generation method of the fusion attention mechanism described above.
[0129] A fourth embodiment of the present invention provides a computer-readable storage medium storing computer instructions, which are executed by the computer to implement the flight training trajectory generation method of the fusion attention mechanism described above.
[0130] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. The programs corresponding to the software modules and method steps can be placed in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the invention.
[0131] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.
[0132] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.
[0133] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A method for generating flight training trajectories by incorporating attention mechanisms, characterized in that, The method includes the following steps: Step S100: Acquire multi-source flight data during flight training and preprocess it to obtain a flight trajectory dataset; Step S200: The flight trajectory dataset is fused using a dynamic weighted fusion algorithm to generate fused data. Step S300: The fused data is input into a prediction model based on AF-LDM and Performer for processing to obtain the final predicted flight training trajectory sequence; the prediction model includes, in sequence: An encoder based on random feature attention is configured to perform multi-level feature extraction on individual trajectory segments in the fused data, thereby obtaining the latent space representation of each trajectory segment. The multi-level feature extraction includes a random feature attention layer, which comprises: integrating a key matrix with real-time aerodynamic parameters to form an extended key matrix; performing random feature mapping on the query and the extended key matrix based on a Gaussian random matrix and random bias to generate a query and key after random feature mapping; and calculating an aerodynamic perception attention score by combining the aerodynamic consistency coefficient; the aerodynamic perception attention score and the value vector are weighted and summed to generate a context-aware feature representation, thereby obtaining the latent space representation of each trajectory segment; The decoder is configured to process the latent space representation and noise vector to obtain an initial predicted flight training trajectory sequence; to suppress high-frequency noise by applying a weighted sinc filter function with velocity adaptive cutoff frequency adjustment to the initial predicted flight training trajectory sequence to obtain a preliminary denoised trajectory sequence; and to perform feature enhancement and residual noise filtering on the preliminary denoised trajectory sequence by using nonlinear filtering to obtain the final predicted flight training trajectory sequence.
2. The flight training trajectory generation method based on the fusion attention mechanism according to claim 1, characterized in that, The loss function of the prediction model during training is: ; ; ; ; in, Indicates the total loss. Indicates attitude change loss. Indicates positional variation loss. Indicates the reconstruction loss. For position-variable weights, For attitude-variable weights, For the final predicted flight training trajectory sequence, This is a sequence of actual flight trajectories. This represents the total number of time steps for calculating the full-time trajectory. For a moment The attitude angle sequence, , The pitch angle, For roll angle, For heading angle, For attitude translation operation, , For attitude increment, , First of all Perform translation operation Perform translation, then pass through the decoder Output trajectory features, First through the decoder Output the trajectory features, and then perform a translation operation on the trajectory features. For the first position sequence The translation operation is performed to perform the translation, and the trajectory features are then output by the decoder. The trajectory features are first output by the decoder, and then a translation operation is performed on the trajectory features. It is the square of the Euclidean distance.
3. The flight training trajectory generation method incorporating an attention mechanism according to claim 1, characterized in that, The preprocessing includes data cleaning, normalization, smoothing, and segmentation.
4. The flight training trajectory generation method incorporating an attention mechanism according to claim 3, characterized in that, The data cleaning includes removing abnormal flight data based on segmented dynamic thresholds and filling flight data by interpolation based on flight trend constraints; The method for removing abnormal flight data based on segmented dynamic thresholds: Flight phases are defined by physical constraint thresholds; the mean and standard deviation of trajectory parameters are calculated based on data points within the flight phase range. The weights for each flight phase are assigned based on the phase's safety sensitivity. Anomaly score is calculated based on the mean, the standard deviation, and the weights for each flight phase; outliers are removed based on the anomaly score. The flight data is filled using interpolation based on flight trend constraints: Based on the actual velocity of the G time steps prior to the target time, the average velocity is calculated, and the integral of the average velocity over time is calculated to obtain the displacement increment. The actual position of the previous time step of the target time step is added to the displacement increment to obtain the filled position of the target time step, and then interpolation filling is performed.
5. The flight training trajectory generation method incorporating an attention mechanism according to claim 1, characterized in that, The method for obtaining the latent space representation of each trajectory segment is as follows: The input layer receives trajectory segments, and the feature dimension of a single trajectory segment is T×F, where T is the time step and F is the number of features; A linear transformation of the embedding layer is used to map the feature dimension to the latent space dimension d, and positional encoding is added to obtain a position-enhanced embedding representation; A stochastic feature attention layer is employed to decompose the position-enhanced embedding representation into query Q, key K, and value V, each with a head dimension of d / 8. Key K incorporates real-time aerodynamic parameters, forming a key incorporating these parameters. A Gaussian random matrix is constructed based on the d / 8 dimension. Random feature mapping is then applied to query Q and key K using this Gaussian random matrix and a random bias, generating randomly feature-mapped query Q and key K. An aerodynamic perception attention score is calculated based on the randomly feature-mapped query Q, key K, and aerodynamic consistency coefficient. Finally, a weighted sum of the aerodynamic perception attention score and the value vector V is performed to generate a context-aware feature representation. The context-aware feature representations of each head are concatenated along the feature dimension. The concatenated feature representations are then linearly transformed. The linearly transformed feature representations are residually connected with the position-enhanced embedding representations. Finally, the first normalized feature is obtained through layer normalization. A feedforward network is used to sequentially perform linear transformation, ReLU activation processing, and linear transformation on the first normalized feature. After the residual connection of the first normalized feature, layer normalization is performed to obtain the second normalized feature, which is the latent space representation of the trajectory segment.
6. The flight training trajectory generation method incorporating an attention mechanism according to claim 5, characterized in that, The aerodynamic perception attention score is calculated based on the query Q, key K, and aerodynamic consistency coefficient after the random feature mapping. The method is as follows: ; In the formula, The score is given for aerodynamic perception and attention. For querying the matrix, i.e., time points. eigenvectors; The key matrix, i.e., time points. eigenvectors; , All are random feature mapping functions; , For input, including or Output high-dimensional random features. It is a random matrix; For random bias; This is the aerodynamic consistency coefficient; , They are time points respectively , The lift coefficient; The expression for the key that integrates real-time aerodynamic parameters is: ; In the formula, For time points The drag coefficient; Angle of attack; represents the original eigenvectors of the key matrix.
7. The flight training trajectory generation method incorporating an attention mechanism according to claim 5, characterized in that, The structure of the feedforward network is as follows: ; in, This is the output of the feedforward network; For network weights; This is the bias parameter.
8. The flight training trajectory generation method based on the fusion attention mechanism according to claim 1, characterized in that, The weighted sinc filter function is: ; In the formula, This represents the weighted sinc filter function. For the sinc function, This is the phase term of the sinc function. It is an exponentially decaying term. The attenuation coefficient is... This indicates the speed-adaptive cutoff frequency, which is set according to the speed. Represents a time variable. Indicates flight speed.
9. The flight training trajectory generation method based on the fusion attention mechanism according to claim 1, characterized in that, The flight trajectory dataset is fused using a dynamic weighted fusion algorithm to generate fused data. The method is as follows: Obtain the flight trajectory dataset; the flight trajectory dataset includes GPS data, IMU sensor data, and flight simulator data; Based on the positioning standard deviation, the reliability value of the GPS data is obtained through mapping. Based on the rate of change of acceleration, the reliability value of the IMU sensor data is obtained through mapping. Based on the mapping relationship between the set fixed coefficient and the flight simulator data, the fixed coefficient is obtained and used as the credibility value of the flight simulator data; Based on the credibility values of each data source, dynamic weights are fused from each data source in the flight trajectory dataset to generate fused data.
10. The flight training trajectory generation method incorporating an attention mechanism according to claim 8, characterized in that, The nonlinear filtering method is as follows: ; in, This is a trajectory sequence for initial denoising. The weighted sinc filter function, It is a non-linear activation function. This is the result of nonlinear filtering, i.e., the final predicted flight training trajectory sequence. .
Citation Information
Patent Citations
Aircraft trajectory prediction model training method and aircraft trajectory prediction method
CN118520249A
Aircraft trajectory prediction method based on space-time attention and dynamic optimization bidirectional LSTM
CN120412334A