A small sample metric learning-based nuclear main pump fault diagnosis method

By constructing a dual-modal feature extraction network for the core pump and a Transformer self-attention fusion mechanism, the problems of the complexity of vibration signals and insufficient diagnostic performance of the core pump under extreme environments and small sample conditions are solved. This enables rapid differentiation and accurate identification of faults under very few sample conditions, and improves the cross-condition generalization ability of core pump fault diagnosis.

CN121765546BActive Publication Date: 2026-06-09CHONGQING UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2025-12-23
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Nuclear main pumps operate under extreme conditions such as high temperature, high pressure, high radiation, and strong fluid disturbance. The vibration signal composition is complex, and single modal characteristics cannot fully reflect the equipment's operating status. Existing diagnostic methods show a significant decrease in diagnostic performance and insufficient generalization ability under small sample conditions, making it difficult to adapt to the complex and ever-changing working conditions of nuclear main pumps.

Method used

A dual-modal feature extraction network based on one-dimensional vibration signal and two-dimensional wavelet time spectrum is constructed. A Transformer self-attention fusion mechanism is introduced. By modeling the structural correlation between cross-modal representations and adaptively adjusting the weight ratio, the feature space's ability to distinguish different fault modes is enhanced. A few-sample metric learning method is used for fault diagnosis.

Benefits of technology

Achieving rapid differentiation and accurate identification of nuclear main pump faults under conditions of extremely limited samples improves the cross-condition generalization capability and practicality of nuclear main pump fault diagnosis, and solves the engineering pain point of scarce nuclear main pump fault samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765546B_ABST
    Figure CN121765546B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of nuclear main pump fault diagnosis method based on small sample metric learning, comprising the following steps: S1, fault signal acquisition: through the multiple sensors arranged in nuclear main pump, original fault signal is collected;S2, multi-modal feature extraction: the original fault signal obtained in step S1 is carried out parallel double branch parallel processing, and then the feature of two modalities of time sequence feature, image feature is extracted;S3, feature dynamic fusion: the local time sequence feature obtained in step S21 is input into the Transformer encoder with the image local feature obtained in step S22, and feature dynamic fusion is carried out, to obtain the depth feature after fusion;S4, fault diagnosis and output: the depth feature after fusion in step S3 is input into the fault diagnosis network based on meta-learning training, and the final fault type diagnosis result is output;Solve the problem that nuclear main pump is in extreme service environment such as high temperature, high pressure, high radiation and strong fluid disturbance, vibration signal component is complex, single modal feature cannot comprehensively reflect equipment operating state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of nuclear main pump fault diagnosis technology, and relates to a nuclear main pump fault diagnosis method based on small sample metric learning, and particularly to a multimodal nuclear main pump fault diagnosis method and device based on a meta-learning framework. Background Technology

[0002] Nuclear energy, as a highly efficient and clean energy source, is crucial for energy security and public safety through its safe and stable operation. The reactor coolant pump (referred to as the main nuclear pump), a key component of the primary loop in the nuclear island, plays a vital role in driving coolant circulation and transferring heat from the reactor core, earning it the title of the "heart" of a nuclear power plant. The main nuclear pump operates under extreme conditions for extended periods, including high temperatures (≥450℃), high pressures (≥45MPa), high radiation, and strong corrosion (liquid high-temperature lead medium). This makes its rotor system prone to typical faults such as imbalance, misalignment, impeller wear, bearing wear, and cavitation. These faults can cause abnormal fluctuations in system flow and pressure, seriously threatening the safe operation of the nuclear reactor. Therefore, accurate diagnosis and early warning of main nuclear pump faults are of great significance for ensuring nuclear power safety.

