Generator anomaly detection method and electronic equipment

By using pre-trained anomaly detection models in the generator abnormality detection system, multiple operating characteristics are extracted and fused, the problems of low detection accuracy and high misjudgment rate in traditional systems are solved, and higher detection accuracy and reliability are achieved.

CN120180342AActive Publication Date: 2025-06-20CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Traditional generator abnormality detection systems rely on a single sensor, resulting in low detection accuracy and prone to misjudgment based on fixed thresholds or empirical formulas.

Method used

The pre-trained anomaly detection model is used to extract the generator's reconstruction operation characteristics and simulated operation characteristics through the encoder, decoder and generator, and the generator is used to fusion and discriminate the generator's abnormal detection results.

Benefits of technology

It improves the accuracy of generator abnormality detection and reduces the misjudgment rate. Especially in the critical state of generator, it ensures the reliability of abnormality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180342A_ABST
    Figure CN120180342A_ABST
Patent Text Reader

Abstract

The invention provides a generator anomaly detection method and electronic equipment, and the method comprises the steps: obtaining the actual operation data of a generator, inputting the actual operation data into a pre-trained anomaly detection model, extracting reconstruction operation features from the actual operation data according to an encoder and a decoder in the model, and carrying out the reconstruction operation features; the method comprises the following steps: reconstructing operation characteristics, extracting simulated operation characteristics from actual operation data according to a generator in a model, fusing the reconstructed operation characteristics and the simulated operation characteristics through a fusion module in the model to obtain fused operation characteristics, and determining an anomaly detection result of the generator through a discriminator in the model, the fused operation characteristics and the actual operation data. The method realizes the anomaly detection of the generator, solves the problem of high misjudgment rate caused by serious dependence of single modal data, solves the problem of high misjudgment rate caused by a fixed threshold value or an empirical formula, can accurately capture the complex operation characteristics of the generator, improves the accuracy of the anomaly detection of the generator, and improves the reliability of the generator. And the anomaly detection reliability in the critical state is ensured.
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 anomaly detection, and particularly relates to a method for detecting generator anomalies and an electronic device. Background Art

[0002] Traditional generator anomaly detection systems have many defects, seriously restricting the accurate grasp of the generator's operating state and fault prevention.

[0003] In related technologies, most generator anomaly detection systems rely on data collected by a single sensor, such as a current sensor or a voltage sensor. This method lacks synchronous detection in other dimensions, resulting in low accuracy of anomaly detection. Moreover, related technologies mostly use fixed thresholds or empirical formulas to determine anomalies. For example, when judging the anomaly of generator efficiency, only the current direction or the positive and negative signs of power are used for judgment. However, in the critical state of the generator, the electrical power is close to the loss power, and small errors in the measuring equipment may lead to misjudgment of anomalies.

[0004] In addition, for anomaly detection based on models, it is difficult to effectively capture the characteristics of complex operating states, resulting in low accuracy of anomaly detection. At the same time, in the face of 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 defects or deficiencies in the prior art, the present application aims to provide a method for detecting generator anomalies and an electronic device to solve the problems of low accuracy of engine anomaly detection and misjudgment of anomalies in related technologies.

[0006] An embodiment of the present application provides a method for detecting generator anomalies, the method comprising: Obtain the 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; Extract reconstructed operating features from the actual operating data based on the encoder and the decoder, and extract simulated operating features from the actual operating data based on the generator; Fuse the reconstructed operating features and the simulated operating features based on the fusion module to obtain fused operating features; Determine the anomaly detection result of the generator based on the discriminator, the fused operating features, and the actual operating data.

[0007] Optionally, extracting reconstructed operating features from the actual operating data based on the encoder and the decoder includes: Extract latent operating features from the actual operating data based on the encoder; Based on the decoder, the potential operating features are reconstructed to obtain reconstructed operating features with the same dimension as the actual operating data.

[0008] Optionally, the encoder includes an input layer, at least one hidden layer, and an output layer. Extracting potential operating features from the actual operating data based on the encoder includes: Input the data values of each dimension in the actual operating data into the input layer, and after being processed by the input layer, the data values of each dimension enter the hidden layer; For each of the hidden layers, extract non-linear 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 non-linear features; Based on the output layer, perform a linear transformation on the output of the last hidden layer to obtain a mean vector and a logarithmic variance vector, and determine the potential operating features according to the mean vector and the logarithmic variance vector.

[0009] Optionally, the generator includes a long short-term memory module and a self-attention module. Extracting simulated operating features from the actual operating data based on the generator includes: Based on the long short-term memory module, extract the change trend of the actual operating data over time to obtain key timing features; Based on the self-attention module, extract the mutual relationship between different parameters in the key timing features to obtain simulated operating features.

[0010] Optionally, based on the fusion module, fuse the reconstructed operating features and the simulated operating features to obtain fused operating features, including: Obtain the operating condition of the generator; Input the operating condition, the reconstructed operating features, and the simulated operating features into the fusion module, so that the fusion module determines the reconstructed feature weight and the simulated feature weight according to the operating condition, and fuse the reconstructed operating features and the simulated operating features according to the reconstructed feature weight and the simulated feature weight to obtain fused operating features.

[0011] Optionally, based on the discriminator, the fused operating features, and the actual operating data, determine the abnormal detection result of the generator, including: Input the fused operating features and the actual operating data into the discriminator, so that the discriminator determines whether the fused operating features are real data of the actual operating data, and obtain the true probability corresponding to the fused operating features; Based on the true probability, determine the abnormal detection result of the generator.

[0012] Optionally, the training of the anomaly detection model includes: Construct an initial model, where the initial model includes an encoder, a decoder, a generator, a fusion module, and a discriminator; Obtain a training sample set, where the training sample set includes multiple pieces of normal operation data; 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, and train the encoder, decoder, and generator in the initial model based on the training sample set until the training cutoff condition is met to obtain the anomaly detection model.

[0013] Optionally, training the encoder, decoder, and generator in the initial model based on the training sample set includes: Input the training sample set into the initial model to obtain the reconstructed data and simulated data corresponding to the normal operation data in the training sample set, and determine the true probabilities corresponding to the reconstructed data and the simulated data; Based on the discriminator in the initial model, the true probability corresponding to the reconstructed data, and the normal operation data, determine the reconstruction adversarial loss and the feature difference loss, and based on the discriminator and the true probability corresponding to the simulated data, determine the generation adversarial loss; Based on the reconstruction adversarial loss and the feature difference loss, update the parameters inside the encoder and the decoder, and based on the generation adversarial loss, update the parameters inside the generator.

