Small sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning

By converting three-phase current signals into FSDP images and constructing a relational network, and using a hybrid attention mechanism and CNN for feature extraction, the problem of electrical equipment fault diagnosis in data-scarce and cross-domain scenarios is solved by traditional methods, achieving efficient, accurate fault diagnosis and rapid adaptability.

CN120876451BActive Publication Date: 2026-02-03HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511340959.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-02-03
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

Traditional electrical equipment fault diagnosis methods perform poorly in scenarios with scarce data and cross-domain conditions, exhibiting overfitting and insufficient model generalization ability, and failing to effectively capture important spatial and channel information.

Method used

A small-sample cross-domain equipment fault diagnosis method based on hybrid attention and meta-learning is adopted. By converting three-phase current signals into FSDP images, constructing a relationship network, using hybrid attention mechanism and CNN for feature extraction, and calculating the relationship score of fault features, efficient small-sample fault diagnosis is achieved.

Benefits of technology

It enhances the expression of fault characteristics and noise resistance, improves the model's recognition performance under data-scarce conditions, and can quickly adapt to fault types under different working conditions, meeting the real-time monitoring needs of industrial sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876451B_ABST
    Figure CN120876451B_ABST
Patent Text Reader

Abstract

The application relates to a small-sample cross-domain equipment fault diagnosis method based on mixed attention and meta-learning, which comprises the following steps: converting three-phase current signals of various types of faults of electrical equipment under different working conditions into FSDP images, dividing the obtained training set and test set into support sets and query sets; constructing a relationship network, training the network by using the training set, and obtaining the trained relationship network; the relationship network comprises a feature extraction module and a relationship module; the feature extraction module extracts features of the support sets and the query sets of the training set by using mixed attention and CNN; the relationship module calculates relationship scores of the fault features extracted from the support sets and the query sets, and determines a fault diagnosis result; and the test set is input into the trained relationship network to obtain an electrical equipment fault diagnosis result. The method can be used for intelligent fault diagnosis and health management of electrical equipment under the conditions of sample scarcity and cross-domain scenes, and provides a new solution for intelligent operation and maintenance of electrical equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of electrical equipment fault diagnosis and artificial intelligence, and relates to a small-sample cross-domain equipment fault diagnosis method based on hybrid attention and meta-learning. Background Technology

[0002] With the rapid development of modern industry, electrical equipment has been widely used in key fields such as power systems, industrial equipment, and aerospace. Its operational reliability directly affects industrial production and economic development. However, various faults inevitably occur in electrical equipment during long-term operation. Therefore, establishing an efficient and accurate fault diagnosis system is of great significance for ensuring the safe operation of equipment and reducing maintenance costs.

[0003] In the field of industrial equipment fault diagnosis, traditional signal analysis-based methods typically rely on spectral analysis or time-domain statistics to extract features, which are then combined with machine learning models for classification. These methods perform well in scenarios with sufficient data and unchanged operating conditions, but they still face significant challenges in practical industrial applications. The application of traditional methods in equipment fault diagnosis in real-world industrial scenarios still has significant limitations: 1) Deep neural networks usually require a large amount of labeled data for training, while the fault samples available in industrial settings are often very limited. This leads to the model being prone to overfitting, and the model's cross-domain generalization ability is insufficient; 2) Traditional attention-based methods often use a single dimension and cannot simultaneously capture important spatial and channel information. Summary of the Invention

[0004] To address the problems existing in the above-mentioned traditional methods, this invention proposes a few-shot cross-domain device fault diagnosis method based on hybrid attention and meta-learning, which can integrate signal visual feature representation, adaptive attention mechanism and efficient few-shot learning to achieve cross-domain fault diagnosis.

[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0006] On the one hand, a few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning is provided, the method comprising the following steps:

[0007] Step 1: Collect three-phase current signals of various faults in electrical equipment under different operating conditions; the current signals are one-dimensional time-domain signals.

[0008] Step 2: Convert the three-phase current signal into an FSDP image, use the FSDP image under one operating condition as the training set, and use the FSDP images under other operating conditions as the test set; divide both the training set and the test set into a support set and a query set.