[0003] Currently, the condition monitoring of nuclear main pumps mainly relies on periodic maintenance and manual diagnosis, which suffers from low efficiency and insufficient reliability. With the development of intelligent operation and maintenance technology, data-driven fault diagnosis methods have become a research hotspot in the industry. However, existing methods face two major technical bottlenecks: First, due to the special service environment of nuclear main pumps, fault data samples are extremely scarce, while current mainstream intelligent diagnosis methods such as deep learning heavily rely on large-scale labeled data, resulting in a significant decrease in diagnostic performance under small sample conditions; second, existing diagnostic models are mostly single-architecture, which, although performing well under specific fault modes, are difficult to adapt to the complex and variable operating conditions of nuclear main pumps, and their generalization ability is insufficient, leading to limited diagnostic accuracy in practical applications. It is worth noting that the special characteristics of nuclear main pump fault diagnosis are also reflected in the complexity of its signal characteristics. Due to factors such as strong noise interference and signal transmission attenuation, effective fault features are often submerged by noise, which further increases the difficulty of diagnosis. In addition, there may be coupling effects between different fault modes, increasing the challenge of accurate fault identification.

[0004] Despite facing numerous challenges such as harsh operating environments, complex signal components, and scarce sample data, accurately identifying and diagnosing potential faults in the main nuclear pump remains a core technological requirement for ensuring the stable operation of the reactor coolant system. Therefore, overcoming the constraints of small sample sizes and the limitations of single models, and developing intelligent diagnostic methods that can adapt to extreme environments and possess strong generalization capabilities, has become a critical technical challenge urgently needing to be addressed in the field of nuclear power safety. This is not only an important breakthrough for improving the operation and maintenance level of nuclear power plants, but also an essential requirement for ensuring the safe and sustainable development of the nuclear power industry. Summary of the Invention

[0005] In view of this, in order to solve the problem that the vibration signal composition of nuclear main pumps is complex and single modal features cannot fully reflect the equipment's operating status under extreme service environments such as high temperature, high pressure, high radiation and strong fluid disturbance, this invention provides a nuclear main pump fault diagnosis method based on small sample metric learning. This diagnostic method constructs a dual-modal feature extraction network based on one-dimensional vibration signal and two-dimensional wavelet time spectrum, and introduces a Transformer self-attention fusion mechanism containing global semantic vectors to realize structural correlation modeling and adaptive adjustment of weight ratios between cross-modal representations, thereby significantly enhancing the feature space's ability to distinguish different fault modes and solving the problems of incomplete single modal feature information and insufficient feature expression ability.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A fault diagnosis method for a nuclear main pump based on few-sample metric learning includes the following steps:

[0008] S1. Fault signal acquisition: Original fault signals are acquired by multiple sensors arranged on the main nuclear pump; the sensors acquire original vibration data at various positions of the main nuclear pump rotor.

[0009] S2. Multimodal Feature Extraction: The original fault signal obtained in step S1 is processed in parallel with two branches to extract features from both temporal and image modes; where:

[0010] S21, Temporal Feature Extraction Branch: The original fault signal is sequentially processed by sliding window clipping and normalization into a one-dimensional time domain signal, and the SEBlock1D attention mechanism is introduced to extract local temporal features with enhanced perception.

[0011] S22, Image Feature Extraction Branch: Perform continuous wavelet transform (CWT) on the original fault signal to convert the one-dimensional time-domain signal of the vibration signal into a two-dimensional time-frequency spectrum of the time-frequency image, and extract local features of the image. The image processing uses the CBAM2D convolutional attention mechanism.

[0012] S3. Dynamic feature fusion: The local temporal features obtained in step S21 and the local image features obtained in step S22 are input into the Transformer encoder for dynamic feature fusion to obtain the fused depth features.

[0013] S4. Fault Diagnosis and Output: The deep features fused in step S3 are input into the fault diagnosis network trained based on meta-learning, and the final fault type diagnosis result is output. That is, the fused features obtained in step S3 are subjected to small-sample metric learning to achieve rapid differentiation of different fault categories. In the embedding space, the support set samples of different fault categories are mapped into low-dimensional feature vectors through the feature extraction module, and class centers of various types of samples are formed in this feature space. The distance or similarity between the sample and various prototypes is queried as the discrimination criterion to achieve fault identification and diagnosis based on metric learning.

[0014] Furthermore, in step S1, the sensors collect raw vibration data at various positions of the nuclear main pump rotor.

[0015] Further, step S2 performs multimodal modeling on the mechanical vibration signal acquired by the sensor in step S1, including two information subspaces: a one-dimensional time-domain signal and a two-dimensional time-frequency spectrum. Specifically, using a time-frequency analysis operator based on Morlet continuous wavelet transform (CWT), the acquired original time-domain signal is transformed into its corresponding time-frequency energy distribution matrix.

