An encoder-based method and system for flight motion recognition
Patent Information
- Application Number
- CN202510060526.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-01-15
AI Technical Summary
但该方法需要大量的数据来训练网络,网络结构和参数的选择也比较复杂
[0042]本发明有益效果:1.本发明采用Transformer模型的编码器部分,在保持Transformer模型的优势的基础上,降低了模型训练强度,更具有普遍适用性。
Smart Images

Figure CN120046033B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flight motion recognition technology, and in particular to an encoder-based flight motion recognition method and system. Background Technology
[0002] With the development of artificial intelligence, more and more researchers are dedicating themselves to the task of flight motion recognition, striving to achieve objective and efficient flight motion recognition. Flight motion recognition is the process of automatically identifying and classifying various actions and postures during flight. This technology has wide applications in aerospace, military, civil aviation, and flight simulation, and has a positive impact on improving flight safety, efficiency, and performance. The automation and efficiency of flight motion recognition can also provide objective and convenient evaluations for pilot assessments, evaluating pilot performance in different scenarios. This helps cultivate pilots' adaptability, decision-making ability, and operational skills, improving their ability to cope with complex environments.
[0003] Pilot training includes flight simulation training and live-air training. Evaluation methods typically rely on expert experience to identify and assess flight maneuvers. Flight maneuvers are generally determined based on flight parameter data, primarily including parameters such as airspeed, altitude, acceleration, heading angle, pitch angle, and bank angle. The amount of flight parameter data is enormous, requiring recording various parameters under different flight states and environmental conditions, often resulting in low data quality. Traditional flight maneuver recognition methods are mainly based on expert systems, extracting flight parameter variation features from the data based on expert experience to build a rule base, and then using computer reasoning to identify maneuvers. This method struggles to identify complex maneuvers and fails to fully utilize flight parameter data, resulting in low accuracy and efficiency. Another approach is based on Bayesian networks, using probabilistic reasoning to identify maneuvers. However, this method requires a large amount of data to train the network, and the network structure and parameter selection are also complex. Summary of the Invention
[0004] To address the technical problems existing in the background art described above, this invention proposes a flight motion recognition method and system based on an encoder, and the technical solution adopted is as follows:
[0005] A flight motion recognition method based on an encoder, the method comprising:
[0006] S1: Acquire raw flight data and perform data preprocessing on the raw flight data;
[0007] S2: Set the time step and fixed window width, divide the preprocessed raw flight data into several data samples according to the time step and fixed window width, and set an encoder for each data sample to encode the raw flight data;
[0008] S3: Input the encoded data samples into the multi-head attention layer, calculate the similarity between each vector in the data samples, and output the similarity index. At the same time, perform residual connections on the similarity index output by the multi-head attention layer.
[0009] S4: The similarity index output from S3 is used as input and fed into the feedforward network layer. The input is linearly mapped and combined with the encoded original flight data obtained from S2 to output new data samples. The output of the feedforward network layer is then residually connected and fed into S2 as input. This process is repeated multiple times.
[0010] S5: Input the data samples after multiple iterations into the fully connected layer to obtain the probability distribution of the data samples.
[0011] Preferably, the data preprocessing in S1 includes: denoising and smoothing the original flight data, filling in missing values, and deleting outliers, and converting the original flight parameter data into data for the adaptive recognition model.
[0012] Preferably, S2 includes:
[0013] S21: Set the interval of data samples in the time dimension, set the number of data points contained in each sample and use it as the window width value, select a starting point from the preprocessed raw data as the starting time step of the first sample, and move forward one time step at a time interval from the starting point, and extract the data within the window width as a subsample.
[0014] S22: Repeat the process of S21 until the entire dataset is covered, generate several subsamples, and set an encoder for each subsample.
[0015] Preferably, S3 includes:
[0016] The encoded samples are used as input to a multi-head attention layer. Simultaneously, the similarity between each vector in the data samples is calculated, and a similarity index is output. Residual connections are then performed on the similarity indices output by the multi-head attention layer. The similarity index is obtained using the following formula:
[0017]
[0018] Where a and b represent two vectors in the data sample that need to be compared, H(a) and H(b) represent the information entropy of vector a and vector b, and H(a) and H(b) are obtained by the following formula:
[0019]
[0020] Among them, P i (a) and P i (b) represents the normalized probability value of the i-th element in vectors a and b.
[0021] Preferably, S4 includes:
[0022] S41: The similarity index is fed into the feedforward network, which includes a linear fully connected layer to perform a linear mapping on the input. The linear fully connected layer maps the input to a higher-dimensional space and fuses it with the encoded original flight data obtained in S2 to obtain a new data sample.
[0023] S42: Establish a residual connection between the new data sample obtained in S41 and the encoder in S2, and use the new data sample obtained in S41 as input to the encoder in step S2 for encoding.
[0024] Preferably, S5 includes:
[0025] S51: Obtain data samples after multiple iterations and preprocess the iterated data samples to ensure that the format and type of the data samples match the input requirements of the fully connected layer;
[0026] S52: The preprocessed data samples are linearly transformed through a fully connected layer, and the output of the linear transformation is input into the Softmax layer to convert the output into a probability distribution. The probability distribution output by the Softmax layer is used as the final output probability. Each element represents the predicted probability of the data sample in each flight action.
[0027] A flight motion recognition system based on an encoder, characterized in that the system comprises:
[0028] Data collection system: Acquires raw flight data and performs data preprocessing on the raw flight data;
[0029] Data encoding system: Set time step and fixed window width, divide the preprocessed raw flight data into several data samples according to time step and fixed window width, and set an encoder for each data sample to encode the raw flight data;
[0030] Multi-head attention layer: The encoded data samples are input into the multi-head attention layer, the similarity between each vector in the data samples is calculated, and the similarity index is output. At the same time, residual connections are made on the similarity index output by the multi-head attention layer.
[0031] Feedforward network layer: The similarity index output by S3 is taken as input and fed into the feedforward network layer. The input is linearly mapped and combined with the encoded original flight data obtained by S2 to output new data samples. At the same time, the output of the feedforward network layer is residually connected and the output of the feedforward network layer is taken as input and fed into S2. This process is repeated multiple times.
[0032] Fully connected layer: The data samples after multiple iterations are input into the fully connected layer to obtain the probability distribution of the data samples.
[0033] Preferably, the data encoding system includes:
[0034] Time step and window width setting system: Set the interval of data samples in the time dimension, set the number of data points contained in each sample and use it as the window width value, select a starting point from the preprocessed raw data as the starting time step of the first sample, and move forward one time step at a time interval, and extract the data within the window width as a subsample.
[0035] Repetitive system: Repeatedly until the entire dataset is covered, generating several subsamples, and setting an encoder for each subsample.
[0036] Preferably, the multi-head attention layer includes:
[0037] Linear computation layer: The similarity index is fed into the feedforward network, which includes a linear fully connected layer to perform a linear mapping on the input. The linear fully connected layer maps the input to a higher-dimensional space and fuses it with the encoded original flight data obtained in S2 to obtain a new data sample.
[0038] Iterative system: The new data sample obtained in S41 is used to establish a residual connection with the encoder in S2. The new data sample obtained in S41 is used as input and sent to the encoder in step S2 for encoding.
[0039] Preferably, the fully connected layer comprises:
[0040] Data preprocessing system: acquires data samples after multiple iterations and preprocesses the iterated data samples to ensure that the format and type of the data samples match the input requirements of the fully connected layer;
[0041] Probability output system: The preprocessed data samples are linearly transformed through a fully connected layer, and the output of the linear transformation is input into a Softmax layer to convert the output into a probability distribution. The probability distribution output by the Softmax layer is used as the final output probability. Each element represents the predicted probability of the data sample in each flight action.
[0042] The beneficial effects of this invention are as follows: 1. This invention uses the encoder part of the Transformer model, which reduces the training intensity of the model while maintaining the advantages of the Transformer model, and is more universally applicable.
[0043] 2. The neural network architecture used in this invention employs a self-attention mechanism and positional encoding design, which can handle the dependencies between time series data in a more detailed manner and has higher representation capabilities.
[0044] 3. Compared with traditional methods, the method used in this invention for flight action recognition has higher recognition accuracy, greater flexibility, and higher tolerance for error in flight parameter data.
[0045] 4. The neural network architecture used in this invention can handle general time series data classification problems and can take into account flight parameter data of various aircraft types. Attached Figure Description
[0046] Figure 1 This invention relates to an encoder-based flight motion recognition method. Detailed Implementation
[0047] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0048] One embodiment of the present invention provides a flight motion recognition method based on an encoder, the method comprising:
[0049] S1: Acquire raw flight data and perform data preprocessing on the raw flight data;
[0050] S2: Set the time step and fixed window width, divide the preprocessed raw flight data into several data samples according to the time step and fixed window width, and set an encoder for each data sample to encode the raw flight data;
[0051] S3: Input the encoded data samples into the multi-head attention layer, calculate the similarity between each vector in the data samples, and output the similarity index. At the same time, perform residual connections on the similarity index output by the multi-head attention layer.
[0052] S4: The similarity index output from S3 is used as input and fed into the feedforward network layer. The input is linearly mapped and combined with the encoded original flight data obtained from S2 to output new data samples. The output of the feedforward network layer is then residually connected and fed into S2 as input. This process is repeated multiple times.
[0053] S5: Input the data samples after multiple iterations into the fully connected layer to obtain the probability distribution of the data samples.
[0054] The working principle and effect of the above technical solution are as follows: First, raw flight data is acquired, including sensor readings, GPS data, speed, and attitude information. The data is preprocessed, including denoising and filling in missing values. A time step and fixed window width are set, which determines the length and granularity of each data sample. The preprocessed flight data is divided into several data samples according to these parameters. An encoder is set for each data sample to extract features. The encoded data samples are input into the multi-head attention layer in the model. The multi-head attention mechanism can calculate the similarity between input vectors using multiple different "heads," outputting a similarity index, i.e., an attention score. Residual connections are applied during output calculation to stabilize the learning process and improve the model's gradient flow. The similarity index obtained in step 3 is input into the feedforward network layer for further processing. Simultaneously, new data samples are generated by linear mapping, combined with the encoded raw data from step 2. The output data samples are processed through residual connections and iterated multiple times, allowing the network to gradually extract higher-level features at each layer. After multiple iterations, the final data samples are fed into the fully connected layer. The final model output is the probability distribution of each flight maneuver, representing the likelihood of the input data being in different flight maneuvers. By using an encoder to encode the raw flight data, important features can be effectively extracted, reducing data dimensionality and thus improving classification and recognition efficiency. Multi-head attention mechanisms can capture similarities between data from different perspectives, making them suitable for handling complex time-series data and capable of identifying complex patterns and relationships hidden within the data. Residual connections provide shortcuts within the network, helping to solve the gradient vanishing problem that may occur in deep networks, thereby enhancing model stability. By setting the time step and window width, the model can dynamically adapt to input data samples of different lengths, flexibly handling flight maneuvers at different stages. Through the iterative process between the feedforward network layer and the encoder, the model can progressively refine its understanding and extraction of features, improving classification accuracy.
[0055] In one embodiment of the present invention, the data preprocessing in S1 includes: denoising and smoothing the original flight data, filling in missing values, and deleting outliers, and converting the original flight parameter data into data for an adaptive recognition model.
[0056] The working principle and effects of the above technical solution are as follows: It estimates and imputes missing data to ensure data integrity, reducing model training instability caused by missing data; it detects and removes outliers that significantly deviate from the normal range, identifying outliers using the IQR (interquartile range) method. This method can eliminate data bias caused by outliers, improving the representativeness of the dataset and model performance. The original flight parameter data is converted into a data format suitable for the identification model. The converted data is more suitable for the model's input requirements in terms of numerical range and format, improving the model's convergence speed and accuracy.
[0057] In one embodiment of the present invention, S2 includes:
[0058] S21: Set the interval of data samples in the time dimension, set the number of data points contained in each sample and use it as the window width value, select a starting point from the preprocessed raw data as the starting time step of the first sample, and move forward one time step at a time interval from the starting point, and extract the data within the window width as a subsample.
[0059] S22: Repeat the process of S21 until the entire dataset is covered, generate several subsamples, and set an encoder for each subsample.
[0060] The working principle and effects of the above technical solution are as follows: By adjusting the time step, overlap between subsamples is allowed, which enables the capture of more dynamic changes and allows the model to capture both short-term features and long-term dependencies. The window width determines the length of each subsample, allowing each sample to focus on local information, upon which the encoder extracts and represents features. The time step and window width can be adjusted according to different task requirements, thereby adjusting the granularity of data segmentation, making the method highly flexible in adapting to data characteristics. The sliding window approach minimizes information loss, ensuring that the model fully utilizes the information from the entire dataset during training.
[0061] In one embodiment of the present invention, S3 includes:
[0062] The encoded samples are used as input to a multi-head attention layer. Simultaneously, the similarity between each vector in the data samples is calculated, and a similarity index is output. Residual connections are then performed on the similarity indices output by the multi-head attention layer. The similarity index is obtained using the following formula:
[0063]
[0064] Where a and b represent two vectors in the data sample that need to be compared, H(a) and H(b) represent the information entropy of vector a and vector b, and H(a) and H(b) are obtained by the following formula:
[0065]
[0066] Among them, P i (a) and P i (b) represents the normalized probability value of the i-th element in vectors a and b.
[0067] Because multiple iterations may cause the similarity index to repeatedly propagate between the S2 and feedforward network layers, leading to numerical instability or convergence issues, an evaluation system is designed to assess the stability of the similarity index during the iteration process. The evaluation result is obtained using the following formula:
[0068]
[0069] Where N represents the number of iterations, U i+1 U represents the similarity index obtained in the (i+1)th iteration. i This represents the similarity index obtained in the i-th iteration;
[0070] When S approaches 0, it indicates that the similarity index is very stable during the iteration process and hardly changes, at which point the iteration can be stopped;
[0071] When 0.1 < S < 0.5, it indicates that the similarity index fluctuates somewhat during the iteration process, but the fluctuation range is not large. In this case, iteration should continue to observe the changing trend of the similarity index. If the fluctuation gradually decreases and tends to stabilize, it is possible to stop the iteration. If the fluctuation continues or increases, the algorithm structure needs to be optimized, and the number of iterations should not exceed 6.
[0072] When 0.5 < S < 1, it indicates that the similarity index fluctuates significantly during the algorithm's iteration process. In this case, the encoded data samples should be cleaned again.
[0073] The working principle and effect of the above technical solution are as follows: This formula uses the calculation method of multiplying the cosine value of the included angle and the information entropy difference to calculate the similarity between each vector in the data sample. The cosine value of the included angle is an indicator that measures the directional similarity between two vectors. In vector space, the smaller the angle between two vectors, i.e., the larger the cosine value, the more similar they are. In the scenario of this invention, the cosine value of the included angle can capture the directional similarity of vectors. Information entropy is an indicator that measures the uncertainty of data. In information theory, the higher the entropy, the greater the uncertainty of the data, and vice versa. Multiplying the cosine value of the included angle and the information entropy difference can comprehensively consider the performance of two data objects in terms of both directional similarity and information content difference. This combination helps to capture more comprehensive similarity information. Even if two vectors are very similar in direction (large cosine value of the included angle), if they have a large difference in information content (large information entropy difference), the final similarity score may be low. Conversely, if two vectors are similar in direction and have similar information content, the final similarity score will be high. Through formula calculation, the stability of the algorithm during the iteration process can be quantified. This helps us understand the algorithm's performance more accurately, avoiding relying solely on experience or intuition to judge its convergence and stability. When the algorithm reaches a stable state during iteration, the formula can be used to determine and stop the iteration early. This helps save computational resources and improve the algorithm's efficiency.
[0074] In one embodiment of the present invention, S4 includes:
[0075] S41: The similarity index is fed into the feedforward network, which includes a linear fully connected layer to perform a linear mapping on the input. The linear fully connected layer maps the input to a higher-dimensional space and fuses it with the encoded original flight data obtained in S2 to obtain a new data sample.
[0076] S42: Establish a residual connection between the new data sample obtained in S41 and the encoder in S2, and use the new data sample obtained in S41 as input to the encoder in step S2 for encoding.
[0077] The working principle and effect of the above technical solution are as follows: The feedforward network layer performs a linear mapping of the input, that is, each input node is connected to every output node, and each connection has a weight. The value of the output node is obtained by weighted summation plus a bias. The role of the linear fully connected layer is to map the input to a higher-dimensional space in order to better capture the features of the data. Residual connection is a commonly used network structure in deep learning. It adds the network's input and output, allowing the network to learn residual information better, thereby improving the network's performance and training effect. In step S42, the new data sample obtained in step S41 is used as input and fed into the encoder in step S2 for encoding. At the same time, through the residual connection, the new data sample is added to the encoder's output. In this way, the encoder not only receives new data samples as input, but also receives residual information from previous layers. In deep networks, gradient vanishing is a common problem. Residual connection, by introducing direct cross-layer connections, helps gradients flow better during backpropagation, thereby mitigating the gradient vanishing problem. Because residual connections allow the network to directly learn the difference between the input and output (i.e., the residual), this helps the network converge to the optimal solution faster. Through residual connections, the network can more easily learn deep feature representations of the data, thereby improving the model's performance.
[0078] In one embodiment of the present invention, S5 includes:
[0079] S51: Obtain data samples after multiple iterations and preprocess the iterated data samples to ensure that the format and type of the data samples match the input requirements of the fully connected layer;
[0080] S52: The preprocessed data samples are linearly transformed through a fully connected layer, and the output of the linear transformation is input into the Softmax layer to convert the output into a probability distribution. The probability distribution output by the Softmax layer is used as the final output probability. Each element represents the predicted probability of the data sample in each flight action.
[0081] The working principle and effect of the above technical solution are as follows: The data preprocessing system acquires data samples after multiple iterations. The iterated data samples are then cleaned, and the preprocessed data samples are input into a fully connected layer for linear transformation. The purpose of this linear transformation is to map the data samples to a new feature space for better classification or regression tasks. The Softmax layer is typically used as the output layer for multi-class classification problems. It transforms the output of the fully connected layer into a probability distribution, ensuring that the value of each output node is between 0 and 1, and the sum of all output node values is 1. The Softmax function calculates the predicted probability of each class by calculating the ratio of the exponent of each class to the sum of the exponents of all classes. Thus, each data sample is assigned a predicted probability distribution across all flight actions. Finally, the probability distribution output by the Softmax layer is used as the final output probability. This probability distribution represents the predicted probability of the data sample across various flight actions and can be used for subsequent decision-making or classification tasks. The Softmax layer transforms the output of the fully connected layer into a probability distribution, meaning that the output of each class can be interpreted as the probability that that class is the correct class. This probabilistic interpretability makes the model's output more intuitive and easier to understand. The Softmax function calculates the predicted probability by dividing the exponent of each category by the sum of the exponents of all categories. This method exhibits good stability when dealing with numerical values. Due to the rapid growth of the exponential function, even if there are large differences between the original output values, these differences are smoothly mapped to a probability range between 0 and 1 after processing by the Softmax function, thus avoiding numerical overflow or underflow problems.
[0082] An embodiment of the present invention provides a flight motion recognition system based on an encoder, characterized in that the system comprises:
[0083] Data collection system: Acquires raw flight data and performs data preprocessing on the raw flight data;
[0084] Data encoding system: Set time step and fixed window width, divide the preprocessed raw flight data into several data samples according to time step and fixed window width, and set an encoder for each data sample to encode the raw flight data;
[0085] Multi-head attention layer: The encoded data samples are input into the multi-head attention layer, the similarity between each vector in the data samples is calculated, and the similarity index is output. At the same time, residual connections are made on the similarity index output by the multi-head attention layer.
[0086] Feedforward network layer: The similarity index output by S3 is taken as input and fed into the feedforward network layer. The input is linearly mapped and combined with the encoded original flight data obtained by S2 to output new data samples. At the same time, the output of the feedforward network layer is residually connected and the output of the feedforward network layer is taken as input and fed into S2. This process is repeated multiple times.
[0087] Fully connected layer: The data samples after multiple iterations are input into the fully connected layer to obtain the probability distribution of the data samples.
[0088] The working principle and effect of the above technical solution are as follows: First, raw flight data is acquired, including sensor readings, GPS data, speed, and attitude information. The data is preprocessed, including denoising and filling in missing values. A time step and fixed window width are set, which determines the length and granularity of each data sample. The preprocessed flight data is divided into several data samples according to these parameters. An encoder is set for each data sample to extract features. The encoded data samples are input into the multi-head attention layer in the model. The multi-head attention mechanism can calculate the similarity between input vectors using multiple different "heads," outputting a similarity index, i.e., an attention score. Residual connections are applied during output calculation to stabilize the learning process and improve the model's gradient flow. The similarity index obtained in step 3 is input into the feedforward network layer for further processing. Simultaneously, new data samples are generated by linear mapping, combined with the encoded raw data from step 2. The output data samples are processed through residual connections and iterated multiple times, allowing the network to gradually extract higher-level features at each layer. After multiple iterations, the final data samples are fed into the fully connected layer. The final model output is the probability distribution of each flight maneuver, representing the likelihood of the input data being in different flight maneuvers. By using an encoder to encode the raw flight data, important features can be effectively extracted, reducing data dimensionality and thus improving classification and recognition efficiency. Multi-head attention mechanisms can capture similarities between data from different perspectives, making them suitable for handling complex time-series data and capable of identifying complex patterns and relationships hidden within the data. Residual connections provide shortcuts within the network, helping to solve the gradient vanishing problem that may occur in deep networks, thereby enhancing model stability. By setting the time step and window width, the model can dynamically adapt to input data samples of different lengths, flexibly handling flight maneuvers at different stages. Through the iterative process between the feedforward network layer and the encoder, the model can progressively refine its understanding and extraction of features, improving classification accuracy.
[0089] In one embodiment of the present invention, the data encoding system includes:
[0090] Time step and window width setting system: Set the interval of data samples in the time dimension, set the number of data points contained in each sample and use it as the window width value, select a starting point from the preprocessed raw data as the starting time step of the first sample, and move forward one time step at a time interval, and extract the data within the window width as a subsample.
[0091] Repetitive system: Repeatedly until the entire dataset is covered, generating several subsamples, and setting an encoder for each subsample.
[0092] The working principle and effects of the above technical solution are as follows: By adjusting the time step, overlap between subsamples is allowed, which enables the capture of more dynamic changes and allows the model to capture both short-term features and long-term dependencies. The window width determines the length of each subsample, allowing each sample to focus on local information, upon which the encoder extracts and represents features. The time step and window width can be adjusted according to different task requirements, thereby adjusting the granularity of data segmentation, making the method highly flexible in adapting to data characteristics. The sliding window approach minimizes information loss, ensuring that the model fully utilizes the information from the entire dataset during training.
[0093] In one embodiment of the present invention, the multi-head attention layer includes:
[0094] Linear computation layer: The similarity index is fed into the feedforward network, which includes a linear fully connected layer to perform a linear mapping on the input. The linear fully connected layer maps the input to a higher-dimensional space and fuses it with the encoded original flight data obtained in S2 to obtain a new data sample.
[0095] Iterative system: The new data sample obtained in S41 is used to establish a residual connection with the encoder in S2. The new data sample obtained in S41 is used as input and sent to the encoder in step S2 for encoding.
[0096] The working principle and effect of the above technical solution are as follows: The feedforward network layer performs a linear mapping of the input, that is, each input node is connected to every output node, and each connection has a weight. The value of the output node is obtained by weighted summation plus a bias. The role of the linear fully connected layer is to map the input to a higher-dimensional space in order to better capture the features of the data. Residual connection is a commonly used network structure in deep learning. It adds the network's input and output, allowing the network to learn residual information better, thereby improving the network's performance and training effect. In step S42, the new data sample obtained in step S41 is used as input and fed into the encoder in step S2 for encoding. At the same time, through the residual connection, the new data sample is added to the encoder's output. In this way, the encoder not only receives new data samples as input, but also receives residual information from previous layers. In deep networks, gradient vanishing is a common problem. Residual connection, by introducing direct cross-layer connections, helps gradients flow better during backpropagation, thereby mitigating the gradient vanishing problem. Because residual connections allow the network to directly learn the difference between the input and output (i.e., the residual), this helps the network converge to the optimal solution faster. Through residual connections, the network can more easily learn deep feature representations of the data, thereby improving the model's performance.
[0097] In one embodiment of the present invention, the fully connected layer includes:
[0098] Data preprocessing system: acquires data samples after multiple iterations and preprocesses the iterated data samples to ensure that the format and type of the data samples match the input requirements of the fully connected layer;
[0099] Probability output system: The preprocessed data samples are linearly transformed through a fully connected layer, and the output of the linear transformation is input into a Softmax layer to convert the output into a probability distribution. The probability distribution output by the Softmax layer is used as the final output probability. Each element represents the predicted probability of the data sample in each flight action.
[0100] The working principle and effect of the above technical solution are as follows: The data preprocessing system acquires data samples after multiple iterations. The iterated data samples are then cleaned, and the preprocessed data samples are input into a fully connected layer for linear transformation. The purpose of this linear transformation is to map the data samples to a new feature space for better classification or regression tasks. The Softmax layer is typically used as the output layer for multi-class classification problems. It transforms the output of the fully connected layer into a probability distribution, ensuring that the value of each output node is between 0 and 1, and the sum of all output node values is 1. The Softmax function calculates the predicted probability of each class by calculating the ratio of the exponent of each class to the sum of the exponents of all classes. Thus, each data sample is assigned a predicted probability distribution across all flight actions. Finally, the probability distribution output by the Softmax layer is used as the final output probability. This probability distribution represents the predicted probability of the data sample across various flight actions and can be used for subsequent decision-making or classification tasks. The Softmax layer transforms the output of the fully connected layer into a probability distribution, meaning that the output of each class can be interpreted as the probability that that class is the correct class. This probabilistic interpretability makes the model's output more intuitive and easier to understand. The Softmax function calculates the predicted probability by dividing the exponent of each category by the sum of the exponents of all categories. This method exhibits good stability when dealing with numerical values. Due to the rapid growth of the exponential function, even if there are large differences between the original output values, these differences are smoothly mapped to a probability range between 0 and 1 after processing by the Softmax function, thus avoiding numerical overflow or underflow problems.
[0101] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A flight motion recognition method based on an encoder, characterized in that, The method includes: S1: Acquire raw flight data and perform data preprocessing on the raw flight data; S2: Set the time step and fixed window width, divide the preprocessed raw flight data into several data samples according to the time step and fixed window width, and set an encoder for each data sample to encode the raw flight data; S3: Input the encoded data samples into the multi-head attention layer, calculate the similarity between each vector in the data samples, and output the similarity index. At the same time, perform residual connections on the similarity index output by the multi-head attention layer. S4: The similarity index output from S3 is used as input and fed into the feedforward network layer. The input is linearly mapped and combined with the encoded original flight data obtained from S2 to output new data samples. The output of the feedforward network layer is then residually connected and fed into S2 as input. This process is repeated multiple times. S5: Input the data samples after multiple iterations into the fully connected layer to obtain the probability distribution of the data samples; S5 includes: S51: Obtain data samples after multiple iterations and preprocess the iterated data samples to ensure that the format and type of the data samples match the input requirements of the fully connected layer; S52: The preprocessed data samples are linearly transformed through a fully connected layer, and the output of the linear transformation is input into Softmax to convert the output into a probability distribution. The probability distribution output by Softmax is used as the final output probability. Each element represents the predicted probability of the data sample in each flight action. S3 includes: The encoded samples are used as input to a multi-head attention layer. Simultaneously, the similarity between each vector in the data samples is calculated, and a similarity index is output. Residual connections are then performed on the similarity indices output by the multi-head attention layer. The similarity index is obtained using the following formula: Where a and b represent two vectors to be compared in the data sample, H(a) and H(b) represent the information entropy of vector a and vector b, and H(a) and H(b) are obtained by the following formula: in, and This represents the normalized probability value of the i-th element in vectors a and b.
2. The encoder-based flight motion recognition method according to claim 1, characterized in that, The data preprocessing in S1 includes: denoising and smoothing the raw flight data, filling in missing values, and deleting outliers, and converting the raw flight parameter data into data for the adaptive recognition model.
3. The flight motion recognition method based on an encoder according to claim 1, characterized in that, S2 includes: S21: Set the interval of data samples in the time dimension, set the number of data points contained in each sample and use it as the window width value, select a starting point from the preprocessed raw data as the starting time step of the first sample, and move forward one time step at a time interval from the starting point, and extract the data within the window width as a subsample. S22: Repeat the process of S21 until the entire dataset is covered, generate several subsamples, and set an encoder for each subsample.
4. The encoder-based flight motion recognition method according to claim 1, characterized in that, S4 includes: S41: The similarity index is fed into the feedforward network, which includes a linear fully connected layer to perform a linear mapping on the input. The linear fully connected layer maps the input to a higher-dimensional space and fuses it with the encoded original flight data obtained in S2 to obtain a new data sample. S42: Establish a residual connection between the new data sample obtained in S41 and the encoder in S2, and use the new data sample obtained in S41 as input to the encoder in step S2 for encoding.
5. A flight motion recognition system based on an encoder, characterized in that, The system includes: Data collection system: Acquires raw flight data and performs data preprocessing on the raw flight data; Data encoding system: Set time step and fixed window width, divide the preprocessed raw flight data into several data samples according to time step and fixed window width, and set an encoder for each data sample to encode the raw flight data; Multi-head attention layer: The encoded data samples are input into the multi-head attention layer, which calculates the similarity between each vector in the data samples and outputs a similarity index. Residual connections are then performed on the similarity index output by the multi-head attention layer. The similarity index is obtained using the following formula: Where a and b represent two vectors to be compared in the data sample, H(a) and H(b) represent the information entropy of vector a and vector b, and H(a) and H(b) are obtained by the following formula: in, and This represents the normalized probability value of the i-th element in vectors a and b; Feedforward network layer: The similarity index output by S3 is taken as input and fed into the feedforward network layer. The input is linearly mapped and combined with the encoded original flight data obtained by S2 to output new data samples. At the same time, the output of the feedforward network layer is residually connected and the output of the feedforward network layer is taken as input and fed into S2. This process is repeated multiple times. Fully connected layer: The data samples after multiple iterations are input into the fully connected layer to obtain the probability distribution of the data samples; The fully connected layer includes: Data preprocessing system: acquires data samples after multiple iterations and preprocesses the iterated data samples to ensure that the format and type of the data samples match the input requirements of the fully connected layer; Probability output system: The preprocessed data samples are linearly transformed through a fully connected layer, and the output of the linear transformation is input into Softmax to convert the output into a probability distribution. The probability distribution output by Softmax is used as the final output probability. Each element represents the predicted probability of the data sample in each flight action.
6. The encoder-based flight motion recognition system according to claim 5, characterized in that, The data encoding system includes: Time step and window width setting system: Set the interval of data samples in the time dimension, set the number of data points contained in each sample and use it as the window width value, select a starting point from the preprocessed raw data as the starting time step of the first sample, and move forward one time step at a time interval, and extract the data within the window width as a subsample. Repetitive system: Repeatedly until the entire dataset is covered, generating several subsamples, and setting an encoder for each subsample.
7. The encoder-based flight motion recognition system according to claim 5, characterized in that, The multi-head attention layer includes: Linear computation layer: The similarity index is fed into the feedforward network, which includes a linear fully connected layer to perform a linear mapping on the input. The linear fully connected layer maps the input to a higher-dimensional space and fuses it with the encoded original flight data obtained in S2 to obtain a new data sample. Iterative system: The new data sample obtained in S41 is used to establish a residual connection with the encoder in S2. The new data sample obtained in S41 is used as input and sent to the encoder in step S2 for encoding.