[0009] Step 3: Construct a relation network. Train the relation network using the training set to obtain a trained relation network. The relation network includes a feature extraction module and a relation module. The feature extraction module is used to extract features from the support set and query set of the training set using a hybrid attention mechanism and CNN to obtain fault features. The relation module is used to calculate the relation score of the fault features extracted from the support set and query set, and determine the final fault diagnosis result based on the relation score.

[0010] Step 4: Input the test set into the trained relational network to obtain the electrical equipment fault diagnosis results.

[0011] In one embodiment, step 2 includes:

[0012] Step 2.1: Divide each phase of the three-phase current signal into individual equal parts. Each serving contains One point.

[0013] Step 2.2: Convert each of the divided one-dimensional signals into an SDP image separately; the SDP images include SDP-A, SDP-B and SDP-C.

[0014] Step 2.3: Inject SDP-A, SDP-B and SDP-C into one channel of the RGB channel of the color image respectively to finally form the FSDP image.

[0015] Step 2.4: Use FSDP images under one working condition as the training set and FSDP images under other working conditions as the test set.

[0016] Step 2.5: For the training set, from all Random selection from class of faults Class of faults Using 10 samples as the support set, The remaining samples of the fault type are used as the query set;

[0017] Step 2.6: Repeat step 2.5 to form multiple task sequences covering all categories in the training set.

[0018] Step 2.7: For the test set, use all labeled samples of all types of faults in the test set as the support set and unlabeled samples as the query set.

[0019] In one embodiment, the support set and query set of the training set share the same label space, and the samples in the support set and query set do not overlap.

[0020] In one embodiment, the support set and query set of the test set share the same label space, the labels of the support set are known to the model, and the labels of the query set are unknown to the model.

[0021] In one embodiment, the conversion formula for converting each segment of the one-dimensional signal into an SDP image separately is as follows:

[0022] ;

[0023] ;

[0024] ;

[0025] in, The index of the discrete sampling point of the time-domain signal; This is the time lag factor. This is the magnification factor; For the first The polar coordinate radius corresponding to each sampling point; For the first The amplitude corresponding to each sampling point; , They are respectively Minimum and maximum amplitude values ​​in the time domain; , The first The polar coordinates of each sampling point are rotated counterclockwise and clockwise by the following angles: For the first An angle of rotation in a mirror-symmetric plane and These are two hyperparameters.

[0026] In one embodiment, the feature extraction module includes multiple feature extraction sub-modules connected in series, each feature extraction sub-module consisting of a CNN layer and a hybrid attention module.

[0027] In one embodiment, the hybrid attention module is a CBAM module.

[0028] In one embodiment, the relationship module includes two convolutional blocks and two fully connected layers; the convolutional blocks include a convolutional layer, a batch normalization layer, a ReLU activation function, and a max pooling layer; in the relationship module: when the number of samples in the support set of the training set or test set is 1, the support set and the query set are concatenated using the corresponding fault features extracted by the feature extraction module to obtain combined features; when the number of samples in the support set of the training set or test set is greater than 1, the outputs of the feature extraction module of all samples in each class of support set are summed element-wise to form the feature representation of the corresponding class, and then concatenated with the feature representation of the query sample to obtain combined features; the combined features are processed sequentially through the first convolutional module, the second convolutional module, the first fully connected layer, the ReLU activation function, the second fully connected layer, and the Sigmoid activation function to obtain the relationship score between each query sample and a certain class of support set; for a query sample, N relationship scores are finally obtained, and the fault category corresponding to the training class support set with the largest relationship score is taken as the fault diagnosis result.

[0029] In one embodiment, the parameter adjustment method during the training of the relational network is as follows:

[0030] ;

[0031] in, and These represent the parameters of the feature extraction module and the relation module, respectively. For relational scores, , These are the tags for the support set and the query set, respectively. m , n These represent the number of samples in the support set and the query set, respectively.

[0032] One of the above technical solutions has the following advantages and beneficial effects:

[0033] The aforementioned method for small-sample cross-domain equipment fault diagnosis based on hybrid attention and meta-learning includes: converting the collected three-phase current signals of various faults in electrical equipment under different operating conditions into FSDP images to obtain training and test sets; dividing both the training and test sets into support and query sets; constructing a relation network and training it using the training set to obtain a trained relation network; the relation network includes a feature extraction module and a relation module; the feature extraction module is used to extract features from the support and query sets of the training set using a hybrid attention mechanism and CNN to obtain fault features; the relation module is used to calculate the relation scores of the fault features extracted from the support and query sets, and determine the final fault diagnosis result based on the relation scores; and inputting the test set into the trained relation network to obtain the electrical equipment fault diagnosis result.