[0014] Optionally, the normal operation data includes generator speed, generator torque, generator voltage, generator current, generator temperature, and generator vibration value. After obtaining the training sample set, it further includes: Preprocess the normal operation data; Among them, preprocessing the normal operation data includes at least one of the following: Perform Kalman filtering on the generator speed and the generator torque to remove the noise in the generator speed and the generator torque; Perform mean filtering on the generator voltage and the generator current to remove the noise in the generator voltage and the generator current; Perform wavelet denoising on the generator temperature and the generator vibration value to remove the high-frequency noise part in the generator temperature and the generator vibration value.

[0015] An embodiment of the present application further provides an electronic device, and the electronic device includes: A processor and a memory; The processor is configured to execute the steps of the generator anomaly detection method provided in any embodiment of the present application by invoking the programs or instructions stored in the memory.

[0016] An embodiment of the present application further provides a computer-readable storage medium storing programs or instructions, which cause a computer to execute the steps of the generator anomaly detection method provided in any embodiment of the present application.

[0017] In summary, the present application proposes a generator anomaly detection method. The method obtains the actual operation data of the generator, inputs the actual operation data into a pre-trained anomaly detection model, extracts reconstructed operation features from the actual operation data by the encoder and decoder in the model, and extracts simulated operation features from the actual operation data by the generator in the model. Furthermore, the fusion module in the model fuses the reconstructed operation features and the simulated operation features to obtain fused operation features. The discriminator in the model, the fused operation features, and the actual operation data are used to determine the anomaly detection result of the generator, realizing the anomaly detection of the generator. This method can perform anomaly detection through multi-modal generator operation data, solve the problem of high misjudgment rate caused by severe dependence on single-modal data, and solve the problem of high misjudgment rate caused by fixed thresholds or empirical formulas. Moreover, this method can accurately capture the complex operation features of the generator through the encoder, decoder, and generator, and thus perform anomaly detection in combination with the discriminator, identify the abnormal states of the generator under various working conditions through the complex operation features, and improve the accuracy of generator anomaly detection. Especially for the critical state of the generator, the reliability of anomaly detection in the critical state can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1 is a flowchart of a generator anomaly detection method provided by an embodiment of the present application; Figure 2 is a schematic diagram of a generator anomaly detection process provided by an embodiment of the present application; Figure 3 is a schematic diagram of the structure of a generator anomaly detection device provided by an embodiment of the present application; Figure 4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0020] The following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are merely used to explain the relevant invention and do not limit the invention. Additionally, it should be noted that for ease of description, only parts related to the invention are shown in the drawings.

[0021] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will detail this application with reference to the drawings and embodiments.

[0022] As mentioned in the background art, in response to the problems in the prior art, this application proposes a method for detecting abnormal conditions of a generator. Figure 1 is a flowchart of a method for detecting abnormal conditions of a generator provided by an embodiment of this application. Refer to Figure 1 This method for detecting abnormal conditions of a generator specifically includes: S110. Obtain the actual operating data of the generator and input the actual operating data into a pre-trained abnormal condition detection model.

[0023] Among them, the actual operating data can be multi-modal generator-related data, which can synchronously collect high-precision parameters in multiple dimensions to achieve multi-source data fusion and comprehensively capture the operating state of the generator. For example, the actual operating data can include the actual rotational speed, actual torque, actual voltage, actual current, actual temperature, and actual vibration value of the generator.

[0024] Exemplarily, high-speed, anti-interference shielded twisted pair cables can be used to connect the sensors and the data acquisition module. The data acquisition module obtains the actual operating data sent by the sensors. After that, the data acquisition module can transmit it to the central processing unit through Ethernet, and the central processing unit realizes abnormal condition detection. At the same time, connect the central processing unit to the display module and connect the central processing unit to the alarm module to achieve real-time data display and abnormal alarm.

[0025] Specifically, after obtaining the actual operating data, the parameters of different modalities in the actual operating data can be spliced into the form of a joint feature vector. For example, the actual operating data can be expressed as: , is the actual rotational speed, is the actual torque, is the actual voltage, is the actual current, is the actual temperature, is the actual vibration value.

[0026] Further, the actual operation 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. Exemplarily, in the embodiments of the present application, the encoder and decoder in the anomaly detection model can adopt the encoder and decoder in a Variational Autoencoder (VAE); the generator and discriminator in the anomaly detection model can adopt the generator and discriminator in a Generative Adversarial Network (GANs).

[0027] Among them, 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 to reconstruct the input data. That is, the encoder can transform the input into a structured probability distribution, and the decoder can use this distribution to generate data.

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

[0029] S120. Extract reconstructed operation features from the actual operation data based on the encoder and decoder, and extract simulated operation features from the actual operation data based on the generator.

[0030] 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 latent information from the actual operation data, and the decoder reconstructs the latent information extracted by the encoder to obtain reconstructed operation features. At the same time, the generator can extract the correlation relationships between different parameters and the time relationships between the same parameters from the actual operation data to obtain simulated operation features.

[0031] In a specific implementation manner, extracting the reconstructed operation features from the actual operation data based on the encoder and decoder includes the following steps: Step 11. Extract latent operation features from the actual operation data based on the encoder; Step 12. Reconstruct the latent operation features based on the decoder to obtain reconstructed operation features with the same dimension as the actual operation data.

[0032] Among them, in Step 11, after the actual operation data is input into the anomaly detection model, it can first enter the encoder, and the encoder can extract latent operation features from the actual operation data.

[0033] For step 11 above, in one example, the encoder includes an input layer, at least one hidden layer, and an output layer. Based on the encoder, latent operating features are extracted from the actual operating data, including the following steps: Step 111: Input the data values of each dimension in the actual operating data into the input layer. After being processed by the input layer, the data values of each dimension enter the hidden layer; Step 112: For each hidden layer, extract non-linear features from the output of the input layer or the output of the previous hidden layer, and perform residual connection on the non-linear features; Step 113: Based on the output layer, perform a linear transformation on the output of the last hidden layer to obtain a mean vector and a logarithmic variance vector, and determine the latent operating features according to the mean vector and the logarithmic variance vector.

