Fault diagnosis method and device, computer device and storage medium

By performing convolution and inverse attention processing on the phase voltage signal sequence of the inverter, combined with the weighted feature summation method, the problem of low accuracy in traditional inverter fault diagnosis is solved, and higher accuracy fault diagnosis is achieved.

CN117825840BActive Publication Date: 2026-07-14CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)
Filing Date
2023-12-26
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Traditional inverter fault diagnosis methods rely on the degree of feature reflection in the conversion image, resulting in low fault diagnosis accuracy.

Method used

By acquiring the phase voltage signal sequence of the inverter, convolution and inverse attention processing are performed using a fault diagnosis network to determine the weighting parameters. The convolution features and inverse attention features are then weighted and summed, and classification is performed to obtain the fault diagnosis results.

Benefits of technology

This improves the accuracy of inverter fault diagnosis, highlights important features, suppresses secondary features, avoids over-reliance on a single feature, and enhances the accuracy of diagnostic results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117825840B_ABST
    Figure CN117825840B_ABST
Patent Text Reader

Abstract

The application relates to a fault diagnosis method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a phase voltage sequence formed by a phase voltage signal output by an inverter to be diagnosed; inputting the phase voltage sequence into a fault diagnosis network, performing convolution processing on the phase voltage sequence through the fault diagnosis network to obtain a convolution feature; performing reverse attention processing on the phase voltage sequence to obtain a reverse attention feature; determining a weighting parameter based on the convolution feature and the reverse attention feature; performing weighted summation on the convolution feature and the reverse attention feature based on the weighting parameter to obtain a weighted feature; performing classification processing based on the weighted feature to obtain a classification processing result; and taking the classification processing result output by the fault diagnosis network as a fault diagnosis result of the inverter to be diagnosed. The method can accurately diagnose the fault of the inverter to be diagnosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system technology, and in particular to a fault diagnosis method, apparatus, computer equipment, and storage medium. Background Technology

[0002] Inverters are widely used in wind power and photovoltaic power generation. Their main function is to convert direct current (DC) to alternating current (AC). The reliable operation of inverters is of great importance to the safety and stability of the entire power equipment and devices. However, in various power systems, the failure rate of various power transistors in inverters typically reaches nearly one-third, which has a significant impact on the reliability of the system.

[0003] Traditional methods for diagnosing inverter faults involve collecting inverter data, calculating the vector phase, and then converting it into a two-dimensional image. The accuracy of fault diagnosis largely depends on the feature representation of the converted image, resulting in low accuracy. Summary of the Invention

[0004] Therefore, it is necessary to provide a fault diagnosis method, apparatus, computer equipment, and computer-readable storage medium that can accurately diagnose inverter faults in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a fault diagnosis method, including:

[0006] Obtain the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed;

[0007] The phase voltage sequence is input into the fault diagnosis network, which performs convolution processing on the phase voltage sequence to obtain convolution features; the phase voltage sequence is then subjected to reverse attention processing to obtain reverse attention features; weighting parameters are determined based on the convolution features and reverse attention features; the convolution features and reverse attention features are then summed in weight based on the weighting parameters to obtain weighted features; and classification processing is performed based on the weighted features to obtain the classification result.

[0008] The classification results output by the fault diagnosis network are used as the fault diagnosis results for the inverter to be diagnosed.

[0009] In one embodiment, the phase voltage sequence is convolved using a fault diagnosis network to obtain convolutional features, including:

[0010] The phase voltage sequence is processed by multi-scale convolution through a fault diagnosis network to obtain multiple intermediate features at different scales.

[0011] Multiple intermediate features at different scales are converted into multiple target features with the same dimension as the phase voltage sequence.

[0012] Multiple target features are added together to obtain convolutional features.

[0013] In one embodiment, the weighting parameters are determined based on convolutional features and inverse attention features, including:

[0014] The convolutional features are normalized to obtain the first normalization result, and the reverse attention features are normalized to obtain the second normalization result.

[0015] The first mean is obtained by taking the average of multiple elements in the first normalization result, and the second mean is obtained by taking the average of multiple elements in the second normalization result.

[0016] The absolute value of the difference between the first mean and the preset value is used as the first weighting parameter;

[0017] The absolute value of the difference between the second mean and the preset value is used as the second weighting parameter; the weighting parameter includes the first weighting parameter and the second weighting parameter.

[0018] In one embodiment, the convolutional features and the inverse attention features are summed in a weighted manner based on weighting parameters to obtain weighted features, including:

[0019] The weighted features are obtained by multiplying the convolutional features by the first weighted parameter, and then adding the reverse attention features by the second weighted parameter.

[0020] In one embodiment, the phase voltage sequence is subjected to inverse attention processing to obtain inverse attention features, including:

[0021] The phase voltage sequence is normalized to obtain normalized features;

[0022] The normalized features are processed in reverse to obtain the reversed features;

[0023] Pruning is performed on the inverse features based on preset positive numbers;

[0024] The pruning results are sequentially reversed and activated to obtain feature weights.

[0025] Multiplying the phase voltage sequence by the feature weights yields the inverse attention feature.

[0026] In one embodiment, classification is performed based on weighted features to obtain a classification result, including:

[0027] The weighted features are then subjected to batch normalization and pooling processes in sequence to obtain pooled features.

[0028] The pooling features are flattened and processed with a first fully connected layer to obtain fully connected features.

[0029] The fully connected features are deactivated and then processed by a second fully connected feature to obtain the classification results.

[0030] In one embodiment, the training steps of the fault diagnosis network include:

[0031] Obtain a phase voltage sequence sample composed of phase voltage signal samples output from the reference inverter, and obtain the fault type label corresponding to the phase voltage sequence sample;