[0016] (1)

[0017] In the formula, It is the input signal. It is the mother wavelet. It is a scale factor. It is the translation factor; the Morlet continuous wavelet transform function expression is (2):

[0018] (2)

[0019] In the formula, These are normalization coefficients used to standardize the energy of the mother wavelet. For the complex sinusoidal carrier term, For the Gaussian envelope term, For time-domain signals, their characteristic spaces are defined separately for time-domain signals and time-frequency signals.

[0020] (3)

[0021] (4)

[0022] In the formula, It refers to the deep time-domain features extracted from the signal. It is a one-dimensional feature extraction network. It is the original 1D vibration signal. It refers to the deep time-frequency domain features extracted from the signal. It is a two-dimensional feature extraction network. It is a two-dimensional time-frequency diagram obtained using continuous wavelet transform.

[0023] Furthermore, the specific steps of step S3 are as follows:

[0024] S31. By constructing feature tokens for two modes—1D vibration signal and 2D time-frequency graph—and adding learnable... Global semantic tokens, forming a sequence:

[0025] (5)

[0026] In the formula, This is the initial input sequence for the cross-modal dynamic fusion module; It is a learnable global semantic vector that uses a self-attention mechanism to uniformly aggregate all modal features within a sequence;

[0027] S32. Dynamic Attention Weight Calculation: Transformer automatically calculates cross-modal attention using QK dot product.

[0028] (6)

[0029] In the formula, , , ,in Given the input sequence, , , The learnable parameter matrix is ​​used, and the dot product similarity matrix is ​​normalized using softmax to obtain the dynamic attention weights of the CLS token for the two features: 1D vibration signal and 2D time-frequency plot.

[0030] (7)

[0031] (8)

[0032] S33. The Transformer fusion module is used to represent the dynamic relationship between modes. By iteratively updating the weights layer by layer, adaptive modeling of the relationship between time-domain features and time-frequency features is achieved, thereby completing cross-modal dynamic weight fusion.

[0033] (9)

[0034] In the formula, Indicates the Transformer encoder's first... The input sequence of the layer; Transformer Encoder This represents a sequence feature transformation unit that includes a multi-head self-attention structure, a feedforward neural network, residual connections, and a normalization module; For the first The updated output sequence of the layer Transformer encoder; CLS automatically aggregates weight information from two features: the 1D vibration signal and the 2D time-frequency plot.

[0035] (10)

[0036] S34, Transformer final fusion features:

[0037] (11)

[0038] In the formula, This is the final output sequence after multi-layer processing by the Transformer encoder. This indicates the first CLS token in the sequence; This is the fused global feature vector.

[0039] Furthermore, the specific steps of step S4 are as follows:

[0040] S41. Constructing the Few-shot Support and Query Sets: In each meta-learning episode, several fault categories and their corresponding samples are randomly selected from the training set using an N-way K-shot method to construct the support and query sets. The set of categories involved in the episode is as follows:

[0041] (12)

[0042] In the formula, This indicates the number of fault types (ways) within this episode.

[0043] S42, For each category Randomly selected from all its samples One sample is used as the support set sample, and then another sample is drawn. Using these samples as the query set samples, we obtain:

[0044] (13)

[0045] In the formula, For multimodal inputs containing 1D vibration signals and 2D time-frequency plots, For the corresponding category labels; then the support set and query set of episode are respectively:

[0046] (14)

[0047] After completing the 1D vibration signal-2D time-frequency map multimodal fusion in step S42, the time domain and time-frequency features of each sample are mapped to a unified low-dimensional embedding space for prototype construction and Few-shot metric learning; the input samples are uniformly mapped by a multimodal fusion encoder to output discriminative embedding vectors.

[0048] S43. For each fault category c∈C, calculate its class center using the fusion features of all samples of that category in the support set. If the sample set is S, then the category The prototype vector is defined as:

[0049] (15)

[0050] In the formula, This represents the "class center" of a category in the embedding space. After calculating for all categories, the prototype set within the episode can be obtained:

[0051] (16)

