A Bayesian variational autoencoder model and its establishment method and application

By introducing self-attention and temporal attention mechanisms into the variational autoencoder, combined with the Bayesian model, the time dependence problem of the variational autoencoder when processing flying parameter data is solved, and the data quality and model generalization are improved. It realizes the effective enhancement of flying parameter data and the capture of abnormal patterns.

CN118277797BActive Publication Date: 2024-08-23NAVAL AVIATION UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410710715.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-23
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

Variational autoencoders cannot effectively handle the time dependence of time series type data, especially the insufficient amount of fault data in flying parameter data, resulting in insufficient data quality and quantity, affecting the performance and generalization ability of the model.

Method used

A Bayesian variational autoencoder model is designed. By introducing self-attention mechanism and temporal attention mechanism in the encoder and decoder, combined with the Bayesian model, the loss function and parameter optimization process are optimized to improve the model accuracy. Time series data processing capabilities.

Benefits of technology

It effectively captures the key features in the data, generates new data samples that are consistent with the actual situation, improves the data quality and the generalization ability of the model, and is suitable for the enhancement of flying parameter data and the capture of abnormal patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118277797B
    Figure CN118277797B
Patent Text Reader

Abstract

The present invention relates to a Bayesian variational autoencoder model and a method for establishing and applying the same, and belongs to the technical field of model establishment and application. The problem that the variational autoencoder in the prior art cannot effectively process the key characteristic of time series type data, namely time dependence, and cannot generate a valid sequence is solved. In order to solve the problem that flight parameter data cannot be used and the amount of fault data in the flight parameter data is insufficient, a Bayesian variational autoencoder model and a method for establishing and applying the same are provided. The Bayesian variational autoencoder model can enhance time series type data and is suitable for flight parameter data. The establishment method includes the following steps: S1, designing an encoder; S2, designing a decoder; S3, determining the total loss function of the variational autoencoder; S4, establishing a Bayesian model, obtaining the minimized total loss function, and optimizing the encoder parameter #imgabs0# and the decoder parameter #imgabs1#.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a Bayesian variational autoencoder model and an establishment method and application thereof, belonging to the technical field of model establishment and application. Background Art

[0002] Variational autoencoders (VAEs) provide a powerful generative model framework that can learn latent representations of data and generate new data samples.

[0003] The application of variational autoencoders (VAE) in time series data enhancement is relatively new and shows some potential. The new time series data generated by VAE is similar to the real data in statistical characteristics, but it is still not enough to capture the high time dependence and complex dynamic characteristics of time series data. VAE needs to be adjusted to adapt to the particularity of time series data. In particular, it cannot be used for aircraft flight parameter data.

[0004] In the process of conducting data mining and analysis based on flight parameter data, the problem of insufficient data volume was exposed. First, the number of faults associated with flight parameter data was small. Second, the flight parameter values ​​of different aircraft models varied greatly. For example, the average value of the vibration sensor in the test state of a certain aircraft was less than 0.3, while the average value of the vibration sensor of another aircraft was greater than 2. In particular, the sensor change amplitude caused by the fault was smaller than the sensor change amplitude caused by the normal working condition change, that is, the correlation between the fault data and the normal data was even greater than the correlation between the normal data. For example, a certain fault mode of the vibration sensor was a small burr at certain stages, that is, compared with the normal mode, the burr change amplitude did not exceed 10%, but during the flight, due to different working conditions, the change amplitude was very drastic, exceeding 300%. These reasons make it impossible for the method based on unsupervised reconstruction error to capture abnormal patterns.

[0005] This exposes the objective limitations of the data, affecting the performance and generalization ability of data-driven models.

[0006] At present, there are the following problems with flight parameter data: 1. Insufficient data quality and quantity: Aircraft parameter data is affected by collection restrictions, noise interference and other factors, resulting in low data quality or insufficient data volume. Therefore, it is necessary to solve the problems of how to process and utilize limited data resources, and how to deal with noise and outliers in the data.

[0007] 2. Insufficient data diversity: The aircraft parameter dataset has problems such as sample imbalance and inconsistent data distribution, which leads to a lack of diverse data samples during model training. Therefore, it is necessary to solve how to increase the diversity of the dataset to improve the generalization ability of the model.