[0034] This method visualizes one-dimensional signals, effectively overcoming the problem that fault features are not obvious and difficult to extract in one-dimensional signals. By converting them into images, it enhances the expression of fault features and noise resistance. Furthermore, fusing multi-dimensional signals into an FSDP image covers more fault information.

[0035] By employing a hybrid attention module to simultaneously capture key channel and spatial features, the model's feature extraction capability is enhanced, which helps the diagnostic system maintain stable recognition performance even when data is scarce.

[0036] Meta-learning using relational networks enhances the model's feature discrimination ability by comparing relation scores, achieving high-precision fault diagnosis with only a very small number of samples. Furthermore, the system can quickly adapt to different fault types under varying operating conditions.

[0037] The relational network constructed by this method has a lightweight overall structure and can run efficiently on resource-constrained embedded devices, meeting the real-time monitoring needs of industrial sites. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the 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.

[0039] Figure 1 This is a flowchart illustrating a few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning in one embodiment.

[0040] Figure 2 Here are FSDP images in one embodiment, where (a) is a normal motor FSDP image, (b) is a 10% FSDP image of local demagnetization, (c) is a 10% FSDP image of uniform demagnetization, (d) is a 30% FSDP image of local demagnetization, and (e) is a 100% FSDP image of local demagnetization.

[0041] Figure 3 Here is a structural diagram of the channel attention module in one embodiment;

[0042] Figure 4 Here is a structural diagram of the spatial attention module in one embodiment;

[0043] Figure 5 Here is a structural diagram of a hybrid attention module in one embodiment;

[0044] Figure 6 Here is a structural diagram of the feature extraction module in one embodiment;

[0045] Figure 7 This is a diagram of the relational network structure in one embodiment;

[0046] Figure 8 This is a structural diagram of the relational module in one embodiment. Detailed Implementation

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

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0049] It should be noted that, in this document, the reference to "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The presentation of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments. The term "and / or" as used herein refers to any combination of one or more of the associated listed items, and all possible combinations, including such combinations.

[0050] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0051] In one embodiment, such as Figure 1 As shown, a few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning is provided, which may include the following processing steps 1 to 4:

[0052] Step 1: Collect three-phase current signals of various faults in electrical equipment under different operating conditions; the current signals are one-dimensional time-domain signals.

[0053] Specifically, this invention chooses three-phase current signals because they can simultaneously capture both electrical and mechanical fault characteristics of equipment. Secondly, three-phase current signals integrate multi-dimensional information, encompassing more fault characteristics than single-phase current signals. Furthermore, current transformers can be directly installed in the distribution cabinet, allowing for deployment without system downtime.

[0054] In step 1, the permanent magnet synchronous motor used in this example falls into five categories: normal motor, 10% partial demagnetization, 10% uniform demagnetization, 30% partial demagnetization, and 100% partial demagnetization. Three-phase current sensors are used to collect three-phase current signals for each category at different speeds and loads. Speeds include 1000 r / min and 1500 r / min, and loads include no-load, half-load, and full-load. The speeds and loads are combined in pairs to form six operating condition combinations.

[0055] Step 2: Convert the three-phase current signal into an FSDP image, use the FSDP image under one operating condition as the training set, and use the FSDP images under other operating conditions as the test set; divide both the training set and the test set into a support set and a query set.

[0056] Specifically, by converting multi-sensor signals into multi-dimensional fused SDP (FSDP) images with geometric features, the ability to express fault features is significantly improved.

[0057] The primary motivation for converting three-phase current signals into FSDP images in this invention is to address the problem of fuzzy features in raw industrial monitoring signals. Complex fault features inherent in one-dimensional signals are often highly coupled, leading to unclear features and difficulty in extraction. The SDP method converts one-dimensional signals into snowflake-shaped images in two-dimensional polar coordinates, thus visualizing the one-dimensional fault signal. FSDP images of different fault modes exhibit significant differences in shape, texture, and curvature variations. These differences reflect changes in signal amplitude and frequency. The image structure information contained in FSDP images offers a significant advantage for identifying fault features.