[0034] Among them, the encoder can be composed of an input layer, at least one hidden layer, and an output layer. In step 111, the actual operating data can enter the input layer in the form of a vector. Each neuron receives the data value of the corresponding dimension. After being processed by the input layer, the data values of each dimension enter the hidden layer.

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

[0036] Furthermore, in step 112, for each hidden layer, the hidden layer can extract non-linear features from the output of the input layer or the output of the previous hidden layer. For example, the first hidden layer can extract non-linear 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 non-linear features from the output of the previous hidden layer (i.e., its own input).

[0037] Among them, the hidden layer can extract non-linear features through linear transformation and non-linear activation functions. The non-linear features can describe the complex non-linear relationships and change trends of parameters such as actual temperature, actual voltage, and actual vibration values.

[0038] Specifically, the linear transformation can be that the hidden layer performs a linear transformation on the output of the previous hidden layer based on the weights and biases between each neuron in the previous hidden layer.

[0039] Exemplarily, the linear transformation can be: Assume that the i-th hidden layer has neurons, and the (i - 1)-th hidden layer has neurons. For the j-th neuron in the i-th hidden layer, its input is the output of all neurons in the (i - 1)-th hidden layer A linear combination, which can be expressed as , is the weight connecting the k-th neuron in the (i - 1)-th hidden layer and the j-th neuron in the i-th hidden layer, and is the bias of the j-th neuron in the i-th hidden layer.

[0040] For example, for the forward propagation of the input feature vector X, assume the feature vector X = , where , , represent parameters of different modalities (assuming the parameter dimensions of each model are small). Entering the hidden layer for linear transformation, assume the number of nodes in the hidden layer (i.e., the number of neurons) is 4. The selection of the number of nodes needs to be determined by 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 (i.e., performing well on training samples but poorly on test samples). One can try using the average of the number of input features and the number of output classes as a starting point and then adjust according to the model's performance, or use the product between the square root of the number of input features and a constant (2 or 3) as an initial estimate of the number of nodes.

[0041] 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 , and the resulting linear transformation result Z is a linear combination of 4 neurons.

[0042] After obtaining the result of the linear transformation , the hidden layer can introduce non-linearity through a non-linear activation function, thereby enhancing the model's expressive power. For example, the ReLU (Rectified Linear Unit) non-linear activation function can be adopted. The definition of ReLU is: , is the output of the j-th neuron in the i-th hidden layer, is the result of the linear transformation. When is greater than 0, , when is less than 0, . After being processed by the non-linear activation function, the hidden layer can obtain the outputs of its neurons.

[0043] After extracting the non-linear features, further, a residual connection can be introduced in the hidden layer to enable more effective backpropagation of the gradient during model training and avoid the problem of gradient vanishing. Specifically, for each hidden layer, the extracted non-linear features can be concatenated with the input of that hidden layer. That is, the first hidden layer concatenates the extracted non-linear features with the output of the input layer, and for hidden layers other than the first hidden layer, it concatenates the extracted non-linear features with the output of the previous hidden layer.

[0044] Exemplarily, assume that the input of the l-th hidden layer is , and after the above linear transformation and non-linear activation function processing, the output is obtained. Then, through the residual connection, the final output of the l-th hidden layer , . During the process of calculating the gradient in model training, according to the chain rule, the gradient of the loss function with respect to the input can be calculated, which can make there be an additional identity term 1 during gradient propagation, thus avoiding the gradient becoming too small during backpropagation. For example, the gradient of the loss function with respect to the input can be expressed as: ; In the formula, is the gradient of the loss function with respect to the input , is the gradient of the loss function with respect to the output , is the gradient of the loss function with respect to the non-linear feature .

[0045] After sequentially performing feature extraction and transformation in each hidden layer, further, in step 113, the last layer (i.e., the output layer) of the encoder can generate the mean and the logarithm of the variance of the latent space distribution through two branches respectively, obtaining the mean vector and the variance logarithm vector. Among them, the two branches can convert the output of the hidden layer into the required parameters through linear transformation.

[0046] Exemplarily, assume that the dimension of the latent space is d, the output layer is divided into a mean branch and a variance logarithm branch, and 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 receive the feature output by the previous hidden layer and perform a linear transformation. For example, let the weight vector corresponding to the i-th mean neuron be , and the bias be , the mean value output by the neuron is: , where is the transpose of, and combining the mean values output by d mean neurons, the mean vector can be obtained.

[0047] Similarly, d neurons in the variance logarithm branch are used to calculate the variance logarithm of the latent space distribution , and the variance logarithm of the i-th neuron , where is the transpose of the weight vector corresponding to the i-th variance logarithm neuron , is the bias corresponding to the i-th variance logarithm neuron, and combining the variance logarithms output by d variance logarithm neurons, the variance logarithm vector can be obtained.

[0048] After obtaining the mean vector and the variance logarithm vector, further, the latent operation characteristics can be determined based on the mean vector and the variance logarithm vector. For example, the mean vector and the variance logarithm vector can be sampled through the reparameterization technique to obtain the latent operation characteristics.

[0049] Exemplarily, a standard normal distribution can be selected from the mean vector and the variance logarithm vector, and then a random vector is sampled from the standard normal distribution , and based on this random vector and the standard normal distribution the latent operation characteristics are calculated. For example, the latent operation characteristics

[0050] Through the above steps 111 - 113, non-linear transformation and residual connection can be performed through the hidden layer, and the mean vector and the variance logarithm vector of the latent space can be determined through the output layer, so as to obtain the latent operation characteristics, and the actual operation data can be transformed into a structured probability distribution, and then the latent characteristics therein can be extracted to achieve an accurate representation of the actual operation data.

[0051] After the encoder extracts the latent operation characteristics, further, the latent operation characteristics can enter the decoder, and the decoder reconstructs it to map the latent operation characteristics back to the original data space where the actual operation data is located, obtaining the reconstructed operation characteristics.