[0008] At present, variational autoencoders have the following problems: variational autoencoders need to effectively learn the potential representation of flight parameter data in the form of time series and be able to generate new data samples that conform to the actual situation. Therefore, it is necessary to solve the problem of how to design and optimize the model structure and how to effectively learn and generate flight parameter data. Summary of the invention

[0009] The purpose of the present invention is to solve the problem that the variational autoencoder in the prior art cannot effectively process the key characteristic of time series type data, namely time dependence, and cannot generate a valid sequence. For the problem that the flight parameter data cannot be used and the amount of fault data in the flight parameter data is insufficient, a Bayesian variational autoencoder model and its establishment method and application are provided, and the Bayesian variational autoencoder model can enhance the time series type data and is suitable for flight parameter data.

[0010] In order to solve the above problems, the method for establishing the Bayesian variational autoencoder model of the present application is implemented through the following technical solutions:

[0011] A method for establishing a Bayesian variational autoencoder model, which is special in that it includes the following steps:

[0012] S1. Design encoder: The encoder network adopts a multi-layer neural network structure and adds a self-attention mechanism to dynamically adjust the importance of each layer's input features, helping the model to focus more on the important parts of the input data and determine the mean and variance of the encoder output after adding the self-attention mechanism;

[0013] S2. Design the decoder: The decoder adopts a multi-layer neural network structure and adds a temporal attention mechanism to ensure that the decoder dynamically pays attention to the information of different time steps in the input sequence when generating the output of each time step, and determines the mean value of the decoder output after adding the temporal attention mechanism;

[0014] S3. Determine the total loss function of the variational autoencoder:

[0015] Combining the reconstruction loss and the KL divergence term, we get the total loss function of the variational autoencoder.

[0016] The reconstruction loss is used to measure the ability of the decoder to reconstruct the original data, that is, to minimize the difference between the reconstructed data and the original data;

[0017] The KL divergence term is used to constrain the distance between the latent variable distribution output by the encoder and the prior distribution, so as to enable the encoder to learn a suitable latent representation;

[0018] S4. Establish a Bayesian model to minimize the total loss function and optimize the encoder parameters and decoder parameters .

[0019] Preferably, the input of the encoder network in step S1 is the original data , the output is the latent variable The mean and variance of

[0020] Among them The output of the layer is represented as , the mean and variance of the encoder output can be expressed as follows: , ,

[0021] In the formula, , are the weight matrices for the mean and variance, respectively, , are the bias terms of the mean and variance respectively, is the output layer of the encoder;

[0022] The encoder The layer output is , is the input of the attention mechanism, then the weight calculation formula of the self-attention mechanism is as follows: ,

[0023] In the formula, , , They are weight matrices, which are used to transform the input Projection into query, key, and value spaces; Function used to normalize weights.

[0024] Preferably, the self-attention mechanism comprises the following steps:

[0025] A. Projection: For each input feature Perform three linear transformations and project them into the query, key, and value spaces to obtain the query vectors. , key vector , value vector ;

[0026] B. Calculate attention scores: Get the similarity between each input feature and other features by calculating the dot product of the query vector and the key vector; then normalize these scores by applying the softmax function to obtain the attention weights;

[0027] C. Weighted summation: Use the attention weights to perform weighted summation on the value vector;

[0028] D. Output: The representation adjusted by the attention mechanism is obtained and passed to the next layer of the network or the output layer for further processing.

[0029] Preferably, the input of the decoder network in step S2 is the latent variable , the output is the reconstructed data The mean of

[0030] Among them The output of the layer is represented as , the mean of the decoder output is expressed as follows: , , where is the weight matrix for reconstructing the data mean, is the bias term for reconstructing the mean of the data;

[0031] The decoder The hidden state of the layer is , then the calculation formula of the temporal attention mechanism is as follows: , where is the calculated temporal attention score, which is used to measure the decoder Layer hidden state and input sequence The correlation of the time steps.

[0032] Preferably, the temporal attention mechanism comprises the following steps:

[0033] A. Calculating Attention Score : In the decoder Layer hidden state and each time step of the input sequence Calculate the attention score between ;

[0034] B. Normalized Attention Score : Normalize the calculated attention scores to ensure that their sum is 1; use the softmax function to achieve this, that is, each attention score Exponentiate and divide by the sum of all exponents;