[0058] Step 3: Construct a relation network. Train the relation network using the training set to obtain a trained relation network. The relation network includes a feature extraction module and a relation module. The feature extraction module is used to extract features from the support set and query set of the training set using a hybrid attention mechanism and CNN to obtain fault features. The relation module is used to calculate the relation score of the fault features extracted from the support set and query set, and determine the final fault diagnosis result based on the relation score.

[0059] Specifically, the hybrid attention mechanism can simultaneously capture key information in both spatial and channel dimensions, adaptively focusing on key fault features.

[0060] The feature extraction module is used to extract features from the support set and query set samples to obtain a combined feature representation. The feature extraction module incorporates a hybrid attention mechanism to simultaneously extract channel and spatial key information.

[0061] A meta-learning framework based on relational networks is constructed to quickly determine the fault category by calculating the feature similarity between query samples and support set samples, thereby improving the model's generalization performance in small-sample, cross-domain scenarios. This method provides a new solution for intelligent operation and maintenance of industrial equipment.

[0062] Step 4: Input the test set into the trained relational network to obtain the electrical equipment fault diagnosis results.

[0063] The aforementioned method for fault diagnosis of small-sample cross-domain equipment based on hybrid attention and meta-learning includes: converting the collected three-phase current signals of various faults in electrical equipment under different operating conditions into FSDP images to obtain training and test sets; dividing both the training and test sets into support and query sets; constructing a relation network and training it using the training set to obtain a trained relation network; the relation network includes a feature extraction module and a relation module; the feature extraction module uses a hybrid attention mechanism and CNN to extract features from the support and query sets of the training set to obtain fault features; the relation module calculates the relation scores of the fault features extracted from the support and query sets, and determines the final fault diagnosis result based on the relation scores; the test set is input into the trained relation network to obtain the fault diagnosis result of the electrical equipment. This method can be used for intelligent fault diagnosis and health management of industrial equipment in scenarios with scarce samples and cross-domain requirements. Based on the meta-learning framework of the relation network, it achieves rapid fault category determination by calculating the feature similarity between the query sample and the support set samples.

[0064] In one embodiment, step 2 includes:

[0065] Step 2.1: Divide each phase of the three-phase current signal into individual equal parts. Each serving contains One point.

[0066] Step 2.2: Convert each of the divided one-dimensional signals into an SDP image separately; the SDP images include SDP-A, SDP-B and SDP-C.

[0067] Step 2.3: Inject SDP-A, SDP-B and SDP-C into one channel of the RGB channel of the color image respectively to finally form the FSDP image.

[0068] Specifically, the FSDP images generated at 1000 r / min and half-load conditions are as follows: Figure 2 As shown, (a) is the FSDP image of a normal motor, (b) is the FSDP image of a partially demagnetized motor with 10% FSDP, (c) is the FSDP image of a uniformly demagnetized motor with 10% FSDP, (d) is the FSDP image of a partially demagnetized motor with 30% FSDP, and (e) is the FSDP image of a partially demagnetized motor with 100% FSDP. Figure 2It can be seen that the FSDP images corresponding to different motor states have significant differences in features such as texture, curvature change, shape, and color, which enhances the expression of fault features and is beneficial for fault differentiation.

[0069] In this example, among the six operating condition combinations, the 1000 r / min and half-load combinations are used as the training set, and the other operating condition combinations are used as the test set. The training and test sets are further divided into support and query sets. The specific steps are as follows:

[0070] Step 2.4: Use FSDP images under one working condition as the training set and FSDP images under other working conditions as the test set.

[0071] Step 2.5: For the training set, from all Random selection from class of faults Class of faults 1 sample as support set ,Will The remaining samples of the fault class are used as the query set. This forms a N -Way, K -Shot task.

[0072] Step 2.6: Repeat Step 2.5 to form multiple task sequences covering all categories in the training set. This support / query set is designed to simulate the support / query set encountered during testing.

[0073] Step 2.7: For the test set, use all labeled samples of all types of faults in the test set as the support set and unlabeled samples as the query set.

[0074] In one embodiment, the support set and query set of the training set share the same label space, and the samples in the support set and query set do not overlap.

