Generator Abnormal Detection Method and Electronic Device

Through the abnormal detection model of multimodal data fusion, the problems of low accuracy and high misjudgment rate in traditional generator detection systems are solved, and the accurate detection of the complex operating state of the generator is realized, especially in the critical state, the detection reliability is improved.

CN120180342BActive Publication Date: 2025-08-05CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510645875.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-05
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

Traditional generator abnormality detection systems rely on single sensor data, resulting in low detection accuracy, and fixed thresholds or empirical formulas lead to high misjudgment rates, making it difficult to capture complex operating state characteristics, especially in critical states that are prone to misjudgment.

Method used

The multimodal data fusion method is adopted to extract and reconstruct the operation characteristics and simulate the operation characteristics through the abnormality detection model composed of encoder, decoder, generator and discriminator, and feature fusion is performed through the fusion module, and the abnormality detection result is finally determined by the discriminator.

Benefits of technology

It improves the accuracy of generator abnormality detection, especially in the critical state, ensures the reliability of detection, reduces the misjudgment rate, and can capture the complex operating characteristics of the generator in all aspects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180342B_ABST
    Figure CN120180342B_ABST
Patent Text Reader

Abstract

The present application provides a generator abnormality detection method and electronic device. The method obtains actual operating data of the generator and inputs it into a pre-trained abnormality detection model. Reconstructed operating features are extracted from the actual operating data according to the encoder and decoder in the model, and simulated operating features are extracted from the actual operating data according to the generator in the model. The reconstructed operating features and the simulated operating features are then fused through a fusion module in the model to obtain fused operating features. The abnormality detection result of the generator is determined through the discriminator, the fused operating features and the actual operating data in the model, thereby realizing abnormality detection of the generator, solving the problem of high misjudgment rate caused by serious reliance on single modal data, and solving the problem of high misjudgment rate caused by fixed thresholds or empirical formulas. In addition, the method can accurately capture the complex operating characteristics of the generator, improve the accuracy of generator abnormality detection, and ensure the reliability of abnormality detection under critical conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle abnormality detection, and in particular to a generator abnormality detection method and electronic equipment. Background Art

[0002] Traditional generator anomaly detection systems have many defects, which seriously restrict the accurate grasp of generator operating status and fault prevention.

[0003] In related technologies, generator anomaly detection systems often rely on data collected by a single sensor, such as a current sensor or voltage sensor. This approach lacks simultaneous detection of other dimensions, resulting in low anomaly detection accuracy. Furthermore, related technologies often use fixed thresholds or empirical formulas to determine anomalies. For example, when determining generator efficiency anomalies, only the current direction or the sign of the power are used. However, in a generator's critical state, where the electrical power approaches the power loss, even small errors in the measurement equipment can lead to misjudgment of anomalies.

[0004] In addition, model-based anomaly detection is difficult to effectively capture complex operating status characteristics, resulting in low anomaly detection accuracy. At the same time, faced with complex industrial environment noise, the model is easily interfered with and has poor generalization ability. Summary of the Invention

[0005] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide a generator abnormality detection method and electronic equipment to solve the problems of low accuracy of engine abnormality detection and abnormality misjudgment in the related art.

[0006] The present invention provides a method for detecting abnormality of a generator, the method comprising:

[0007] Acquire actual operating data of the generator and input the actual operating data into a pre-trained anomaly detection model, wherein the anomaly detection model includes an encoder, a decoder, a generator, a fusion module, and a discriminator;

[0008] extracting reconstructed operation features from the actual operation data based on the encoder and the decoder, and extracting simulated operation features from the actual operation data based on the generator;

[0009] fusing the reconstructed operation feature and the simulated operation feature based on the fusion module to obtain a fused operation feature;

[0010] An abnormality detection result of the generator is determined based on the discriminator, the fused operation feature and the actual operation data.

[0011] Optionally, extracting and reconstructing operation features from the actual operation data based on the encoder and the decoder includes:

[0012] extracting potential operation features from the actual operation data based on the encoder;

[0013] The potential operation feature is reconstructed based on the decoder to obtain a reconstructed operation feature with the same dimension as the actual operation data.

[0014] Optionally, the encoder includes an input layer, at least one hidden layer, and an output layer, and extracting potential operation features from the actual operation data based on the encoder includes:

[0015] Inputting the data values of each dimension in the actual operation data into the input layer, and the data values of each dimension enter the hidden layer after being processed by the input layer;

[0016] For each of the hidden layers, extracting nonlinear features from the output of the input layer or the output of the previous hidden layer based on the hidden layer, and performing residual connection on the nonlinear features;

[0017] Based on the output layer, a linear transformation is performed on the output of the last hidden layer to obtain a mean vector and a variance logarithm vector, and potential operating characteristics are determined according to the mean vector and the variance logarithm vector.

[0018] Optionally, the generator includes a long short-term memory module and a self-attention module, and extracting simulated operation features from the actual operation data based on the generator includes:

[0019] Extracting the temporal variation trend of the actual operation data based on the long short-term memory module to obtain key time series features;

[0020] Based on the self-attention module, the relationship between different parameters in the key timing features is extracted to obtain simulation operation features.

[0021] Optionally, fusing the reconstructed operation feature and the simulated operation feature based on the fusion module to obtain a fused operation feature includes:

[0022] Obtaining the operating condition of the generator;

[0023] The operating conditions, the reconstructed operating characteristics and the simulated operating characteristics are input into the fusion module, so that the fusion module determines the reconstruction characteristic weight and the simulation characteristic weight according to the operating conditions, and fuses the reconstructed operating characteristics and the simulated operating characteristics according to the reconstruction characteristic weight and the simulation characteristic weight to obtain a fused operating characteristic.

[0024] Optionally, determining an abnormality detection result of the generator based on the discriminator, the fused operation feature, and the actual operation data includes:

[0025] Inputting the fused operation feature and the actual operation data into the discriminator, so that the discriminator determines whether the fused operation feature is the real data of the actual operation data, and obtains the real probability corresponding to the fused operation feature;

[0026] An abnormality detection result of the generator is determined based on the true probability.

[0027] Optionally, the training of the anomaly detection model includes:

[0028] Constructing an initial model, wherein the initial model includes an encoder, a decoder, a generator, a fusion module, and a discriminator;

[0029] Acquire a training sample set, wherein the training sample set includes a plurality of normal operation data;

[0030] The parameters of the encoder, decoder, and generator in the initial model are fixed, and the discriminator in the initial model is trained based on the training sample set. The parameters of the discriminator in the initial model are fixed, and the encoder, decoder, and generator in the initial model are trained based on the training sample set until the training cutoff condition is met, thereby obtaining the anomaly detection model.

[0031] Optionally, training the encoder, decoder, and generator in the initial model based on the training sample set includes:

[0032] Inputting the training sample set into the initial model, obtaining reconstructed data and simulated data corresponding to the normal operating data in the training sample set, and determining the true probabilities corresponding to the reconstructed data and the simulated data;

[0033] Determining a reconstruction adversarial loss and a feature difference loss based on the discriminator in the initial model, the true probability corresponding to the reconstructed data, and the normal operating data, and determining a generative adversarial loss based on the true probability corresponding to the discriminator and the simulated data;

[0034] Based on the reconstruction adversarial loss and the feature difference loss, the parameters inside the encoder and the decoder are updated, and based on the generation adversarial loss, the parameters inside the generator are updated.

[0035] Optionally, the normal operating data includes generator speed, generator torque, generator voltage, generator current, generator temperature and generator vibration value. After obtaining the training sample set, the following is further included:

[0036] preprocessing the normal operation data;

[0037] The preprocessing of the normal operating data includes at least one of the following:

[0038] performing Kalman filtering on the generator speed and the generator torque to remove noise from the generator speed and the generator torque;

[0039] performing mean filtering on the generator voltage and the generator current to remove noise in the generator voltage and the generator current;

[0040] Wavelet denoising is performed on the generator temperature and the generator vibration value to remove high-frequency noise components in the generator temperature and the generator vibration value.

[0041] An embodiment of the present application further provides an electronic device, comprising:

[0042] processor and memory;

[0043] The processor is used to execute the steps of the generator abnormality detection method provided in any embodiment of the present application by calling the program or instructions stored in the memory.

[0044] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of the generator abnormality detection method provided in any embodiment of the present application.

[0045] In summary, the present application proposes a method for detecting abnormalities in a generator. The method obtains actual operating data of the generator and inputs the actual operating data into a pre-trained abnormality detection model. The encoder and decoder in the model extract reconstructed operating features from the actual operating data, and the generator in the model extracts simulated operating features from the actual operating data. The reconstructed operating features and the simulated operating features are then fused by a fusion module in the model to obtain fused operating features. The abnormality detection result of the generator is determined by the discriminator in the model, the fused operating features, and the actual operating data, thereby realizing abnormality detection of the generator. The method can perform abnormality detection through multi-modal generator operating data, solving the problem of high false positive rate caused by heavy reliance on single-modal data, as well as the problem of high false positive rate caused by fixed thresholds or empirical formulas. In addition, the method can accurately capture the complex operating characteristics of the generator through the encoder, decoder, and generator, thereby combining the discriminator for abnormality detection, identifying the abnormal state of the generator under various working conditions through the complex operating features, improving the accuracy of generator abnormality detection, especially for the critical state of the generator, and ensuring the reliability of abnormality detection under critical state. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0047] Figure 1 This is a flow chart of a generator abnormality detection method provided by an embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of a generator abnormality detection process provided by an embodiment of the present application;

[0049] Figure 3 This is a schematic structural diagram of a generator abnormality detection device provided in an embodiment of the present application;

[0050] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] 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 embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.

[0052] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0053] As mentioned in the background technology, in order to solve the problems in the prior art, this application proposes a generator abnormality detection method. Figure 1 This is a flow chart of a generator abnormality detection method provided by an embodiment of the present application. Figure 1 , the generator abnormality detection method specifically includes:

[0054] S110 , obtaining actual operating data of the generator, and inputting the actual operating data into a pre-trained anomaly detection model.

[0055] The actual operating data can be multimodal generator-related data, which can simultaneously collect high-precision parameters from multiple dimensions, achieve multi-source data fusion, and comprehensively capture the generator's operating status. For example, the actual operating data can include the generator's actual speed, actual torque, actual voltage, actual current, actual temperature, and actual vibration values.

[0056] For example, a high-speed, anti-interference shielded twisted pair cable can be used to connect the sensor and the data acquisition module. The data acquisition module obtains the actual operating data sent by the sensor. After that, the data acquisition module can transmit it to the central processing unit via Ethernet, and the central processing unit realizes abnormality detection. At the same time, the central processing unit is connected to the display module, and the central processing unit is connected to the alarm module to realize real-time data display and abnormality alarm.

[0057] Specifically, after obtaining the actual operation data, the parameters of different modes in the actual operation data can be spliced into the form of a joint feature vector. For example, the actual operation data It can be expressed as:

[0058] , is the actual speed, is the actual torque, is the actual voltage, is the actual current, is the actual temperature, is the actual vibration value.

[0059] Furthermore, actual operating data can be input into a pre-trained anomaly detection model, which includes an encoder, a decoder, a generator, a fusion module, and a discriminator. For example, in the embodiments of the present application, the encoder and decoder in the anomaly detection model can be the encoder and decoder in a variational autoencoder (VAE); the generator and discriminator in the anomaly detection model can be the generator and discriminator in a generative adversarial network (GANs).

[0060] The encoder can be used to compress high-dimensional input into a low-dimensional latent space, extract key features and discard redundant information. The decoder is used to map the latent variables extracted by the encoder back to the data space and reconstruct the input data. In other words, the encoder can transform the input into a structured probability distribution, and the decoder can use this distribution to generate data.

[0061] Among them, the generator can be used to generate fake data similar to the input; the fusion module can fuse the output of the decoder and the generator; the discriminator can be used to use the actual running data as real data to determine whether the output of the fusion module is false data.

[0062] S120 , extracting reconstructed operation features from the actual operation data based on the encoder and the decoder, and extracting simulated operation features from the actual operation data based on the generator.

[0063] Specifically, when the actual operation data is input into the anomaly detection model, the actual operation data can enter the encoder and the generator. The encoder first extracts potential information from the actual operation data, and the decoder reconstructs the potential information extracted by the encoder to obtain reconstructed operation features; at the same time, the generator can extract the correlation between different parameters and the time relationship between the same parameters from the actual operation data to obtain simulated operation features.

[0064] In a specific embodiment, extracting and reconstructing operation features from actual operation data based on an encoder and a decoder includes the following steps:

[0065] Step 11: extracting potential operation features from actual operation data based on the encoder;

[0066] Step 12: Reconstruct the potential operation features based on the decoder to obtain reconstructed operation features with the same dimension as the actual operation data.

[0067] In step 11, after the actual operation data is input into the anomaly detection model, it may first enter the encoder, and the encoder may extract potential operation features from the actual operation data.

[0068] Regarding step 11 above, in one example, the encoder includes an input layer, at least one hidden layer, and an output layer. Extracting potential operation features from actual operation data based on the encoder includes the following steps:

[0069] Step 111: Input the data values of each dimension in the actual operation data into the input layer, and the data values of each dimension enter the hidden layer after being processed by the input layer;

[0070] Step 112: For each hidden layer, extract nonlinear features from the output of the input layer or the output of the previous hidden layer based on the hidden layer, and perform residual connection on the nonlinear features;

[0071] Step 113: Perform a linear transformation on the output of the last hidden layer based on the output layer to obtain a mean vector and a variance logarithm vector, and determine the potential operating characteristics based on the mean vector and the variance logarithm vector.

[0072] The encoder may be composed of an input layer, at least one hidden layer, and an output layer. In step 111, actual operating data may enter the input layer in the form of a vector, and each neuron receives the data value of the corresponding dimension. The data value of each dimension is processed by the input layer and then enters the hidden layer.

[0073] For example, the input layer may perform format conversion on the actual running data to convert it into a uniform tensor format (such as a vector or a matrix), or the input layer may perform normalization on the actual running data to scale it to a fixed range, etc.

[0074] Furthermore, in step 112, for each hidden layer, the hidden layer can extract nonlinear features from the output of the input layer or the output of the previous hidden layer. For example, the first hidden layer can extract nonlinear features from the output of the input layer (i.e., its own input), and the other hidden layers except the first hidden layer can extract nonlinear features from the output of the previous hidden layer (i.e., its own input).

[0075] Among them, the hidden layer can extract nonlinear features through linear transformation and nonlinear activation function. The nonlinear features can describe the complex nonlinear relationships and change trends of parameters such as actual temperature, actual voltage, and actual vibration value.

[0076] Specifically, the linear transformation may be a linear transformation performed by the hidden layer on the output of the previous hidden layer based on the weights and biases between the neurons in the previous hidden layer.