[0052] 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 dimension of the latent operating features, and it is responsible for receiving the latent operating features output from the encoder; the hidden layer contains multiple neurons, and the number and number of layers can be adjusted according to actual needs to achieve the gradual transformation and extraction of the latent operating features (linear transformation and non-linear activation); the number of neurons in the output layer is the same as the dimension of the actual operating data, and it is used to output the reconstructed operating features. During the reconstruction process, the decoder can gradually map the latent operating features back to the original data space through a series of linear transformations and non-linear activation functions.

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

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

[0055] In the embodiments of this application, in addition to extracting the reconstructed operating features through the encoder and the decoder, simulated operating features can also be extracted through a generator.

[0056] In a specific implementation, the generator includes a long short-term memory module and a self-attention module. Extracting simulated operating features from the actual operating data based on the generator includes the following steps: Step 21: Extract the change trend of the actual operating data over time based on the long short-term memory module to obtain key time series features; Step 22: Extract the mutual relationship between different parameters in the key time series features based on the self-attention module to obtain simulated operating features.

[0057] Among them, in Step 21, the actual operating 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 operating data and extract the change trends between parameters at different times.

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

[0059] Further, in step 22, the key temporal features output by the long short-term memory module will enter the self-attention module. The self-attention module can model the global information in the key temporal features through the self-attention mechanism, analyze the mutual relationships between different parameters in the multi-modal data, such as the correlation between temperature changes and current and load, so as to capture complex global dependencies, and assign different weights to each parameter at each time step through self-attention calculation to highlight key information and obtain simulated operation features.

[0060] Through the above steps 21 - 22, after being processed by the long short-term memory module and the self-attention module, the generator can output a simulated state feature vector, that is, the simulated operation feature. The simulated operation feature can be understood as a comprehensive representation of various features that the generator may present. For example, when processing data such as the voltage, current, and temperature of the generator under the critical state, the long short-term memory module analyzes the change trends of voltage and current, and the self-attention module analyzes the mutual relationships between parameters, and finally outputs the simulated operation features under the critical state. In this way, the actual operation data can be analyzed from different perspectives of time and space to ensure the accuracy of the extracted simulated operation features, thereby ensuring the reliability of subsequent anomaly detection.

[0061] S130. Based on the fusion module, fuse the reconstructed operation feature and the simulated operation feature to obtain the fused operation feature.

[0062] Specifically, after obtaining the reconstructed operation feature and the simulated operation feature, the reconstructed operation feature and the simulated operation feature can be fused to ensure feature accuracy.

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

[0064] In a specific implementation manner, based on the fusion module, fuse the reconstructed operation feature and the simulated operation feature to obtain the fused operation feature, including: Obtain the operating conditions of the generator; input the operating conditions, the reconstructed operation feature, and the simulated operation feature into the fusion module, so that the fusion module determines the reconstructed feature weight and the simulated feature weight according to the operating conditions, and fuse the reconstructed operation feature and the simulated operation feature according to the reconstructed feature weight and the simulated feature weight to obtain the fused operation feature.

[0065] Among them, the operating conditions can describe the load degree or load change situation of the generator, such as, low load condition, medium load condition, high load condition, or rapid change condition.

[0066] Specifically, the operating conditions, reconstructed operating characteristics, and simulated operating characteristics can be input into the fusion module, and the fusion module can determine the reconstructed feature weight and the simulated feature weight according to the operating conditions.

[0067] For example, considering that the generator operates stably under low-load conditions, after training, the encoder and decoder can accurately and stably extract the potential features in this stable operating state. These features include the basic operating laws and characteristic patterns of the generator under low load, and have high reliability and representativeness. Therefore, under low-load conditions, the fusion module can increase the weight of the reconstructed operating characteristics obtained by the encoder and decoder, that is, increase the reconstructed feature weight, so that the model relies more on the features extracted by the encoder and decoder for anomaly discrimination, ensuring the accuracy of anomaly detection.

[0068] Moreover, considering that under high-load conditions or rapidly changing conditions, the physical processes and operating states inside the generator are more complex, and some sudden and abnormal feature changes may occur. After training, the generator has a powerful generation ability and can quickly adapt to the changes in data distribution, generating diverse features, thereby capturing the abnormal features that may occur under these complex conditions. Therefore, under high-load conditions or rapidly changing conditions, the fusion module can increase the weight of the simulated operating characteristics obtained by the generator, that is, increase the simulated feature weight, to help the model better face anomaly detection under complex conditions by leveraging the advantages of the generator.

[0069] After determining the reconstructed feature weight and the simulated feature weight, further, the fusion module can perform weighted summation on the reconstructed operating characteristics and the simulated operating characteristics according to the reconstructed feature weight and the simulated feature weight, so as to achieve the fusion of the reconstructed operating characteristics and the simulated operating characteristics.

[0070] Exemplarily, assuming that the reconstructed operating characteristic is represented as , the simulated operating characteristic is represented as , the reconstructed feature weight is , the simulated feature weight is , then the fused operating characteristic can be expressed as: ; To further enhance the expression ability of the fused operating characteristic, a non-linear transformation can be performed on the fused operating characteristic after weighted summation, such as using the ReLU function.

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

[0072] S140. Based on the discriminator, fusing the operation characteristics and actual operation data to determine the abnormal detection result of the generator.

[0073] Specifically, after obtaining the fused operation characteristics, further, the fused operation characteristics and actual operation data can be input into the discriminator to determine whether the fused operation characteristics are virtual data through the discriminator, so as to obtain the abnormal detection result of the generator.

[0074] In a specific implementation manner, based on the discriminator, fusing the operation characteristics and actual operation data to determine the abnormal detection result of the generator includes the following steps: Step 31. Input the fused operation characteristics and actual operation data into the discriminator so that the discriminator determines whether the fused operation characteristics are real data of the actual operation data, and obtain the real probability corresponding to the fused operation characteristics; Step 32. Determine the abnormal detection result of the generator based on the real probability.

[0075] Among them, the discriminator can be composed of a convolutional neural network. In Step 31, after the fused operation characteristics and actual operation data enter the discriminator, local feature capture can be performed through the convolutional layer of the discriminator. Multiple different convolutional kernels are used to perform convolutional operations on the input data (fused operation characteristics and actual operation data). Each convolutional kernel can be regarded as a feature detector, and the convolutional kernel slides on the input data to extract local features.