[0075] In one embodiment, the support set and query set of the test set share the same label space, the labels of the support set are known to the model, and the labels of the query set are unknown to the model.

[0076] In one embodiment, the conversion formula for converting each segment of the one-dimensional signal into an SDP image separately is as follows:

[0077] ;

[0078] ;

[0079] ;

[0080] in, The index of the discrete sampling point of the time-domain signal; This is the time lag factor. This is the magnification factor; For the first The polar coordinate radius corresponding to each sampling point; For the first The amplitude corresponding to each sampling point; , They are respectively Minimum and maximum amplitude values ​​in the time domain; , The first The polar coordinates of each sampling point are rotated counterclockwise and clockwise by the following angles: For the first An angle of rotation in a mirror-symmetric plane and These are two hyperparameters, determined based on the minimum similarity of FSDP images for different faults under different parameters.

[0081] In one embodiment, the feature extraction module includes multiple feature extraction sub-modules connected in series, each feature extraction sub-module consisting of a CNN layer and a hybrid attention module.

[0082] Specifically, the data processing steps in the feature extraction module include:

[0083] Step 3.1.1: Build a feature extraction module based on hybrid attention mechanism and CNN The entire feature extraction module consists of alternating CNN layers and hybrid attention modules:

[0084] The hybrid attention module consists of a channel attention module and a spatial attention module. By sequentially combining channel attention and spatial attention, the weights of the feature maps are dynamically adjusted, making the network focus more on important channels and spatial regions while suppressing irrelevant information.

[0085] In the hybrid attention module: given an intermediate feature map As input, the hybrid attention module sequentially calculates the one-dimensional channel attention. and attention in two-dimensional space The following sections will introduce channel attention and spatial attention respectively:

[0086] This invention extracts the inter-channel relationships of fault features through a channel attention mechanism to obtain a channel attention vector. This invention simultaneously uses average pooling and max pooling features, focusing on both average and maximum information concurrently.

[0087] First, average pooling and max pooling operations are used to aggregate the spatial information of the feature map, generating two different spatial feature representations, which can be expressed as:

[0088] ;

[0089] ;

[0090] in, and Let represent the average pooling feature and the max pooling feature of the channel attention, respectively. Then, these two feature representations are input into a shared network. The shared network consists of two multilayer perceptron (MLP) layers. It can be represented as:

[0091] ;

[0092] in, This represents the activation function. After applying the shared network to each feature representation, the output feature vector is merged by summing the elements. The formula for calculating channel attention is:

[0093] ;

[0094] in, This represents the Sigmoid activation function. As can be seen from the formula, the weights of the MLP... and Two inputs and shared.

[0095] Spatial attention mechanism structure such as Figure 4 As shown. In this example, spatial attention is used to extract the spatial relationships of features, resulting in a spatial attention map. Unlike channel attention, spatial attention focuses on where important information is distributed, complementing channel attention. To compute spatial attention, this invention first applies average pooling and max pooling operations along the channel axis and concatenates them to generate an efficient feature representation. Applying pooling operations along the channel axis effectively highlights information regions. For the concatenated feature representation, convolutional layers are applied to generate the spatial attention map.

[0096] By aggregating the channel information of the feature maps using two pooling layers, two two-dimensional feature maps are generated, which can be represented as:

[0097] ;

[0098] ;

[0099] in, Represents the input feature map, and Let represent the average pooling feature and the max pooling feature of spatial attention, respectively. The two pooling features are combined and input into the convolutional layer to generate a two-dimensional spatial attention map. The formula for calculating spatial attention is:

[0100] ;

[0101] in, This represents the Sigmoid activation function. This indicates a convolutional layer with a kernel size of 7. 7.

[0102] like Figure 5 As shown, the entire process of hybrid attention computation follows the order of first calculating channel attention, then spatial attention. The entire attention computation process can be represented as:

[0103] ;

[0104] .

[0105] Given an input image, two attention modules, one for channels and one for space, compute complementary attention, focusing on channel-important information and the other for spatial-important information, respectively.

[0106] A CNN layer is simply a convolutional layer. The size of each convolutional kernel is determined as needed, typically 3. 3 or 5 5.