[0052] S44. After obtaining the prototype set, input the query sample into the fusion encoder to obtain its embedding features, and use temperature-scaled cosine similarity to calculate the similarity between the query sample and the prototypes of each category:

[0053] (17)

[0054] In the formula, To query the embedding vector of a sample in the output of a multimodal fusion encoder, For category The corresponding prototype vector;

[0055] , After being normalized by the L2 norm, both are used to calculate the cosine similarity through the inner product. This cosine similarity is used to measure the directional consistency between the query sample and the prototype of each category. Based on Softmax, the posterior probability of the query sample belonging to each fault category is obtained, thus realizing the determination of the fault category.

[0056] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the aforementioned method for diagnosing nuclear main pump faults.

[0057] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for diagnosing nuclear main pump faults.

[0058] The beneficial effects of this invention are as follows:

[0059] 1. The nuclear main pump fault diagnosis method based on few-sample metric learning disclosed in this invention constructs dedicated attention feature extraction networks for time series and time-frequency images respectively. Through mechanisms such as channel attention and spatial attention, the key feature expression related to faults in each modality is strengthened, thereby obtaining multi-level deep features that can characterize structural state changes.

[0060] 2. The nuclear main pump fault diagnosis method based on few-sample metric learning disclosed in this invention maps one-dimensional time-domain signals and two-dimensional time-spectrum features to a unified embedding space, constructs a cross-modal feature sequence using feature vectors as elements, and introduces a learnable global representation token as the convergence node of the sequence. By using the Transformer's multi-head self-attention mechanism to establish correlations between different modalities and achieve dynamic weight adjustment, a fusion feature with global expressive power is obtained.

[0061] 3. The nuclear main pump fault diagnosis method based on few-sample metric learning disclosed in this invention utilizes fused multimodal features to construct prototype representations of each fault category in a support set, and completes fault discrimination based on the metric distance between query samples and various prototypes. Through the prototype metric mechanism, multiple fault states such as rotor misalignment, wear, and rotor imbalance can be quickly distinguished under conditions of very few samples.

[0062] 4. The nuclear main pump fault diagnosis method based on small-sample metric learning disclosed in this invention comprehensively assesses the current operational health status of the nuclear main pump based on the fault category determination results output by the meta-learning model, combined with the structural bias parameters obtained by surrogate model inversion and the dynamic performance indicators inferred from multimodal features. By comparing the normal operating condition parameter range with the prediction results, it infers potential structural anomalies, performance degradation trends, or fault levels, and finally outputs complete health assessment information to the diagnostic system.

[0063] 5. The nuclear main pump fault diagnosis method based on few-sample metric learning disclosed in this invention introduces a prototype network framework. By constructing class centers on the support set samples and combining a temperature-scaled cosine similarity metric, the model can still form stable discrimination boundaries even with a small number of samples or no operating conditions. This allows the embedding space to automatically evolve into a "compact intra-class, separated inter-class" structure. Even when faced with signal distribution changes caused by different bias levels, wear degrees, and flow field disturbances of the nuclear main pump, it maintains good cross-condition generalization ability, significantly improving the fault identification performance and cross-condition generalization ability of the nuclear main pump under small-sample conditions. This solves the engineering pain point of scarce nuclear main pump fault samples, greatly enhancing the practicality and engineering application value of the method.

[0064] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0065] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0066] Figure 1 This is a flowchart of the nuclear main pump fault diagnosis method based on few-sample metric learning according to the present invention.

[0067] Figure 2 This is a flowchart of the adaptive cross-modal attention fusion mechanism of the present invention;

[0068] Figure 3 This is a schematic diagram of the prototype metric network structure of the present invention;

[0069] Figure 4 This is a schematic diagram of the confusion matrix of the fault diagnosis model of the present invention on the test set;

[0070] Figure 5 This is a schematic diagram of the fault diagnosis model of the present invention on the test set using T-SNE. Detailed Implementation

[0071] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.

[0072] like Figure 1 The method for diagnosing nuclear main pump faults based on few-sample metric learning, as shown, includes the following steps:

[0073] S1. Fault signal acquisition: Original fault signals are acquired by multiple sensors arranged on the main nuclear pump; the sensors acquire original vibration data at various positions of the main nuclear pump rotor.