[0035] C. Hidden state of weighted input sequence: using normalized attention scores The hidden states of the input sequence are weighted summed to obtain the input of the decoder at the current time step; ensuring that the decoder focuses on the part of the input sequence that is relevant to the current time step when generating each output, thereby generating the output more accurately;

[0036] D. Update the hidden state of the decoder: The hidden state of the input sequence obtained by weighted summation is used as the input of the decoder at the current time step to generate the output of the current time step; the decoder will dynamically pay attention to the information of different time steps in the input sequence at each time step to better generate the output sequence.

[0037] Preferably, the original data in step S3 is , reconstructing the data into , the reconstruction loss is defined as the element-wise cross entropy loss between the two:

[0038] , where is the dimension of the data;

[0039] The latent variable distribution of the encoder output is , the prior distribution is , then the calculation formula of the KL divergence term is: ,

[0040] In the formula, is the dimension of the latent space, and They are the encoder output The means and variances of the latent variables;

[0041] Combining the reconstruction loss and the KL divergence term, we get the total loss function of the variational autoencoder: ,

[0042] In the formula, represents the expectation of the reconstruction loss under the latent variable distribution of the encoder output.

[0043] Preferably, in step S4, an appropriate prior distribution is selected and , using Gaussian distribution to constrain the Bayesian variational autoencoder model parameters, the following Bayesian model is established:

[0044] , where is the given encoder parameter and decoder parameters Observation data The likelihood function of and They are the encoder parameters and decoder parameters The prior distribution of

[0045] According to Bayes' theorem, the posterior distribution of the parameters is estimated by the prior distribution and likelihood function, as follows: ,

[0046] In the formula, Indicates the given encoder parameters and decoder parameters Observation data The likelihood function of ;

[0047] Use variational inference to approximate the posterior distribution as follows: Approximate the posterior distribution as a parameterized distribution , and approximate the true posterior distribution by minimizing the KL divergence;

[0048] Find one , which minimizes the KL divergence: ,

[0049] The KL divergence is defined as: ,

[0050] In variational inference, the approximate posterior distribution is optimized by minimizing the KL divergence , use the stochastic gradient descent (SGD) algorithm to calculate the minimum total loss function; then adjust the encoder parameters and decoder parameters Optimize

[0051] in, Represents the weight matrix and bias of the encoder network, which determines how the encoder network converts the input data Convert to latent variables ; Represents the weight matrix and bias of the decoder network, which determines how the decoder network converts the latent variables Transformed into generated output data .

[0052] A Bayesian variational autoencoder model established by the above method includes an encoder and a decoder, and its special feature is that: a Bayesian model is added between the encoder and the decoder;

[0053] The encoder samples data in the latent space, and the self-attention mechanism dynamically adjusts the importance of each input feature through weighted averaging;

[0054] The decoder maps the sampled latent variables back to the original data space to generate new data samples with similar features, and uses an attention mechanism to process data features for the output of each layer in the decoder;

[0055] The Bayesian model is used to estimate the distribution parameters of latent variables and the parameters of the reconstructed distribution. By inferring the posterior distribution of the parameters, an estimate of the uncertainty of the parameters is obtained, thereby improving the robustness and generalization ability of the model.

[0056] Another technical solution adopted by the present invention is: application of a Bayesian variational autoencoder model in flight parameter data enhancement.

[0057] An application of a Bayesian variational autoencoder model in flight parameter data enhancement is special in that it includes the following steps:

[0058] S01. Acquisition of original data: Screening out the records that are potentially related to the records in the flight parameter system from the fault records exported from the maintenance quality control system; Collecting the flight parameter record data under typical fault modes and normal modes, and constructing a data set;

[0059] S02, data preprocessing: preprocess the original data in the data set in step S01, specifically: 1. Gaussian normalization is performed on non-angular numerical data to convert the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, ensuring that the data have the same scale;

[0060] 2. Angle data processing, specifically: the parameters of the angle type are respectively subjected to sin and cos operations to become two trigonometric function parameters. For example, the parameter a of the angle type is respectively subjected to sin(a) and cos(a) operations;

[0061] 3. Save the preprocessed data as a feature matrix, where each row represents a sample, i.e., an aircraft parameter, and each column represents a feature, i.e., a feature parameter;