[0076] Specifically, the fused operation characteristics and actual operation data are multi-modal data of the generator. The convolutional kernels in the convolutional layer of the discriminator can capture local features such as the voltage fluctuation pattern, the temperature rising trend, and the periodic change of vibration. At the same time, each convolutional kernel will generate a corresponding feature map, which reflects the response of the input data in terms of the features represented by the convolutional kernel. Multiple convolutional kernels work in parallel to generate multiple different feature maps to describe the internal features of the input data from different angles.

[0077] After being processed by the convolutional layer, the pooling layer (such as max pooling or average pooling) in the discriminator can further reduce the size of the feature map to reduce the data dimension and downsample the feature map output by the convolutional layer. Taking max pooling as an example, it selects the maximum value in each pooling window as the output, which helps to retain the key information in the feature map and remove some unimportant details. In the multi-modal data of the generator, the pooling operation can highlight some features that are important for discriminating real data and virtual data, such as abnormal peaks or valleys.

[0078] After being processed by the pooling layer, the fully connected layer in the discriminator can further perform feature fusion and classification decisions. The multiple feature maps processed by the convolutional layer and the pooling layer are unfolded and concatenated together to form a long vector. This vector contains various feature information of the input data from local to global. Through the weight matrix and bias term of the fully connected layer, these features are linearly combined and non-linearly transformed to achieve feature fusion. The last fully connected layer usually uses an activation function (such as Sigmoid) to output a probability value. This probability value can represent the possibility that the fused running feature is the real data corresponding to the actual running data, and this probability value can be used as the real probability.

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

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

[0081] It should be noted that the discriminator can determine the matching degree between the actual running data and the fused running feature by measuring the similarity between them, so as to determine whether the fused running feature is virtual according to the matching degree. The discriminator can learn the data distribution characteristics under the normal operation of the generator through pre-training. If the matching degree between the actual running data and the fused running feature is similar to the matching degree under the normal operation of the generator, that is, the actual running data and the fused running feature are highly similar, it indicates that the current running state of the generator conforms to the normal state learned by the model, and the generator is in a normal running state.

[0082] In the above steps 31 - 32, the discriminator can measure the difference between the generated fused running feature and the actual running data, and then determine the abnormal detection result based on this difference, which can achieve accurate detection of generator abnormalities. Especially in the case where the generator is in a critical state, it can avoid the problem of abnormal detection errors caused by unstable operation. Among them, the critical state can refer to the operation of the generator reaching a special working point, such as the electric power being close to the loss power.

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

[0084] Among them, the host computer can store each abnormality detection result and establish a historical database. The host computer can conduct in-depth analysis of the historical database, such as analyzing the frequency of abnormal occurrence and abnormal development rules under different working conditions, and discover potential problems through data mining technology to provide a basis for generator maintenance and performance optimization. For example, through analysis, it is found that when a certain model of generator is running under high load for a long time, specific components are prone to abnormal temperature rise and cause failures. The operation strategy can be adjusted or the product design can be improved in a targeted manner, and the operating parameters of the generator can be optimized based on the abnormality detection results and data analysis.

[0085] 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.

[0086] For example, after determining that the abnormality detection result of the generator is abnormal operation, the alarm module can be controlled to issue an alarm. If an alarm release instruction is received (such as maintenance personnel checking the generator and determining that the generator is normal), the actual operation data and the corresponding abnormality detection result can be used as negative samples; or, after determining that the abnormality detection result of the generator is normal operation, if a fault instruction is received (such as sent by the generator management system in the vehicle), the actual operation data and the corresponding abnormality detection result can be used as negative samples. Furthermore, negative samples can be used to optimize the training of the abnormality detection model to achieve dynamic adjustment of the model, so that the model is suitable for vehicle generators and the accuracy of abnormality detection is guaranteed.

[0087] In an embodiment of the present application, for the training of the anomaly detection model, data of the generator in normal operating state 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.

[0088] In a specific implementation, the training of the anomaly detection model includes the following steps: Step 41: construct an initial model, which includes an encoder, a decoder, a generator, a fusion module and a discriminator; Step 42: Obtain a training sample set, wherein the training sample set includes a plurality of normal operation data; 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.

[0089] In step 41, an initial model including an encoder, a decoder, a generator, a fusion module and a discriminator may be constructed first. 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.

[0090] 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.

[0091] For the collection of normal operation data, targeted material selection can be made for the sensor according to the specific test scenario. For example, if the generator operates in a high temperature environment, high temperature resistant ceramics (such as zirconium oxide) or metal oxide semiconductor materials can be used to make temperature sensors. For general ambient temperatures, platinum resistance temperature sensors can be used. When it is necessary to detect tiny vibrations to identify early generator failures, vibration sensors based on piezoelectric ceramic materials can be used. If the environment in which the generator is located is relatively harsh, corrosion-resistant materials such as stainless steel or titanium alloys can be used to make 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 the casing, bearing seat and other parts, fixed with bolts or magnetic suction to ensure rigid connection, and the sensitive axis can be adjusted to be consistent with the vibration direction.

[0092] 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 being obtained.

[0093] In some embodiments, the normal operation data includes generator speed, generator torque, generator voltage, generator current, generator temperature, and generator vibration value. After obtaining the training sample set, it further includes: Preprocess the normal operation data; Among them, preprocessing the normal operation data includes at least one of the following: Perform Kalman filtering on the generator speed and generator torque to eliminate the noise in the generator speed and generator torque; Perform mean filtering on the generator voltage and generator current to eliminate the noise in the generator voltage and generator current; Perform wavelet denoising on the generator temperature and generator vibration value to eliminate the high-frequency noise part in the generator temperature and generator vibration value.

[0094] Specifically, for the generator speed and generator torque, the Kalman filtering algorithm can be used to process them, and optimal estimation is performed through the system state equation and the observation equation to eliminate the noise in the generator speed and generator torque. For the generator voltage and generator current, the mean filtering algorithm can be used to process them, and the average value of the voltage and current within a certain time window is calculated to eliminate the noise in the generator voltage and generator current. For the generator temperature and generator vibration value, the wavelet denoising algorithm can be used to process them, decompose the temperature and vibration value, eliminate the high-frequency noise part, and retain the effective components.

[0095] After completing the above processing, the preprocessing can further include normalizing the normal operation data to eliminate the dimensional difference between the data from different sensors. For example, the following formula can be used: ; In the formula, is the result after normalization, is the data in a certain mode of the normal operation data, is the data mean, is the data standard deviation.

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