[0074] S2. Multimodal feature extraction: The original fault signal obtained in step S1 is processed in parallel with two branches to extract features of two modes: time-series features and image features.

[0075] S21, Temporal Feature Extraction Branch: The original fault signal is sequentially processed by sliding window clipping and normalization into a one-dimensional time domain signal, and the SEBlock1D attention mechanism is introduced to extract local temporal features with enhanced perception.

[0076] This branch of technology focuses on the variation patterns of fault vibration signals over time. Sliding window pruning divides long sequences into several shorter sequences, facilitating the model's learning of local patterns; normalization standardizes the data; the SEBlock1D attention mechanism automatically learns and enhances the weights of the temporal features most relevant to the fault, while suppressing irrelevant noise.

[0077] S22, Image Feature Extraction Branch: Continuous Wavelet Transform (CWT) is performed on the original fault signal to convert the one-dimensional time-domain signal of the vibration signal into a two-dimensional time-frequency spectrum, extracting local image features. The image processing utilizes the CBAM2D convolutional attention mechanism, a hybrid attention mechanism combining channel and spatial attention. Its core design idea is to sequentially superimpose the two attention mechanisms, enabling the network to adaptively optimize the feature map in both channel and spatial dimensions, thereby significantly improving the feature representation capability.

[0078] This branch of technology transforms fault vibration signals from the "time domain" to the "time-frequency domain." CWT can generate time-frequency plots (two-dimensional spectrograms) and simultaneously display the changes in signal frequency components over time. This is crucial for capturing transient fault characteristics (such as impacts and modulation) in non-stationary vibration signals. Image processing technology (CBAM2D) is used to extract key spatial features from the time-frequency plots.

[0079] Specifically, multimodal modeling is performed on the vibration signals of rotating machinery, including two information subspaces: a one-dimensional time-domain signal and a two-dimensional time-frequency spectrum. Using a time-frequency analysis operator based on Morlet continuous wavelet transform (CWT), the acquired raw time-domain signal is transformed into its corresponding time-frequency energy distribution matrix.

[0080] (1)

[0081] In the formula, It is the input signal. It is the mother wavelet. It is a scale factor. It is a translation factor. The Morlet continuous wavelet transform function is a wavelet function with a fixed frequency, consisting of normalized coefficients, a complex exponential part, a Gaussian envelope, etc., and its function expression is (2):

[0082] (2)

[0083] In the formula, These are normalization coefficients used to standardize the energy of the mother wavelet. For the complex sinusoidal carrier term, For the Gaussian envelope term, Let time be the variable. Define the characteristic spaces for time-domain signals and time-frequency signals respectively:

[0084] (3)

[0085] (4)

[0086] In the formula, It refers to the deep time-domain features extracted from the signal. It is a one-dimensional feature extraction network. It is the original 1D vibration signal. It refers to the deep time-frequency domain features extracted from the signal. It is a two-dimensional feature extraction network. It is a two-dimensional time-frequency diagram obtained using continuous wavelet transform.

[0087] S3. Dynamic feature fusion: The local temporal features obtained in step S21 and the local image features obtained in step S22 are input into the Transformer encoder for dynamic feature fusion to obtain the fused depth features.

[0088] With its powerful self-attention mechanism, Transformer can dynamically model the intrinsic relationship between two different types of features and assign them appropriate weights, achieving a deep fusion where 1+1>2, generating a more informative and discriminative "fused deep feature". The specific steps are as follows ( Figure 2 ):

[0089] S31. By constructing feature tokens for two modes—1D vibration signal and 2D time-frequency graph—and adding learnable... Global semantic tokens, forming a sequence:

[0090] (5)

[0091] In the formula, This is the initial input sequence for the cross-modal dynamic fusion module; It is a learnable global semantic vector that uses a self-attention mechanism to uniformly aggregate all modal features within a sequence.

[0092] S32. Dynamic Attention Weight Calculation: Transformer automatically calculates cross-modal attention using QK dot product.

[0093] (6)

[0094] In the formula, , , ,in Given the input sequence, , , By generating a learnable parameter matrix and normalizing the dot product similarity matrix using softmax, we can obtain the dynamic attention weights of the CLS token for the two features: 1D vibration signal and 2D time-frequency plot.