[0062] S03. Data input and processing: The preprocessed aircraft parameter data is input into the Bayesian variational autoencoder model to generate new samples with similar distribution.

[0063] The method for establishing the Bayesian variational autoencoder model of the present application introduces an attention mechanism, so that the model can automatically learn and adjust the weight of each feature during the learning process, so as to better capture the key features in the data, especially when processing complex or high-dimensional data; due to the introduction of the time attention mechanism, time series type data can be enhanced, which is suitable for flight parameter data; Bayesian reasoning and variational autoencoders are combined to generate new data samples by learning the distribution structure of data, and at the same time, the data can be reduced in dimension and denoised;

[0064] The established Bayesian variational autoencoder model is suitable for flight parameter data: adding attention layers to the encoder and decoder of VAE can help the model focus more on the important parts of the input data; through the combination of Bayesian reasoning and attention mechanism, the diversity of existing flight parameter data sets can be effectively fitted; the combination of Bayesian reasoning and variational autoencoder can effectively generate high-quality data samples, and can effectively perform data representation learning and uncertainty quantification, thereby improving the generalization ability of the model.

[0065] The Bayesian variational autoencoder model can learn the latent representation of the data and remove noise and redundant information in the data, thereby improving the quality and clarity of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 : Flow chart of the method of the present invention;

[0067] Figure 2 : A schematic diagram of the structure of the model of the present invention;

[0068] Figure 3 :Flowchart of flight parameter data. DETAILED DESCRIPTION

[0069] The following is a specific implementation of the present invention with reference to the accompanying drawings to further illustrate the composition of the present invention.

[0070] Example 1. A method for establishing a Bayesian variational autoencoder model. For the specific process, refer to Figure 1 , including the following steps:

[0071] S1. Design encoder: The encoder network adopts a multi-layer neural network structure, adds a self-attention mechanism to dynamically adjust the importance of each input feature, and determines the mean and variance of the encoder output after adding the self-attention mechanism;

[0072] The input of the encoder network is the raw data , the output is the latent variable The mean and variance of

[0073] Among them The output of the layer is represented as , the mean and variance of the encoder output are expressed as follows: , ,

[0074] In the formula, , are the weight matrices for the mean and variance, respectively, , are the bias terms of the mean and variance respectively, is the output layer of the encoder;

[0075] The encoder The layer output is , is the input of the attention mechanism, then the weight calculation formula of the self-attention mechanism is as follows: ,

[0076] In the formula, , , They are weight matrices, which are used to transform the input Projection into query, key, and value spaces; Function used to normalize weights.

[0077] The self-attention mechanism includes the following steps:

[0078] A. Projection: For each input feature Perform three linear transformations and project them into the query, key, and value spaces to obtain the query vectors. , key vector , value vector ;

[0079] B. Calculate attention scores: Get the similarity between each input feature and other features by calculating the dot product of the query vector and the key vector; then normalize these scores by applying the softmax function to obtain the attention weights;

[0080] C. Weighted summation: Use the attention weights to perform weighted summation on the value vector;

[0081] D. Output: The representation adjusted by the attention mechanism is obtained and passed to the next layer of the network or the output layer for further processing.

[0082] S2. Design decoder:

[0083] The decoder adopts a multi-layer neural network structure, and adds a temporal attention mechanism to ensure that the decoder dynamically pays attention to the information of different time steps in the input sequence when generating the output of each time step, and determines the mean value of the decoder output after adding the temporal attention mechanism;

[0084] The input to the decoder network is the latent variable , the output is the reconstructed data The mean of

[0085] Among them The output of the layer is represented as , the mean of the decoder output is expressed as follows: , , where is the weight matrix for reconstructing the data mean, is the bias term for reconstructing the mean of the data;

[0086] The decoder The hidden state of the layer is , then the calculation formula of the temporal attention mechanism is as follows: , where is the calculated temporal attention score, which is used to measure the decoder Layer hidden state and input sequence The correlation of the time steps.

[0087] The temporal attention mechanism includes the following steps:

[0088] A. Calculating Attention Score : In the decoder Layer hidden state and each time step of the input sequence Calculate the attention score between ;

[0089] B. Normalized Attention Score : Normalize the calculated attention scores to ensure that their sum is 1; use the softmax function to achieve this, that is, each attention score Exponentiate and divide by the sum of all exponents;