[0032] The phase voltage sequence samples are input into the initial model, and the initial model performs convolution processing on the phase voltage sequence samples to obtain convolution feature samples; the phase voltage sequence samples are then subjected to inverse attention processing to obtain inverse attention feature samples.

[0033] Based on the convolutional feature samples and the inverse attention feature samples, the weighted parameter samples are determined; based on the weighted parameter samples, the convolutional feature samples and the inverse attention feature samples are summed in weights to obtain the weighted feature samples.

[0034] The initial network output prediction classification result is obtained by classifying the weighted feature samples.

[0035] Based on the fault type labels and prediction classification results, the model parameters of the initial network are adjusted until the preset stopping condition is met, thus obtaining the fault diagnosis network.

[0036] Secondly, this application also provides a fault diagnosis device, comprising:

[0037] The acquisition module is used to acquire the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed;

[0038] The model processing module is used to input the phase voltage sequence into the fault diagnosis network, perform convolution processing on the phase voltage sequence through the fault diagnosis network to obtain convolution features; perform reverse attention processing on the phase voltage sequence to obtain reverse attention features; determine weighting parameters based on the convolution features and reverse attention features; perform weighted summation of the convolution features and reverse attention features based on the weighting parameters to obtain weighted features; and perform classification processing based on the weighted features to obtain the classification result.

[0039] The diagnostic module is used to take the classification results output by the fault diagnosis network as the fault diagnosis results of the inverter to be diagnosed.

[0040] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0041] Obtain the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed;

[0042] The phase voltage sequence is input into the fault diagnosis network, which performs convolution processing on the phase voltage sequence to obtain convolution features; the phase voltage sequence is then subjected to reverse attention processing to obtain reverse attention features; weighting parameters are determined based on the convolution features and reverse attention features; the convolution features and reverse attention features are then summed in weight based on the weighting parameters to obtain weighted features; and classification processing is performed based on the weighted features to obtain the classification result.

[0043] The classification results output by the fault diagnosis network are used as the fault diagnosis results for the inverter to be diagnosed.

[0044] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0045] Obtain the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed;

[0046] The phase voltage sequence is input into the fault diagnosis network, which performs convolution processing on the phase voltage sequence to obtain convolution features; the phase voltage sequence is then subjected to reverse attention processing to obtain reverse attention features; weighting parameters are determined based on the convolution features and reverse attention features; the convolution features and reverse attention features are then summed in weight based on the weighting parameters to obtain weighted features; and classification processing is performed based on the weighted features to obtain the classification result.

[0047] The classification results output by the fault diagnosis network are used as the fault diagnosis results for the inverter to be diagnosed.

[0048] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0049] Obtain the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed;

[0050] The phase voltage sequence is input into the fault diagnosis network, which performs convolution processing on the phase voltage sequence to obtain convolution features; the phase voltage sequence is then subjected to reverse attention processing to obtain reverse attention features; weighting parameters are determined based on the convolution features and reverse attention features; the convolution features and reverse attention features are then summed in weight based on the weighting parameters to obtain weighted features; and classification processing is performed based on the weighted features to obtain the classification result.

[0051] The classification results output by the fault diagnosis network are used as the fault diagnosis results for the inverter to be diagnosed.

[0052] The aforementioned fault diagnosis methods, devices, computer equipment, storage media, and computer program products acquire a phase voltage sequence composed of phase voltage signals output from the inverter to be diagnosed. This phase voltage sequence is then input into a fault diagnosis network. The network performs convolution processing on the phase voltage sequence to obtain convolution features, and then performs inverse attention processing to obtain inverse attention features. Based on the convolution and inverse attention features, weighting parameters are determined. Finally, the convolution and inverse attention features are weighted and summed to obtain weighted features. This method, which uses the fault diagnosis network to perform convolution and inverse attention processing on the phase voltage sequence of the inverter to be diagnosed, and then weights and sums the feature results of both processes to obtain weighted features, helps to highlight important features and suppress secondary features, avoiding over-reliance on a single feature. Classification processing is then performed based on the weighted features to obtain classification results. The classification results output by the fault diagnosis network are used as the fault diagnosis results for the inverter to be diagnosed, which helps to improve the accuracy of the fault diagnosis results. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a diagram illustrating the application environment of a fault diagnosis method in one embodiment;

[0055] Figure 2 This is a flowchart illustrating a fault diagnosis method in one embodiment;

[0056] Figure 3 This is a schematic diagram of the three-phase voltage signals when no fault occurs in one embodiment;

[0057] Figure 4 This is a schematic diagram of the phase voltage signal when a single tube open-circuit fault occurs in one embodiment.

[0058] Figure 5 This is a schematic diagram of the phase voltage signal when a fault occurs in the upper and lower tubes of the same bridge arm in one embodiment.

[0059] Figure 6 This is a schematic diagram of the phase voltage signal when an open-circuit fault occurs on the same side of two bridge arms in one embodiment.

[0060] Figure 7 This is a schematic diagram of the phase voltage signal when an open-circuit fault occurs on two opposite sides of two bridge arms in one embodiment.

[0061] Figure 8 This is a flowchart illustrating the reverse attention processing in one embodiment;

[0062] Figure 9 This is a schematic diagram of the network structure of a fault diagnosis network in one embodiment;

[0063] Figure 10 This is a schematic diagram of the residual convolution module in one embodiment;

[0064] Figure 11 This is a structural block diagram of a fault diagnosis device in one embodiment;

[0065] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0067] The fault diagnosis method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with the inverter 104 to be diagnosed via a network. Terminal 102 acquires a phase voltage sequence composed of phase voltage signals output from the inverter 104; inputs the phase voltage sequence into a fault diagnosis network, performs convolution processing on the phase voltage sequence to obtain convolution features; performs inverse attention processing on the phase voltage sequence to obtain inverse attention features; determines weighting parameters based on the convolution features and inverse attention features; performs weighted summation of the convolution features and inverse attention features based on the weighting parameters to obtain weighted features; performs classification processing based on the weighted features to obtain a classification result; and uses the classification result output by the fault diagnosis network as the fault diagnosis result for the inverter 104 to be diagnosed. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc.