[0077] Exemplarily, the linear transformation can be: Assume that the i-th hidden layer has neurons, and the i-1th hidden layer has neurons, for the jth neuron in the i-th hidden layer, its input is the output of all neurons in the i-1th hidden layer The linear combination of , is the weight connecting the kth neuron in the i-1th hidden layer and the jth neuron in the i-th hidden layer, is the bias of the jth neuron in the ith hidden layer.

[0078] For example, the input feature vector X is forward propagated, assuming that the feature vector X= ,in 、 、 The parameters representing different modes (assuming that the parameter dimension of each model is small) enter the hidden layer for linear transformation. Assume that the number of nodes in the hidden layer (that is, the number of neurons) is 4. The selection of the number of nodes needs to be determined through continuous trial and adjustment. Cross-validation and grid search can be used to find the optimal number of nodes. Too many nodes may cause the model to become complex and prone to overfitting (that is, good performance on training samples and poor performance on test samples). You can try to use the average of the number of input features and the number of output categories as a starting point, and then adjust according to the performance of the model, or use the product of the square root of the number of input features and a constant (2 or 3) as an initial estimate of the number of nodes.

[0079] Continuing with the above example, when the number of nodes in the hidden layer is 4, the dimension of the weight matrix W is 8×4, and the dimension of the bias vector b is 4×1. The linear transformation of the feature vector X is expressed as , the linear transformation result Z is a linear combination of 4 neurons.

[0080] The result of the linear transformation is Afterwards, the hidden layer can introduce nonlinear characteristics through nonlinear activation functions to enhance the expressive power of the model. For example, the ReLU (Rectified Linear Unit) nonlinear activation function can be used. The definition of ReLU is: , is the output of the jth neuron in the i hidden layer, is the result of linear transformation, when When greater than 0, ,when When it is less than 0, After being processed by the nonlinear activation function, the hidden layer can obtain the output of each neuron.

[0081] After extracting nonlinear features, residual connections can be introduced in the hidden layers to enable more efficient backpropagation of gradients during model training, thus avoiding the vanishing gradient problem. Specifically, for each hidden layer, the extracted nonlinear features can be connected to the input of that hidden layer. That is, the first hidden layer connects the extracted nonlinear features to the output of the input layer, and the hidden layers other than the first hidden layer connect the extracted nonlinear features to the output of the previous hidden layer.

[0082] For example, assume that the input of the lth hidden layer is , after the above linear change and nonlinear activation function processing, the output is , then the final output of the lth hidden layer can be obtained through the residual connection , In the process of calculating the gradient during model training, the loss function is calculated according to the chain rule. Calculate about input The gradient of can make an additional identity term 1 during gradient propagation, thereby preventing the gradient from becoming too small during the back propagation process, such as the loss function About input The gradient of can be expressed as:

[0083] ;

[0084] Where, is the loss function About input The gradient, is the loss function About output The gradient, is the loss function About nonlinear characteristics gradient.

[0085] After feature extraction and transformation are performed on each hidden layer, the final layer (i.e., the output layer) of the encoder can generate the logarithm of the mean and variance of the latent space distribution through two branches in step 113, respectively, to obtain a mean vector and a logarithm vector of variance. The two branches can convert the hidden layer output into the desired parameters through a linear transformation.

[0086] For example, assuming that the dimension of the latent space is d, the output layer is divided into a mean branch and a variance logarithm branch, each branch contains d neurons; among them, the d neurons in the mean branch are responsible for calculating the mean of the latent space distribution , for each neuron, it can accept the features output by the previous hidden layer , and make linear changes, such as, let the weight vector corresponding to the i-th mean neuron be , the bias is , then the mean value of the neuron output is for: ,in for By combining the mean values of the outputs of d mean neurons, we can get the mean vector .

[0087] Similarly, the d neurons in the variance logarithm branch are used to calculate the variance logarithm of the latent space distribution , the logarithm of the variance of the i-th neuron ,in is the weight vector corresponding to the i-th variance logarithm neuron The transpose of is the bias corresponding to the i-th variance logarithm neuron. By combining the variance logarithms output by d variance logarithm neurons, we can get the variance logarithm vector .

[0088] After obtaining the mean vector and the logarithm of the variance vector, the potential operating characteristics can be further determined based on the mean vector and the logarithm of the variance vector. For example, the potential operating characteristics can be obtained by sampling the mean vector and the logarithm of the variance vector using a reparameterization technique.

[0089] For example, the standard normal distribution can be selected from the mean vector and the logarithm vector of the variance , and then from the standard normal distribution A random vector is sampled from , based on the random vector With standard normal distribution Calculate potential operating characteristics , such as potential operating characteristics , the latent running feature contains the feature information extracted by the encoder.

[0090] Through the above steps 111 to 113, nonlinear transformation and residual connection can be performed through the hidden layer, and the mean vector and variance logarithm vector of the latent space can be determined through the output layer to obtain potential operation characteristics. The actual operation data can be converted into a structured probability distribution, and then the potential features therein can be extracted to achieve accurate representation of the actual operation data.

[0091] After the encoder extracts the potential operation features, the potential operation features can further enter the decoder and be reconstructed by the decoder to map the potential operation features back to the original data space where the actual operation data is located to obtain the reconstructed operation features.

[0092] Specifically, the decoder can adopt the same structure as the encoder, consisting of an input layer, at least one hidden layer, and an output layer. In the decoder, the number of neurons in the input layer is consistent with the dimensionality of the latent operational features, and is responsible for receiving the latent operational features output by the encoder. The hidden layer contains multiple neurons, and their number and number of layers can be adjusted according to actual needs to achieve gradual conversion and extraction of the latent operational features (linear change and nonlinear activation). The number of neurons in the output layer is consistent with the dimensionality of the actual operational data, and is used to output the reconstructed operational features. During the reconstruction process, the decoder can gradually map the latent operational features back to the original data space through a series of linear transformations and nonlinear activation functions.

[0093] For example, for time-series parameters (such as vibration and current signals), deconvolution (Deconv1D) or gated recurrent unit networks can be used to generate reconstructed operating features. For non-time-series parameters (static values such as speed and torque), fully connected layers can be used for reconstruction. Each layer is connected by a weight matrix and a bias vector.

[0094] Through the encoder and decoder, the actual operating data can be first mapped to the latent space, and then mapped back from the latent space to the original data space. This can accurately extract the potential key features in the actual operating data and ensure the accuracy of generator anomaly detection.

[0095] In an embodiment of the present application, in addition to extracting and reconstructing operation features through an encoder and a decoder, simulation operation features can also be extracted through a generator.

[0096] In a specific embodiment, the generator includes a long short-term memory module and a self-attention module, and extracting simulated operation features from the actual operation data based on the generator includes the following steps:

[0097] Step 21: Extract the temporal variation trend of the actual operation data based on the long short-term memory module to obtain key time series features;

[0098] Step 22: Extract the relationship between different parameters in the key timing features based on the self-attention module to obtain the simulation operation features.

[0099] Among them, in step 21, the actual operation data can be input into the long short-term memory module in the form of a time series. The long short-term memory module can process the long-term dependencies in the actual operation data and extract the change trends of various parameters at different times.

[0100] For example, the long short-term memory module can extract the changes in voltage and current of the generator under different loads over time, effectively capture the long-term patterns of these changes, and selectively memorize and update information through a gating mechanism (input gate, forget gate, output gate) to obtain key timing features.