[0090] C. Hidden state of weighted input sequence: using normalized attention scores The hidden states of the input sequence are weighted summed to obtain the input of the decoder at the current time step; ensuring that the decoder focuses on the part of the input sequence that is relevant to the current time step when generating each output, thereby generating the output more accurately;

[0091] D. Update the hidden state of the decoder: The hidden state of the input sequence obtained by weighted summation is used as the input of the decoder at the current time step to generate the output of the current time step; the decoder will dynamically pay attention to the information of different time steps in the input sequence at each time step to better generate the output sequence.

[0092] S3. Determine the total loss function of the variational autoencoder:

[0093] Combining the reconstruction loss and the KL divergence term, we get the total loss function of the variational autoencoder.

[0094] The reconstruction loss is used to measure the ability of the decoder to reconstruct the original data, that is, to minimize the difference between the reconstructed data and the original data;

[0095] The KL divergence term is used to constrain the distance between the latent variable distribution output by the encoder and the prior distribution, so as to enable the encoder to learn a suitable latent representation;

[0096] The original data is , reconstructing the data into , the reconstruction loss is defined as the element-wise cross entropy loss between the two: , where is the dimension of the data;

[0097] The latent variable distribution of the encoder output is , the prior distribution is , then the calculation formula of the KL divergence term is: ,

[0098] In the formula, is the dimension of the latent space, and They are the encoder output The means and variances of the latent variables;

[0099] Combining the reconstruction loss and the KL divergence term, we get the total loss function of the variational autoencoder: , where represents the expectation of the reconstruction loss under the latent variable distribution of the encoder output.

[0100] S4. Establish a Bayesian model to minimize the total loss function and optimize the encoder parameters and decoder parameters ;

[0101] Choosing an appropriate prior distribution and , using Gaussian distribution to constrain the Bayesian variational autoencoder model parameters, the following Bayesian model is established:

[0102] , where is the given encoder parameter and decoder parameters Observation data The likelihood function of and They are the encoder parameters and decoder parameters The prior distribution of

[0103] According to Bayes' theorem, the posterior distribution of the parameters is estimated by the prior distribution and likelihood function, as follows: ,

[0104] In the formula, Indicates the given encoder parameters and decoder parameters Observation data The likelihood function of ;

[0105] Use variational inference to approximate the posterior distribution as follows: Approximate the posterior distribution as a parameterized distribution , and approximate the true posterior distribution by minimizing the KL divergence;

[0106] Find one , which minimizes the KL divergence: ,

[0107] The KL divergence is defined as: ,

[0108] In variational inference, the approximate posterior distribution is optimized by minimizing the KL divergence , use the stochastic gradient descent (SGD) algorithm to calculate the minimum total loss function; then adjust the encoder parameters and decoder parameters Make optimizations.

[0109] in, Represents the weight matrix and bias of the encoder network, which determines how the encoder network converts the input data Convert to latent variables ; Represents the weight matrix and bias of the decoder network, which determines how the decoder network converts the latent variables Transformed into generated output data .

[0110] Example 2. A Bayesian variational autoencoder model established by the method described in Example 1, referring to Figure 2 , including an encoder and a decoder, wherein a Bayesian model is added between the encoder and the decoder;

[0111] The encoder samples data in the latent space, and the self-attention mechanism dynamically adjusts the importance of each input feature through weighted averaging;

[0112] The decoder maps the sampled latent variables back to the original data space to generate new data samples with similar features, and uses an attention mechanism to process data features for the output of each layer in the decoder;

[0113] The Bayesian model is used to estimate the distribution parameters of latent variables and the parameters of the reconstructed distribution. By inferring the posterior distribution of the parameters, an estimate of the uncertainty of the parameters is obtained, thereby improving the robustness and generalization ability of the model.

[0114] Example 3. Application of a Bayesian variational autoencoder model described in Example 2 in flight parameter data enhancement.

[0115] An application of a Bayesian variational autoencoder model in flight parameter data enhancement includes the following steps:

[0116] S01. Acquisition of original data: Screening out the records that are potentially related to the records in the flight parameter system from the fault records exported from the maintenance quality control system; Collecting the flight parameter record data under typical fault modes and normal modes, and constructing a data set;