[0068] In one exemplary embodiment, such as Figure 2 As shown, a fault diagnosis method is provided. This embodiment illustrates the method applied to terminal 102. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The method includes steps 202 to 206. Wherein:

[0069] Step 202: Obtain the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed.

[0070] Based on the number of phases, the types of inverters to be diagnosed include single-phase inverters, two-phase inverters, and three-phase inverters. Single-phase inverters output single-phase voltage signals, two-phase inverters output two-phase voltage signals, and three-phase inverters output three-phase voltage signals. When the inverter to be diagnosed is faulty, the fault type can be an open-circuit fault.

[0071] Table 1 shows the fault types and faulty devices of the inverter to be diagnosed in one embodiment. In this embodiment, transistors Q1 and Q2 are on the same bridge arm, transistors Q3 and Q4 are on the same bridge arm, transistors Q5 and Q6 are on the same bridge arm, transistors Q1, Q3 and Q5 are on the same side, and transistors Q2, Q4 and Q6 are on the same side.

[0072] Table 1. Fault types and faulty devices of the inverter to be diagnosed

[0073]

[0074] When an open-circuit fault occurs in the inverter under test, the phase voltage signal output by the inverter under test will differ from the phase voltage signal output when no fault has occurred. For example... Figure 3 The diagram shows the three-phase voltage signals output by the inverter under diagnosis in one embodiment when no fault has occurred. Figure 4 The diagram shows the phase voltage signal output by the inverter under diagnosis in one embodiment when a single transistor (Q6 transistor) open-circuit fault occurs. Figure 5 The diagram shows the phase voltage signal output by the inverter under diagnosis in one embodiment when a fault occurs in two transistors (Q5 and Q6) on the same bridge arm. Figure 6 The diagram shows the phase voltage signal output by the inverter under diagnosis in one embodiment when an open-circuit fault occurs in two transistors (Q3 and Q5) on the same side of both bridge arms. Figure 7 The diagram shows the phase voltage signals output by the inverter under diagnosis in one embodiment when an open-circuit fault occurs in two transistors (Q3 and Q6) on opposite sides of the two bridge arms. Figures 3 to 7 Ua, Ub, and Uc in the three-phase voltage signals represent the first phase voltage signal, the second phase voltage signal, and the third phase voltage signal, respectively.

[0075] The phase voltage sequence consists of the voltage amplitude of the phase voltage signal output by the inverter to be diagnosed within a preset time period.

[0076] The type of inverter to be diagnosed in this embodiment is not specifically limited; a three-phase inverter can be used as an example for explanation. The terminal acquires the three-phase phase voltage signals output by the three-phase inverter within a preset time period, and samples the three-phase phase voltage signals at a preset sampling frequency to obtain the phase voltage sequence corresponding to each phase voltage of the three-phase phase voltage signals.

[0077] Step 204: Input the phase voltage sequence into the fault diagnosis network, perform convolution processing on the phase voltage sequence through the fault diagnosis network to obtain convolution features; perform reverse attention processing on the phase voltage sequence to obtain reverse attention features; determine weighting parameters based on the convolution features and reverse attention features; perform weighted summation of the convolution features and reverse attention features based on the weighting parameters to obtain weighted features; perform classification processing based on the weighted features to obtain the classification result.

[0078] For a three-phase inverter, which consists of three phase voltage sequences, a three-dimensional matrix can be constructed based on the phase voltage amplitudes of the three phase voltage sequences. Similarly, for a two-phase inverter, a two-dimensional matrix can be constructed based on two phase voltage sequences, and for a single-phase inverter, a one-dimensional vector can be constructed based on a single phase voltage sequence.

[0079] The terminal inputs the phase voltage sequence into the fault diagnosis network. Specifically, it can input a three-dimensional matrix, a two-dimensional matrix, or a one-dimensional vector composed of the phase voltage sequence into the fault diagnosis network.

[0080] The fault diagnosis network is a pre-trained deep learning network. For example, it can be a classification network. By using the fault diagnosis network to process the phase voltage sequence, the classification results corresponding to the phase voltage sequence will be obtained.

[0081] The fault diagnosis network includes a residual convolution module and a classification module. The residual convolution module includes a convolution module and a residual module.

[0082] The phase voltage sequence is input into the fault diagnosis network in the form of a corresponding matrix or vector. The convolutional module in the fault diagnosis network performs convolution processing on the phase voltage sequence to obtain convolutional features. Each convolutional module includes at least one convolutional kernel of a preset size. The terminal can use one of the target convolutional kernels from at least one kernel to perform convolution processing on the phase voltage sequence, and the result is used as the convolutional feature. Alternatively, multiple convolutional kernels can be used to perform convolution processing on the phase voltage sequence separately, and the multiple results can be processed and used as the convolutional feature. Convolution processing can downsample the phase voltage sequence, increase the receptive field, and learn more global features.

[0083] The residual module in the fault diagnosis network performs inverse attention processing on the phase voltage sequence to obtain inverse attention features. This inverse attention processing maximizes the attention given to important features while eliminating secondary features.

[0084] The weighting coefficient is the sum of the convolutional features and the reverse attention features. The magnitude of the weighting coefficient is determined by the convolutional features and the reverse attention features. This helps to avoid over-reliance on a single feature. Classification based on weighted features helps to improve the accuracy of the classification results.

[0085] The terminal uses the classification module in the fault diagnosis network to classify the weighted features, and the classification module outputs the classification results.

