Power equipment fault detection method, device, equipment and medium
By using a multi-scale context-aware autoencoder model and an improved hybrid loss function, the problem of detecting weak faults in power equipment under complex backgrounds is solved, achieving efficient and real-time fault detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
- Filing Date
- 2026-04-17
- Publication Date
- 2026-05-15
AI Technical Summary
Existing acoustic fault detection methods suffer from severe noise interference in complex backgrounds, making it difficult to capture the weak and irregular acoustic features of power equipment faults. Traditional models have insufficient feature extraction capabilities, resulting in decreased detection accuracy and a high false negative rate.
A multi-scale context-aware autoencoder model is adopted, which uses a dual-stream dilated convolutional network to extract long-range dependency features in the time and frequency dimensions. It is combined with an improved hybrid loss function for self-supervised training, and anomaly scores are calculated by reconstructing the dissimilarity to determine faults.
It improves the sensitivity and accuracy of detecting minor faults, reduces the missed detection rate, and realizes real-time, non-contact power equipment fault detection.
Smart Images

Figure CN122050436A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power equipment condition monitoring technology, and in particular to a method, apparatus, equipment and medium for power equipment fault detection. Background Technology
[0002] Voiceprint signals are sound signals generated during the operation of power equipment. Their acoustic characteristics, such as frequency, amplitude, and duration, contain rich information about the internal operating status of the equipment. Due to its advantages of being non-contact, real-time, and low-cost, voiceprint acquisition has been widely used in recent years for monitoring the operating status and diagnosing faults in equipment such as generators, transformers, and motors. In industrial scenarios, voiceprint detection can effectively assist maintenance personnel in promptly identifying abnormal states, preventing accidents from escalating, and improving the safety and reliability of equipment operation. With the rapid development of deep learning and audio processing technologies, voiceprint-based fault detection methods have also made significant progress, particularly in feature extraction, anomaly detection, and fault classification.
[0003] However, existing voiceprint fault detection methods still face several challenges. First, voiceprint signals are highly susceptible to background noise interference in complex industrial environments, such as electromagnetic noise, mechanical resonance, and ambient sound sources. These noise signals can mix into the operating voiceprint of the equipment itself, leading to a deterioration in the quality of the original signal. Traditional filtering or noise reduction methods struggle to suppress unstructured noise while preserving fault characteristics, thus affecting the diagnostic performance of the model. Second, equipment faults are typically non-repetitive and sudden, resulting in irregular voiceprint patterns that are difficult to accurately identify using rule extraction or template matching. Especially in the initial stage of a fault, abnormal voiceprint signals often have small amplitudes and short durations in the time domain, with extremely subtle differences from normal operating conditions. These signals are easily ignored or misjudged by the model, leading to false alarms or missed alarms.
[0004] Taking partial discharge of large transformers as an example, this type of fault usually manifests as a low-frequency, discontinuous, short-duration shock wave in acoustic waveforms. However, under high background noise, such weak signals are difficult to be accurately captured and modeled by existing convolutional neural networks, resulting in a decrease in detection accuracy.
[0005] Patent CN117457029A discloses a device fault detection method based on an autoencoder. This method uses the Mel spectrum of several consecutive frames as acoustic feature input and combines reconstruction error with gamma distribution for anomaly detection. While this method achieves non-contact anomaly monitoring, its deterministic feature stitching approach easily leads to model degradation during training, reducing it to a simple pixel-copying identity mapping. This makes it difficult to effectively extract fault features in noisy environments. Furthermore, its generic encoder structure lacks a specific design for the time-frequency physical characteristics of acoustic signatures, failing to capture long-range dependencies and local details, resulting in insufficient reconstruction and recognition capabilities for weak fault signals.
[0006] In summary, existing technologies in the field of voiceprint fault detection mainly have the following problems: (1) Noise interference is significant in complex backgrounds, and voiceprint features are easily contaminated. Furthermore, fault voiceprint signals are usually weak and short-lived, with irregular changes. Traditional models have insufficient feature extraction capabilities and are difficult to capture multi-scale fault features. Traditional autoencoder models mostly use standard convolutional neural networks for feature extraction. Standard convolution is limited by a fixed receptive field and cannot simultaneously take into account the feature changes of power equipment fault voiceprints that span a wide range in time and frequency dimensions. (3) The reconstruction loss function is singular, resulting in the loss of weak fault details. Existing technologies usually only use mean square error as the reconstruction loss function to train the model. Although MSE can guarantee the overall similarity of the reconstructed image at the pixel level, its pixel-independent calculation characteristics will cause the model to tend to generate "averaged" and smooth reconstruction results. In power equipment fault detection, key early weak fault information is often hidden in the local subtle textures and edge structures of the spectrum. MSE loss cannot effectively constrain the model to accurately reconstruct these high-frequency details, resulting in the abnormal score being insensitive to weak faults and easily causing missed detection.
[0007] Therefore, there is an urgent need for a power equipment fault detection technology that can be sensitive to weak anomalies and resist background noise interference, relying solely on voiceprint information. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the prior art by providing a method, device, equipment and medium for detecting faults in power equipment, improving the fault perception sensitivity and location accuracy of the model under complex noise background, and realizing efficient, real-time and non-contact intelligent monitoring of the operating status of power equipment.
[0009] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, a method for detecting faults in power equipment is provided, the method comprising the following steps: Acquire the acoustic signature signal of the power equipment and perform time-frequency transformation to obtain the original log-Mel spectrum. The original log-Mel spectrogram is input into a multi-scale context-aware autoencoder model, which outputs a reconstructed spectrogram. The model uses a dual-stream dilated convolutional network to extract multi-scale long-range dependency features of the voiceprint in the time and frequency dimensions, and performs complete spectrum reconstruction based on the extracted features. Anomaly scores are calculated based on the reconstruction difference between the original logarithmic Mel spectrogram and the reconstructed spectrogram. When the anomaly score exceeds a dynamic threshold set based on extreme value theory, the device is deemed to be faulty.
[0010] The multi-scale context-aware autoencoder model is trained using a fragmented spectral view, which is obtained by randomly masking the original log-Mel spectrum under normal operating conditions. The specific steps of the random mask processing are as follows: The original two-dimensional log-Mel spectrum is divided into non-overlapping grid blocks of a preset size; a mask ratio is set, and grid blocks are randomly sampled according to a uniform distribution for masking. The pixel values of the sampled grid blocks are randomly set to zero or replaced with learnable mask embedding vectors; the unmasked visible grid blocks are retained as incomplete spectrum views.
[0011] The multi-scale context-aware autoencoder model includes: A dual-stream dilated convolutional network is used to extract features from incomplete spectrograms. It includes parallel temporal dilation convolutional branches and frequency dilation convolutional branches, which use convolutional kernels with different dilation rates to capture the long temporal dependence features and wideband coupling features of the acoustic signature signal. The feature interaction fusion layer is used to fuse the features extracted from the two branches of the dual-stream encoder through the channel attention mechanism to generate a high-dimensional latent feature vector. The predictive decoder maps high-dimensional latent feature vectors back to the original spectral size, outputting a reconstructed spectrogram.
[0012] The calculation of the anomaly score is as follows: The residual between the original log-Mel spectrum and the reconstructed spectrum is calculated to obtain the residual map. The residual map is locally weighted and smoothed to suppress isolated error high points caused by random Gaussian white noise. The mean, maximum value and energy entropy of the smoothed residual map are extracted as multidimensional indicators of reconstruction difference. The anomaly score is calculated by weighted summation of the multidimensional indicators of reconstruction difference.
[0013] The multi-scale context-aware autoencoder model is self-supervised pre-training based on a hybrid loss function of structural similarity and pixel difference. The hybrid loss function is defined as a weighted sum of improved mean square error loss, structural similarity loss and edge gradient loss. The improved mean square error loss constrains the consistency of energy intensity of the reconstructed signal, the structural similarity loss constrains the consistency of brightness, contrast and structure between the reconstructed spectrum and the original spectrum to enhance the preservation of voiceprint texture details, and the edge gradient loss is used to constrain the edge sharpness of the voiceprint.
[0014] The marginal gradient loss is defined as the first derivative of the original log-Melbourne spectrum and the reconstructed spectrum in the time and frequency directions. Distance, expressed as: ; in, This represents the original logarithmic Mel spectrum. This represents the reconstructed spectrogram. This represents the first-order difference gradient operator in the time and frequency axes.
[0015] The improved mean square error loss is defined as follows: ; in, , These represent the height and width of the spectrogram, respectively. Represents the pixels in the original logarithmic Mel spectrogram. The value at that location, Represents the pixels in the reconstructed spectrogram. The value at that location, Represents pixels The adaptive weight at a given point is defined as the normalized value of the local time-frequency contrast entropy, which is defined as: ; in, Represents pixels The local neighborhood, Represents pixels The normalized contrast probability of pixels within the neighborhood. , Represents pixels The average pixel value within a local neighborhood. This represents a preset value to prevent the denominator from being 0.
[0016] According to a second aspect of the present invention, a power equipment fault detection device is provided, the device comprising: Data acquisition and preprocessing module: acquires the acoustic signature signal of the power equipment, performs time-frequency transformation to obtain the original log-Mel spectrum; Reconstruction Module: The original log-Mel spectrogram is input into a multi-scale context-aware autoencoder model, and the reconstructed spectrogram is output. The model uses a dual-stream dilated convolutional network to extract multi-scale long-range dependency features of the voiceprint in the time and frequency dimensions, and performs complete spectrum reconstruction based on the extracted features. Fault determination module: An anomaly score is constructed based on the reconstruction difference between the original log-Mel spectrum and the reconstructed spectrum. When the anomaly score exceeds the dynamic threshold set based on extreme value theory, the device is determined to be faulty.
[0017] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0018] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0019] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention solves the problem of fixed receptive field and difficulty in capturing the diversity of fault acoustic patterns of power equipment by designing a time-frequency decoupled dual-stream dilated convolutional network. The dual-stream structure uses dilated convolution to extract features in the time and frequency dimensions respectively, which can independently capture the long-period mechanical vibration law and fine frequency harmonic distribution. This enables the model to capture both the short-term details of transient faults such as partial discharge and the long-term sequence changes of faults such as mechanical loosening, and achieve a more comprehensive and accurate characterization of fault features. This solves the problem that traditional methods cannot simultaneously take into account transient impact features and steady-state operation features.
[0020] (2) This invention solves the problem of overly smooth reconstructed images and loss of weak fault details caused by traditional mean square error loss by designing a hybrid loss function. The hybrid loss function is defined as a weighted sum of improved mean square error loss, structural similarity loss and edge gradient loss. While focusing on pixel-level reconstruction accuracy, it strengthens the constraints on the structural similarity and weak abrupt changes of the spectrogram, which enables the reconstructed spectrogram to retain more high-frequency details and weak fault features in the original signal.
[0021] (3) This invention does not rely on image, vibration or other sensor data, but can achieve real-time non-destructive testing based solely on voiceprint information, which simplifies deployment costs, improves system response efficiency and adaptability, and has good practicality and engineering promotion value. It is especially suitable for equipment status monitoring scenarios with complex structures or where it is not easy to deploy sensors.
[0022] (4) This invention constructs a voiceprint fault detection model through a self-supervised learning strategy and uses a convolutional autoencoder to pre-train on a large amount of unlabeled normal device voiceprint data, effectively capturing the distribution law of general acoustic features under the device's operating state, providing a robust feature representation for subsequent fault diagnosis, and solving the problem that existing methods are difficult to model in scenarios with scarce labeled samples.
[0023] (5) Because the reconstructed image retains details, when the input contains voiceprints with weak faults, the model cannot perfectly reconstruct these details as it does with normal samples, resulting in a significant increase in the reconstruction difference between the original image and the reconstructed image. This invention calculates anomaly scores based on reconstruction difference, and the calculated scores are more sensitive to early and weak faults. Combined with dynamic threshold settings based on extreme value theory, it effectively reduces the false negative rate. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a Mel-ray spectrogram of the normal state in one embodiment; Figure 3 This is a Mel spectrum diagram of a fault state in one embodiment. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0027] Example 1 This embodiment provides a method for detecting faults in power equipment, which includes the following steps: S1: Acquire the acoustic signature signal of the power equipment and perform time-frequency transformation to obtain the original log-Mel spectrum.
[0028] like Figure 1As shown, the first step is to perform a time-frequency transformation on the acquired voiceprint signal. The raw audio signal from the operation of power equipment (such as transformers, GIS switchgear, etc.) is collected. The audio is resampled and subjected to a short-time Fourier transform (STFT) using a sliding window (window length 1024, step size 256). The linear spectrum is then passed through a 128-mel filter bank, and the logarithm is taken to generate a log-mel spectrogram, denoted as […]. ,in, For time frames, This represents the number of frequency channels.
[0029] In this embodiment, the generation of the Mel spectrogram involves the following core parameters: (1) The Fast Fourier Transform (FFT) points are set to 1024. This parameter determines the length of each window when performing the Short Time Fourier Transform, which affects the frequency resolution of the spectrum.
[0030] (2) Window Function: The Hanning window is used. Before performing STFT, a window function is applied to each audio frame to reduce the spectral leakage effect caused by the sudden truncation of the signal frame, making the spectral estimation more accurate.
[0031] (3) Hop Length: Set to 256 sampling points. Hop Length determines the step size of the STFT window function sliding on the time axis, corresponding to the resolution of the Mel spectrogram on the time axis. A smaller frame shift means higher temporal resolution, but it also increases the computational cost and the temporal dimension of the generated spectrogram.
[0032] (4) Number of Mel filters: set to 128, that is, 128 triangular filter banks are used on the Mel frequency scale to filter and aggregate the linear power spectrum obtained by STFT, and finally generate a 128-dimensional Mel frequency feature vector sequence, which constitutes the frequency axis of the Mel spectrum.
[0033] The steps for generating a Mel spectrogram include: converting a one-dimensional time-domain audio signal... x [ n The time frame is divided into multiple short frames, and a window function is applied to each frame. w [ n Then, a Fourier transform is performed on each windowed frame to obtain its spectral representation. m The STFT of a frame can be represented as: ; in, It's a frame shift. N It is the number of points in the FFT. kIt is the index of the frequency box.
[0034] Calculate the energy, or power spectrum, of each frame of the spectrum: ; This yields a time-frequency spectrum, where the horizontal axis represents time (frames) and the vertical axis represents linear frequency.
[0035] Convert the linear frequency scale to the Mel scale. Frequency f The conversion formula from (Hz) to Mel scale is: .
[0036] Design a set of triangular filter banks (Mel Filter Bank) that are equally spaced on the Mel scale. Let the first... Each filter is The power spectrum is filtered through this filter bank: ; This calculates the total energy within each Mel band. The logarithm of the energy in each Mel band is then taken to compress its dynamic range and make it closer to human loudness perception. ; Combining different frames and filters That is, the Mel spectrum is obtained. It contains both the time-domain information of the signal and the frequency-domain information in a way that is more in line with auditory perception.
[0037] Figure 2 and Figure 3 The spectrum diagrams are shown for normal and fault states, respectively. The spectrum diagrams will be processed in steps S2 and S3 to achieve fault detection.
[0038] S2, the original log-Mel spectrum is input into the multi-scale context-aware autoencoder model, and the reconstructed spectrum is output. The model uses a dual-stream dilated convolutional network to extract multi-scale long-range dependency features of the voiceprint in the time and frequency dimensions, and performs complete spectrum reconstruction based on the extracted features.
[0039] like Figure 1 As shown, the multi-scale context-aware autoencoder model includes: A dual-stream dilated convolutional network is used to extract features from incomplete spectrograms. It includes parallel temporal dilation convolutional branches and frequency dilation convolutional branches, which use convolutional kernels with different dilation rates to capture the long temporal dependence features and wideband coupling features of the acoustic signature signal. The feature interaction fusion layer is used to fuse the features extracted from the two branches of the two-stream encoder through the channel attention mechanism to generate a high-dimensional latent feature vector. The predictive decoder maps high-dimensional latent feature vectors back to the original spectral size, outputting a reconstructed spectrogram.
[0040] In this embodiment, the temporal dilated convolution branch uses a one-dimensional dilated convolutional layer with a kernel size of 1×3 and dilation rates set sequentially to [1, 2, 4, 8]. This branch specifically expands the receptive field along the time axis to capture long-period mechanical fault features. The frequency dilated convolution branch uses a one-dimensional dilated convolutional layer with a kernel size of 3×1 and dilation rates set sequentially to [1, 2, 4, 8]. This branch specifically expands the receptive field along the frequency axis to capture wideband coupling features. The feature maps output by the two branches are concatenated along the channel dimension. Subsequently, a channel attention mechanism (SE-Block) is introduced: channel descriptors are obtained through global average pooling, and weight coefficients for each channel are generated using two fully connected layers to reweight the concatenated features. This step automatically suppresses invalid channels containing background white noise and enhances the response of fault feature channels. The decoder structure is symmetrical to the encoder, and transposed convolution is used to progressively upsample low-dimensional features to restore them to the size of the original spectrogram, outputting a reconstructed spectrogram. .
[0041] The multi-scale context-aware autoencoder model is trained only on data under normal operating conditions. That is, it first acquires the voiceprint signal under normal operating conditions, and after time-frequency conversion, such as... Figure 1 As shown, a masking process is performed, which serves as the input to a multi-scale context-aware autoencoder model. The unmasked spectrogram is used as the output to train the model, allowing it to learn how to reconstruct the image. Specifically, the masking process involves dividing the original two-dimensional log-Mel spectrogram into segments of size [size missing]. Non-overlapping grid patches; set mask ratio Masking is performed by randomly sampling grid blocks in a uniform distribution. The pixel values of the sampled grid blocks are randomly set to zero or replaced with learnable mask embedding vectors (Mask Tokens). The unmasked visible grid blocks are retained as an incomplete spectral view. In this embodiment, the size of each grid block is set to 16×16 pixels, and the mask ratio is... .
[0042] To address the issues of blurred reconstructed images and loss of subtle fault details caused by traditional MSE loss, this embodiment employs a multi-scale context-aware autoencoder model for self-supervised pre-training based on a hybrid loss function of structural similarity and pixel difference. This hybrid loss function is defined as a weighted sum of improved mean squared error loss, structural similarity loss, and edge gradient loss. ; in, To improve the mean square error loss, constrain the consistency of energy intensity of the reconstructed signal; To mitigate structural similarity loss, the reconstructed spectrum is constrained to maintain consistency with the original spectrum in terms of brightness, contrast, and structure, thereby enhancing the preservation of voiceprint texture details. Edge gradient loss is used to constrain the edge sharpness of the voiceprint and enhance the model's sensitivity to abrupt signals generated by weak faults, such as partial discharge pulses. , , In one embodiment, to correspond to the weights, =0.3, =0.4, =0.3.
[0043] The improved mean squared error loss is defined as follows: ; in, , These represent the height and width of the spectrogram, respectively. Represents the pixels in the original logarithmic Mel spectrogram. The value at that location, Represents the pixels in the reconstructed spectrogram. The value at that location, Represents pixels The adaptive weight at a given point is defined as the normalized value of the local time-frequency contrast entropy, which is defined as: ; in, Represents pixels The local neighborhood, Represents pixels The normalized contrast probability of pixels within the neighborhood. , Represents pixels The average pixel value within a local neighborhood. This represents a preset value to prevent the denominator from being 0.
[0044] Structural similarity loss is defined as: ; The SSIM metric comprehensively considers brightness, contrast, and structural information. This loss factor forces the model to focus on the texture structure of the voiceprint, rather than simply pixel values.
[0045] Marginal gradient loss is defined as the first derivative of the original log-Melbourne spectrum and the reconstructed spectrum in the time and frequency directions. Distance, expressed as: ; in, This represents the original logarithmic Mel spectrum. This represents the reconstructed spectrogram. This represents the first-order difference gradient operator in the time and frequency axes.
[0046] S3 calculates anomaly scores based on the reconstruction difference between the original logarithmic Mel spectrum and the reconstructed spectrum. When the anomaly score exceeds the dynamic threshold set based on extreme value theory, the device is determined to be faulty.
[0047] During inference, real-time voiceprints of the target device are collected to generate the original log-Mel spectrum. No masking is required; simply input the trained model to obtain the reconstructed spectrogram. Because the model is trained only on normal samples and enhanced by a masking task, it has a strong ability to recover normal voiceprints, but it cannot effectively reconstruct unseen fault modes.
[0048] Subsequently, the residual between the original log-Mel spectrum and the reconstructed spectrum is calculated to obtain the residual map: .
[0049] For residual plot Local weighted smoothing is performed to suppress isolated error spikes caused by random Gaussian white noise; the mean of the smoothed residual plot is extracted. Maximum value and energy entropy As a multidimensional indicator of reconstruction difference, anomaly scores are calculated by weighted summation of the multidimensional indicators of reconstruction difference. : ,in, , , In one embodiment, to correspond to the weights, =0.2, =0.4, =0.4.
[0050] The generalized Pareto distribution from extreme value theory is used to fit the rating tails of normal samples in the training set, and the quantile with a confidence level of 99% is set as the dynamic threshold Th. If the rating... If >Th, the device is determined to be in an abnormal state and an alarm signal is output.
[0051] In this embodiment, the model is trained using transfer learning, which is divided into two stages: first, using the source domain... Use normal samples to train the source model The training objective is to minimize the mixture loss function. Subsequent fine-tuning in the target domain will then be performed on the model trained in the source domain. All network weights as the new model Network weights, using the target domain A small number of normally operating samples Further training is then performed. The optimization objective in this stage is the same as in the pre-training stage, but it only applies to the target domain data. After fine-tuning, the final model Used for target domain Fault detection.
[0052] Example 2 This embodiment provides a power equipment fault detection device, which includes: Data acquisition and preprocessing module: acquires the acoustic signature signal of the power equipment, performs time-frequency transformation to obtain the original log-Mel spectrum; Reconstruction Module: The original log-Mel spectrogram is input into a multi-scale context-aware autoencoder model, and the reconstructed spectrogram is output. The model uses a dual-stream dilated convolutional network to extract multi-scale long-range dependency features of the voiceprint in the time and frequency dimensions, and performs complete spectrum reconstruction based on the extracted features. Fault determination module: An anomaly score is constructed based on the reconstruction difference between the original log-Mel spectrum and the reconstructed spectrum. When the anomaly score exceeds the dynamic threshold set based on extreme value theory, the device is determined to be faulty.
[0053] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0054] Example 3 This embodiment conducts thorough experiments on two datasets to demonstrate the method described in Example 1. The final experimental results are shown in Tables 1 and 2. Several metrics of the present invention show advantages compared to existing methods.
[0055] Table 1. Performance comparison of different models on the IDMT dataset Table 2. Performance comparison of different models on the MIMII-FAN dataset Example 4 The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0056] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0057] The processing unit executes the various methods and processes described above, such as methods S1 to S3. For example, in some embodiments, methods S1 to S3 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S3 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S3 by any other suitable means (e.g., by means of firmware).
[0058] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0059] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0060] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0061] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting faults in power equipment, characterized in that, The method includes the following steps: Acquire the acoustic signature signal of the power equipment and perform time-frequency transformation to obtain the original log-Mel spectrum. The original log-Mel spectrogram is input into a multi-scale context-aware autoencoder model, which outputs a reconstructed spectrogram. The model uses a dual-stream dilated convolutional network to extract multi-scale long-range dependency features of the voiceprint in the time and frequency dimensions, and performs complete spectrum reconstruction based on the extracted features. Anomaly scores are calculated based on the reconstruction difference between the original logarithmic Mel spectrogram and the reconstructed spectrogram. When the anomaly score exceeds a dynamic threshold set based on extreme value theory, the device is deemed to be faulty.
2. The method for detecting faults in power equipment according to claim 1, characterized in that, The multi-scale context-aware autoencoder model is trained using a fragmented spectral view, which is obtained by randomly masking the original log-Mel spectrum under normal operating conditions. The specific steps of the random mask processing are as follows: The original two-dimensional log-Mel spectrum is divided into non-overlapping grid blocks of a preset size; a mask ratio is set, and grid blocks are randomly sampled according to a uniform distribution for masking. The pixel values of the sampled grid blocks are randomly set to zero or replaced with learnable mask embedding vectors; the unmasked visible grid blocks are retained as incomplete spectrum views.
3. The method for detecting faults in power equipment according to claim 1, characterized in that, The multi-scale context-aware autoencoder model includes: A dual-stream dilated convolutional network is used to extract features from incomplete spectrograms. It includes parallel temporal dilation convolutional branches and frequency dilation convolutional branches, which use convolutional kernels with different dilation rates to capture the long temporal dependence features and wideband coupling features of the acoustic signature signal. The feature interaction fusion layer is used to fuse the features extracted from the two branches of the dual-stream encoder through the channel attention mechanism to generate a high-dimensional latent feature vector. The predictive decoder maps high-dimensional latent feature vectors back to the original spectral size, outputting a reconstructed spectrogram.
4. The method for detecting faults in power equipment according to claim 1, characterized in that, The calculation of the anomaly score is as follows: The residual between the original log-Mel spectrum and the reconstructed spectrum is calculated to obtain the residual map. The residual map is locally weighted and smoothed to suppress isolated error high points caused by random Gaussian white noise. The mean, maximum value and energy entropy of the smoothed residual map are extracted as multidimensional indicators of reconstruction difference. The anomaly score is calculated by weighted summation of the multidimensional indicators of reconstruction difference.
5. The method for detecting faults in power equipment according to claim 1, characterized in that, The multi-scale context-aware autoencoder model is self-supervised pre-training based on a hybrid loss function of structural similarity and pixel difference. The hybrid loss function is defined as a weighted sum of improved mean square error loss, structural similarity loss and edge gradient loss. The improved mean square error loss constrains the consistency of energy intensity of the reconstructed signal, the structural similarity loss constrains the consistency of brightness, contrast and structure between the reconstructed spectrum and the original spectrum to enhance the preservation of voiceprint texture details, and the edge gradient loss is used to constrain the edge sharpness of the voiceprint.
6. The method for detecting faults in power equipment according to claim 5, characterized in that, The marginal gradient loss is defined as the first derivative of the original log-Melbourne spectrum and the reconstructed spectrum in the time and frequency directions. Distance, expressed as: ; in, This represents the original logarithmic Mel spectrum. This represents the reconstructed spectrogram. This represents the first-order difference gradient operator in the time and frequency axes.
7. The method for detecting faults in power equipment according to claim 5, characterized in that, The improved mean square error loss is defined as follows: ; in, , These represent the height and width of the spectrogram, respectively. Represents the pixel points in the original logarithmic Mel spectrogram. The value at that location, Represents the pixels in the reconstructed spectrogram. The value at that location, Represents pixels The adaptive weight at a given point is defined as the normalized value of the local time-frequency contrast entropy, which is defined as: ; in, Represents pixels The local neighborhood, Represents pixels The normalized contrast probability of pixels in the neighborhood. , Represents pixels The average pixel value within a local neighborhood. This represents a preset value to prevent the denominator from being 0.
8. A power equipment fault detection device, characterized in that, The device includes: Data acquisition and preprocessing module: acquires the acoustic signature signal of the power equipment, performs time-frequency transformation to obtain the original log-Mel spectrum; Reconstruction module: The original log-Mel spectrum is input into a multi-scale context-aware autoencoder model, and the reconstructed spectrum is output. The model uses a dual-stream dilated convolutional network to extract multi-scale long-range dependency features of the voiceprint in the time and frequency dimensions, and performs complete spectrum reconstruction based on the extracted features. Fault determination module: An anomaly score is constructed based on the reconstruction difference between the original log-Mel spectrum and the reconstructed spectrum. When the anomaly score exceeds the dynamic threshold set based on extreme value theory, the device is determined to be faulty.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.