[0101] Furthermore, in step 22, the key timing features output by the long short-term memory module enter the self-attention module. The self-attention module can model the global information in the key timing features through the self-attention mechanism, and analyze the relationship between different parameters in multimodal data, such as the correlation between temperature changes and current and load, thereby capturing complex global dependencies and assigning different weights to each parameter in each time step through self-attention calculation to highlight key information and obtain simulation operation characteristics.

[0102] Through steps 21 and 22 above, after processing by the long-short-term memory module and the self-attention module, the generator can output a simulated state feature vector, namely a simulated operating feature. This simulated operating feature can be understood as a comprehensive representation of various possible characteristics of the generator. For example, when processing data such as the voltage, current, and temperature of the generator under a critical state, the long-short-term memory module analyzes the voltage and current trends, while the self-attention module analyzes the relationships between these parameters, ultimately outputting the simulated operating feature under the critical state. This approach allows analysis of actual operating data from different perspectives, both temporally and spatially, ensuring the accuracy of the extracted simulated operating features and, consequently, the reliability of subsequent anomaly detection.

[0103] S130 : Based on the fusion module, the reconstructed operation feature and the simulated operation feature are fused to obtain a fused operation feature.

[0104] Specifically, after obtaining the reconstructed operation features and the simulated operation features, the reconstructed operation features and the simulated operation features may be fused to ensure feature accuracy.

[0105] In the embodiment of the present application, considering that the operating conditions of the generator are dynamically changing, the characteristics exhibited by the generator under different operating conditions may be different, and the manifestation and significance of abnormal characteristics are not exactly the same. Therefore, the fusion module can dynamically adjust the fusion ratio of the reconstructed operating characteristics and the simulated operating characteristics according to the operating conditions.

[0106] In a specific embodiment, the reconstructed operation feature and the simulated operation feature are fused based on the fusion module to obtain the fused operation feature, including:

[0107] The operating conditions of the generator are obtained; the operating conditions, the reconstructed operating characteristics and the simulated operating characteristics are input into a fusion module, so that the fusion module determines the reconstruction feature weight and the simulation feature weight according to the operating conditions, and fuses the reconstructed operating characteristics and the simulated operating characteristics according to the reconstruction feature weight and the simulation feature weight to obtain a fused operating characteristic.

[0108] The operating condition may describe the load level or load variation of the generator, such as a low load condition, a medium load condition, a high load condition, or a rapidly changing condition.

[0109] Specifically, the operating conditions, the reconstructed operating characteristics, and the simulated operating characteristics may be input into a fusion module, and the fusion module may determine the weights of the reconstructed characteristics and the simulated characteristics according to the operating conditions.

[0110] For example, considering the stable operation of generators under low-load conditions, the encoder and decoder, after training, can more accurately and stably extract the potential features of this stable operating state. These features contain the basic operating laws and characteristic patterns of the generator under low load, and are highly reliable and representative. Therefore, under low-load conditions, the fusion module can increase the weight of the reconstructed operating features obtained by the encoder and decoder, that is, increase the weight of the reconstructed features, so that the model relies more on the features extracted by the encoder and decoder to distinguish anomalies, ensuring the accuracy of anomaly detection.

[0111] Furthermore, considering that under high-load or rapidly changing operating conditions, the physical processes and operating states within the generator are more complex, and sudden and abnormal feature changes may occur, the generator, after training, possesses powerful generation capabilities, can quickly adapt to changes in data distribution, and generate diverse features, thereby capturing abnormal features that may appear under these complex operating conditions. Therefore, under high-load or rapidly changing operating conditions, the fusion module can increase the weight of the simulated operating features obtained by the generator, that is, increase the weight of the simulated features, thereby leveraging the advantages of the generator to help the model better handle anomaly detection under complex operating conditions.

[0112] After determining the reconstruction feature weights and the simulation feature weights, the fusion module may further perform weighted summation on the reconstruction operation features and the simulation operation features according to the reconstruction feature weights and the simulation feature weights to achieve fusion of the reconstruction operation features and the simulation operation features.

[0113] For example, assume that the reconstruction operation feature is represented as , the simulation operation characteristics are expressed as , the reconstructed feature weight is , the simulated feature weight is , then the fusion operation features It can be expressed as:

[0114] ;

[0115] In order to further improve the expressive power of the fusion operation features, nonlinear changes can be performed on the weighted summed fusion operation features, such as using the ReLU function.

[0116] Through the above implementation, dynamic feature fusion based on the generator operating conditions can be achieved, and the operating laws and characteristic patterns of the generator under different operating conditions can be taken into account, making the fused features more reliable and representative, thereby improving the accuracy of anomaly detection.

[0117] S140 , based on the discriminator, the fusion operation characteristics and the actual operation data, determine the abnormality detection result of the generator.

[0118] Specifically, after obtaining the fused operating features, the fused operating features and the actual operating data can be further input into a discriminator to determine whether the fused operating features are virtual data through the discriminator, thereby obtaining an abnormality detection result of the generator.

[0119] In a specific embodiment, determining the abnormality detection result of the generator based on the discriminator, the fusion operation characteristics and the actual operation data includes the following steps:

[0120] Step 31: Input the fused operation feature and the actual operation data into the discriminator, so that the discriminator determines whether the fused operation feature is the real data of the actual operation data, and obtains the true probability corresponding to the fused operation feature;

[0121] Step 32: Determine the abnormality detection result of the generator based on the true probability.

[0122] The discriminator can be composed of a convolutional neural network. In step 31, after the fused operational features and actual operational data enter the discriminator, local features can be captured through the discriminator's convolutional layer. Multiple different convolution kernels are used to perform convolution operations on the input data (the fused operational features and actual operational data). Each convolution kernel can be considered a feature detector, which extracts local features by sliding over the input data.

[0123] Specifically, the operating characteristics are integrated with actual operating data to generate multimodal data for the generator. The convolution kernels in the discriminator's convolutional layer can capture local features such as voltage fluctuation patterns, temperature increases, and periodic changes in vibration. Each convolution kernel generates a corresponding feature map that reflects the input data's response to the features represented by that kernel. Multiple convolution kernels operate in parallel, generating multiple different feature maps that describe the internal characteristics of the input data from different perspectives.

[0124] After processing by the convolutional layers, pooling layers (such as max pooling or average pooling) in the discriminator can further reduce the size of the feature map, thereby lowering the data dimensionality and downsampling the feature map output by the convolutional layer. For example, max pooling selects the maximum value within each pooling window as the output, helping to preserve key information in the feature map while removing unimportant details. In the generator's multimodal data, pooling can highlight features that are important for distinguishing real data from virtual data, such as unusual peaks or valleys.

[0125] After processing by the pooling layer, the fully connected layer in the discriminator further performs feature fusion and classification decisions. It expands and concatenates the multiple feature maps processed by the convolutional and pooling layers to form a long vector. This vector contains various feature information from local to global aspects of the input data. The fully connected layer's weight matrix and bias terms perform linear combinations and nonlinear transformations on these features to achieve feature fusion. The final fully connected layer typically uses an activation function (such as Sigmoid) to output a probability value. This probability value indicates the likelihood that the fused running feature corresponds to the real data corresponding to the actual running data, and this probability value can be used as the true probability.

[0126] Furthermore, in step 32, after obtaining the true probability output by the discriminator, if the true probability is close to 1, it means that the fused running feature is real data, and if the true probability is close to 0, it means that the fused running feature is virtual data.

[0127] Exemplarily, a probability threshold can be set in advance. If the true probability is greater than or equal to the probability threshold, the fused operation feature can be determined to be true data, and then the abnormality detection result of the generator can be determined to be normal operation, that is, there is no abnormality. If the true probability is less than the probability threshold, the fused operation feature can be determined to be virtual data, and then the abnormality detection result of the generator can be determined to be abnormal operation, that is, there is an abnormality.