[0107] CNN layers and hybrid attention modules are sequentially connected and combined, and multiple combined modules can be repeatedly constructed. For example... Figure 6 As shown, in this example, the feature extraction module adopts a structure that is repeated four times, that is, it is composed of four "CNN-hybrid attention" modules connected in series, and finally outputs the feature map of the image.

[0108] Step 3.1.2: Input the samples from both the support set and the query set into the feature extraction module to obtain feature representations. and , and These represent samples in the support set and query set, respectively.

[0109] Relationship network structure such as Figure 7 As shown, it mainly includes a feature extraction module and a relationship module.

[0110] In one embodiment, the hybrid attention module is a CBAM module.

[0111] In one embodiment, the relationship module includes two convolutional blocks and two fully connected layers; the convolutional blocks include a convolutional layer, a batch normalization layer, a ReLU activation function, and a max pooling layer; in the relationship module: when the number of samples in the support set of the training set or test set is 1, the support set and the query set are concatenated using the corresponding fault features extracted by the feature extraction module to obtain combined features; when the number of samples in the support set of the training set or test set is greater than 1, the outputs of the feature extraction module of all samples in each class of support set are summed element-wise to form the feature representation of the corresponding class, and then concatenated with the feature representation of the query sample to obtain combined features; the combined features are processed sequentially through the first convolutional module, the second convolutional module, the first fully connected layer, the ReLU activation function, the second fully connected layer, and the Sigmoid activation function to obtain the relationship score between each query sample and a certain class of support set; for a query sample, N relationship scores are finally obtained, and the fault category corresponding to the training class support set with the largest relationship score is taken as the fault diagnosis result.

[0112] Specifically, in the relational module, the specific steps of data processing include:

[0113] Step 3.2.1: For K -shot, if K =1, then directly and By piecing them together, we obtain the combined features. , This indicates that the feature representations are concatenated and spliced ​​together.

[0114] like K If the value is greater than 1, the feature extraction module output of all samples in the support set of each training class will be summed element by element to form the feature representation of that class, and then concatenated with the feature representation of the query sample.

[0115] Step 3.2.2: Input the feature combination into the relation module In the middle. For example Figure 8 As shown, the relational module consists of two convolutional layers and two fully connected layers. Each convolutional block is 3... 3 convolutions, followed by batch normalization, ReLU activation function, and 2 A max-pooling layer of 2. Two fully connected layers, one 8-dimensional and the other 1-dimensional. The fully connected layers are activated by the ReLU function, and the output layer uses the Sigmoid function to control the final output value within a reasonable range. The final output is the relation score between each query sample and a certain support set. The higher the relation score, the greater the probability that the query sample belongs to this type of fault. This can be represented as:

[0116] .

[0117] For a given query sample, the final result is Each relationship score is then converted into a One-Hot label, with the highest relationship score considered to have a similarity of 1, and the others considered to have a similarity of 0.

[0118] Step 3.2.3: Perform forward propagation from step 3.2.2 to obtain the final relationship score. Based on this, calculate the loss function and perform backpropagation. The mean squared error loss (MSE) is used. The objective function can be expressed as:

[0119] ;

[0120] in, and These represent the parameters of the feature extraction module and the relation module, respectively.

[0121] Step 3.2.4: Repeat the iteration multiple times to obtain the trained feature extraction module and relation module.

[0122] Optionally, the support set and query set in the test set are simultaneously input into the feature extraction module to obtain a combined feature representation, which is then input into the relation network to obtain a relation score. The relation scores are compared to determine whether the query sample belongs to the fault category with the largest relation score.

[0123] In one embodiment, the parameter adjustment method during the training of the relational network is as follows:

[0124]

[0125] in, and These represent the parameters of the feature extraction module and the relation module, respectively. For relational scores, , These are the tags for the support set and the query set, respectively. m , n These represent the number of samples in the support set and the query set, respectively.

[0126] It should be understood that, although the above Figure 1 The steps are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated in this document, there is no strict order in which these steps are executed; they can be performed in other orders. Furthermore, the above... Figure 1At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

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

[0128] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of protection of this 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 all such modifications and improvements fall within the scope of protection of this application.

Claims