[0095] (7)

[0096] (8)

[0097] S33. The Transformer fusion module is used to represent the dynamic relationship between modes. By iteratively updating the weights layer by layer, adaptive modeling of the relationship between time-domain features and time-frequency features is achieved, thereby completing cross-modal dynamic weight fusion.

[0098] (9)

[0099] In the formula, Indicates the Transformer encoder's first... The input sequence of the layer; Transformer Encoder This represents a sequence feature transformation unit that includes a multi-head self-attention structure, a feedforward neural network, residual connections, and a normalization module; For the first The updated output sequence of the layer Transformer encoder; CLS automatically aggregates weight information from two features: the 1D vibration signal and the 2D time-frequency plot.

[0100] (10)

[0101] S34, Transformer final fusion features:

[0102] (11)

[0103] In the formula, This is the final output sequence after multi-layer processing by the Transformer encoder. This indicates the first CLS token in the sequence; This is the fused global feature vector.

[0104] S4. Fault Diagnosis and Output: The deep features fused in step S3 are input into a fault diagnosis network trained based on meta-learning, and the final fault type diagnosis result is output. A class center and dynamic metric space are constructed based on a prototype network. Small-sample metric learning is performed on the fused features obtained in step S3 to achieve rapid differentiation of different fault categories. This invention employs a prototype metric network framework as follows: Figure 3 As shown, in the embedding space, support set samples of different fault categories are mapped into low-dimensional feature vectors through the feature extraction module, and class centers (i.e., prototypes) of various types of samples are formed in this feature space. The distance or similarity between the queried sample and each type of prototype is used as the discrimination criterion to achieve fault identification based on metric learning.

[0105] Meta-learning, also known as "learning to learn," has the core advantage of enabling learning from small samples. During the training phase, the model learns how to quickly adapt to new tasks. Therefore, in practical applications, even with extremely limited samples of certain fault types, the network can perform rapid and accurate diagnosis based on prior knowledge, perfectly solving the pain point of scarce data on nuclear main pump faults. The final output includes "diagnostic results" such as those related to imbalance or misalignment.

[0106] Specifically, the steps include the following:

[0107] S41. Constructing the Few-shot Support and Query Sets: In each meta-learning episode, several fault categories and their corresponding samples are randomly selected from the training set using an N-way K-shot method to construct the support and query sets. The set of categories involved in the episode is as follows:

[0108] (12)

[0109] In the formula, This indicates the number of fault types (ways) within this episode.

[0110] S42, For each category Randomly selected from all its samples Using 1 sample as the support set, and then extracting 0 samples as the query set, we get:

[0111] (13)

[0112] In the formula, For multimodal inputs containing 1D vibration signals and 2D time-frequency plots, For the corresponding category labels, the support set and query set for episode are as follows:

[0113] (14)

[0114] After completing the 1D vibration signal-2D time-frequency map multimodal fusion in step S42, the time domain and time-frequency features of each sample are mapped to a unified low-dimensional embedding space for prototype construction and Few-shot metric learning; the input samples are uniformly mapped by a multimodal fusion encoder to output discriminative embedding vectors.

[0115] S43. For each fault category c∈C, calculate its class center using the fusion features of all samples of that category in the support set. If the sample set is S, then the category The prototype vector is defined as:

[0116] (15)

[0117] In the formula, The "class center" representing the category in the embedding space essentially reflects the average representation of the failure mode in the time-domain–time-frequency fusion feature space. After calculation for all categories, the prototype set within the episode is obtained:

[0118] (16)

[0119] S44. After obtaining the prototype set, input the query sample into the fusion encoder to obtain its embedding features, and use temperature-scaled cosine similarity to calculate the similarity between the query sample and the prototypes of each category:

[0120] (17)

[0121] In the formula, To query the embedding vector of a sample in the output of a multimodal fusion encoder, For category The corresponding prototype vector;