[0128] It should be noted that the discriminator can determine the degree of match between the actual operating data and the fused operating features by measuring the similarity between the actual operating data and the fused operating features, and thus determine whether the fused operating features are virtual based on the degree of match. The discriminator can learn the data distribution characteristics of the generator under normal operating conditions through pre-training. If the degree of match between the actual operating data and the fused operating features is similar to that under normal operating conditions, that is, the actual operating data and the fused operating features are highly similar, then it indicates that the current operating state of the generator conforms to the normal state learned by the model and the generator is in normal operating condition.

[0129] In steps 31 and 32 above, a discriminator can measure the difference between the generated fused operating features and the actual operating data, and then determine the anomaly detection result based on this difference. This can accurately detect generator anomalies, especially when the generator is in a critical state, and can avoid the problem of anomaly detection errors caused by unstable operation. The critical state can refer to the generator reaching a specific operating point, such as when the electric power is close to the loss power.

[0130] Specifically, if the generator abnormality detection result is determined to be abnormal operation, that is, an abnormality exists, the vehicle alarm module can be controlled to sound an alarm, or the abnormality information can be transmitted to the host computer for display and storage. If the generator abnormality detection result is determined to be normal operation, that is, no abnormality exists, data collection, processing, analysis, and judgment can be repeated in the next moment until the generator stops operating or the entire detection system is shut down.

[0131] The host computer can store each anomaly detection result and establish a historical database. The host computer can then conduct in-depth analysis of the historical database, such as analyzing the frequency and development patterns of anomalies under different operating conditions. Using data mining techniques, it can identify potential problems and provide a basis for generator maintenance and performance optimization. For example, analysis can reveal that a certain generator model is prone to abnormal temperature rise in specific components during long-term operation under high load. This can lead to targeted adjustments to operating strategies or improvements to product design. Based on anomaly detection results and data analysis, the generator's operating parameters can be optimized.

[0132] In order to further improve the accuracy of anomaly detection, considering that with the accumulation of vehicle mileage and the wear of various components, the data collected by the sensor under the same state may change, therefore, a feedback mechanism can also be introduced in the actual anomaly detection process to optimize the anomaly detection model.

[0133] For example, after determining that the generator's abnormality detection result indicates abnormal operation, the alarm module can be controlled to issue an alarm. If a clear command is received (e.g., maintenance personnel inspect the generator and determine that it is normal), the actual operating data and the corresponding abnormality detection result can be used as negative samples. Alternatively, after determining that the generator's abnormality detection result indicates normal operation, if a fault command is received (e.g., from the generator management system in the vehicle), the actual operating data and the corresponding abnormality detection result can be used as negative samples. Furthermore, negative samples can be used to optimize and train the anomaly detection model, enabling dynamic adjustment of the model, making it suitable for vehicle generators and ensuring the accuracy of anomaly detection.

[0134] In an embodiment of the present application, for the training of the anomaly detection model, data under normal operating conditions of the generator can be used as samples for training, and the encoder, decoder and generator are used as one part, and the discriminator is used as another part, and the two parts are trained alternately.

[0135] In a specific embodiment, the training of the anomaly detection model includes the following steps:

[0136] Step 41: Build an initial model, which includes an encoder, a decoder, a generator, a fusion module, and a discriminator.

[0137] Step 42: Obtain a training sample set, wherein the training sample set includes a plurality of normal operation data;

[0138] Step 43: Fix the parameters of the encoder, decoder, and generator in the initial model, train the discriminator in the initial model based on the training sample set, and fix the parameters of the discriminator in the initial model, train the encoder, decoder, and generator in the initial model based on the training sample set until the training cutoff condition is met, and obtain the anomaly detection model.

[0139] In step 41, an initial model including an encoder, a decoder, a generator, a fusion module, and a discriminator may be constructed. The encoder may be composed of an input layer, at least one hidden layer, and an output layer; the decoder may be composed of an input layer, at least one hidden layer, and an output layer; the generator may be composed of a long short-term memory module and a self-attention module; and the discriminator may be composed of at least one convolutional layer, a pooling layer, and a fully connected layer.

[0140] Furthermore, in step 42, a training sample set consisting of multiple normal operating data can be obtained, wherein the normal operating data is multimodal operating data collected under the normal operating state of the generator, and the normal operating data may include generator speed, generator torque, generator voltage, generator current, generator temperature and generator vibration value.

[0141] For collecting normal operating data, sensor materials can be selected based on the specific test scenario. For example, if the generator operates in a high-temperature environment, a temperature sensor made of high-temperature-resistant ceramics (such as zirconia) or metal oxide semiconductor materials can be used. For normal ambient temperatures, a platinum resistance temperature sensor can be used. When detecting small vibrations to identify early generator failures, a vibration sensor based on piezoelectric ceramic materials can be used. If the generator is located in a harsh environment, corrosion-resistant materials such as stainless steel or titanium alloy can be selected for the vibration sensor housing and sensitive elements. In addition, a magnetoelectric speed sensor can be selected and firmly installed near the rotating shaft of the generator through a customized bracket; a strain gauge torque sensor can be installed on the transmission; a Hall voltage sensor can be selected and installed at the output end of the generator, with the input terminal firmly connected to the output line; a Rogowski coil current sensor can be used, wrapped around the phase cable, tightly fitting the cable, and the output end connected to the signal conditioning circuit; thermocouple temperature sensors can be installed in key heating parts such as windings and bearings, and the measuring end can be tightly fitted with thermal conductive glue; piezoelectric vibration sensors can be installed in parts such as the casing and bearing seat, fixed with bolts or magnetic suction to ensure a rigid connection, and the sensitive axis can be adjusted to be consistent with the vibration direction.

[0142] Considering that some samples may contain missing values or noise, which may affect the accuracy of model training, the sample set can also be preprocessed after it is obtained.

[0143] In some embodiments, the normal operating data includes generator speed, generator torque, generator voltage, generator current, generator temperature, and generator vibration value. After obtaining the training sample set, the following is also included:

[0144] Preprocess normal operation data;

[0145] The preprocessing of the normal operation data includes at least one of the following:

[0146] Performing Kalman filtering on the generator speed and generator torque to remove noise in the generator speed and generator torque;

[0147] Perform mean filtering on the generator voltage and generator current to remove noise in the generator voltage and generator current;

[0148] The generator temperature and generator vibration values are subjected to wavelet denoising to remove the high-frequency noise portion in the generator temperature and generator vibration values.

[0149] Specifically, the generator speed and torque can be processed using the Kalman filter algorithm, which uses the system state equation and observation equation to perform optimal estimation to remove noise from the generator speed and torque. The generator voltage and current can be processed using the mean filter algorithm, which calculates the average value of the voltage and current within a certain time window to remove noise from the generator voltage and current. The generator temperature and vibration values can be processed using the wavelet denoising algorithm, which decomposes the temperature and vibration values, removes high-frequency noise, and retains the effective components.

[0150] After completing the above processing, preprocessing may further include normalizing the normal operation data to eliminate the dimensional differences between the data from different sensors. For example, the following formula may be used:

[0151] ;

[0152] Where, is the normalized result, is the data under a certain mode in the normal operation data, is the data mean, is the standard deviation of the data.

[0153] After normalization is completed, preprocessing can also include extracting key features from normal operation data. For example, for generator speed and generator torque, statistical features such as mean, variance and peak value can be extracted; for generator voltage and generator current, electrical features such as effective value and phase difference can be extracted; for generator temperature, thermal features such as heating rate and temperature gradient can be extracted; for generator vibration value, vibration features such as vibration amplitude and frequency component can be extracted.