[0086] Step 206: Use the classification processing result output by the fault diagnosis network as the fault diagnosis result of the inverter to be diagnosed.

[0087] The terminal uses the classification results output by the classification module of the fault diagnosis network as the fault diagnosis results of the inverter to be diagnosed.

[0088] The fault diagnosis results are used to indicate the type of fault in the inverter under diagnosis. For example, the fault diagnosis results may include a single open-circuit fault or a two-transistor open-circuit fault.

[0089] In the aforementioned fault diagnosis method, a phase voltage sequence composed of phase voltage signals output from the inverter to be diagnosed is acquired. This phase voltage sequence is then input into a fault diagnosis network. The network performs convolution processing on the phase voltage sequence to obtain convolution features, and then performs inverse attention processing to obtain inverse attention features. Based on the convolution and inverse attention features, weighting parameters are determined. Based on these weighting parameters, the convolution and inverse attention features are weighted and summed to obtain weighted features. This method, which involves performing convolution and inverse attention processing on the phase voltage sequence of the inverter to be diagnosed through the fault diagnosis network, and then weighting and summing the feature results of the two processing methods to obtain weighted features, helps to highlight important features and suppress secondary features, avoiding over-reliance on a single feature. Based on the weighted features, classification processing is performed to obtain classification results. The classification results output by the fault diagnosis network are used as the fault diagnosis results for the inverter to be diagnosed, which helps to improve the accuracy of the fault diagnosis results.

[0090] In an exemplary embodiment, the phase voltage sequence is convolved through a fault diagnosis network to obtain convolutional features, including: performing multi-scale convolution on the phase voltage sequence through the fault diagnosis network to obtain multiple intermediate features of different scales; converting the multiple intermediate features of different scales into multiple target features with the same dimension as the phase voltage sequence; and adding the multiple target features to obtain the convolutional features.

[0091] Multi-scale convolution processing refers to using multiple convolution kernels of different scales to convolve the phase voltage sequence. For example, the terminal uses multiple convolution kernels of different scales in the convolution module of the fault diagnosis network to perform convolution processing on the three-dimensional convolution corresponding to the three-phase phase voltage sequence, obtaining multiple intermediate features at different scales. After multi-scale convolution processing, the scale of the intermediate features is reduced compared to the scale of the matrix or vector corresponding to the phase voltage sequence, which is beneficial for retaining the main features and removing redundant features.

[0092] Since multiple intermediate features have different scales, it is necessary to convert each intermediate feature into the same dimension. Based on features with the same dimension, operations such as summation can be performed to fuse multiple intermediate features together to obtain convolutional features.

[0093] The dimension of the phase voltage sequence is the dimension of the matrix or vector corresponding to the phase voltage sequence. For example, the matrix dimension corresponding to the phase voltage sequence of a three-phase inverter is... The dimensions of intermediate features include Then the intermediate features will be transformed The target features. The dimensionality transformation method can be: supplementing the difference between the intermediate features and the matrix corresponding to the phase voltage sequence with preset supplementary values. For example, the difference between the intermediate feature dimension and the intermediate feature transformation... If there are 1 element, then the intermediate feature will be 1. Each element is added to the corresponding position of the target feature according to the position order of each pixel, and then added to the remaining elements of the target feature. Each position is padded with a preset supplementary value. In some embodiments, the preset supplementary value can be 0 or other values.

[0094] The method of adding multiple target features can add elements in the same position from multiple target features, and the result is used as the convolutional feature.

[0095] In this embodiment, by performing multi-scale convolution processing on the phase voltage sequence and then fusing multiple processing results, the intermediate features of different receptive fields can be obtained after multi-scale processing using convolution kernels of different scales. Fusing multiple intermediate features of different scales is beneficial to retaining the main features of the phase voltage sequence and removing redundant features, thereby improving the accuracy of fault diagnosis results.

[0096] In an exemplary embodiment, determining weighting parameters based on convolutional features and inverse attention features includes: normalizing the convolutional features to obtain a first normalization result, normalizing the inverse attention features to obtain a second normalization result; averaging multiple elements in the first normalization result to obtain a first mean, averaging multiple elements in the second normalization result to obtain a second mean; using the absolute value of the difference between the first mean and a preset value as a first weighting parameter; using the absolute value of the difference between the second mean and a preset value as a second weighting parameter; the weighting parameters include the first weighting parameter and the second weighting parameter.

[0097] Normalization is used to unify the elements in the convolutional features within the range of 0 to 1, eliminating the influence of excessively large or small elements on the features. Multiple elements in both the first and second normalization results are between 0 and 1. The average of these multiple elements in each normalization result is calculated to obtain the first mean and the second mean, respectively. The first weighting parameter is the absolute value of the difference between the first mean and a preset value, and the second weighting parameter is the absolute value of the difference between the second mean and the preset value. For example, the preset value can be 1 or other values.

[0098] The first mean can represent the feature proportion of convolution features, and the second mean can represent the feature proportion of reverse attention features. Using the absolute value of the difference between the first mean and the preset value as the first weighting parameter, and the absolute value of the difference between the second mean and the preset value as the second weighting parameter, helps to avoid model overfitting and improve the accuracy of model classification results.

[0099] Since the weighting coefficients are used as the weighting coefficients for the weighted summation of convolutional features and backattention features, the sum of the weighting coefficients corresponding to the convolutional features and backattention features can be 1. For example, the first weighting parameter can be used as the weighting coefficient of the convolutional feature, and the difference between 1 and the first weighting parameter can be used as the weighting coefficient of the backattention feature. Alternatively, the second weighting parameter can be used as the weighting coefficient of the backattention feature, and the difference between 1 and the second weighting parameter can be used as the weighting coefficient of the convolutional feature.

