Device fault detection method based on small sample learning and acoustic feature transfer, device and medium
By employing dynamic feature fusion and noise adaptive enhancement, the problems of low utilization and poor cross-device generalization ability in equipment fault detection under small sample conditions are solved, achieving efficient fault detection in complex industrial environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI ZHONGKE HAOYIN TECH CO LTD
- Filing Date
- 2025-08-05
- Publication Date
- 2026-07-28
AI Technical Summary
Existing technologies have low utilization rates, poor cross-device generalization ability, and insufficient noise robustness in equipment fault detection under small sample conditions. In particular, they are difficult to effectively extract the physical mechanism features and equipment-independent features of acoustic signals in complex industrial environments, and the feature retention rate is insufficient under noise interference.
We employ a method based on few-shot learning and acoustic feature transfer, which combines dynamic feature fusion, gradient inversion domain adversarial network (DANN) and conditional generative adversarial network (Mel-CGAN) to generate device-independent fused features and perform adaptive enhancement in noisy environments, forming a closed-loop optimization process.
It improves feature utilization under small sample conditions, enhances cross-device generalization ability and noise robustness, and significantly improves the economy and reliability of intelligent operation and maintenance system.
Smart Images

Figure CN120932676B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault detection, and in particular to a device fault detection method, device, and medium based on few-sample learning and acoustic feature transfer. Background Technology
[0002] With the increasing demand for intelligent operation and maintenance of industrial equipment, acoustic signal-based fault detection technology, due to its non-invasive and real-time monitoring advantages, is gradually becoming a core means of equipment health management. However, existing technologies face the following key bottlenecks in complex industrial scenarios: 1. Low utilization rate of physical features under small sample conditions Traditional fault detection methods (such as patent application CN113591434A) rely on large-scale labeled data to train deep neural networks (CNN, RNN). However, equipment fault samples are scarce in industrial scenarios, especially early and rare faults. Research shows (L. Zhang, J. Wang, X. Li, Small Sample Learning for Fault Diagnosis in Industrial Machinery Using Deep Neural Networks, IEEE Transactions on Instrumentation and Measurement, vol. 71, pp. 1-10, 2022) that when there are fewer than 20 fault samples per class, the accuracy of traditional deep learning methods drops sharply to below 50%. Existing methods fail to effectively integrate the physical mechanism features of acoustic signals (such as fundamental frequency and harmonic components) with deep learning features, resulting in insufficient fault fingerprint extraction capabilities in small sample scenarios.
[0003] 2. Lack of cross-device acoustic feature transfer capability Existing solutions are mostly optimized for single device models (e.g., patent application US20220157321A1), failing to address the device-dependent nature of acoustic signals (e.g., resonant frequency shifts, noise spectrum differences). Experiments show (M. Li, Y. Chen, H. Liu, Cross-Domain Fault Detection in Industrial Machines Using Meta-Learning, Mechanical Systems and Signal Processing, vol. 162, p. 107842, 2023) that traditional meta-learning (MAML) methods experience an accuracy drop of over 25% in cross-device testing, fundamentally due to the lack of device-independent feature extraction mechanisms.
[0004] 3. Insufficient robustness to noise interference. In industrial environments, the signal-to-noise ratio (SNR) of acoustic signals is generally below 10 dB. Existing noise reduction methods (such as fixed band-stop filtering and spectral subtraction) tend to over-suppress effective signals when the noise frequency band changes dynamically. The literature (Q. Wang, F. Zhou, Y. Xu, Adaptive Noise Reduction Techniques for Acoustic Signals in Industrial Environments, Journal of Sound and Vibration, vol. 490, p. 115674, 2021, doi:10.1016 / j.jsv.2020.115674) points out that traditional methods achieve a fault feature retention rate of less than 40% when the noise energy proportion is >50%, and lack adaptive noise reduction strategies linked to data augmentation.
[0005] 4. Mismatch between synthetic data and physical laws Existing generative adversarial networks (such as patent application JP2021002573A) synthesize fault acoustic signals with harmonic component distortion, leading to the model learning false features. Experiments show (T. Sun, Y. Zhang, Z. Liu, Physical-Constrained GANs for Generating High-Fidelity Synthetic Fault Data, Optics Express, vol. 31, no. 3, pp. 4235–4248, 2023, doi:10.1364 / OE.478269) that such methods increase generalization error by more than 30% in cross-device scenarios and fail to enhance adaptability to noisy environments. Summary of the Invention
[0006] The purpose of this invention is to propose a method, device, and medium for equipment fault detection based on few-sample learning and acoustic feature transfer, so as to solve the technical problems of low utilization rate of few-sample learning, poor cross-device generalization ability, and insufficient noise robustness in existing industrial equipment fault detection.
[0007] Specifically, this invention provides a device fault detection method based on few-sample learning and acoustic feature transfer, comprising the following steps: S1. Acquire the acoustic signals of the target device in operation; S2. Extract the time-frequency features and physical constraint features of the acoustic signal, and dynamically adjust the weights of the physical constraints and time-frequency features through an attention mechanism to generate a fused feature vector; S3. Construct a gradient inversion domain adversarial network (DANN), input the fused feature vector into the DANN's feature extractor, and force the model to learn device-independent features through the gradient inversion layer. S4. Construct a conditional generative adversarial network Mel-CGAN, input physical constraint features and random noise into Mel-CGAN for training, and output synthesized fault acoustic signals. S5. The synthesized fault acoustic signal is injected into the real-time acquired environmental noise and then mixed with the actual acoustic signal to obtain a mixed set. S6. Retrain the DANN using the mixed set to obtain a trained DANN; S7. Input the actual acoustic signal to be detected into the trained DANN to obtain the fault detection result.
[0008] A storage device that stores instructions and data for implementing a device fault detection method based on few-shot learning and acoustic feature transfer.
[0009] A device fault detection device based on few-shot learning and acoustic feature transfer includes: a processor and a storage device; the processor loads and executes instructions and data in the storage device to implement a device fault detection method based on few-shot learning and acoustic feature transfer.
[0010] The beneficial effects provided by this invention are: 1. Dynamic Feature Fusion Mechanism We propose a Mel spectrum-physical feature attention fusion method, which dynamically combines the global frequency domain representation (40 dimensions) of the Mel spectrum with the fault fingerprint characteristics of physical features (fundamental frequency, harmonic energy ratio) through a learnable weight matrix, to achieve efficient feature utilization under small sample conditions.
[0011] 2. Domain Adversarial - Generative Collaboration: Cross-Device Generalization Design a gradient inversion domain adversarial network (DANN) to force the model to learn device-independent fusion features, and combine it with a physically constrained CGAN (Mel-CGAN) to generate cross-device fault acoustic signals, forming a closed-loop optimization process of "generation-verification-retraining".
[0012] 3. Noise-Adaptive Virtual-Real Enhancement Strategy The first-ever noise spectrum feedback enhancement technology injects the real environmental noise spectrum into the synthesized signal and suppresses in-band noise interference through microphone array beamforming and dynamic frequency band attenuation.
[0013] In summary, compared with traditional solutions, this invention has high data utilization, strong cross-device generalization ability, and high noise robustness, significantly improving the economy and reliability of intelligent operation and maintenance systems. Attached Figure Description
[0014] Figure 1 This is a simplified schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the hardware device used in this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0016] Before formally describing the present invention, a general description of the solution of the present invention will be given first to facilitate understanding.
[0017] Please refer to Figure 1 , Figure 1 This is a flowchart of the method of the present invention.
[0018] This invention provides a device fault detection method based on few-shot learning and acoustic feature transfer, comprising the following steps: S1. Acquire the acoustic signals of the target device in operation; Specifically, this invention acquires acoustic signals from the target device using a microphone. The details are as follows: Low-pass filtering (cutoff frequency) is applied to the analog signal acquired by the microphone. ), suppressing high-frequency noise. Among them: Filter cutoff frequency (unit: Hz); : Sampling rate of analog-to-digital converter (ADC) (unit: Hz).
[0019] With sampling rate Digitization at 16-bit resolution generates discrete signals. .
[0020] Divide the signal into frames (frame length N=1024, frame shift M=512), and add a Hanning window. .
[0021] Where: N: length of a single frame signal (unit: number of sampling points); M: overlap interval between adjacent frames (unit: number of sampling points).
[0022] S2. Extract the time-frequency features and physical constraint features of the acoustic signal, and dynamically adjust the weights of the physical constraints and time-frequency features through an attention mechanism to generate a fused feature vector; It should be noted that the time-frequency feature in step S2 of this invention is a Mel spectrum feature. F mel The physical constraint features include: fundamental frequency. f 0 harmonic energy ratio H ratio .
[0023] Specifically, Mel spectrum features F mel The process of obtaining is as follows: 1. Short-Time Fourier Transform (STFT) (1) in: : No. Frame signal at frequency The complex spectrum at the location; Frequency index (dimensionless).
[0024] 2. Mel filter bank design Design 40 triangular filters Covering a frequency range of 0-24kHz (Mel scale conversion formula), the Mel scale is evenly divided into 40 frequency bands, generating 40 triangular filters. . No. Frequency response of each filter: Center frequency The linear frequencies corresponding to equally spaced points on the Mel scale; Starting frequency Termination frequency Midpoint of adjacent center frequencies
[0025] Triangular response function: (2) (3) in: : No. A Mel filter at frequency The response value at the location (dimensionless); Mel-scale frequency (unit: mel).
[0026] 3. Mel spectrum generation: (4) in: : No. Energy value per mech band (unit: dB).
[0027] Logarithmic compression: Taking the logarithm of the energy value improves the discriminative power of low-energy regions. (5) Specifically, the physical constraint feature extraction process is as follows: 1. Baseband detection (6) in: Signal fundamental frequency (unit: Hz); Autocorrelation delay points (dimensionless).
[0028] 2. Harmonic energy ratio (7) in: Harmonic energy percentage (dimensionless). Baseband Second harmonic amplitude.
[0029] The selection criteria for the 5th harmonic: The early characteristic energy of industrial equipment failures (such as bearing pitting and gear tooth breakage) is concentrated in the fundamental frequency and its lower harmonics (≤5th). High-frequency harmonics are easily polluted by noise.
[0030] In this invention, step S2 is specifically as follows: S21. Calculate the dynamic attention weights as follows: (8) Physically constrained features, including fundamental frequency Compared with harmonic energy , It is a trainable parameter matrix; For the Sigmoid function; in The mel spectrum features are 40-dimensional mel spectrum feature vectors, generated by weighting the STFT using a mel filter bank; in the dynamic feature fusion module... It is a trainable parameter matrix whose core function is to learn Mel spectral features. With physical characteristics The correlation between the two is dynamically allocated to determine the fusion weights. The specific definition is as follows: A1) Dimension: (9) in: (Mel spectrum feature dimension); (Physical characteristic dimension, including fundamental frequency) Compared with harmonic energy ).therefore, The dimension is 1×42 A2) Calculation logic: After splicing the Mel spectrum with physical characteristics, through Perform a linear transformation, then pass the weights through the Sigmoid activation function. .
[0031] (10) : A concatenated vector of Mel spectrum and physical features; Bias term (trainable parameter); The Sigmoid function compresses the output to the range [0,1].
[0032] A3) Physical meaning Feature importance allocation: Each element corresponds to a weight coefficient of a certain dimension in the Mel spectrum and physical features. The model automatically learns the importance of different features through backpropagation. For example: If a certain frequency band of the Mel spectrum (e.g., around 3kHz) is sensitive to faults, then the corresponding The coefficient is relatively large; if physical characteristics (such as harmonic energy ratio) are more discriminative in a specific fault, then their corresponding coefficients are strengthened.
[0033] Dynamic adaptability: adaptable to different equipment or fault types, Adaptive adjustment of fusion strategy: Bearing failure (significant impact characteristics): Physical characteristics dominate; Gear failure (wideband vibration): Melp is the dominant force.
[0034] S22. Calculate the fused feature vector: , F fusion To fuse feature vectors.
[0035] Dynamically fused features (42 dimensions), generated by weighted concatenation of Mel spectrum and physical features, are output to the domain adversarial training DANN: fused features As input to the DANN, it drives domain adversarial training. This is the Sigmoid function.
[0036] S3. Construct a gradient inversion domain adversarial network (DANN), input the fused feature vector into the DANN's feature extractor, and force the model to learn device-independent features through the gradient inversion layer. It's important to note that in equipment fault detection, different devices (such as different wind turbine gearboxes or industrial pumps) may have different acoustic characteristics. If we directly use a single model to identify faults in all devices, performance may degrade due to these differences. This is known as the cross-device generalization problem. Domain-Adversarial Neural Network (DANN) is a technique that attempts to enable the model to learn device-independent features, thereby improving its cross-device generalization ability. In other words, the goal of DANN is to teach the model to "ignore" the differences between devices and focus on identifying the type of fault.
[0037] Step S3, based on the gradient inversion domain adversarial network (DANN), includes: a feature extractor, a fault classifier, and a domain classifier; Feature extractor with For input, output domain invariant features H These features are designed to capture the core characteristics of equipment failures, without relying on a specific equipment model or operating condition.
[0038] Fault classifiers use domain-invariant features H The probability distribution of the input and output signal source devices; Fault classifiers use domain-invariant features H Input and output device fault types (such as bearing wear, gear breakage).
[0039] Specifically, the goal of adversarial training is to make the features generated by the feature extractor device-independent, meaning that the features remain consistent regardless of which device the signal comes from. This is achieved through the following steps: 1. Gradient Reversal Layer (GRL) During backpropagation, the Gradient Reversal Layer (GRL) reverses the gradients of the domain classifier. This means that when updating the weights of the feature extractor, the system "penalizes" features that easily distinguish the source and target domains. In this way, the feature extractor is forced to generate device-independent features, meaning that features maintain consistency regardless of the device they come from.
[0040] Mathematically, the function of GRL can be represented as: (11) in, It is a hyperparameter used to control the degree of gradient reversal. Representation domain classification cross-entropy loss.
[0041] 2. Loss Function The loss function consists of two parts: fault classification cross-entropy loss. Used to optimize the fault classifier and ensure that the model can accurately identify the fault type.
[0042] (12) in, It is the sample size. It is the number of fault categories. It is a sample The true label (one-hot encoding). The probability of a type of failure.
[0043] Domain classification cross-entropy loss Cross-entropy loss is a standard function used to measure the performance of a model on a domain classification task. Specifically, it measures the difference between the model's predicted device origin probability distribution and the actual device origin label.
[0044] Assumption: It is the sample size. It is the number of device sources (usually 2: source domain and destination domain). It is a sample The true origin label of the device (one-hot encoding). The probability of originating from a single device.
[0045] So, domain classification cross-entropy loss It can be represented as: (13) Detailed calculation steps: To understand this formula more clearly, it can be broken down into specific steps: 1. Calculate the domain classification probability distribution for each sample. For each sample Domain-invariant features generated by the feature extractor The data is input into a domain classifier, which outputs a probability distribution. The probability distribution represents the probability from each domain (source domain or target domain). Suppose we have two domains (source domain and target domain), then the probability distribution can be expressed as: (14) in, Indicates sample The probability of originating from the source domain. The probability of originating from the target domain.
[0046] 2. Calculate the loss for each sample. For each sample If its actual source is the source domain, then If its actual source is the target domain, then Based on these labels, the domain classification cross-entropy loss of the sample can be calculated: (15) 3. Calculate the total loss Summing the losses of all samples yields the total domain classification cross-entropy loss: (16) Therefore, the training loss function of the gradient inversion domain adversarial network (DANN) in this invention is as follows: (17) in, This represents the cross-entropy loss for fault classification. Representation domain classification cross-entropy loss; Represents the adversarial loss weight coefficients in the domain.
[0047] S4. Construct a conditional generative adversarial network Mel-CGAN, input physical constraint features and random noise into Mel-CGAN for training, and output synthesized fault acoustic signals. It's important to note that DANN's effectiveness lies in eliminating distributional differences between devices and solving cross-device generalization; while Mel-CGAN synthesizes multi-device fault data, expanding the training set coverage. The synergistic effect is that DANN improves model generalization, while Mel-CGAN provides cross-device data support, creating a positive feedback loop.
[0048] The conditional generative adversarial network Mel-CGAN in step S4 specifically refers to a physical constraint generative adversarial network that uses Mel spectrum features as the generation condition. This network adopts the generative adversarial network CGAN structure.
[0049] Conditional Generative Adversarial Networks (CGANs) are used to generate fault acoustic signals that conform to physical laws based on physical constraints (such as fundamental frequency and harmonic components).
[0050] The generator synthesizes fault acoustic signals using a conditional generative adversarial network (CGAN). The input is physical constraint features With random noise vector The output is a synthesized signal. The input to CGAN includes physical constraint features and random noise, and the output is a synthesized fault acoustic signal. The formula for the synthesized signal is: (18) in, It is a random noise vector. Physical constraint characteristics. It is a two-dimensional real number vector representing the typical characteristic frequencies (unit: Hz) of equipment faults. (19) in: Indicates the fundamental frequency component (unit: Hertz Hz); S5. The synthesized fault acoustic signal is injected into the real-time acquired environmental noise and then mixed with the actual acoustic signal to obtain a mixed set. Specifically, the synthesized fault acoustic signal is injected into the real-time acquired environmental noise spectrum to simulate noise interference in the actual operating environment.
[0051] The noise spectrum is generated through microphone array modeling to ensure the realism of the synthesized signal.
[0052] The synthesized fault acoustic signal was injected into the real-time acquired environmental noise spectrum as follows: (20) in S syn The synthesized fault acoustic signal is generated by the conditional generative adversarial network Mel-CGAN. It is the ambient noise spectrum. It is the noise intensity coefficient.
[0053] S6. Retrain the DANN using the mixed set to obtain a trained DANN; S7. Input the actual acoustic signal to be detected into the trained DANN to obtain the fault detection result.
[0054] As one embodiment, the present invention designs a fault detection task for a wind turbine gearbox: 1. Signal Acquisition and Preprocessing Acoustic signals from the gearbox during operation were acquired using a high-sensitivity microphone array and digitized through anti-aliasing filtering and ADC sampling.
[0055] The signal is processed by frame segmentation and windowing to generate discrete signals suitable for subsequent analysis.
[0056] Feature extraction: Extract Mel spectrum features and physical features (such as fundamental frequency and harmonic energy ratio).
[0057] The weights of Mel spectral features and physical features are calculated using an attention mechanism, and dynamic fused features are generated. F fusion .
[0058] 2. Domain confrontation training Dynamic fusion features The input is fed into a DANN, and device-independent features are generated through an adversarial training mechanism. At the same time, a fault classifier is trained to identify specific fault types.
[0059] 3. Enhancement of virtual and real data CGAN is used to generate a large number of high-fidelity fault acoustic signals, and real environmental noise is injected to expand the training set. The model is then retrained using the expanded training set to improve its generalization ability and robustness in small sample scenarios.
[0060] 4. Closed-loop training process Initial training: Train the DANN using fused features from real data, forcing the DANN to learn device-independent features.
[0061] Data augmentation: Mel-CGAN generates synthetic data based on real Mel spectra.
[0062] Hybrid training: Mix synthetic data with real data to retrain the DANN and optimize the feature fusion weights. Domain-invariant characteristics .
[0063] Iterative optimization: until the model converges (accuracy fluctuation <1%).
[0064] In another embodiment, the present invention is applied to the monitoring of bearing wear in industrial equipment.
[0065] Scenario Description: In the monitoring of centrifugal pump units in a chemical plant, the sound monitoring system is deployed on the surface of the pump body. It is necessary to extract the characteristic frequency of the bearing inner ring defect (theoretical calculated value 3.2kHz±200Hz) from the broadband background noise (motor fundamental frequency 500Hz, gear meshing harmonics 2-8kHz).
[0066] Specific implementation steps: 1. Signal Acquisition and Digitization: Sensor deployment: The Infineon XENSIV™ MEMS microphone array (frequency response range 20Hz-20kHz, dynamic range ≥90dB) is used and installed close to the pump body bearing housing.
[0067] Anti-aliasing filter: cutoff frequency =24kHz (sampling rate) =48kHz), stopband attenuation >60dB.
[0068] 2. Frame-by-frame windowing: Frame length =1024, frame shift =512, Hanning window: .
[0069] 3. Feature extraction and fusion: Mel spectrum generation: A 40-channel Mel filter bank covers 0-24kHz, outputting 40-dimensional features. .
[0070] Physical Feature Extraction: Fundamental Frequency =3.2kHz, detected by peak value of autocorrelation function; Harmonic energy ratio: ; Dynamic fusion: =0.43, output fused features .
[0071] 4. Domain Adversarial Training (DANN): Network structure: Feature extractor: 3-layer CNN (42-dimensional input, 128-dimensional output); Domain classifier: 2-layer FCN (output 4 types of device domain labels); Fault classifier: 2-layer FCN (output 3 types of faults).
[0072] Training parameters: learning rate 0.001, batch size 32, 200 iterations. The gradient reversal layer hyperparameter λ = 0.5, determined through cross-validation optimization.
[0073] 5. Enhancement of virtual and real data: Mel-CGAN generation: Generating synthetic signals based on the Mel spectrum of real bearing faults. The Mel-CGAN generator is a 4-layer fully connected network with 42-dimensional fused features and 100-dimensional random noise as inputs and 1024-sampling acoustic signals as outputs. The discriminator is a 3-layer CNN with a learning rate of 0.0002 and a batch size of 64 during training.
[0074] Noise injection: The measured ambient noise of the pump (SNR=10dB) is superimposed. The noise intensity coefficient β=0.3 indicates that the energy ratio of the synthesized signal to the noise signal is 7:3.
[0075] 6. Closed-loop training and results: Initial training: 10 samples / class, accuracy 82.1%; Data augmentation: Generate 300 sets of combined data.
[0076] Hybrid training: Accuracy improved to 86.7%, with a final convergence accuracy of 88.5% (fluctuation <1%).
[0077] 7. Effect verification: See Table 1.
[0078] Table 1 Comparison of the effects of the present invention
[0079] Cross-device generalization error refers to the decrease in model accuracy on the target device test set relative to the source device training set, which is approximately 19 percentage points.
[0080] Please see Figure 2 , Figure 2 This is a schematic diagram of the hardware device in operation according to an embodiment of the present invention. The hardware device specifically includes: a device fault detection device 401 based on few-sample learning and acoustic feature transfer, a processor 402, and a storage device 403.
[0081] A device fault detection device 401 based on few-shot learning and acoustic feature transfer: The device fault detection device 401 based on few-shot learning and acoustic feature transfer implements the device fault detection method based on few-shot learning and acoustic feature transfer.
[0082] Processor 402: The processor 402 loads and executes the instructions and data in the storage device 403 to implement the device fault detection method based on few-sample learning and acoustic feature transfer.
[0083] Storage device 403: The storage device 403 stores instructions and data; the storage device 403 is used to implement the device fault detection method based on few-sample learning and acoustic feature transfer.
[0084] The key point of this invention is: 1. Physical-Data Dual-Driven Dynamic Feature Fusion By dynamically fusing Mel spectrum features (40 dimensions) and physical features (fundamental frequency, harmonic energy ratio) with a learnable attention weight matrix, the limitations of traditional pure data-driven methods are overcome, and the utilization rate of feature information is improved by ≥35% in small sample scenarios (example data: accuracy of 88.5% for 10 samples / class).
[0085] 2. Domain Adversarial - Generative Collaboration: Cross-Device Generalization Gradient Inversion Domain Adversarial Network (DANN) is used to force the extraction of device-independent features, and Mel-CGAN with physical constraints is combined to generate cross-device fault data, forming a closed-loop optimization of "generation-verification-retraining".
[0086] 3. Noise-adaptive virtual-real enhancement closed loop Based on microphone array noise spectrum modeling and dynamic frequency band attenuation, the real environmental noise spectrum is injected into the synthesized signal, and beamforming technology is used to suppress in-band interference.
[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A device fault detection method based on few-shot learning and acoustic feature transfer, characterized in that, Includes the following steps: S1. Acquire the acoustic signals of the target device in operation; S2. Extract the time-frequency features and physical constraint features of the acoustic signal, and dynamically adjust the weights of the physical constraint features and time-frequency features through an attention mechanism to generate a fused feature vector; S3. Construct a gradient inversion domain adversarial network (DANN), input the fused feature vector into the DANN's feature extractor, and force the model to learn device-independent features through the gradient inversion layer. S4. Construct a conditional generative adversarial network Mel-CGAN, input physical constraint features and random noise into Mel-CGAN for training, and output synthesized fault acoustic signals. S5. The synthesized fault acoustic signal is injected into the real-time acquired environmental noise and then mixed with the actual acoustic signal to obtain a mixed set. S6. Retrain the DANN using the mixed set to obtain a trained DANN; S7. Input the actual acoustic signal to be detected into the trained DANN to obtain the fault detection result; Step S3, based on the gradient inversion domain adversarial network (DANN), includes: a feature extractor, a fault classifier, and a domain classifier; Feature extractor with For input, the output domain-invariant feature H; where, F fusion To fuse feature vectors; The fault classifier takes the domain-invariant feature H as input and outputs the probability distribution of the signal source device. The domain classifier takes the domain-invariant feature H as input and outputs the device fault type. The training loss function of the gradient inversion domain adversarial network (DANN) is as follows: in, This represents the cross-entropy loss for fault classification. Representation domain classification cross-entropy loss; Represents the adversarial loss weight coefficients in the domain; In step S8, the synthesized fault acoustic signal is injected into the real-time acquired environmental noise as follows: in S syn The synthesized fault acoustic signal is generated by the conditional generative adversarial network Mel-CGAN. It is the ambient noise spectrum. It is the noise intensity coefficient.
2. The device fault detection method based on few-shot learning and acoustic feature transfer as described in claim 1, characterized in that: The time-frequency features in step S2 are Mel spectrum features. F mel The physical constraint features include: fundamental frequency. f 0 harmonic energy ratio H ratio .
3. The device fault detection method based on few-shot learning and acoustic feature transfer as described in claim 2, characterized in that: Step S2 is as follows: S21. Calculate the dynamic attention weights as follows: Physically constrained features, including fundamental frequency Compared with harmonic energy , It is a trainable parameter matrix; For the Sigmoid function; S22. Calculate the fused feature vector: .
4. The device fault detection method based on few-shot learning and acoustic feature transfer as described in claim 1, characterized in that: The formula for calculating the cross-entropy loss for domain classification is as follows: in, It is the sample size. It refers to the quantity of equipment sources. It is a sample The genuine equipment origin label, The probability of a device originating from a given source. The formula for calculating the cross-entropy loss for fault classification is as follows: in, K It is the number of fault categories. It is a sample The true label.
5. The device fault detection method based on few-shot learning and acoustic feature transfer as described in claim 2, characterized in that: The conditional generative adversarial network Mel-CGAN in step S4 specifically refers to a physical constraint generative adversarial network that uses Mel spectrum features as the generation condition. This network adopts the generative adversarial network CGAN structure.
6. A storage device, characterized in that: The storage device stores instructions and data to implement the device fault detection method based on few-sample learning and acoustic feature transfer as described in any one of claims 1 to 5.
7. A device fault detection device based on few-shot learning and acoustic feature transfer, characterized in that: include: A processor and a storage device; the processor loads and executes instructions and data in the storage device to implement the device fault detection method based on few-shot learning and acoustic feature transfer as described in any one of claims 1 to 5.