[0154] Furthermore, preprocessing can also include time series alignment of the data across various modes within normal operation data. Time series data such as generator vibration values and non-time series data such as generator temperature may differ in time, necessitating timestamp alignment. For example, engine vibration values can be resampled to synchronize their sampling frequency to the same frequency as other non-time series data, ensuring temporal comparability across different modalities. Missing data points due to factors such as sensor latency can be filled using interpolation methods (such as linear interpolation).

[0155] Finally, data from different modalities can be concatenated into a joint feature vector. Later, during model training, the joint feature vector corresponding to each normal operating data point in the training sample set can be input into the initial model for training. For example, for generator vibration values, to enhance the joint time-frequency representation, frequency domain features, such as spectral energy and dominant frequency components, can be extracted through a short-time Fourier transform. These frequency domain features, along with the time domain features of the generator vibration values, can be used as a feature representation of the generator vibration values. This can then be combined with data from other modalities to form a joint feature vector containing rich information.

[0156] In the above implementation, by preprocessing the normal operation data, the training efficiency and accuracy of the model can be further improved.

[0157] After preprocessing the training sample set, further, in step 43, the encoder, decoder and generator can be regarded as the model generation part, and the discriminator can be regarded as the model discrimination part, and the model generation part and the model discrimination part can be alternately trained through the training sample set.

[0158] Specifically, the parameters of the encoder, decoder and generator in the initial model can be fixed, the joint feature vector corresponding to each normal operating data in the training sample set can be input into the initial model, and the discriminator in the initial model can be trained. After the training is completed, the parameters of the discriminator in the initial model can be fixed, the joint feature vector corresponding to each normal operating data in the training sample set can be input into the initial model, and the encoder, decoder and generator in the initial model can be trained until the training cutoff condition is met to obtain an anomaly detection model.

[0159] Among them, the training cutoff condition can be that the loss value calculated by the loss function converges; or, the training cutoff condition can be that the model's indicators on the validation set (such as accuracy, recall rate, F1 score, etc.) exceed the corresponding threshold; or, the training cutoff condition can be that the number of rounds of alternating training reaches a set round threshold, etc.

[0160] By alternating iterative training, the model generation part and the model discrimination part can be trained in sequence, thereby ensuring the accuracy of the model's anomaly detection.

[0161] In an embodiment of the present application, the loss functions adopted by the model generation part and the model discrimination part may be different, and, in the model generation part, the loss functions adopted by the encoder and the decoder may be different from the loss function adopted by the generator.

[0162] In order to prevent overfitting due to high model complexity during model training, that is, the model performs well on the training sample set but performs poorly on the validation set or new data, L1 regularization and L2 regularization can be added to the loss functions of the encoder and decoder. By adding penalty terms to the loss function, the weights of the model are constrained to avoid excessive weights, thereby reducing the complexity of the model and improving the generalization ability of the model.

[0163] Among them, L1 regularization can be added to the loss function as a penalty term by adding the sum of the absolute values of the weights. Assuming that the original loss function of the encoder and decoder is , the weight parameter is (such as the weights of the encoder hidden layer, output layer, etc.), then add the loss function after L1 regularization for:

[0164] ;

[0165] Where, is the hyperparameter of L1 regularization, is the i-th weight parameter. For the anomaly detection task, The value range of can be 0.001~0.1, which is used to control the strength of regularization. You can select an intermediate value in this range as The starting value of is tested, and then dynamically adjusted according to the training situation of the model. If the loss calculated by the loss function decreases slowly during the training process, it indicates that the model may be underfitting and can be appropriately reduced. Increasing the value of , reduces the strength of regularization, and vice versa.

[0166] The role of L1 regularization is to make some weights become 0 to achieve the effect of feature selection. During the back propagation process, the weight update rule becomes:

[0167] ;

[0168] Where, is the updated weight parameter, is the weight parameter, is the learning rate, is a sign function, Represents the weight parameter L1 regularization has the property of sparsity, which can reduce some weight parameters to 0, thus achieving the purpose of feature selection. When processing high-dimensional data, L1 regularization can automatically filter out features that contribute significantly to the model output, reduce the impact of redundant features, further reduce the complexity of the model, and improve the interpretability of the model.

[0169] Among them, L2 regularization can be added to the loss function as a penalty term by adding the sum of squares of weights. The loss function after adding L2 regularization is for:

[0170] ;

[0171] Where, is the original loss function, is the i-th weight parameter, It is a hyperparameter of L2 regularization. Its value can be found in , This can make the weights smoother and avoid overfitting. During the back propagation process, the weight update rule becomes:

[0172] ;

[0173] Where, is the updated weight parameter, is the weight parameter, is the learning rate. L2 regularization can use the penalty term to make the weight gradually approach 0 during the update process, but it will not become 0, making the weight smoother, preventing the model from overfitting the noise and details in the training sample set, and allowing the model to learn more general features.

[0174] In addition to introducing the above-mentioned L1 regularization and L2 regularization, adversarial loss and difference loss can also be introduced into the loss functions of the encoder and decoder to further improve the encoder's ability to learn the distribution of latent variables and improve the decoder's ability to reconstruct data.

[0175] Regarding step 43 above, in one example, training the encoder, decoder, and generator in the initial model based on the training sample set includes the following steps:

[0176] Step 431: Input the training sample set into the initial model to obtain the reconstructed data and simulated data corresponding to the normal operating data in the training sample set, and determine the true probability corresponding to the reconstructed data and the simulated data;

[0177] Step 432: Determine the reconstruction adversarial loss and the feature difference loss based on the discriminator in the initial model, the true probability corresponding to the reconstructed data, and the normal operation data, and determine the generative adversarial loss based on the true probability corresponding to the discriminator and the simulated data;

[0178] Step 433: Update the internal parameters of the encoder and decoder based on the reconstruction adversarial loss and the feature difference loss, and update the internal parameters of the generator based on the generation adversarial loss.

[0179] Among them, in step 431, after the training sample set enters the initial model, the encoder and decoder in the initial model can extract reconstructed data, and the generator can extract simulated data. The process can refer to the aforementioned processing steps for actual operation data and will not be repeated here.

[0180] Furthermore, the discriminator in the initial model can determine the probability that the reconstructed data is the real data corresponding to the normal operating data, and obtain the real probability corresponding to the reconstructed data, and determine the probability that the simulated data is the real data corresponding to the normal operating data, and obtain the real probability corresponding to the simulated operating data.

[0181] Furthermore, in step 432, the discriminator may measure the difference between the generated reconstructed data and the normal operating data, as well as the difference between the generated simulated data and the normal operating data, and feed back the difference to the encoder, decoder, and generator in the form of an error.

[0182] Specifically, the discriminator can calculate the reconstruction adversarial loss based on the true probability corresponding to the reconstructed data. The reconstruction adversarial loss can reflect the difference between the reconstructed data of the encoder and decoder and the normal operating data, and determine the feature difference loss based on the difference between the reconstructed data and the normal operating data at the feature level, as shown in the following formula:

[0183] ;

[0184] ;

[0185] Where, To reconstruct the adversarial loss, is the feature difference loss; is the discriminator's judgment result on the reconstructed data, that is, the true probability corresponding to the reconstructed data; 、 are the values of normal operation data and reconstructed data in the jth feature dimension respectively.