[0117] S02, data preprocessing: preprocess the original data in the data set in step S01, specifically: 1. Gaussian normalization is performed on non-angular numerical data to convert the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, ensuring that the data have the same scale;

[0118] 2. Angle data processing, specifically: take sin and cos operations on the parameters of the angle class, and turn them into two trigonometric function parameters. For example, the parameter a of the angle class takes sin(a) and cos(a) operations respectively;

[0119] 3. Save the preprocessed data as a feature matrix, where each row represents a sample, i.e., an aircraft parameter, and each column represents a feature, i.e., a feature parameter;

[0120] S03. Data input and processing: The pre-processed aircraft parameter data is input into the Bayesian variational autoencoder model to generate new samples with similar distribution. For the specific flight parameter data flow, refer to Figure 3 .

[0121] The main goal of the Bayesian variational autoencoder model is to generate new samples with similar distribution to achieve data enhancement. Therefore, the output data is a sample of reconstructed flight parameter data generated from the latent space. These samples are reconstructed versions of the original data, but may have wider variations in the latent space. At the same time, the enhanced data has the following characteristics:

[0122] 1) The generated data contains samples that are not observed in the original dataset, increasing the diversity and coverage of the dataset;

[0123] 2) The generated data maintains similar characteristics and distribution as the original data, ensuring that the generated samples are statistically consistent with the original data;

[0124] 3) Neighboring points in the latent space correspond to similar samples in the data space, and the generated data maintains continuity in the latent space to ensure interpolation and inference when generating samples.

Claims

1. A method for establishing a Bayesian variational autoencoder model, characterized in that: The following steps are involved: S1. Design encoder: The encoder network adopts a multi-layer neural network structure, and adds a self-attention mechanism to dynamically adjust the importance of each input feature, and determine the mean and variance of the encoder output after adding the self-attention mechanism; S2. Design decoder: The decoder adopts a multi-layer neural network structure, and adds a temporal attention mechanism to ensure that the decoder dynamically pays attention to the information of different time steps in the input sequence when generating the output of each time step, and determines the mean value of the decoder output after adding the temporal attention mechanism; S3. Determine the total loss function of the variational autoencoder: Combining the reconstruction loss and the KL divergence term, we get the total loss function of the variational autoencoder. The reconstruction loss is used to measure the ability of the decoder to reconstruct the original data, that is, to minimize the difference between the reconstructed data and the original data; The KL divergence term is used to constrain the distance between the latent variable distribution output by the encoder and the prior distribution, so as to enable the encoder to learn a suitable latent representation; S4. Establish a Bayesian model to minimize the total loss function and optimize the encoder parameters and decoder parameters ; In step S4, an appropriate prior distribution is selected and , using Gaussian distribution to constrain the Bayesian variational autoencoder model parameters, the following Bayesian model is established: , where is the given encoder parameter and decoder parameters Observation data The likelihood function of and They are the encoder parameters and decoder parameters The prior distribution of According to Bayes' theorem, the posterior distribution of the parameters is estimated by the prior distribution and likelihood function, as follows: , In the formula, Indicates the given encoder parameters and decoder parameters Observation data The likelihood function of ; Use variational inference to approximate the posterior distribution as follows: Approximate the posterior distribution as a parameterized distribution , and approximate the true posterior distribution by minimizing the KL divergence; Find one , which minimizes the KL divergence: , The KL divergence is defined as: , In variational inference, the approximate posterior distribution is optimized by minimizing the KL divergence , use the stochastic gradient descent (SGD) algorithm to calculate the minimum total loss function; then adjust the encoder parameters and decoder parameters Optimize The model established by the above method is applied to flight parameter data enhancement, including the following steps: S01. Acquisition of original data: Screening out the records that are potentially related to the records in the flight parameter system from the fault records exported from the maintenance quality control system; Collecting the flight parameter record data under typical fault modes and normal modes, and constructing a data set; S02, data preprocessing: preprocess the original data in the data set in step S01, specifically:

1. Gaussian normalization is performed on non-angular numerical data to convert the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, ensuring that the data have the same scale; 2. Angle data processing, specifically: take sin and cos operations on the angle parameters respectively to convert them into two trigonometric function parameters; 3. Save the preprocessed data as a feature matrix, where each row represents a sample, i.e., an aircraft parameter, and each column represents a feature, i.e., a feature parameter; S03. Data input and processing: The preprocessed aircraft parameter data is input into the Bayesian variational autoencoder model to generate new samples with similar distribution.