[0122] , Both are normalized using the L2 norm, and cosine similarity is calculated through inner product to measure the directional consistency between the query sample and the prototypes of each category. The posterior probability of the query sample belonging to each fault category is obtained based on Softmax, thus determining the fault category. A total loss function is constructed by combining classification cross-entropy loss, prototype separation regularization, modality decorrelation regularization, and prototype contrast loss. Through iterative training on multiple episodes, different fault categories in the embedding space continuously achieve intra-class aggregation and inter-class separation, thereby forming a dynamically adjustable Few-shot metric space to achieve fault diagnosis under multi-condition and small-sample conditions.

[0123] Figure 4This is a schematic diagram of the confusion matrix obtained by the fault diagnosis model of the present invention in the test set, as shown below. Figure 4 As shown in the figure, the horizontal axis represents the predicted category, and the vertical axis represents the true category. The shades of different colors indicate the number of samples or the predicted probability of the corresponding category. The multimodal feature fusion and prototype metric classification method constructed in this invention can ensure that most fault categories fall on the main diagonal of the confusion matrix, indicating that the model has high recognition accuracy and stability for each fault type.

[0124] Figure 5 The following is a visualization of the t-SNE features of the fault diagnosis model of this invention on the test set, such as... Figure 5 As shown in the figure, the dots of different colors represent different fault categories. The samples of each category exhibit a clear cluster structure in the two-dimensional embedding space, with high inter-class separation and good intra-class compactness. This result further demonstrates that the multimodal deep feature fusion and prototype metric classification method proposed in this invention can achieve stable fault differentiation capability under extreme operating conditions and with few samples in the nuclear main pump.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for diagnosing nuclear main pump faults based on small-sample metric learning, characterized in that, Includes the following steps: S1. Fault signal acquisition: Raw fault signals are acquired through multiple sensors deployed on the main nuclear pump; S2. Multimodal Feature Extraction: The original fault signal obtained in step S1 is processed in parallel with two branches to extract features from both temporal and image modes; where: S21, Temporal Feature Extraction Branch: The original fault vibration signal is sequentially clipped by sliding window and normalized to form a one-dimensional temporal signal. This signal is then input into a convolutional network containing an SEBlock1D channel attention structure to extract local temporal features with enhanced perception. S22, Image Feature Extraction Branch: Perform continuous wavelet transform (CWT) on the original fault signal to convert the one-dimensional time-domain signal of the vibration signal into a two-dimensional time-frequency spectrum of the time-frequency image, and extract local features of the image. The image processing uses the CBAM2D convolutional attention mechanism. S3. Dynamic feature fusion: The local temporal features obtained in step S21 and the local image features obtained in step S22 are input into the Transformer encoder for dynamic feature fusion to obtain the fused depth features. S4. Fault Diagnosis and Output: The deep features fused in step S3 are input into the fault diagnosis network trained based on meta-learning, and the final fault type diagnosis result is output. That is, the fused features obtained in step S3 are subjected to small-sample metric learning to achieve rapid differentiation of different fault categories. In the embedding space, the support set samples of different fault categories are mapped into low-dimensional feature vectors through the feature extraction module, and class centers of various types of samples are formed in this feature space. The distance or similarity between the sample and various prototypes is queried as the discrimination criterion to achieve fault identification and diagnosis based on metric learning.

2. The nuclear main pump fault diagnosis method as described in claim 1, characterized in that, In step S1, the sensors collect raw vibration data at various positions of the main pump rotor.

3. The nuclear main pump fault diagnosis method as described in claim 1, characterized in that, Step S2 performs multimodal modeling on the mechanical vibration signal acquired by the sensor in Step S1, including two information subspaces: a one-dimensional time-domain signal and a two-dimensional time-frequency spectrum. Specifically, using a time-frequency analysis operator based on Morlet continuous wavelet transform (CWT), the acquired original time-domain signal is transformed into its corresponding time-frequency energy distribution matrix. (1) In the formula, It is the input signal. It is the mother wavelet. It is a scale factor. It is the translation factor; the Morlet continuous wavelet transform function expression is (2): (2) In the formula, These are normalization coefficients used to standardize the energy of the mother wavelet. For the complex sinusoidal carrier term, For the Gaussian envelope term, For time-domain signals, their characteristic spaces are defined separately for time-domain signals and time-frequency signals. (3) (4) In the formula, It refers to the deep time-domain features extracted from the signal. It is a one-dimensional feature extraction network. It is the original 1D vibration signal. It refers to the deep time-frequency domain features extracted from the signal. It is a two-dimensional feature extraction network. It is a two-dimensional time-frequency diagram obtained using continuous wavelet transform.