[0186] In addition, the discriminator can also feed back error information to the generator in the form of generative adversarial loss based on the true probability corresponding to the simulated data, that is, calculate the generative adversarial loss, as shown in the following formula:

[0187] ;

[0188] Where, is the simulated data output by the generator, is the discriminator’s judgment result on the simulated data, that is, the true probability corresponding to the simulated data, To generate adversarial loss.

[0189] Furthermore, in step 433, the discriminator can feed back the reconstruction adversarial loss and feature difference loss to the encoder and decoder. The encoder and decoder can then combine the reconstruction adversarial loss, feature difference loss, reconstruction error, L1 regularization, and L2 regularization to calculate the final loss, and then update the internal parameters of the encoder and decoder using the final loss. In addition, the discriminator can feed back the generative adversarial loss to the generator, and the generator can then update the internal parameters of the encoder and decoder using the generative adversarial loss.

[0190] Among them, the final loss of encoder and decoder can be expressed as:

[0191] ;

[0192] Where, For the final loss; is the reconstruction error term, , is the weight of the reconstruction error, is the reconstruction error (e.g., the mean square error between the reconstructed data and the normal operating data), assuming that the normal operating data is , reconstructing the data into , the latent variables in the reconstruction process are , the mean value of the encoder output is , the logarithm of the variance is , then the reconstruction error is:

[0193] ;

[0194] Where, is the data dimension, 、 are the values of normal operation data and reconstructed data in the i-th feature dimension respectively.

[0195] also, is the normally distributed error term, , is the weight of the normally distributed error, is a normally distributed error, which can be expressed as:

[0196] ;

[0197] Where, is the dimension of the latent space in the reconstruction process, 、 are the mean and variance of the j-th dimension of the latent space, respectively.

[0198] also, is the L1 regularization term, is the L2 regularization term, , , 、 are the weight of L1 regularization loss and the weight of L2 regularization loss, respectively. is the L1 regularization loss, is the L2 regularization loss, 、 They are the hyperparameters of L1 regularization and L2 regularization, The pth weight parameter.

[0199] also, To reconstruct the adversarial loss term, is the feature difference loss term, , , 、 are the weights of reconstruction adversarial loss and feature difference loss, respectively. 、 They are reconstruction adversarial loss and feature difference loss respectively.

[0200] For the encoder and decoder, after calculating the final loss, the gradient of the final loss with respect to the internal parameters (weights and biases of the encoder and decoder) can be calculated through backpropagation, and then the internal parameters can be updated using an optimization algorithm (such as stochastic gradient descent or others).

[0201] For example, the gradient propagation of the decoder can be performed first, starting from the final loss First, the gradient of the final loss with respect to each parameter inside the decoder is calculated according to the chain rule, e.g., for a certain weight in the decoder , first calculate the final loss Partial derivative with respect to the output of the layer where the weight is located ,in, is the output of the jth neuron in this layer. Further, according to the input of this layer calculate , and finally we get by the chain rule , in this way, forward calculation is performed layer by layer to calculate the gradients of all parameters inside the decoder.

[0202] Furthermore, the final loss between the decoder's reconstructed data and the normal operating data Will continue to backpropagate to the encoder, first, according to the final loss Calculate its relative to the latent variable Gradient , then due to is obtained by reparameterization from the mean and standard deviation We can further calculate and Finally, according to the network structure of the encoder, the gradient of the final loss relative to the parameters inside the encoder is calculated layer by layer, and the gradient of the final loss for the weights and biases of each layer is calculated using a chain rule similar to that of the encoder.

[0203] For example, reconstructing data yes function, so, , then calculate and The gradient, , , From the standard normal distribution The random vector sampled from . and The output of the previous layer (i.e. the input of this layer) is the result obtained by linear change, so, , is the activation function, To find the derivative of the activation function, , , so the final loss of this layer can be calculated for the weight and bias The gradient of , and then the parameters are updated according to the gradient.

[0204] After calculating the gradients of the internal parameters of the encoder and decoder, the optimization algorithm can be used to update the internal parameters. Taking the stochastic gradient descent algorithm as an example, the parameter update formula is:

[0205] ;

[0206] ;

[0207] Where, 、 are the updated weights and biases, 、 are the weights and biases before updating, 、 are the hyperparameters of L1 regularization and L2 regularization, is the learning rate, and the formula for the learning rate can be:

[0208] ;

[0209] Where, is the cumulative sum of squared gradients, is a constant (a small value is used to avoid the denominator being 0), 、 are the learning rates at time t+1 and time t, respectively. The learning rate controls the step size of each parameter update. Through continuous forward propagation, loss calculation, backpropagation, and parameter updates, the encoder and decoder parameters are gradually adjusted, thereby reducing losses and improving the model's ability to reconstruct data and learn the distribution of latent variables.

[0210] The generator abnormality detection method provided in the embodiment of the present application obtains the actual operating data of the generator and inputs the actual operating data into a pre-trained abnormality detection model. The encoder and decoder in the model extract reconstructed operating features from the actual operating data, and the generator in the model extracts simulated operating features from the actual operating data. The reconstructed operating features and the simulated operating features are then fused by the fusion module in the model to obtain fused operating features. The abnormality detection result of the generator is determined by the discriminator, the fused operating features and the actual operating data in the model, thereby realizing abnormality detection of the generator. The method can perform abnormality detection through multi-modal generator operating data, solve the problem of high false positive rate caused by serious reliance on single-modal data, and solve the problem of high false positive rate caused by fixed thresholds or empirical formulas. In addition, the method can accurately capture the complex operating characteristics of the generator through the encoder, decoder and generator, thereby combining the discriminator for abnormality detection, and improve the accuracy of generator abnormality detection through complex operating features, especially for the critical state of the generator, and can ensure the reliability of abnormality detection under critical state.

[0211] Figure 2 This is a schematic diagram of a generator abnormality detection process provided by an embodiment of the present application, such as Figure 2 As shown, first, the multi-dimensional data of the generator under normal operating conditions, namely, normal operating data, can be collected through various sensors, and then the normal operating data can be preprocessed. The encoder can process the normal operating data and calculate the potential operating features. The decoder can process the potential features and calculate the reconstructed operating features. At the same time, the generator can process the normal operating data and calculate the simulated operating features.

[0212] Furthermore, the simulated and reconstructed operational features are fused together in a fusion module. This fused data, along with the normal operational data, is fed into the discriminator, which determines whether the fused data is real data. If not, the discriminator determines the reconstruction adversarial loss and feature difference loss, which are fed back to the decoder for parameter update. It also determines the generative adversarial loss and feeds it back to the generator for parameter update. After model training is complete, the actual operational data can be directly fed into the anomaly detection model to obtain anomaly detection results.

[0213] exist Figure 2 In the process shown, the outputs of the generator and decoder are combined, and adversarial training is used to improve the model's learning ability for different operating conditions, thereby enhancing the system's reliability in detecting abnormalities in the critical state of the generator. In addition, the discriminator provides discriminant feedback on the fused data, so that the encoder, decoder and generator are continuously optimized. Through continuous iterative training, the model parameters are optimized. When processing real-time detection data, the new data can be quickly extracted and discriminant analyzed to meet the real-time detection needs of the generator's operating status, detect abnormalities in time and issue warnings to ensure safe and stable operation of the equipment. In addition, the fusion module can assign weights to the outputs of the decoder and generator according to the operating conditions of the generator. Through data generation and adversarial training mechanisms, it reduces dependence on a large amount of specific operating condition data, reduces data collection and labeling costs, and achieves efficient and accurate generator abnormality detection. In particular, it can improve the accuracy of abnormality detection in critical states and ensure safe and stable operation of the generator.