[0097] Further, the preprocessing may also include performing time series alignment on the data of each modality in the normal operation data. There may be differences in time between time series data such as generator vibration values and non-time series data such as generator temperature, and timestamp alignment is required. For example, for the engine vibration value, its sampling frequency can be synchronized to the unified frequency of other non-temporal data through resampling operations, so as to ensure the comparability of data in different modalities in the time dimension. For data missing points caused by reasons such as sensor delay, interpolation methods (such as linear interpolation) can be used to fill these missing points.

[0098] Finally, the data of different modalities can be concatenated into a joint feature vector. When subsequent model training is carried out, the joint feature vectors corresponding to the normal operation data in the training sample set can be input into the initial model for training. For example, for the generator vibration value, in order to enhance the time-frequency joint representation, frequency domain features such as spectral energy and dominant frequency components can be extracted through short-time Fourier transform. The frequency domain features and the time domain features of the generator vibration value are used together as the feature representation of the generator vibration value, and then concatenated with the data of other modalities to form a joint feature vector containing rich information.

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

[0100] 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. The model generation part and the model discrimination part are alternately trained through the training sample set.

[0101] Specifically, the parameters of the encoder, decoder, and generator in the initial model can be fixed. The joint feature vectors corresponding to the normal operation data in the training sample set are input into the initial model to train the discriminator in the initial model. After training is completed, the parameters of the discriminator in the initial model can be fixed, and the joint feature vectors corresponding to the normal operation data in the training sample set are input into the initial model to train the encoder, decoder, and generator in the initial model until the training cut-off condition is met to obtain the anomaly detection model.

[0102] Among them, the training cut-off condition can be that the loss value calculated by the loss function converges; or, the training cut-off condition can be that the metrics (such as accuracy, recall, F1 score, etc.) of the model on the validation set exceed the corresponding thresholds; or, the training cut-off condition can be that the number of rounds of alternating training reaches the set round threshold, etc.

[0103] By alternately performing iterative training, the model generation part and the model discrimination part can be trained separately and sequentially, thereby ensuring the accuracy of the model's anomaly detection.

[0104] In the embodiments of the present application, the loss functions adopted by the model generation part and the model discrimination part can be different. Moreover, in the model generation part, the loss functions adopted by the encoder and the decoder can be different from the loss function adopted by the generator.

[0105] To prevent the phenomenon of overfitting caused by high model complexity during model training, that is, the problem that the model performs well on the training sample set during training but poorly on the validation set or new data, L1 regularization and L2 regularization can also be added to the loss functions of the encoder and the decoder. By adding penalty terms to the loss functions, 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.

[0106] Among them, L1 regularization can be adding the sum of the absolute values of the weights as a penalty term to the loss function. Assuming that the original loss function of the encoder and the decoder is , and the weight parameter is (such as the weights of the encoder hidden layer, output layer, etc.), then the loss function after adding L1 regularization is: ; In the formula, is the hyperparameter of L1 regularization, is the i-th weight parameter. For the anomaly detection task, can take a value range of 0.001 to 0.1, which is used to control the strength of regularization. An intermediate value within this range can be selected as the starting value for experimentation, and then dynamically adjusted according to the training situation of the model. If the loss calculated by the loss function during training decreases slowly, it indicates that the model may be underfitting, and the value of can be appropriately reduced to reduce the strength of regularization, and vice versa.

[0107] The role of L1 regularization is to make some weights become 0, achieving the effect of feature selection. During the backpropagation process, the weight update rule becomes: ; In the formula, is the updated weight parameter, is the weight parameter, is the learning rate, is the sign function, represents the weight parameter symbols. L1 regularization has sparsity, which can make some weight parameters become 0 to achieve the purpose of feature selection. When dealing with high-dimensional data, L1 regularization can automatically select the features that contribute more to the model output, reduce the influence of redundant features, further reduce the complexity of the model, and improve the interpretability of the model.

[0108] Among them, L2 regularization can be to add the sum of squares of weights as a penalty term to the loss function. The loss function after adding L2 regularization is: ; In the formula, is the original loss function, is the i-th weight parameter, is the hyperparameter of L2 regularization, and its value-taking rule can refer to , which can make the weights smoother and avoid overfitting. During the backpropagation process, the update rule of the weights becomes: ; In the formula, is the updated weight parameter, is the weight parameter, is the learning rate. L2 regularization can make the weights gradually approach 0 during the update process through the penalty term, but will not become 0, making the weights smoother, avoiding the noise and details in the training sample set by the model, and enabling the model to learn more general features.

[0109] In addition to introducing the above L1 regularization and L2 regularization, for the loss functions of the encoder and decoder, adversarial loss and difference loss can also be introduced therein to further improve the learning ability of the encoder for the latent variable distribution and improve the data reconstruction ability of the decoder.

[0110] For the above step 43, in one example, training the encoder, decoder and generator in the initial model based on the training sample set includes the following steps: Step 431: Input the training sample set into the initial model to obtain the reconstructed data and simulated data corresponding to the normal operation data in the training sample set, and determine the true probabilities corresponding to the reconstructed data and the simulated data; Step 432: Based on the discriminator in the initial model, the true probability corresponding to the reconstructed data, and the normal operation data, determine the reconstruction adversarial loss and the feature difference loss, and based on the discriminator and the true probability corresponding to the simulated data, determine the generation adversarial loss; Step 433: Based on the reconstruction adversarial loss and the feature difference loss, update the parameters inside the encoder and decoder, and based on the generation adversarial loss, update the parameters inside the generator.

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

[0112] Furthermore, the discriminator in the initial model can judge the probability that the reconstructed data is the real data corresponding to the normal operation data, obtain the real probability corresponding to the reconstructed data, and judge the probability that the simulated data is the real data corresponding to the normal operation data, obtain the real probability corresponding to the simulated operation data.

[0113] Furthermore, in step 432, the discriminator can measure the difference between the generated reconstructed data and the normal operation data, and the difference between the generated simulated data and the normal operation data, and feedback this difference to the encoder, decoder and generator in the form of error.