4. The nuclear main pump fault diagnosis method as described in claim 3, characterized in that, The specific steps of step S3 are as follows: S31. By constructing feature tokens for two modes—1D vibration signal and 2D time-frequency graph—and adding learnable... Global semantic tokens, forming a sequence: (5) In the formula, This is the initial input sequence for the cross-modal dynamic fusion module; It is a learnable global semantic vector that uses a self-attention mechanism to uniformly aggregate all modal features within a sequence; S32. Dynamic Attention Weight Calculation: Transformer automatically calculates cross-modal attention using QK dot product. (6) In the formula, , , ,in Given the input sequence, , , The learnable parameter matrix is ​​used, and the dot product similarity matrix is ​​normalized using softmax to obtain the dynamic attention weights of the CLS token for the two features: 1D vibration signal and 2D time-frequency plot. (7) (8) S33. The Transformer fusion module is used to represent the dynamic relationship between modes. By iteratively updating the weights layer by layer, adaptive modeling of the relationship between time-domain features and time-frequency features is achieved, thereby completing cross-modal dynamic weight fusion. (9) In the formula, Indicates the Transformer encoder's first... The input sequence of the layer; Transformer Encoder This represents a sequence feature transformation unit that includes a multi-head self-attention structure, a feedforward neural network, residual connections, and a normalization module; For the first The updated output sequence of the layer Transformer encoder; CLS automatically aggregates weight information from two features: the 1D vibration signal and the 2D time-frequency plot. (10) S34, Transformer final fusion features: (11) In the formula, This is the final output sequence after multi-layer processing by the Transformer encoder. This indicates the first CLS token in the sequence; This is the fused global feature vector.

5. The nuclear main pump fault diagnosis method as described in claim 1, characterized in that, In step S3, the Transformer encoder models the intrinsic relationship between local temporal features and local image features through its self-attention mechanism, thereby achieving dynamic weighted fusion of cross-modal features.

6. The nuclear main pump fault diagnosis method as described in claim 4, characterized in that, The specific steps of step S4 are as follows: S41. Constructing the Few-shot Support and Query Sets: In each meta-learning episode, several fault categories and their corresponding samples are randomly selected from the training set in an N-way K-shot manner to construct the support and query sets; the set of categories involved in the episode is as follows: (12) In the formula, This indicates the number of fault types (ways) within this episode; S42, For each category Randomly selected from all its samples One sample is used as the support set sample, and then another sample is drawn. Using these samples as the query set samples, we obtain: (13) In the formula, For multimodal inputs containing 1D vibration signals and 2D time-frequency plots, For the corresponding category labels; then the support set and query set of episode are respectively: (14) S43. Input the 1D vibration signals and 2D time-frequency maps from the support set and query set into the multimodal fusion encoder, perform 1D–2D feature extraction and feature alignment on each sample, and map them to a unified low-dimensional embedding space to obtain a discriminative embedding vector. For each fault category c∈C, its class center is calculated using the fusion features of all samples of that category in the support set; the class center of the sample belonging to the category in the support set is calculated. If the sample set is S, then the category The prototype vector is defined as: (15) In the formula, This represents the "class center" of a category in the embedding space. After calculating for all categories, we obtain the prototype set within the episode: (16) S44. After obtaining the prototype set, input the query sample into the fusion encoder to obtain its embedding features, and use temperature-scaled cosine similarity to calculate the similarity between the query sample and the prototypes of each category: (17) In the formula, To query the embedding vector of a sample in the output of a multimodal fusion encoder, For category The corresponding prototype vector; , After being normalized by the L2 norm, both are used to calculate the cosine similarity through the inner product. This cosine similarity is used to measure the directional consistency between the query sample and the prototype of each category. Based on Softmax, the posterior probability of the query sample belonging to each fault category is obtained, thus realizing the determination of the fault category.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the nuclear main pump fault diagnosis method as described in any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the nuclear main pump fault diagnosis method as described in any one of claims 1 to 6.