2. The method for establishing a Bayesian variational autoencoder model according to claim 1, characterized in that: The input of the encoder network in step S1 is the original data , the output is the latent variable The mean and variance of Among them The output of the layer is represented as , the mean and variance of the encoder output can be expressed as follows: , , where , are the weight matrices for the mean and variance, respectively, , are the bias terms of the mean and variance respectively, is the output layer of the encoder; The encoder The layer output is , is the input of the attention mechanism, then the weight calculation formula of the self-attention mechanism is as follows: , where , , They are weight matrices, which are used to transform the input Projection into query, key, and value spaces; Function used to normalize weights.

3. The method for establishing a Bayesian variational autoencoder model according to claim 2, characterized in that: The self-attention mechanism includes the following steps: A. Projection: For each input feature Perform three linear transformations and project them into the query, key, and value spaces to obtain the query vectors. , key vector , value vector ; B. Calculate attention scores: Get the similarity between each input feature and other features by calculating the dot product of the query vector and the key vector; then normalize these scores by applying the softmax function to obtain the attention weights; C. Weighted summation: Use the attention weights to perform weighted summation on the value vector; D. Output: The representation adjusted by the attention mechanism is obtained and passed to the next layer of the network or the output layer for further processing.

4. A method for establishing a Bayesian variational autoencoder model according to claim 1 or 2, characterized in that: The input of the decoder network in step S2 is the latent variable , the output is the reconstructed data The mean of Among them The output of the layer is represented as , the mean of the decoder output is expressed as follows: , , where is the weight matrix for reconstructing the data mean, is the bias term for reconstructing the mean of the data; The decoder The hidden state of the layer is , then the calculation formula of the temporal attention mechanism is as follows: , where is the calculated temporal attention score, which is used to measure the decoder Layer hidden state and input sequence The correlation of the time steps.

5. The method for establishing a Bayesian variational autoencoder model according to claim 4, characterized in that: The temporal attention mechanism includes the following steps: A. Calculating Attention Score : In the decoder Layer hidden state and each time step of the input sequence Calculate the attention score between ; B. Normalized Attention Score : Normalize the calculated attention scores to ensure that their sum is 1; use the softmax function to achieve this, that is, each attention score Exponentiate and divide by the sum of all exponents; C. Hidden state of weighted input sequence: using normalized attention scores The hidden states of the input sequence are weighted summed to obtain the input of the decoder at the current time step; ensuring that the decoder focuses on the part of the input sequence that is relevant to the current time step when generating each output, thereby generating the output more accurately; D. Update the hidden state of the decoder: The hidden state of the input sequence obtained by weighted summation is used as the input of the decoder at the current time step to generate the output of the current time step; the decoder will dynamically pay attention to the information of different time steps in the input sequence at each time step to better generate the output sequence.

6. A method for establishing a Bayesian variational autoencoder model according to claim 1 or 2, characterized in that: The original data in step S3 is , reconstructing the data into , the reconstruction loss is defined as the element-wise cross entropy loss between the two: , where is the dimension of the data; The latent variable distribution of the encoder output is , the prior distribution is , then the calculation formula of the KL divergence term is: , In the formula, is the dimension of the latent space, and They are the encoder output The means and variances of the latent variables; Combining the reconstruction loss and the KL divergence term, we get the total loss function of the variational autoencoder: , where represents the expectation of the reconstruction loss under the latent variable distribution of the encoder output.

7. A Bayesian variational autoencoder model established by the method according to any one of claims 1 to 6, comprising an encoder and a decoder, wherein the special feature is that a Bayesian model is added between the encoder and the decoder; The encoder samples data in the latent space, and the self-attention mechanism dynamically adjusts the importance of each input feature through weighted averaging; The decoder maps the sampled latent variables back to the original data space to generate new data samples with similar features, and uses an attention mechanism to process data features for the output of each layer in the decoder; The Bayesian model is used to estimate the distribution parameters of latent variables and the parameters of the reconstructed distribution. By inferring the posterior distribution of the parameters, an estimate of the uncertainty of the parameters is obtained, thereby improving the robustness and generalization ability of the model.