[0100] In other embodiments, the sum of the weighted coefficients corresponding to the convolutional features and the reverse attention features may not equal 1. The weighting parameters include a first weighting parameter and a second weighting parameter. For example, the first weighting parameter can be used as the weighting coefficient of the convolutional features, and the second weighting parameter can be used as the weighting coefficient of the convolutional features.

[0101] In this embodiment, the first weighting parameter and the second weighting parameter are obtained by normalizing, averaging, and subtracting the convolutional features and the reverse attention features from the preset values, respectively. The weighting parameters are used to perform weighted summation of the convolutional features and the reverse attention features, which helps to highlight important features, eliminate secondary features, avoid model overfitting, and improve the accuracy of the model classification results.

[0102] In an exemplary embodiment, the convolutional features and the inverse attention features are weighted and summed based on the weighting parameters to obtain weighted features, including: multiplying the convolutional features by the first weighting parameter, and adding the inverse attention features by the second weighting parameter to obtain weighted features.

[0103] The first weighting parameter is used as the weighting coefficient of the convolutional feature, and the second weighting coefficient is used as the weighting coefficient of the reverse attention feature. The sum of the product of the convolutional feature and the first weighting parameter, plus the product of the reverse attention feature and the second weighting parameter, is used as the weighted feature.

[0104] In this embodiment, the first weighting parameter is used as the weighting coefficient of the convolution feature, and the second weighting coefficient is used as the weighting coefficient of the reverse attention feature. This can avoid overfitting and help to highlight important features and eliminate secondary features.

[0105] In an exemplary embodiment, the phase voltage sequence is subjected to inverse attention processing to obtain inverse attention features, including: normalizing the phase voltage sequence to obtain normalized features; performing inverse processing on the normalized features to obtain inverse features; pruning the inverse features based on a preset positive number; performing inverse processing and activation processing on the pruning results in sequence to obtain feature weights; and multiplying the phase voltage sequence by the feature weights to obtain inverse attention features.

[0106] In the fault diagnosis network, the residual module performs reverse attention processing on the phase voltage sequence to obtain reverse attention features. Normalization is used to unify the elements in the matrix or vector corresponding to the phase voltage sequence to the range of 0 to 1. The normalized features are weight matrices representing the proportion of feature importance in the phase voltage sequence. For example, the normalization process can use the Softmax activation function (a normalized exponential function).

[0107] Reverse processing refers to multiplying each element in the normalized feature by -1, so that each element in the resulting reversed feature is the opposite of each element in the normalized feature.

[0108] Pruning involves adding a preset positive number to each element of the inverse feature to obtain the pruned result. This pruned result is then inversely processed, followed by activation processing to eliminate features less than 0. For example, the ReLU (Linear Rectification Function) activation function can be used for activation.

[0109] Multiplying the phase voltage sequence by the feature weights can eliminate secondary features and highlight the important features.

[0110] like Figure 8 The diagram illustrates the reverse attention process in one embodiment. The matrix or vector corresponding to the phase voltage sequence is input into the residual module of the fault diagnosis network. In the residual module, the matrix or vector corresponding to the phase voltage sequence is normalized using the Softmax activation function to obtain normalized features. These normalized features are then reverse-processed to obtain reverse features. The reverse features are pruned based on a preset positive number. The pruning results are then reverse-processed and activated sequentially to obtain feature weights. Finally, the phase voltage sequence is multiplied by these feature weights to obtain the reverse attention features.

[0111] In this embodiment, the phase voltage sequence is normalized and converted into a weight matrix representing the proportion of importance of features. Then, through inversion and pruning, secondary features in the weight matrix are removed. Ideally, only the weight proportions of important features remain in the weight matrix. After inversion and activation, the matrix is ​​multiplied with the matrix or vector corresponding to the phase voltage sequence, thus removing secondary features and highlighting important features.

[0112] In an exemplary embodiment, classification processing based on weighted features is performed to obtain a classification result, including: performing batch normalization and pooling processing on the weighted features in sequence to obtain pooled features; performing flattening processing and a first fully connected processing on the pooled features to obtain fully connected features; and performing deactivation processing and a second fully connected processing on the fully connected features to obtain a classification result.

[0113] The weighted features, as the output of the residual convolutional module in the fault diagnosis network, are then further processed by the classification module. The classification module includes a batch normalization layer, a pooling layer, a flattening layer, a first fully connected layer, a deactivation layer, and a second fully connected layer. After the weighted features are input into the classification module, they are processed sequentially through each layer, outputting the classification result.

[0114] In some embodiments, the fault diagnosis network includes multiple residual convolutional modules, each followed by a batch normalization layer and a pooling layer. Before flattening, the pooling features may also be processed by at least one residual convolutional module, a normalization layer, and a pooling layer to obtain pooled features.

[0115] In this embodiment, the weighted features are sequentially subjected to batch normalization, pooling, flattening, first fully connected processing, deactivation, and second fully connected processing to obtain the classification result. Since the scale of the features changes after pooling, flattening the pooled features into a one-dimensional vector and then performing fully connected processing can achieve feature classification. Deactivation helps to avoid overfitting, and the obtained classification result has high accuracy.

[0116] In an exemplary embodiment, the training steps of the fault diagnosis network include: acquiring phase voltage sequence samples composed of phase voltage signal samples output by a reference inverter, and acquiring fault type labels corresponding to the phase voltage sequence samples; inputting the phase voltage sequence samples into an initial model, performing convolution processing on the phase voltage sequence samples through the initial model to obtain convolutional feature samples; performing reverse attention processing on the phase voltage sequence samples to obtain reverse attention feature samples; determining weighted parameter samples based on the convolutional feature samples and the reverse attention feature samples; performing weighted summation on the convolutional feature samples and the reverse attention feature samples based on the weighted parameter samples to obtain weighted feature samples; performing classification processing based on the weighted feature samples to obtain the predicted classification result output by the initial network; and adjusting the model parameters of the initial network based on the fault type labels and the predicted classification result until a preset stopping condition is met to obtain the fault diagnosis network.