[0214] Figure 3 : is a schematic diagram of the structure of a generator abnormality detection device provided in an embodiment of the present application. The device includes a data acquisition module 310, a feature extraction module 320, a feature fusion module 330, and a discrimination module 340, wherein:

[0215] An acquisition module 310 is configured to acquire actual operating data of the generator and input the actual operating data into a pre-trained anomaly detection model, wherein the anomaly detection model includes an encoder, a decoder, a generator, a fusion module, and a discriminator;

[0216] a feature extraction module 320 for extracting reconstructed operation features from the actual operation data based on the encoder and the decoder, and extracting simulated operation features from the actual operation data based on the generator;

[0217] a feature fusion module 330 for fusing the reconstructed operation feature with the simulated operation feature based on the fusion module to obtain a fused operation feature;

[0218] The discriminator module 340 is configured to determine an abnormality detection result of the generator based on the discriminator, the fused operating characteristics, and the actual operating data.

[0219] The generator abnormality detection device provided in the embodiment of the present application can execute the steps in the generator abnormality detection method provided in the method embodiment of the present application, that is, it is applicable to the generator abnormality detection method provided in the embodiment of the present application, and has the execution steps and beneficial effects, which are no longer repeated here.

[0220] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .

[0221] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.

[0222] Memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and processor 401 may execute the program instructions to implement the generator anomaly detection method described above in any embodiment of the present application and / or other desired functions. The computer-readable storage medium may also store various contents, such as initial external parameters and threshold values.

[0223] In one example, electronic device 400 may further include an input device 403 and an output device 404, which are interconnected via a bus system and / or other connection mechanisms (not shown). Input device 403 may include, for example, a keyboard, a mouse, etc. Output device 404 may output various information to the outside, including warning information, braking force, etc. Output device 404 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.

[0224] Of course, to simplify, Figure 4 Only some of the components related to the present application in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device 400 may further include any other appropriate components according to specific application scenarios.

[0225] In addition to the above methods and devices, embodiments of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the generator abnormality detection method provided by any embodiment of the present application.

[0226] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0227] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps of the generator abnormality detection method provided by any embodiment of the present application.

[0228] The computer-readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0229] It should be noted that the terms used in this application are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.

[0230] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0231] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression, there are objectively infinite specific structures. For ordinary technicians in this technical field, without departing from the principles of this application, they can also make several improvements, modifications or changes, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A method for detecting abnormality of a generator, characterized in that: include: Acquire actual operating data of the generator and input the actual operating data into a pre-trained anomaly detection model, wherein the anomaly detection model includes an encoder, a decoder, a generator, a fusion module, and a discriminator; extracting reconstructed operation features from the actual operation data based on the encoder and the decoder, and extracting simulated operation features from the actual operation data based on the generator; The reconstructed operation feature and the simulated operation feature are fused based on the fusion module to obtain a fused operation feature, wherein the fusion module dynamically adjusts the fusion ratio of the reconstructed operation feature and the simulated operation feature according to the operating conditions; determining an abnormality detection result of the generator based on the discriminator, the fused operating feature, and the actual operating data; The generator includes a long short-term memory module and a self-attention module, and extracts simulated operation features from the actual operation data based on the generator, including: Based on the long short-term memory module, the temporal variation trend of the actual operation data is extracted to obtain key timing features. Based on the self-attention module, the relationship between different parameters in the key timing features is extracted to obtain simulated operation features.

2. The method according to claim 1, characterized in that Extracting and reconstructing operation features from the actual operation data based on the encoder and the decoder includes: extracting potential operation features from the actual operation data based on the encoder; The potential operation feature is reconstructed based on the decoder to obtain a reconstructed operation feature with the same dimension as the actual operation data.

3. The method according to claim 2, characterized in that The encoder includes an input layer, at least one hidden layer, and an output layer, and extracting potential operation features from the actual operation data based on the encoder includes: Inputting the data values of each dimension in the actual operation data into the input layer, and the data values of each dimension enter the hidden layer after being processed by the input layer; For each of the hidden layers, extracting nonlinear features from the output of the input layer or the output of the previous hidden layer based on the hidden layer, and performing residual connection on the nonlinear features; Based on the output layer, a linear transformation is performed on the output of the last hidden layer to obtain a mean vector and a variance logarithm vector, and potential operating characteristics are determined according to the mean vector and the variance logarithm vector.

4. The method according to claim 1, wherein The reconstructed operation feature and the simulated operation feature are fused based on the fusion module to obtain a fused operation feature, including: Obtaining the operating condition of the generator; The operating conditions, the reconstructed operating characteristics and the simulated operating characteristics are input into the fusion module, so that the fusion module determines the reconstruction characteristic weight and the simulation characteristic weight according to the operating conditions, and fuses the reconstructed operating characteristics and the simulated operating characteristics according to the reconstruction characteristic weight and the simulation characteristic weight to obtain a fused operating characteristic.

5. The method according to claim 1, wherein Determining an abnormality detection result of the generator based on the discriminator, the fused operation feature, and the actual operation data, including: Inputting the fused operation feature and the actual operation data into the discriminator, so that the discriminator determines whether the fused operation feature is the real data of the actual operation data, and obtains the true probability corresponding to the fused operation feature; An abnormality detection result of the generator is determined based on the true probability.

6. The method according to claim 1, characterized in that The training of the anomaly detection model includes: Constructing an initial model, wherein the initial model includes an encoder, a decoder, a generator, a fusion module, and a discriminator; Acquire a training sample set, wherein the training sample set includes a plurality of normal operation data; The parameters of the encoder, decoder, and generator in the initial model are fixed, and the discriminator in the initial model is trained based on the training sample set. The parameters of the discriminator in the initial model are fixed, and the encoder, decoder, and generator in the initial model are trained based on the training sample set until the training cutoff condition is met, thereby obtaining the anomaly detection model.

7. The method according to claim 6, characterized in that Training the encoder, decoder, and generator in the initial model based on the training sample set includes: Inputting the training sample set into the initial model, obtaining reconstructed data and simulated data corresponding to the normal operating data in the training sample set, and determining the true probabilities corresponding to the reconstructed data and the simulated data; Determining a reconstruction adversarial loss and a feature difference loss based on the discriminator in the initial model, the true probability corresponding to the reconstructed data, and the normal operating data, and determining a generative adversarial loss based on the true probability corresponding to the discriminator and the simulated data; Based on the reconstruction adversarial loss and the feature difference loss, the parameters inside the encoder and the decoder are updated, and based on the generation adversarial loss, the parameters inside the generator are updated.

8. The method according to claim 6, characterized in that The normal operating data includes generator speed, generator torque, generator voltage, generator current, generator temperature and generator vibration value. After obtaining the training sample set, the following is also included: preprocessing the normal operation data; The preprocessing of the normal operating data includes at least one of the following: performing Kalman filtering on the generator speed and the generator torque to remove noise from the generator speed and the generator torque; performing mean filtering on the generator voltage and the generator current to remove noise in the generator voltage and the generator current; Wavelet denoising is performed on the generator temperature and the generator vibration value to remove high-frequency noise components in the generator temperature and the generator vibration value.

9. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the generator abnormality detection method according to any one of claims 1 to 8 by calling the program or instructions stored in the memory.

Citation Information

Patent Citations

  • Deep learning model training method and device, electronic equipment and storage medium

    CN118397391A

  • High-dimensional time series data anomaly detection method based on multi-modal generative adversarial network

    CN118690304A