[0114] Specifically, the discriminator can calculate the reconstruction adversarial loss according to the real 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 operation data, and determine the feature difference loss according to the difference between the reconstructed data and the normal operation data at the feature level, as shown in the following formula: ; ; In the formula, is the reconstruction adversarial loss, is the feature difference loss; is the discriminator's discrimination result for the reconstructed data, that is, the real probability corresponding to the reconstructed data; , are the values of the normal operation data and the reconstructed data on the j-th feature dimension respectively.

[0115] And, the discriminator can also feedback error information to the generator in the form of the generation adversarial loss alone according to the real probability corresponding to the simulated data, that is, calculate the generation adversarial loss, as shown in the following formula: ; In the formula, is the simulated data output by the generator, is the discriminator's discrimination result for the simulated data, that is, the real probability corresponding to the simulated data, is the generation adversarial loss.

[0116] Further, in step 433, the discriminator can feedback the reconstruction adversarial loss and the feature difference loss to the encoder and the decoder. Then, the encoder and the decoder can combine the reconstruction adversarial loss, the feature difference loss, the reconstruction error, and the L1 regularization and L2 regularization to calculate the final loss, and then update the parameters inside the encoder and the decoder through the final loss. Moreover, the discriminator can feedback the generative adversarial loss to the generator, and then the generator can update the parameters inside the encoder and the decoder through the generative adversarial loss.

[0117] Among them, the final loss of the encoder and the decoder can be expressed as: ; In the formula, is the final loss; is the reconstruction error term, , is the weight of the reconstruction error, is the reconstruction error (such as the mean square error between the reconstructed data and the normal operation data). Assuming the normal operation data is , the reconstructed data is , the latent variable during the reconstruction process is , the mean output by the encoder is , the logarithm of the variance is , then the reconstruction error is: ; In the formula, is the data dimension, , are the values of the normal operation data and the reconstructed data in the i-th feature dimension respectively.

[0118] In addition, is the normal distribution error term, , is the weight of the normal distribution error, is the normal distribution error, which can be expressed as: ; In the formula, is the latent space dimension during the reconstruction process, , are the mean and variance under the j-th dimension of the latent space respectively.

[0119] In addition, is the L1 regularization term, is the L2 regularization term, , , , are the weights of the L1 regularization loss and the L2 regularization loss respectively, is the L1 regularization loss, is the L2 regularization loss, 、 are the hyperparameters of L1 regularization and L2 regularization respectively, the p-th weight parameter.

[0120] In addition, is the reconstruction adversarial loss term, is the feature difference loss term, , , 、 are the weights of the reconstruction adversarial loss and the feature difference loss respectively, 、 are the reconstruction adversarial loss and the feature difference loss respectively.

[0121] For the encoder and decoder, after calculating the final loss, the gradients of the final loss with respect to each internal parameter (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).

[0122] Exemplarily, first, the gradient propagation of the decoder can be performed. Starting from the final loss , according to the chain rule, the gradients of the final loss with respect to each internal parameter of the decoder are calculated. For example, for a certain weight in the decoder, first calculate the partial derivative of the final loss with respect to the output of the layer where this weight is located , where is the output of the j-th neuron in this layer. Further, according to the input of this layer, calculate , and finally obtain through the chain rule. Calculate the gradients of all internal parameters of the decoder layer by layer in this way.

[0123] Furthermore, the final loss between the reconstructed data of the decoder and the normal operation data will continue to backpropagate to the encoder. First, calculate its gradient with respect to the latent variable , and then since is obtained from the mean and the standard deviation through the reparameterization trick, further calculate and and , finally, according to the network structure of the encoder, calculate the gradients of the final loss with respect to the internal parameters of the encoder layer by layer, and calculate the gradients of the final loss with respect to the weights and biases of each layer using a chain rule similar to that of the encoder.

[0124] For example, the reconstructed data is a function of , so next calculate and gradients of , , where is a random vector sampled from the standard normal distribution and are the outputs of the previous layer (i.e., the inputs of this layer) obtained by linear transformation. Therefore, , is the activation function, is the derivative of the activation function, , , and in this way, the gradients of the final loss of this layer with respect to the weight and bias can be calculated, and then the parameters can be updated according to this gradient.

[0125] After calculating the gradients of the internal parameters of the encoder and decoder, an optimization algorithm can be used to update the internal parameters. Taking the stochastic gradient descent algorithm as an example, the parameter update formula is: ; ; where in the formula, , are the updated weights and biases, , are the weights and biases before update, , are the hyperparameters of L1 regularization and L2 regularization, is the learning rate, and the formula for the learning rate can be: ; where in the formula, is the cumulative sum of the squared gradients, is a constant (with a small value to avoid division by zero), , They are the learning rates at times \(t + 1\) and \(t\) respectively. The learning rate can control the step size of each parameter update. By continuously performing forward propagation, loss calculation, backpropagation, and parameter update, the parameters of the encoder and decoder can be gradually adjusted, thereby reducing the loss and improving the model's ability to reconstruct data and learn the distribution of latent variables.

[0126] The generator anomaly detection method provided by the embodiments of this application obtains the actual operation data of the generator, inputs the actual operation data into a pre-trained anomaly detection model, extracts reconstructed operation features from the actual operation data by the encoder and decoder in the model, and extracts simulated operation features from the actual operation data by the generator in the model. Furthermore, the reconstructed operation features and the simulated operation features are fused by the fusion module in the model to obtain fused operation features. The discriminator in the model, the fused operation features, and the actual operation data are used to determine the anomaly detection result of the generator, realizing the anomaly detection of the generator. This method can perform anomaly detection through multi-modal generator operation data, solve the problem of high misjudgment rate caused by severe dependence on single-modal data, and solve the problem of high misjudgment rate caused by fixed thresholds or empirical formulas. Moreover, this method can accurately capture the complex operation features of the generator through the encoder, decoder, and generator, and then combine the discriminator to perform anomaly detection, improving the accuracy of generator anomaly detection through complex operation features. Especially for the critical state of the generator, it can ensure the reliability of anomaly detection in the critical state.

[0127] Figure 2 is a schematic diagram of a generator anomaly detection process provided by the embodiments of this application. As Figure 2 shown, first, multi-dimensional data in the normal operation state of the generator, that is, normal operation data, can be collected through various sensors. Then, the normal operation data is preprocessed. The encoder can process the normal operation data to calculate the latent operation features, the decoder can process the latent features to calculate the reconstructed operation features, and at the same time, the generator can process the normal operation data to calculate the simulated operation features.