[0117] The reference inverter and the inverter under test must have the same number of phases. For example, if the reference inverter is a three-phase inverter, the inverter under test should also be a three-phase inverter. The terminal acquires phase voltage signal samples output by the reference inverter within a preset time period. These phase voltage signal samples are then sampled, and the phase voltage sequence sample is composed of the phase voltage amplitude of the phase voltage signal samples at each sampling point. Fault type labels are used to indicate the fault type of the reference inverter. For example, fault type labels may include single-transistor open-circuit fault type or double-transistor open-circuit fault type.

[0118] The initial model can be a deep learning model, for example, a deep learning model used for classification.

[0119] The terminal inputs a matrix or vector composed of phase voltage sequence samples into the initial model. The initial model performs convolution processing on the phase voltage sequence samples to obtain convolutional feature samples, and then performs inverse attention processing on the phase voltage sequence samples to obtain inverse attention feature samples. The weighted parameter samples are weighting coefficients obtained by weighted summation of the convolutional feature samples and the inverse attention feature samples, and can be determined based on the convolutional feature samples and the inverse attention feature samples. Classification processing is performed based on the weighted feature samples to obtain the predicted classification result output by the initial network.

[0120] A preset loss function is determined, and the fault type label and the prediction classification result are input into the loss function to calculate the model loss value. The model parameters of the initial model are adjusted based on the model loss value. When the model loss value meets the preset stopping condition, the fault diagnosis network is obtained.

[0121] like Figure 9 The diagram shows a schematic of the network structure of a fault diagnosis network in one embodiment. The matrix or vector corresponding to the phase voltage sequence serves as the input to the fault diagnosis network. In the fault diagnosis network, the matrix or vector corresponding to the phase voltage sequence is processed by a residual convolution module, and then sequentially passes through a batch normalization layer, a pooling layer, a flattening layer, a first fully connected layer, a deactivation layer, and a second fully connected layer to obtain the classification result.

[0122] In this embodiment, during the training process of the fault diagnosis network, convolution and inverse attention processing are performed on the phase voltage sequence samples of the reference inverter, and the feature result samples of the two processing are weighted and summed to obtain weighted feature samples. This helps to highlight important features and suppress secondary features, avoiding over-reliance on a single feature. Classification processing is performed based on the weighted feature samples to obtain the predicted classification result. The model is trained based on the difference between the predicted classification result and the fault type label. The resulting fault diagnosis network has high fault diagnosis accuracy.

[0123] To illustrate the fault diagnosis method and its effectiveness in this solution in detail, a specific embodiment is described below:

[0124] For open-circuit fault diagnosis of the inverter under test, which can be a three-phase inverter, the terminal acquires the phase voltage sequence composed of the phase voltage signals output by the inverter under test and inputs the phase voltage sequence into the fault diagnosis network. The network consists of a residual convolution module and a classification module. The residual convolution module includes a convolution module and a residual module. The classification module includes a batch normalization layer, a pooling layer, a flattening layer, a first fully connected layer, a deactivation layer, and a second fully connected layer.

[0125] like Figure 10The diagram shows a schematic of the residual convolution module in one embodiment. The terminal performs multi-scale convolution processing on the phase voltage sequence through the convolution module in the residual convolution module to obtain multiple intermediate features at different scales. These intermediate features at different scales are then converted into multiple target features with the same dimension as the phase voltage sequence. Finally, the multiple target features are added together to obtain the convolutional features.

[0126] The terminal performs reverse attention processing on the phase voltage sequence through the residual module in the residual convolution module to obtain reverse attention features. Specifically, the phase voltage sequence is normalized by the residual module to obtain normalized features. The normalized features are then reverse-processed to obtain reverse features. The reverse features are pruned based on preset positive numbers. The pruning results are then reverse-processed and activated sequentially to obtain feature weights. The phase voltage sequence is multiplied by the feature weights to obtain the reverse attention features.

[0127] The residual convolution module normalizes the convolutional features to obtain a first normalized result, and normalizes the inverse attention features to obtain a second normalized result. The average of multiple elements in the first normalized result is calculated to obtain a first mean, and the average of multiple elements in the second normalized result is calculated to obtain a second mean. The absolute value of the difference between the first mean and a preset value is used as a first weighting parameter, and the absolute value of the difference between the second mean and the preset value is used as a second weighting parameter. The product of the convolutional features and the first weighting parameter, plus the product of the inverse attention features and the second weighting parameter, is added to obtain the weighted features.

[0128] In some embodiments, the formula for obtaining the weighted features can be expressed as:

[0129]

[0130]

[0131]

[0132] in, Indicates the first weighted parameter. This represents the second weighting parameter. Represents convolutional features, Indicates anti-attention features, Indicates weighted features, This indicates normalization processing. This indicates that the mean value is calculated, with a default value of 1.

[0133] In the classification module, the weighted features output by the residual convolution module are processed sequentially through batch normalization, pooling, flattening, first fully connected processing, deactivation processing, and second fully connected processing by each processing layer of the classification module to obtain the classification result. The classification result output by the fault diagnosis network is used as the fault diagnosis result of the inverter to be diagnosed.

