Flight training trajectory generation method fusing attention mechanism
Through multi-source data fusion and Performer model, combined with random feature attention mechanism and speed adaptive filtering, the data scarcity and smoothness problems in traditional flight training trajectory generation are solved, and real-time, diversified, smooth and continuous flight training trajectory generation is achieved, which improves the stability and safety of training.
Patent Information
- Application Number
- CN202511299249.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Traditional flight training trajectory generation technology has problems such as data scarcity, poor quality, insufficient method flexibility, poor real-time performance, and lack of smooth continuity. It is difficult to generate diversified, personalized and high-quality flight training trajectories, and cannot meet the needs of high-quality training.
Multi-source data fusion, dynamic weight fusion algorithm and prediction model based on AF-LDM and Performer are adopted, combined with random feature attention mechanism and speed adaptive filtering to generate diversified, smooth and continuous flight training trajectories.
Improve data quality through multi-source data fusion, dynamically adjust trajectory generation, reduce computational complexity, achieve real-time, diversified, smooth and continuous flight training trajectories, and improve training stability and safety.
Smart Images

Figure CN120805077A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of aviation flight training, and particularly relates to a flight training trajectory generation method fusing an attention mechanism. BACKGROUND
[0002] In the field of aviation flight training, traditional flight training trajectory generation mainly relies on two technical solutions: 1. A technical solution based on a flight simulator: The flight simulator is composed of a hardware system (a 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, the pilot inputs instructions through the simulated cockpit to the flight simulation software, the software calculates the flight state according to the preset physical model and weather conditions, and then feeds back to the display equipment for display. The components have clear division of labor, the simulated cockpit provides the operating environment, the flight control equipment is used for instruction input, the display equipment presents the flight state, and the flight simulation software simulates the flight process as the core.
[0003] 2. A technical solution based on historical flight data: The process includes data collection (obtaining aircraft position, speed, etc. from airlines, training institutions, etc.), storage (storing data into a database), retrieval and analysis (querying and analyzing flight phase parameters on demand), 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, there are significant shortcomings: 1. Data scarcity: High-quality historical flight data is limited by sensor costs (such as small aircrafts lacking high-precision sensors due to cost constraints) and security requirements (sensitive data is not publicly disclosed), making it difficult to cover all scenarios and special cases; 2. Data quality is uneven: In data collection and storage, sensor failures, transmission errors, and human errors can easily introduce outliers, and there is a lack of effective cleaning and preprocessing mechanisms, so low-quality data enters the trajectory generation process, affecting accuracy; 3. Lack of 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 handle complex flight requirements; 4. Poor method real-time performance: Traditional methods generate trajectories requiring a large amount of calculation (simulating complex flight states considering multiple factors), and complex machine learning algorithms (such as traditional self-attention mechanisms, with increasing computational complexity with time steps) have low efficiency in processing large-scale data, making it difficult to meet real-time training requirements; 5, Method smoothness and continuity is not enough: modeling and data processing does not fully consider the physical characteristics of the trajectory, simple interpolation to fill in missing values is easy to cause trajectory mutation; Lack of smoothing optimization mechanism, the generated trajectory has discontinuity and jitter problem, affecting the safety and stability of training.
[0005] The above defects make it difficult to meet the demand of diversified, personalized and high-quality flight training trajectory, limit the level of flight training, and urgently need technical breakthrough. SUMMARY
[0006] In order to solve the above problems in the prior art, that is, the traditional flight training trajectory generation technical scheme has the problems of data scarcity and poor quality, and the method has insufficient flexibility, poor real-time performance, and lack of smooth continuity, it is difficult to generate diversified, personalized and high-quality flight training trajectory, and cannot meet the demand of high-quality training. To solve the problem, the first aspect of the present application provides a flight training trajectory generation method fusing attention mechanism, which comprises the following steps: Step S100, obtaining multi-source flight data in the flight training process, and obtaining flight trajectory data set after preprocessing; Step S200, using a dynamic weight fusion algorithm to fuse the data in the flight trajectory data set to generate fusion data; Step S300, inputting the fusion data into a prediction model based on AF-LDM and Performer for processing to obtain a final predicted flight training trajectory sequence; the prediction model comprises in sequence; An encoder based on random feature attention is configured to perform multi-level feature extraction on a single trajectory segment in the fusion data, thereby obtaining a latent space representation of each trajectory segment; The multi-level feature extraction includes a random feature attention layer, which includes: an extended key matrix formed by integrating a key matrix with real-time aerodynamic parameters, random feature mapping of a query and the extended key matrix based on a Gaussian random matrix and a random bias, generation of the query and the key after random feature mapping, and calculation of aerodynamic perception attention score combined with an aerodynamic consistency coefficient; The aerodynamic perception attention score and the value vector are weighted and summed to generate a context-aware feature representation, and then the latent space representation of each trajectory segment is obtained; A decoder is configured to process the latent space representation and a noise vector to obtain an initial predicted flight training trajectory sequence; a weighted sinc filtering function with speed adaptive cutoff frequency adjustment is used to suppress high-frequency noise of the initial predicted flight training trajectory sequence to obtain a preliminary denoised trajectory sequence, and a nonlinear filter is used to enhance the features of the preliminary denoised trajectory sequence and filter residual noise to obtain the final predicted flight training trajectory sequence.
[0007] The present application has the following advantages: 1) Break through the limitations of single data source and improve data quality through multi-source data fusion (GPS, IMU, flight simulator, historical data) and segmented dynamic threshold cleaning, trend constraint interpolation combined with normalization and smoothing processing; 2) The aerodynamic parameters are integrated into the attention mechanism, which dynamically adjusts the score correlation with physical characteristics; the model generates diversified trajectories on demand, covering special scenarios; multi-dimensional loss constraints solve the attitude mutation, improve the continuity, and meet the personalized training needs; 3) With the random feature attention mechanism of the Performer model, the computational complexity of trajectory generation is reduced, and the stable data input in complex scenarios is combined with the dynamic weight fusion algorithm to improve the speed of trajectory generation, realizing the real-time training requirement; 4) The speed adaptive filtering of the AF-LDM model reduces the high-frequency jitter of the trajectory, and the co-variant loss function of the attitude and position improves the continuity of the attitude angle, so that the generated trajectory is smooth and continuous and strictly follows the aerodynamic physical law, fundamentally solving the problems of traditional trajectory jitter and attitude mutation, and greatly improving the stability and safety of flight training. BRIEF DESCRIPTION OF DRAWINGS
[0008] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings: Figure 1 is a step flow chart of the flight training trajectory generation method of the present application. DETAILED DESCRIPTION
[0009] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are only intended to explain the related application, and not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for ease of description.
[0010] It should be noted that the embodiments and features in the embodiments in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0011] In order to more clearly illustrate the flight training trajectory generation method of the present application, the following will be combined with Figure 1 The steps in the embodiments of the present application will be described in detail.
[0012] The flight training trajectory generation method of the present application with fusion attention mechanism proposed in the first embodiment, see Figure 1 , the method comprises the following steps: Step 1, obtaining multi-source flight data in the flight training process, and obtaining flight trajectory data set after pre-processing; In this embodiment, multi-source flight data in the flight training process is acquired, including GPS data (providing longitude, latitude and height information), IMU sensor data (providing speed and acceleration information, the data format is time series, and each time point contains position, speed and acceleration information), flight simulator data (the flight simulator can generate virtual flight trajectory data according to different flight tasks and scenes, which is used for training and testing the model), and historical flight data (a large amount of historical flight data saved by airlines and flight training institutions, which needs to be preprocessed to ensure data quality and consistency), wherein the GPS data and the IMU sensor data are collectively referred to as aircraft sensor data. The multi-source data breaks through the limitation of a single data source, expands the data coverage range, solves the problem of data scarcity, and enables the training data to cover the whole scene of take-off, cruising and landing, and special flight conditions. The preprocessing includes data cleaning, normalization, smoothing processing and segmentation processing. The data cleaning includes removing abnormal flight data based on segmented dynamic threshold and filling flight data based on flight trend constraint interpolation; the former can accurately remove abnormal values introduced by sensor failure, transmission error, etc., and the latter avoids trajectory mutation caused by simple interpolation, and both of them improve the data quality. The method for removing abnormal flight data based on segmented dynamic threshold is as follows: The flight phases are divided by physical constraint threshold; the flight phases include: take-off ( ), cruising ( ), and landing ( ); the physical constraint threshold of each phase is: Take-off phase: vertical acceleration , gravity acceleration , and speed ; Cruising phase: vertical acceleration , and speed ; Landing phase: vertical acceleration , and speed ; Based on the data points in the flight phase range, the mean value and the standard deviation of the trajectory parameters are calculated; The weight of each flight phase is assigned according to the phase safety sensitivity ; specifically, take-off , cruising , and landing , which strengthens the near-ground safety; The abnormality degree is calculated based on the mean value, the standard deviation and the weight ; the expression is: ,in, is the stage weight, s is 1, 2, 3; Remove outliers based on the degree of abnormality; specifically, when When , it is determined to be an abnormal value; The method of filling the flight data based on the flight trend constraint interpolation is as follows: Based on target time The actual speed of the first G moments, calculate the average speed , and calculate the integral of the average velocity over time to obtain the displacement increment ; For example, when N=5, , for The real speed at the moment (original speed), At the same time, in order to ensure that the filling value is consistent with the inertia of the aircraft, (such as the cruise phase, The rate of change of the actual filling speed does not exceed ) The target time The real position of the previous moment Added to the displacement increment, the target time is obtained Filling position , and then interpolation is performed; The expression is: ; The normalization includes position normalization, specifically, normalizing longitude, latitude and altitude to In the range, let the position be , the minimum position is , the maximum position is , then the normalized position for: ; The normalization includes speed normalization, specifically the speed Normalized to In the range, the minimum speed is set to , the maximum speed is , then the normalized speed for: ; The normalization includes acceleration normalization. Specifically, the acceleration Normalized to In the range, the minimum acceleration is , the maximum acceleration is , then the normalized acceleration for: ; The smoothing processing includes smoothing the trajectory data using a sliding average filter, and a sliding window size is set as , the data sequence is , and the smoothed data is , wherein the sliding window size must be an odd number to ensure symmetry, for example , the corresponding window contains , and is the sum of data in a window with as the center and points on the left and right; The segmentation processing includes segmenting the flight trajectory data according to a ratio of 70% (training set), 15% (validation set), and 15% (test set); The normalization unifies the data scale, the sliding average smoothing processing reduces the original noise, the segmented data set is the training / validation / test set, and the standardized data is provided for model training, further ensuring data consistency; Based on the positioning standard deviation, the reliability value of the GPS data is obtained through mapping, and the specific expression is , wherein is the reliability value of the GPS data, is the positioning standard deviation, for example, in a city area , then ; Based on the acceleration change rate, the reliability value of the IMU sensor data is obtained through mapping, and the specific expression is , wherein is the reliability value of the IMU sensor data, is the acceleration change rate, which measures the drift degree of the IMU sensor data, for example, when flying smoothly , then ; According to the mapping relationship between the set fixed coefficient and the flight simulator data, the fixed coefficient is obtained as the reliability value of the flight simulator data ; ; The data source reliability quantification (GPS based on positioning standard deviation, IMU based on acceleration change rate) provides a basis for subsequent dynamic fusion and ensures the quantification of data reliability evaluation; Step 2, a dynamic weight fusion algorithm is used to fuse the data in the flight trajectory data set to generate fused data, specifically, the flight trajectory data set is obtained; the flight trajectory data set includes GPS data, IMU sensor data, and flight simulator data; Based on the credibility value of each data source, the data sources in the flight trajectory data set are dynamically weighted and fused to generate fused data; the purpose is to generate fused data when the GPS signal is weak (such as in mountainous areas). ), automatically increase the IMU weight (such as ), ensure data continuity, realize intelligent complementarity of multi-source data, solve the data fragmentation problem of traditional fixed weight fusion in signal unstable scenarios, improve data continuity in complex environments, and provide stable input for subsequent trajectory generation. The specific expression is: ; Where, The time point after fusion data, They are the raw data of GPS data, IMU sensor data, and flight simulator data; Step 3: To address the issues of traditional methods such as "lack of flexibility (inability to correlate physical properties), poor real-time performance (complex calculations), and lack of smoothness and continuity (trajectory jitter, sudden attitude 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: an encoder configured to perform multi-level feature extraction on individual trajectory segments in the fused data to obtain a latent space representation of each trajectory segment; The multi-level feature extraction includes a random feature attention layer, which includes: integrating a key matrix into 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 a random bias, generating a query and key after random feature mapping, and calculating an aerodynamic perception attention score in combination with an aerodynamic consistency coefficient; performing a weighted summation of the aerodynamic perception attention score and the value vector to generate a context-aware feature representation, thereby obtaining a latent space representation of each trajectory segment; In this embodiment, 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; The embedding layer linear transformation is used to map the feature dimension to the latent space dimension d, and position encoding is added to obtain a position-enhanced embedding representation; The position-enhanced embedding representation is split into query (Q), key (K) and value (V) by adopting multi-head random feature attention processing, each head dimension being d / 8 (64), wherein the key is integrated into real-time aerodynamic parameters to form a key (K) integrated into real-time aerodynamic parameters; a Gaussian random matrix is constructed based on the d / 8 dimension, and the query (Q) and the key (K) are respectively subjected to random feature mapping based on the Gaussian random matrix and a random bias, to generate the query Q and the key K after random feature mapping, that is (K) and (Q), the dimensions of the (Q) are both T x m; the aerodynamic perception attention score is calculated based on the (K), (Q) and the aerodynamic consistency coefficient; the aerodynamic perception attention score and the value vector V are weighted and summed to generate a context-perceived feature representation; The context-perceived feature representations of each head of the output layer are spliced along the feature dimension, linearly transformed, and the linearly transformed feature representation is connected in residual with the position-enhanced embedding representation, and then layer normalization processing is performed to obtain a first normalized feature; The first normalized feature is sequentially subjected to linear transformation, ReLU activation processing and linear transformation by the feedforward network, and layer normalization is performed after the first normalized feature is connected in residual to obtain a second normalized feature, that is, a latent space representation of the trajectory segment; The aerodynamic perception attention score is calculated based on the (K), (Q) and the aerodynamic consistency coefficient, which is realized by an aerodynamic perception attention function, and the aerodynamic perception attention function is: ; In the formula, is the aerodynamic perception attention score, is a query matrix, that is, a feature vector at time point ; is a key matrix, that is, a feature vector at time point ; , are random feature mapping functions; , is an input, including or , and outputs a high-dimensional random feature, is a random matrix, ; is a random bias, ; is an aerodynamic consistency coefficient; , are time points , lift coefficient, wherein, is air density, is wing area, is lift line slope; The expression of the key formed by integrating real-time aerodynamic parameters is: ; In the formula, is the drag coefficient at the time point , wherein, is the zero-lift drag coefficient, is the induced drag factor; is the angle of attack (real-time measurement value, range ); is the original eigenvector of the key matrix; The structure of the feedforward network is: ; wherein, is the output of the feedforward network; is the weight of the network; is the bias parameter; In this way, the random feature attention mechanism replaces the traditional self-attention, reduces the computational complexity, solves the problem of low efficiency in large-scale time series processing, improves the trajectory generation speed, and meets the real-time training demand; The key vector integrates real-time aerodynamic parameters (lift coefficient CL, drag coefficient CD, angle of attack a), and combines the aerodynamic perception attention score (the lift difference attenuation is controlled through l) to make the trajectory generation related to the physical characteristics of flight, solve the problem of insufficient flexibility caused by the traditional method deviating from the physical rules, and improve the matching degree of the trajectory and the actual flight rule; The decoder is configured to process the latent space representation and the noise vector to obtain an initial predicted flight training trajectory sequence ; In this embodiment, the initial predicted flight training trajectory sequence is obtained by the following method: The input layer receives the latent space representation output by the encoder and the noise vector introduced by the AF-LDM; The Masked Multi-Head Random Feature Self-Attention is used to generate the current time step trajectory, so that the decoder can only obtain and process historical information, capture different dimensional local time sequence dependency relationships in parallel through the multi-head mechanism, and realize efficient calculation (adapt to the Performer framework) in combination with random feature mapping; the layer strictly guarantees this causal relationship by applying a mask in attention calculation, ensures the time sequence causality of trajectory generation, specifically, in the decoder, the calculation of self-attention scores needs to apply a mask matrix to realize causality: ; wherein, represents a mask attention mechanism, represents a scaling factor, represents a feature dimension, is a lower triangular matrix, the part above the diagonal is negative infinity, so that the model cannot pay attention to future time steps, represents and transpose dot product; As the bottom layer of the decoder, the output of the time sequence constraint module provides local time sequence features filtered by causal relationship for the subsequent cross-attention layer, and is the basis for ensuring the time consistency of the trajectory sequence; The Multi-Head Random Feature Cross-Attention is used to associate the sequence generated by the decoder with the latent space representation output by the encoder, integrate global context information, obtain fusion features, and avoid the trajectory generation being limited to local time sequence and deviating from the global goal; specifically, the cross-attention matches the decoder query with the encoder key and value (in this description, the encoder internal self-attention only uses its own features K and V as keys and values, and the context is limited within the module, without additional annotation “enc”; and the cross-attention needs to let the decoder interact with the “encoder source” and “decoder source” two types of keys and values, so the encoder keys and values are marked with “enc” subscript to clearly indicate the information source and avoid confusion with the decoder K and V), and the calculation method is: ; wherein, represents a cross-attention mechanism, represents a scaling factor, represents a feature dimension, represents and The transposed dot product of This is also achieved through random feature mapping to maintain computational efficiency; Based on the local temporal features output by the multi-head masked self-attention layer, the global information provided by the encoder is introduced for feature enhancement, which is the key link between local temporal generation and global constraints. Adopting a feedforward network (FFN): Performing nonlinear transformation on the fused features to further refine the feature expression; the structure is the same as the feedforward network structure in the encoder; Output layer: maps the feature expression extracted by the feedforward network into the initial predicted trajectory sequence; The random feature mapping function used in the decoder is consistent with that used in the encoder to ensure the consistency of model parameters and calculation logic. The loss function used in the training process is the same as that used by the encoder, ensuring that the entire model learns under a unified optimization objective; A weighted sinc filter function with speed adaptive cutoff frequency adjustment is applied to the predicted flight training trajectory sequence to suppress high-frequency noise, thereby obtaining a preliminary denoised trajectory sequence; and a nonlinear filter is used to perform feature enhancement and residual noise filtering on the preliminary denoised trajectory sequence, thereby obtaining a final predicted flight training trajectory sequence. The speed adaptive cutoff frequency for: ; The weighted sinc filter function for: ; Where, represents the weighted sinc filter function, For the sinc function, its "main lobe" is the maximum peak range of the function on both sides of the zero point, representing the passband of the filter. is the phase term of the sinc function, is an exponential decay term, is the attenuation coefficient (increases linearly with the cutoff frequency, suppressing the filter sidelobe energy), represents the time variable, Indicates flight speed; Fixed ideal sampling filter , ,in Represents the convolution operation; In order to distinguish the differences in filtering requirements for flight speed and solve the problem of traditional fixed filtering of "either over-smoothing and loss of details or residual noise", nonlinear filtering is used to enhance features and filter residual noise, which can suppress noise while retaining key signal details. Specifically, a nonlinear activation function is introduced. , the nonlinear filtering, a method thereof is: ; wherein, is a preliminary denoised trajectory sequence, is a weighted sinc filter function, is a nonlinear activation function, is a nonlinear filtering result, i.e., a final predicted flight training trajectory sequence ; The fixed filtering reduces the trajectory high-frequency jitter (such as wind disturbance) by 42%, and the trajectory detail retention rate in the low-speed stage (such as take-off) is increased by 35%; The loss function of the prediction model during training is: based on the final predicted flight training trajectory sequence and the real flight trajectory sequence, a reconstruction loss is calculated by a reconstruction loss function; based on the attitude angle translation constraint, an attitude homomorphism loss is calculated by an attitude homomorphism loss function; based on the position translation constraint, an attitude homomorphism loss is calculated by a position homomorphism loss function; based on the reconstruction loss, the attitude homomorphism loss and the position homomorphism loss, a total loss is calculated by a total loss function; In this embodiment, the loss function expression is: ; ; ; ; wherein, represents the total loss, represents the attitude homomorphism loss, represents the position homomorphism loss, represents the reconstruction loss, is a position homomorphism weight, which can be 0.5, is an attitude homomorphism weight, the attitude has a greater impact on flight safety, and the weight is higher, which can be 0.8, is a final predicted flight training trajectory sequence, is a real flight trajectory sequence, is a full-time trajectory calculation error, represents the total number of time steps of the full-time trajectory calculation, is an attitude angle sequence at time , , is a pitch angle, is a roll angle, is a heading angle, is an attitude translation operation, wherein, is an attitude increment, , Firstly, the translation operation is performed on the position sequence The translation operation is performed on the position sequence The translation operation is performed on the position sequence The translation operation is performed on the position sequence Firstly, the translation operation is performed on the position sequence Firstly, the translation operation is performed on the position sequence Firstly, the translation operation is performed on the position sequence Firstly, the translation operation is performed on the position sequence Firstly, the translation operation is performed on the position sequence Firstly, the translation operation is performed on the position sequence The Euclidean distance is squared. The reconstruction loss ensures the overall accuracy of the trajectory, and the pose / position homogeneity loss constrains the continuity of the pose angle and the position, solving the traditional loss problem of "smooth position but sudden pose", and improving the continuity of the pose angle by 57%, significantly enhancing the smoothness and physical safety of the generated trajectory. The gradient of the total loss and the parameters of the prediction model is calculated using the gradient descent method, and the parameters of the prediction model are updated based on the gradient. wherein is the learning rate, is the model parameter, is the gradient of the total loss function with respect to the model parameter. It also includes evaluating the performance of the prediction model on the validation set, adjusting hyperparameters (such as learning rate, weight , etc.) to optimize the model performance; evaluating the final performance of the model on the test set to ensure the generalization ability of the model. The trained model is integrated into the flight training system to provide diverse training scenarios for pilots, generate flight trajectories in real time, improve the flexibility and efficiency of training, and solve the problem of fixed rules in traditional simulators that are difficult to adapt to personalized training. In summary, through multi-source data preprocessing, the data scarcity and quality problems are solved, the dynamic fusion ensures the continuity of the data, and the Performer and AF-LDM models break through the bottlenecks of real-time, flexibility, and smoothness, ultimately achieving 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 capability for flight training.
[0013] Although each step is described in the above-described order in the above-described embodiments, it can be understood by those skilled in the art that, in order to achieve the effect of the embodiments, the different steps do not have to be executed in such an order, and can be executed simultaneously (in parallel) or in a reversed order, and these simple changes are within the protection scope of the present application.
[0014] The flight training trajectory generation system of the second embodiment of the application fuses attention mechanisms, and comprises: a multi-source data acquisition module configured to acquire multi-source flight data in a flight training process and obtain a flight trajectory data set through preprocessing; A dynamic fusion module configured to fuse data in the flight trajectory data set by using a dynamic weight fusion algorithm to generate fused data; A prediction model module configured to input the fused data into a prediction model for processing, wherein the prediction model comprises, in sequence: An encoder configured to perform multi-level feature extraction on a single trajectory segment in the fused data, and further obtain a latent space representation of each trajectory segment; The multi-level feature extraction comprises a random feature attention layer, and the random feature attention layer comprises: an extended key matrix formed by integrating a key matrix with real-time aerodynamic parameters, random feature mapping of a query and the extended key matrix based on a Gaussian random matrix and a random bias, generation of a query and a key after random feature mapping, and calculation of an aerodynamic perception attention score in combination with an aerodynamic consistency coefficient; and weighted summation of the aerodynamic perception attention score, to generate a context-aware feature representation; A decoder configured to process the latent space representation and a noise vector to obtain a predicted flight training trajectory sequence; An AF-LDM model configured to perform speed-adaptive cutoff frequency adjustment on the predicted flight training trajectory sequence, and suppress high-frequency noise by using a weighted sinc filtering function, to obtain a final predicted flight training trajectory sequence.
[0015] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related description of the system described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0016] It should be noted that the flight training trajectory generation system provided by the above embodiment provides a fusion attention mechanism, and the above functional modules are only used as examples for illustration. In actual application, the above functions can be completed by different functional modules according to needs, that is, the modules or steps in the embodiment of the application are further decomposed or combined, for example, the modules of the above embodiment can be combined into one module, or can be further split 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 application are only for distinguishing the respective modules and steps, and should not be considered as improper limitation of the application.
[0017] The third embodiment of the application provides an electronic device, including: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the flight training trajectory generation method of the fusion attention mechanism.
[0018] The fourth embodiment of the application provides a computer readable storage medium, and the computer readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the flight training trajectory generation method of the fusion attention mechanism.
[0019] Those skilled in the art should be able to realize that the modules and method steps of each example described in combination with the embodiments disclosed herein can be realized by 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), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are executed 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 application.
[0020] The terms "first", "second", and the like are used to distinguish similar objects, not to describe or indicate a particular order or sequence.
[0021] The term "comprising" or any other similar word is intended to encompass the inclusion of one or more steps, features, or elements but not to the exclusion of any other steps, features, or elements. The term "comprising" therefore indicates that the inclusion of one or more steps, features, or elements is not a requirement and that other steps, features, or elements can also be included.
[0022] So far, the technical solutions of the present application have been described in combination with the preferred embodiments shown in the drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without deviating from the principles of the present application, and the technical solutions after these changes or replacements will all fall within the protection scope of the present application.
Claims
1. A flight training trajectory generation method integrating attention mechanism, characterized by: The method comprises the following steps: Step S100, acquiring multi-source flight data during flight training and obtaining a flight trajectory dataset through preprocessing; Step S200, using a dynamic weight fusion algorithm to fuse the data in the flight trajectory dataset to generate fused data; Step S300: Input the fused data into a prediction model based on AF-LDM and Performer for processing to obtain a final predicted flight training trajectory sequence; the prediction model includes: an encoder based on random feature attention, configured to perform multi-level feature extraction on individual trajectory segments in the fused data to obtain a latent space representation of each trajectory segment; The multi-level feature extraction includes a random feature attention layer, which includes: integrating a key matrix into 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 a random bias, generating a query and key after random feature mapping, and calculating an aerodynamic perception attention score in combination with an aerodynamic consistency coefficient; performing a weighted summation of the aerodynamic perception attention score and the value vector to generate a context-aware feature representation, thereby obtaining a latent space representation of each trajectory segment; A decoder is configured to process the latent space representation and the noise vector to obtain an initial predicted flight training trajectory sequence; perform a weighted sinc filter function with a velocity-adaptive cutoff frequency adjustment on the initial predicted flight training trajectory sequence to suppress high-frequency noise to obtain a preliminary denoised trajectory sequence; and perform feature enhancement and residual noise filtering on the preliminary denoised trajectory sequence using a nonlinear filter to obtain a final predicted flight training trajectory sequence.
2. The flight training trajectory generation method integrating the attention mechanism according to claim 1 is characterized in that: The loss function of the prediction model during training is: ; ; ; ; in, represents the total loss, represents the posture variation loss, represents the position variation loss, represents the reconstruction loss, is the position equivariant weight, is the posture variation weight, is the final predicted flight training trajectory sequence, is the real flight trajectory sequence, Calculate the error for the full timing trajectory, Indicates the total number of time steps for the full time series trajectory calculation, For the moment The attitude angle sequence, , is the pitch angle, is the roll angle, is the heading angle, For posture translation operation, , is the attitude increment, , First Perform a pan operation Translate and then pass through the decoder The output trajectory features, Decoder Output trajectory features, and then perform translation operations on the trajectory features. For the first position sequence Perform translation operation to translate, and then the trajectory features output by the decoder, To first output the trajectory features through the decoder, and then perform translation operation on the trajectory features, is the square of the Euclidean distance.
3. The flight training trajectory generation method integrating attention mechanism according to claim 1 is characterized in that: The preprocessing includes data cleaning, normalization, smoothing and segmentation.
4. The flight training trajectory generation method integrating attention mechanism according to claim 2 is characterized in that: The data cleaning includes removing abnormal flight data based on segmented dynamic thresholds and filling in flight data based on flight trend constraint interpolation; The abnormal flight data is removed based on the segmented dynamic threshold: The flight phases are divided by physical constraint thresholds; the mean and standard deviation of trajectory parameters are calculated based on the data points within the flight phase range; Allocating weights to each flight phase according to the phase safety sensitivity; calculating anomaly based on the mean, the standard deviation, and the weight; and removing outliers based on the anomaly; The flight data is filled by interpolation based on flight trend constraints: Based on the actual speed of the G moments before the target moment, the average speed is calculated, and the integral of the average speed over time is calculated to obtain the displacement increment; The actual position at the previous moment of the target moment is added to the displacement increment to obtain the filling position at the target moment, and then interpolation filling is performed.
5. The flight training trajectory generation method integrating attention mechanism according to claim 1 is 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; The embedding layer linear transformation is used to map the feature dimension to the latent space dimension d, and position encoding is added to obtain a position-enhanced embedding representation; A random feature attention layer is used to split the position-enhanced embedding representation into a query Q, a key K, and a value V, each with a dimension of d / 8. The key K is integrated with real-time aerodynamic parameters to form a key integrated with real-time aerodynamic parameters. A Gaussian random matrix is constructed based on the d / 8 dimension. The query Q and the key K are randomly feature mapped based on the Gaussian random matrix and a random bias to generate a query Q and a key K after random feature mapping. An aerodynamic perception attention score is calculated based on the query Q, the key K, and the aerodynamic consistency coefficient after random feature mapping. The aerodynamic perception attention score is weightedly summed with the value vector V to generate a context-aware feature representation. splicing the context-aware feature representation of each head along the feature dimension, performing a linear transformation on the spliced feature representation, residually connecting the linearly transformed feature representation with the position-enhanced embedding representation, and then performing layer normalization to obtain a first normalized feature; A feedforward network is used to sequentially perform linear transformation, ReLU activation processing, and linear transformation on the first normalized features, and layer normalization is performed after residual connection of the first normalized features to obtain the second normalized features, i.e., the latent space representation of the trajectory segment.
6. The flight training trajectory generation method integrating attention mechanism according to claim 5 is 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, and the method is: ; Where, For the aerodynamic perception attention score, is the query matrix, i.e., the time point The eigenvector of is the key matrix, i.e. the time point The eigenvector of 、 All are random feature mapping functions; , For input, including or , output high-dimensional random features, is a random matrix; is a random bias; is the aerodynamic consistency coefficient; 、 Time points 、 The lift coefficient; The expression forming the key to incorporate the real-time aerodynamic parameters is: ; Where, For time point The drag coefficient; is the angle of attack; is the raw eigenvector of the key matrix.
7. The flight training trajectory generation method integrating attention mechanism according to claim 5 is characterized in that: The structure of the feedforward network is: ; in, is the output of the feedforward network; is the weight of the network; is the bias parameter.
8. The flight training trajectory generation method integrating attention mechanism according to claim 1 is characterized in that: The weighted sinc filter function is: ; Where, represents the weighted sinc filter function, is the sinc function, is the phase term of the sinc function, is an exponential decay term, is the attenuation coefficient, Indicates the speed adaptive cutoff frequency. Set the corresponding cutoff frequency according to the speed adaptive setting. represents the time variable, Indicates flight speed.
9. The flight training trajectory generation method integrating attention mechanism according to claim 1, characterized in that: The dynamic weight fusion algorithm is used to fuse the data in the flight trajectory dataset to generate fused data. The method is as follows: Acquire the flight trajectory data set; the flight trajectory data set includes GPS data, IMU sensor data and flight simulator data; Based on the positioning standard deviation, obtaining a credibility value of the GPS data through mapping; Based on the acceleration change rate, obtaining a credibility value of the IMU sensor data through mapping; According to a mapping relationship between a set fixed coefficient and the flight simulator data, a fixed coefficient is obtained as a credibility value of the flight simulator data; Based on the credibility value of each data source, the data sources in the flight trajectory dataset are dynamically weighted and fused to generate fused data.
10. The flight training trajectory generation method integrating attention mechanism according to claim 8, characterized in that: The nonlinear filtering method is as follows: ; in, is the initial denoised trajectory sequence, is the weighted sinc filter function, is a nonlinear activation function, is the nonlinear filtering result, that is, 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
Flight trajectory prediction method based on feature decoupling and Mama network
CN120448815A
Cited By
Priori-based normalized residual trajectory generation method, system, device and medium
CN122108189A