[0128] Furthermore, the simulated operation features and the reconstructed operation features are fused by the fusion module. The fused data and the normal operation data enter the discriminator together. The discriminator determines whether the fused data is real data. If not, the reconstruction adversarial loss and the feature difference loss are determined and fed back to the decoder for parameter update, and the generation adversarial loss is determined and fed back to the generator for parameter update. After the model training is completed, the actual operation data can be directly input into the anomaly detection model to obtain the anomaly detection result.

[0129] In Figure 2In the shown process, the outputs of the generator and the decoder are combined, and through adversarial training, the learning ability of the model for data under different working conditions is improved, thereby enhancing the reliability of the system for detecting abnormalities in the critical state of the generator. Moreover, the discriminator performs discriminative feedback on the fused data, enabling the encoder, decoder, and generator to be continuously optimized. Through continuous iterative training, the model parameters are optimized. When processing real-time detection data, it can quickly extract features and perform discriminative analysis on new data, meet the requirements of real-time detection of the operating state of the generator, promptly detect abnormalities and give early warnings, and ensure the safe and stable operation of the equipment. In addition, the fusion module can assign weights to the outputs of the decoder and the generator according to the working conditions of the generator. Through the data generation and adversarial training mechanisms, the dependence on a large amount of specific working condition data is reduced, the data collection and annotation costs are lowered, and efficient and accurate generator abnormality detection is achieved. In particular, the accuracy of abnormality detection in the critical state can be improved to ensure the safe and stable operation of the generator.

[0130] Figure 3 FIG. is a schematic structural diagram of a generator abnormality detection device provided by 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, where: The acquisition module 310 is configured to acquire the actual operating data of the generator and input the actual operating data into a pre-trained abnormality detection model, where the abnormality detection model includes an encoder, a decoder, a generator, a fusion module, and a discriminator; The feature extraction module 320 is configured to extract reconstructed operating features from the actual operating data based on the encoder and the decoder, and extract simulated operating features from the actual operating data based on the generator; The feature fusion module 330 is configured to fuse the reconstructed operating features and the simulated operating features based on the fusion module to obtain fused operating features; The discrimination module 340 is configured to determine the abnormality detection result of the generator based on the discriminator, the fused operating features, and the actual operating data.

[0131] The generator abnormality detection device provided by the embodiment of the present application can execute the steps in the generator abnormality detection method provided by the method embodiment of the present application, that is, it is applicable to the generator abnormality detection method provided by the embodiment of the present application, and the implementation steps and beneficial effects are not described herein again.

[0132] Figure 4 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 4 shown, the electronic device 400 includes one or more processors 401 and a memory 402.

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

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

[0135] In one example, the electronic device 400 can further include: an input device 403 and an output device 404, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown). The input device 403 can include, for example, a keyboard, a mouse, etc. The output device 404 can output various information to the outside, including warning prompt information, braking force, etc. The output device 404 can include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0136] Of course, for simplicity, Figure 4 only some of the components related to the present application in the electronic device 400 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device 400 can further include any other appropriate components.

[0137] In addition to the above methods and devices, embodiments of the present application can also be computer program products, which include computer program instructions, and when the computer program instructions are run by a processor, the processor is caused to execute the steps of the generator anomaly detection method provided by any embodiment of the present application.

[0138] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The programming code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0139] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are run by a processor, the processor is caused to perform the steps of the generator anomaly detection method provided by any embodiment of the present application.

[0140] The computer-readable storage medium may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having 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 of the above.

[0141] It should be noted that the terms used in the present application are only for describing specific embodiments and do not limit the scope of the present application. As shown in the specification and claims of the present application, unless the context clearly indicates otherwise, words such as "a", "an", "one", and / or "the" are not specifically singular and may also include the plural. The term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the presence of additional identical elements in the process, method, or device including the element.

[0142] It should also be noted that the orientation or positional relationship indicated by terms such as "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present application. Unless otherwise clearly specified and defined, terms such as "installed", "connected", "coupled" 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, an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.

[0143] In this article, specific examples are used to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only for helping to understand the method and its core idea of the present application. The above is only the preferred implementation manner of the present application. It should be noted that due to the limitation of literal expression, and objectively there are infinite specific structures. For those of ordinary skill in the technical field, without departing from the principle of the present application, several improvements, refinements or changes can be made, or the above technical features can be combined in an appropriate manner; these improvements, refinements, changes or combinations, or directly applying the inventive concept and technical solution to other occasions without improvement, should all be regarded as the protection scope of the present application.

Claims

1. A method for detecting abnormality of a generator, characterized in that: include: Acquire actual operation data of the generator, and input the actual operation 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 a reconstructed operation feature from the actual operation data based on the encoder and the decoder, and extracting a simulated operation feature from the actual operation data based on the generator; Based on the fusion module, the reconstructed operation feature and the simulated operation feature are fused to obtain a fused operation feature; Based on the discriminator, the fused operation feature and the actual operation data, an abnormality detection result of the generator is determined.

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 characteristics are reconstructed based on the decoder to obtain a reconstructed operation characteristic 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, characterized in that: 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: Extracting the temporal variation trend of the actual operation data based on the long short-term memory module to obtain key time series features; Based on the self-attention module, the relationship between different parameters in the key timing features is extracted to obtain the simulation operation features.

5. The method according to claim 1, characterized in that 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 simulation operating characteristics according to the reconstruction characteristic weight and the simulation characteristic weight to obtain the fused operating characteristics.

6. The method according to claim 1, characterized in that 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 real probability corresponding to the fused operation feature; An abnormality detection result of the generator is determined based on the true probability.

7. 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.

8. The method according to claim 7, 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; Determine 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 determine a generation 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.

9. The method according to claim 7, 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, it also includes: 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 in 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; The generator temperature and the generator vibration value are subjected to wavelet denoising processing to remove high-frequency noise parts in the generator temperature and the generator vibration value.

10. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the steps of the generator abnormality detection method according to any one of claims 1 to 9 by calling the program or instruction 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

  • Abnormal event detection method and apparatus, computer device, storage medium, computer program, and computer program product

    WO2023142550A1

Cited By

  • Automobile motor fault detection method, system and device and medium

    CN121613310A