[0134] The training steps of the fault diagnosis network include: acquiring phase voltage sequence samples composed of phase voltage signal samples output from the reference inverter, obtaining fault type labels corresponding to the phase voltage sequence samples, inputting the phase voltage sequence samples into the initial model, performing convolution processing on the phase voltage sequence samples through the initial model to obtain convolution feature samples, performing reverse attention processing on the phase voltage sequence samples to obtain reverse attention feature samples, determining weighted parameter samples based on the convolution feature samples and reverse attention feature samples, performing weighted summation on the convolution feature samples and reverse attention feature samples based on the weighted parameter samples to obtain weighted feature samples, performing classification processing based on the weighted feature samples to obtain the predicted classification result output by the initial network, and adjusting the model parameters of the initial network based on the fault type labels and the predicted classification result until a preset stopping condition is met to obtain the fault diagnosis network.

[0135] The aforementioned fault diagnosis method acquires a phase voltage sequence composed of phase voltage signals output from the inverter under test. This phase voltage sequence is then input into a fault diagnosis network. The network performs convolution processing on the phase voltage sequence to obtain convolutional features, followed by inverse attention processing to obtain inverse attention features. Weighting parameters are determined based on these convolutional and inverse attention features. Finally, the convolutional and inverse attention features are weighted and summed to obtain weighted features. This method, which uses the fault diagnosis network to perform convolution and inverse attention processing on the phase voltage sequence of the inverter under test, and then weights and sums the feature results of both processes to obtain weighted features, helps to highlight important features and suppress secondary features, avoiding over-reliance on a single feature. Classification processing is then performed based on the weighted features, and the classification result output by the fault diagnosis network is used as the fault diagnosis result for the inverter under test, thus improving the accuracy of the fault diagnosis. Furthermore, inputting the phase voltage sequence of the inverter under test into the fault diagnosis model avoids complex feature preprocessing operations and effectively prevents feature loss during feature extraction. The inverse attention mechanism in the residual module highlights important features and suppresses secondary features by assigning different weights to different features. By weighting convolutional features and inverse attention features as input features for the next layer in the fault diagnosis network, the network's over-reliance on any one feature is effectively prevented, thus improving the robustness of the fault diagnosis network.

[0136] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0137] Based on the same inventive concept, this application also provides a fault diagnosis device for implementing the fault diagnosis method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more fault diagnosis device embodiments provided below can be found in the limitations of the fault diagnosis method described above, and will not be repeated here.

[0138] In one exemplary embodiment, such as Figure 11 As shown, a fault diagnosis device 1100 is provided, including: an acquisition module 1102, a model processing module 1104, and a diagnosis module 1106, wherein:

[0139] The acquisition module 1102 is used to acquire the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed;

[0140] The model processing module 1104 is used to input the phase voltage sequence into the fault diagnosis network, perform convolution processing on the phase voltage sequence through the fault diagnosis network to obtain convolution features; perform reverse attention processing on the phase voltage sequence to obtain reverse attention features; determine weighting parameters based on the convolution features and reverse attention features; perform weighted summation of the convolution features and reverse attention features based on the weighting parameters to obtain weighted features; and perform classification processing based on the weighted features to obtain the classification result.

[0141] The diagnostic module 1106 is used to take the classification processing results output by the fault diagnosis network as the fault diagnosis results of the inverter to be diagnosed.

[0142] The aforementioned fault diagnosis device acquires a phase voltage sequence composed of phase voltage signals output from the inverter to be diagnosed, inputs the phase voltage sequence into a fault diagnosis network, performs convolution processing on the phase voltage sequence to obtain convolution features, performs inverse attention processing on the phase voltage sequence to obtain inverse attention features, determines weighting parameters based on the convolution features and inverse attention features, and performs a weighted sum of the convolution features and inverse attention features based on the weighting parameters to obtain weighted features. This method of performing convolution and inverse attention processing on the phase voltage sequence of the inverter to be diagnosed through the fault diagnosis network, and then performing a weighted sum of the feature results of the two processing to obtain weighted features, is beneficial for highlighting important features and suppressing secondary features, avoiding over-reliance on a single feature. Classification processing is performed based on the weighted features to obtain classification results, and the classification results output by the fault diagnosis network are used as the fault diagnosis results of the inverter to be diagnosed, which helps to improve the accuracy of the fault diagnosis results.

[0143] In one embodiment, the phase voltage sequence is convolved through a fault diagnosis network to obtain convolutional features. The model processing module 1104 is further configured to: perform multi-scale convolution on the phase voltage sequence through the fault diagnosis network to obtain multiple intermediate features of different scales; convert the multiple intermediate features of different scales into multiple target features with the same dimension as the phase voltage sequence; and add the multiple target features to obtain convolutional features.

[0144] In one embodiment, based on convolutional features and inverse attention features, weighting parameters are determined. The model processing module 1104 is further configured to: normalize the convolutional features to obtain a first normalization result; normalize the inverse attention features to obtain a second normalization result; calculate the average of multiple elements in the first normalization result to obtain a first mean; calculate the average of multiple elements in the second normalization result to obtain a second mean; use the absolute value of the difference between the first mean and a preset value as a first weighting parameter; use the absolute value of the difference between the second mean and a preset value as a second weighting parameter; the weighting parameters include the first weighting parameter and the second weighting parameter.

[0145] In one embodiment, the convolutional features and the inverse attention features are weighted and summed based on the weighting parameters to obtain weighted features. The model processing module 1104 is further configured to: multiply the convolutional features by the first weighting parameter, add the inverse attention features by the second weighting parameter, and obtain weighted features.

[0146] In one embodiment, the phase voltage sequence is subjected to inverse attention processing to obtain inverse attention features. The model processing module 1104 is further configured to: normalize the phase voltage sequence to obtain normalized features; perform inverse processing on the normalized features to obtain inverse features; perform pruning processing on the inverse features based on preset positive numbers; perform inverse processing and activation processing on the pruning results in sequence to obtain feature weights; and multiply the phase voltage sequence by the feature weights to obtain inverse attention features.