1. A few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning, characterized in that, Including the following steps: Step 1: Collect three-phase current signals of various faults in electrical equipment under different operating conditions; the current signals are one-dimensional time-domain signals. Step 2: Convert the three-phase current signal into an FSDP image, use the FSDP image under one operating condition as the training set, and use the FSDP images under other operating conditions as the test set; divide both the training set and the test set into a support set and a query set. Step 3: Construct a relation network. Train the relation network using the training set to obtain a trained relation network; the relation network includes a feature extraction module and a relation module. The feature extraction module is used to extract features from the support set and query set of the training set using a hybrid attention mechanism and CNN to obtain fault features; The relation module is used to calculate the relation score of the fault features extracted from the support set and the query set, and to determine the final fault diagnosis result based on the relation score. Step 4: Input the test set into the trained relational network to obtain the electrical equipment fault diagnosis results; The relational module includes two convolutional blocks and two fully connected layers; the convolutional block includes a convolutional layer, a batch normalization layer, a ReLU activation function, and a max pooling layer. In the relation module: When the number of samples in the support set of the training set or test set is 1, the corresponding fault features extracted by the feature extraction module are concatenated between the support set and the query set to obtain the combined features. When the number of samples in the support set of the training set or test set is greater than 1, the output of the feature extraction module of all samples in each support set is summed element by element to form the feature representation of the corresponding category. Then, it is concatenated with the feature representation of the query sample to obtain the combined feature. The combined features are processed sequentially through the first convolutional module, the second convolutional module, the first fully connected layer, the ReLU activation function, the second fully connected layer, and the Sigmoid activation function to obtain the relationship score between each query sample and a certain support set. For a given query sample, N relation scores are obtained. The fault category corresponding to the training class support set with the highest relation score is taken as the fault diagnosis result.

2. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 1, characterized in that, Step 2 includes: Step 2.1: Divide each phase of the three-phase current signal into individual equal parts. Each serving contains One point; Step 2.2: Convert each one-dimensional signal after division into an SDP image; the SDP image includes SDP-A, SDP-B and SDP-C; Step 2.3: Inject SDP-A, SDP-B, and SDP-C into one channel of the RGB channel of the color image, respectively, to finally form an FSDP image; Step 2.4: Use FSDP images under one working condition as the training set and FSDP images under other working conditions as the test set; Step 2.5: For the training set, from all Random selection from class of faults Class of faults Using 10 samples as the support set, The remaining samples of the fault type are used as the query set; Step 2.6: Repeat step 2.5 to form multiple task sequences covering all categories in the training set; this support / query set is designed to simulate the support / query set that will be encountered during testing; Step 2.7: For the test set, use all labeled samples of all types of faults in the test set as the support set and unlabeled samples as the query set.

3. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 2, characterized in that, The support set and query set of the training set share the same label space, and the samples in the support set and query set do not overlap.

4. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 2, characterized in that, The support set and query set of the test set share the same label space. The labels of the support set are known to the model, while the labels of the query set are unknown to the model.

5. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 2, characterized in that, The conversion formula for converting each segment of the one-dimensional signal into an SDP image separately is as follows: in, The index of the discrete sampling point of the time-domain signal; This is the time lag factor. This is the magnification factor; For the first The polar coordinate radius corresponding to each sampling point; For the first The amplitude corresponding to each sampling point; , They are respectively Minimum and maximum amplitude values ​​in the time domain; , The first The polar coordinates of each sampling point are rotated counterclockwise and clockwise by the following angles: For the first An angle of rotation in a mirror-symmetric plane and These are two hyperparameters.

6. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 1, characterized in that, The feature extraction module includes multiple feature extraction sub-modules connected in series. Each feature extraction sub-module consists of a CNN layer and a hybrid attention module.

7. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 6, characterized in that, The hybrid attention module is a CBAM module.

8. The few-sample cross-domain device fault diagnosis method based on hybrid attention and meta-learning according to claim 1, characterized in that, The parameter adjustment method during the training of the relation network is as follows: in, and These represent the parameters of the feature extraction module and the relation module, respectively. For relational scores, , These are the labels for the support set and the query set, respectively. m , n These represent the number of samples in the support set and the query set, respectively.

Citation Information

Patent Citations

  • Rotating part fault diagnosis method and device based on improved CNN and relation module

    CN113111820A

  • Bearing fault diagnosis method and device based on small sample learning and medium

    CN118606815A