[0147] In one embodiment, classification processing based on weighted features to obtain a classification result includes: performing batch normalization and pooling processing on the weighted features sequentially to obtain pooled features; performing flattening processing and a first fully connected processing on the pooled features to obtain fully connected features; and performing deactivation processing and a second fully connected processing on the fully connected features to obtain a classification result.

[0148] In one embodiment, regarding the training of the fault diagnosis network, the fault diagnosis device 1100 further includes a model training module. The model training module is used to: acquire phase voltage sequence samples composed of phase voltage signal samples output from the reference inverter, and acquire fault type labels corresponding to the phase voltage sequence samples; input the phase voltage sequence samples into an initial model, and perform convolution processing on the phase voltage sequence samples using the initial model to obtain convolutional feature samples; perform reverse attention processing on the phase voltage sequence samples to obtain reverse attention feature samples; determine weighted parameter samples based on the convolutional feature samples and the reverse attention feature samples; perform weighted summation on the convolutional feature samples and the reverse attention feature samples based on the weighted parameter samples to obtain weighted feature samples; perform classification processing based on the weighted feature samples to obtain the predicted classification result output by the initial network; and adjust the model parameters of the initial network based on the fault type labels and the predicted classification result until a preset stopping condition is met to obtain the fault diagnosis network.

[0149] Each module in the aforementioned fault diagnosis device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0150] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a fault diagnosis method.

[0151] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0152] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0153] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0154] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0156] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A fault diagnosis method, characterized in that, The method includes: Obtain the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed; The phase voltage sequence is input into a fault diagnosis network, which performs convolution processing on the phase voltage sequence to obtain convolution features; the phase voltage sequence is then subjected to reverse attention processing to obtain reverse attention features; weighting parameters are determined based on the convolution features and the reverse attention features; the convolution features and the reverse attention features are then summed in a weighted manner based on the weighting parameters to obtain weighted features; and classification processing is performed based on the weighted features to obtain the classification result. The classification results output by the fault diagnosis network are used as the fault diagnosis results of the inverter to be diagnosed.

2. The method according to claim 1, characterized in that, The step of performing convolution processing on the phase voltage sequence through the fault diagnosis network to obtain convolution features includes: The fault diagnosis network performs multi-scale convolution processing on the phase voltage sequence to obtain multiple intermediate features at different scales. The intermediate features at different scales are converted into multiple target features with the same dimension as the phase voltage sequence. The multiple target features are added together to obtain the convolutional features.

3. The method according to claim 1, characterized in that, The determination of weighting parameters based on the convolutional features and the inverse attention features includes: The convolutional features are normalized to obtain a first normalization result, and the inverse attention features are normalized to obtain a second normalization result. The average of multiple elements in the first normalization result is calculated to obtain the first average; the average of multiple elements in the second normalization result is calculated to obtain the second average. The absolute value of the difference between the first mean and the preset value is used as the first weighting parameter; The absolute value of the difference between the second mean and the preset value is used as the second weighting parameter; the weighting parameter includes the first weighting parameter and the second weighting parameter.

4. The method according to claim 3, characterized in that, The step of summing the convolutional features and the inverse attention features based on the weighting parameters to obtain weighted features includes: The weighted features are obtained by multiplying the convolutional features by the first weighting parameter and then adding the product of the reverse attention features and the second weighting parameter.

5. The method according to claim 1, characterized in that, The reverse attention processing of the phase voltage sequence to obtain reverse attention features includes: The phase voltage sequence is normalized to obtain normalized features; The normalized features are processed in reverse to obtain the reverse features; The reverse features are pruned based on a preset positive number; The pruning results are sequentially reversed and activated to obtain feature weights. Multiplying the phase voltage sequence by the feature weights yields the inverse attention feature.

6. The method according to claim 1, characterized in that, The classification process based on the weighted features, to obtain the classification result, includes: The weighted features are sequentially subjected to batch normalization and pooling to obtain pooled features. The pooling features are flattened and subjected to a first fully connected process to obtain fully connected features; The fully connected features are deactivated and then subjected to a second fully connected processing to obtain the classification result.

7. The method according to claim 1, characterized in that, The training steps of the fault diagnosis network include: Obtain a phase voltage sequence sample composed of phase voltage signal samples output from the reference inverter, and obtain the fault type label corresponding to the phase voltage sequence sample; The phase voltage sequence samples are input into the initial model, and the initial model is used to perform convolution processing on the phase voltage sequence samples to obtain convolution feature samples; the phase voltage sequence samples are then subjected to reverse attention processing to obtain reverse attention feature samples. Based on the convolutional feature samples and the inverse attention feature samples, a weighted parameter sample is determined; based on the weighted parameter sample, the convolutional feature samples and the inverse attention feature samples are summed in a weighted manner to obtain a weighted feature sample; Based on the weighted feature samples, classification processing is performed to obtain the predicted classification result output by the initial model; Based on the fault type label and the predicted classification result, the model parameters of the initial model are adjusted until a preset stopping condition is met, thus obtaining the fault diagnosis network.

8. A fault diagnosis device, characterized in that, The device includes: The acquisition module is used to acquire the phase voltage sequence composed of the phase voltage signals output by the inverter to be diagnosed; The model processing module is used to input the phase voltage sequence into a fault diagnosis network, perform convolution processing on the phase voltage sequence through the fault diagnosis network to obtain convolution features; perform reverse attention processing on the phase voltage sequence to obtain reverse attention features; determine weighting parameters based on the convolution features and the reverse attention features; perform weighted summation of the convolution features and the reverse attention features based on the weighting parameters to obtain weighted features; and perform classification processing based on the weighted features to obtain the classification result. The diagnostic module is used to take the classification processing results output by the fault diagnosis network as the fault diagnosis results of the inverter to be diagnosed.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.