A multi-class machine abnormal sound detection method based on diffusion model

By introducing diffusion model and conditional embedding modules into the abnormal sound detection model, the problems of autoencoder degradation and high multi-category detection cost are solved, and efficient and accurate multi-category abnormal sound detection is achieved.

CN119626259BActive Publication Date: 2025-04-11UNIV OF SCI & TECH OF CHINA

Patent Information

Application Number
CN202510161917.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-04-11
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

The existing reconstruction-based anomaly sound detection model has the problem that the autoencoder degenerates into an identity function, making it difficult to effectively extract and capture higher-order features of data, and requires training the model separately for each machine type, resulting in high computing resources and storage costs.

Method used

A diffusion model is introduced to avoid autoencoder degeneration through the mechanism of gradual noise addition and denoising, and improve the model's ability to utilize implicit features of the input data. At the same time, the multi-category information is integrated into the model through the conditional embedding module, multi-category anomaly detection of a single model is realized, and an anomaly score algorithm based on Gaussian mixed model is designed.

Benefits of technology

It effectively avoids autoencoder degeneration, improves the sensitivity and accuracy of abnormal detection, realizes single model multi-category detection, reduces resource requirements and deployment complexity, and provides more accurate abnormal scores.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626259B_ABST
    Figure CN119626259B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting abnormal sound of multiple types of machines based on a diffusion model, comprising the following steps: collecting normal sound data, wherein the normal sound data contains category information, and constructing a training data set; preprocessing the normal sound data in the training data set to generate a mel-spectrogram, and generating a label corresponding to the category; training a multi-class abnormal sound detection network based on a diffusion model according to the label corresponding to the category and the mel-spectrogram; using the trained multi-class abnormal sound detection network to make mean‑GMM features, and training a Gaussian mixture model; inputting the sound data to be detected into the multi-class abnormal sound detection network and the Gaussian mixture model to obtain a detection result. The present invention designs an abnormal score algorithm based on a Gaussian mixture model, which evenly considers the continuity and change characteristics of the sound data in the time domain. A more fine-grained abnormal score is provided, which significantly improves the accuracy of detection and the adaptability to complex industrial environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electronic information technology, and in particular relates to a method for detecting abnormal sounds of multiple types of machines based on a diffusion model. Background Art

[0002] With the rapid development of intelligent manufacturing technology, the health monitoring of industrial equipment has become an important task to ensure production efficiency and safety. Traditional industrial equipment fault detection relies on regular manual inspections or the use of physical detection methods such as vibration analysis. However, these methods are often inefficient and costly in modern industrial environments with a wide variety of equipment and complex operating environments. Sound-based anomaly detection provides an effective means for fault monitoring. During the long-term operation of industrial equipment, a series of fault problems often occur due to wear, aging, environmental changes or improper operation. These faults usually manifest as changes in the sound of equipment operation. For example, when the bearing is worn, the rotor is unbalanced, the lubrication is insufficient, or foreign matter enters the equipment, the sound emitted by the machine will be significantly different from the normal working state. Therefore, sound, as an important information that can reflect the operating status of the equipment, has become one of the key clues for anomaly detection.

[0003] Currently, many existing abnormal sound detection methods rely on reconstruction-based models. Such methods only use normal sounds for training. When detecting, abnormal sounds have higher reconstruction errors than normal sounds, so as to distinguish normal data from abnormal data. Many of the current reconstruction-based methods are based on autoencoder architectures, which have some limitations.

[0004] As an unsupervised learning model, the core idea of ​​the autoencoder is to map the input data to a low-dimensional feature space through the encoder, and then reconstruct the original data from the feature space by the decoder. However, in the actual training process, the autoencoder is often prone to degenerate into an identity function, that is, the joint network of the encoder and decoder oversimplifies the direct mapping relationship between the input and output, resulting in the reconstruction result being almost exactly the same as the input. This degradation phenomenon weakens the autoencoder's ability to extract high-level features of the input data, making it impossible for the model to effectively characterize the complex patterns and implicit structures of the input data. More importantly, when the distribution of the test samples deviates from the distribution of the training samples (for example, due to distribution changes caused by noise, equipment changes, or environmental disturbances), the performance of the model in anomaly detection will be significantly reduced, making it difficult to accurately identify anomalies.

[0005] Although reconstruction-based methods have shown strong adaptability in many application scenarios, the quality and diversity of their generated results are constrained by the modeling capabilities of the model. On the one hand, due to the limitations of the network structure design (such as too simple a number of layers or inflexible activation functions), it is difficult for the model to effectively extract and capture the high-order features of the data, resulting in poor quality of the generated results, blurring, distortion and other problems; on the other hand, the design of the loss function often focuses on minimizing the reconstruction error, but ignores the complexity of the high-dimensional data distribution, which significantly limits the diversity of the generated data. For example, when reconstructing spectrograms, existing models are usually unable to fully capture the rich detail features in the acoustic signal. The generated spectrograms lack clarity and cannot reflect the true diversity of the input data, which greatly limits the applicability of the model.

[0006] At present, most reconstruction-based abnormal sound detection models usually require a dedicated model to be trained separately for each machine type. Although this design can optimize the detection performance in specific scenarios, it greatly increases the storage and computing costs of the model. With the diversification of machine types and detection requirements in industrial scenarios, this approach that relies on independent models faces many challenges in practical applications. First, training models for each machine type separately requires a lot of computing resources and time, which significantly increases the complexity of deployment; second, in order to ensure model performance, researchers need to invest a lot of energy in parameter tuning, which further raises the threshold for use; in addition, the storage requirements of multiple models also increase linearly with the increase in machine types, which puts higher requirements on the system's storage capacity. These problems significantly limit the scalability and practicality of these methods in diverse detection scenarios.

[0007] In addition, the current mainstream reconstruction-based abnormal sound detection algorithms usually use simple absolute error or mean square error as the calculation index of the anomaly score. However, these methods fail to fully consider the characteristics of audio data in their design, such as spectral information, correlation of time series, and complex distribution characteristics of sound signals. Due to the lack of modeling of the essential properties of audio data, these simple error measurement methods may not be able to effectively distinguish between normal and abnormal data, thus affecting the accuracy and robustness of anomaly detection. Optimizing the anomaly scoring method to adapt to the characteristics of audio data is one of the important directions to improve detection performance. Summary of the invention

[0008] The main purpose of the present invention is:

[0009] 1. Solve the problem of the autoencoder model degenerating into an identity function: In order to overcome the degradation problem that may occur in the autoencoder in the anomaly detection task, the present invention introduces a diffusion model as an alternative. The diffusion model gradually destroys the characteristic structure of the data until it is completely randomized by gradually adding Gaussian noise to the input data, and then uses a deep neural network to gradually reconstruct the data in an inverse diffusion manner. In this framework, the reconstruction process is not directly mapped from input to output, but is gradually generated from a completely destroyed state. This multi-stage noise addition and denoising mechanism effectively avoids the problem of the autoencoder degenerating into an identity function. In addition, this method can make more full use of the implicit features of the input data and improve the sensitivity and accuracy of anomaly detection.

[0010] 2. Stronger generation capability: In order to solve the problem of insufficient generation capability of existing reconstruction-based models, the present invention adopts a diffusion model to achieve stronger generation capability. The diffusion model can more accurately capture the complex distribution characteristics of input data through gradual modeling and optimization of high-dimensional feature space, and the generation quality and diversity are significantly improved. Especially in the task of reconstructing spectrograms, the generation results of the diffusion model show higher clarity and authenticity, and can better restore the detailed features of acoustic signals, thereby improving the accuracy and robustness of anomaly detection tasks.

[0011] 3. Achieve unified detection capabilities for multiple categories: Existing technologies usually require separate training models for different categories of machines, resulting in large storage space usage, high consumption of computing resources, and maintenance complexity that increases significantly with the number of categories. To address this problem, the present invention effectively integrates multiple categories of information (such as different machine types) into the model in a conditional embedding manner, so that a single model can handle multiple categories of abnormal sound detection tasks. This design not only reduces the number of models and training costs, but also improves the efficiency of the reasoning stage, achieving efficient and unified multi-category anomaly detection, and significantly reducing deployment difficulty and resource requirements.

[0012] 4. Provide an efficient and accurate anomaly score algorithm: In order to further improve the accuracy and reliability of the detection results, the present invention designs an anomaly score algorithm based on a Gaussian mixture model. The algorithm combines the advantages of the diffusion model in terms of reconstruction error characteristics, evenly considers each time frame over the entire time span, can capture stationary features well, fully considers the continuity and change characteristics of sound data in the time domain, and performs a more fine-grained scoring of abnormal situations. This method can provide more accurate detection results, significantly enhance the system's sensitivity to abnormal situations, and improve the robustness of the model in complex industrial environments.

[0013] The present invention provides a method for detecting abnormal sounds of multiple types of machines based on a diffusion model, comprising the following steps:

[0014] Step S1: Collect normal sound data, which contains category information, and construct a training data set;

[0015] Step S2: preprocess the normal sound data in the training data set to generate a mel-spectrogram and generate a label corresponding to the category;

[0016] Step S3: According to the corresponding labels and mel spectrograms of the categories, a multi-class abnormal sound detection network based on a diffusion model is trained. The multi-class abnormal sound detection network adopts a U-Net network. The U-Net network has a symmetrical U-shaped structure, which consists of an encoder path, i.e., a downsampling path, and a decoder path, i.e., an upsampling path. The mel spectrogram data is first input into the downsampling path for feature extraction. The convolution kernel used is unified as a 3×3 convolution kernel. The extracted features are then input into the upsampling path to restore the original resolution of the feature map. The downsampling path and the upsampling path are connected by a jump connection. The feature map in the downsampling path is transferred to the upsampling path through the jump connection and is spliced ​​with the upsampling feature map of the corresponding layer according to the channel dimension.

[0017] Step S4: using the trained multi-class abnormal sound detection network to generate average-GMM features and train the Gaussian mixture model;

[0018] Step S5: input the sound data to be detected into a multi-class abnormal sound detection network and a Gaussian mixture model to obtain a detection result.

[0019] A device for detecting abnormal sounds of multiple types of machines based on a diffusion model, comprising the following modules:

[0020] A collection module is used to collect normal sound data, which contains category information, and construct a training data set;

[0021] The preprocessing module is used to preprocess the normal sound data in the training data set to generate a mel-spectrogram and generate a label corresponding to the category;

[0022] The first training module is used to train a multi-class abnormal sound detection network based on a diffusion model according to the class corresponding labels and the mel spectrogram;

[0023] The second training module is used to use the trained multi-class abnormal sound detection network to produce average-GMM features and train the Gaussian mixture model;

[0024] The detection module is used to input the sound data to be detected into a multi-class abnormal sound detection network and a Gaussian mixture model to obtain a detection result.

[0025] Beneficial effects:

[0026] 1. The present invention introduces a diffusion model, which effectively avoids the problem of the autoencoder degenerating into an identity function through a mechanism of gradual denoising and denoising, so that the model can make more full use of the implicit features of the input data. The reconstruction process is carried out step by step, which improves the sensitivity and accuracy of anomaly detection, especially when the distribution of test samples deviates from the distribution of training samples, the performance is more robust. The diffusion model can accurately capture the complex distribution characteristics of the input data, and the generated spectrogram has higher clarity and authenticity. The detailed features of the acoustic signal are effectively restored, making anomaly detection more accurate and reliable, and the applicability in a variety of industrial scenarios is significantly improved.

[0027] 2. This invention integrates multi-category information into the diffusion model by adding a conditional embedding module, thus realizing single-model multi-category anomaly detection. This reduces the number of independent models and the corresponding training, storage and computing costs, and improves the deployment efficiency and scalability of the system.

[0028] 3. This paper designs an anomaly score algorithm based on a Gaussian mixture model, which evenly considers the continuity and change characteristics of sound data in the time domain. It provides a more fine-grained anomaly score, significantly improving the accuracy of detection and adaptability to complex industrial environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flowchart of the steps of a method for detecting abnormal sounds of multiple types of machines based on a diffusion model provided by the present invention.

[0030] Figure 2 It is a training flow chart of a network of a method for detecting abnormal sounds of multiple types of machines based on a diffusion model provided by the present invention.

[0031] Figure 3 It is a specific architecture diagram of a conditional embedding module in a method for detecting abnormal sounds of multiple types of machines based on a diffusion model provided by the present invention.

[0032] Figure 4 The present invention provides a flowchart of an abnormal score algorithm in a method for detecting abnormal sounds of multiple types of machines based on a diffusion model.

[0033] Figure 5 It is a block diagram of a device for detecting abnormal sounds of multiple types of machines based on a diffusion model provided by the present invention. DETAILED DESCRIPTION

[0034] See also Figure 1 As shown, the present invention is a method for detecting abnormal sounds of multiple types of machines based on a diffusion model, comprising the following steps:

[0035] Step S1: Collect normal sound data, which contains category information, and construct a training data set.

[0036] Specifically, in this embodiment, an acoustic sensor is used to collect sound data when the corresponding machine is working normally, and the specific type of the machine can be recorded in the file name of the sound data or the name of the folder containing the sound data.

[0037] The category information may record the type of machine and the ID number of the machine. For example, a machine for making toy trains may be recorded as ToyCar. If there are five toy train machines, they may be recorded as ToyCar_00, ToyCar_01, and so on.

[0038] Step S2: Preprocess the sound data in the training data set to generate a mel-spectrogram and generate a label corresponding to the category.

[0039] Specifically, in this embodiment, the total number of categories of audio data is first counted, and different categories are converted into corresponding digital labels.

[0040] Preprocessing the sound data in the training data set to generate a Mel spectrogram includes: for the collected sound data, using an audio processing library such as librosa to obtain a Mel spectrogram (log-Mel spectrogram). The preprocessing includes reading audio data, framing and windowing, performing short-time Fourier transform, mapping the spectrum to a Mel frequency scale, taking the logarithm, and finally obtaining a log-Mel spectrogram.

[0041] Step S3: According to the corresponding labels and mel spectrograms of the categories, a multi-class abnormal sound detection network based on a diffusion model is trained. The multi-class abnormal sound detection network adopts a U-Net network, which has a symmetrical U-shaped structure and consists of an encoder path (downsampling path) and a decoder path (upsampling path). The mel spectrogram data is first input into the downsampling path for feature extraction, and the convolution kernel used is unified as a 3×3 convolution kernel. The extracted features are then input into the upsampling path to restore the original resolution of the feature map. The downsampling path and the upsampling path are connected by a jump connection, and the feature map in the downsampling path is transferred to the upsampling path through the jump connection, and is concatenated (concat operation) with the upsampling feature map of the corresponding layer according to the channel dimension. This fusion retains low-level detail information while combining high-level semantic information. In addition, in order to add conditional information, the conditional embedding module is used to convert the conditional information into a tensor and integrate it into each convolution layer of the U-Net.

[0042] In order to improve the generation capability of the network and to achieve a unified model that can detect multiple types of anomalies using only one network, the present invention designs a conditional embedding module that can add category corresponding labels to the multiple types of abnormal sound detection network. The specific structure of the conditional embedding module is as follows: Figure 3 shown.

[0043] The conditional embedding module includes embedding, fully connected layer (Linear), and activation function (SiLU). The embedding layer maps discrete conditional inputs (such as categories) into a continuous vector space, representing them as low-dimensional real vectors. The fully connected layer maps low-dimensional real vectors to outputs through a learnable linear transformation through matrix multiplication and addition operations, thereby extracting new features, and the activation function applies nonlinear changes to the new features to obtain the output, which is then passed through a fully connected layer to perform a linear transformation on the output of the activation function, and adjust the output of the conditional embedding module to adapt to the UNet network. The module as a whole constructs a mapping from discrete input to continuous output, and gradually extracts features to meet the needs of downstream tasks.

[0044] Specifically, in this embodiment, the training process is as follows: Figure 2 As shown below. Figure 2 Describe the training process:

[0045] For the extracted Mel spectrogram, the forward diffusion process (i.e., gradually adding Gaussian noise to the Mel spectrogram) is used to completely destroy the spectrogram into Gaussian noise, i.e., the noisy spectrogram. The extracted category labels are input into the conditional embedding module and added to the denoising U-Net network. The network will reconstruct the original spectrogram. The above process is the diffusion model architecture. The following loss function is used for training:

[0046] ,

[0047] in, is the loss function, is the mathematical expectation, is random Gaussian noise, is the network to be trained, is the Mel spectrogram after multi-step noise addition (i.e., the input of the network), is the number of steps to add noise.

[0048] Step S4: Use the trained multi-class abnormal sound detection network to create average-GMM features and train a Gaussian mixture model (GMM).

[0049] The vector obtained by averaging the Mel spectrogram in the time dimension (which can be used for GMM training) is called Mean-GMM. , calculate an average value for each row of numbers, and finally get a The vector of the vector is called average-GMM or Mean-GMM).

[0050] Specifically, in this embodiment, in order to further improve the accuracy and reliability of the detection results, the present invention designs an anomaly score algorithm based on a Gaussian mixture model, such as Figure 4 The process of training a Gaussian mixture model includes:

[0051] Step S401: input the mel-spectrogram of the training data set into the trained multi-class abnormal sound detection network to obtain reconstructed mel-spectrogram data.

[0052] Step S402: subtract the reconstructed mel-spectrogram data from the corresponding input mel-spectrogram element by element to obtain a spectrogram difference (a two-dimensional matrix).

[0053] Step S403: Take the average of the spectrogram difference by time frame (the X axis of the matrix), obtain the average feature and save it. This evenly considers each time frame in the entire time span, can well capture the stationary features, and fully consider the continuity and change characteristics of the sound data in the time domain.

[0054] Step S404: for different categories, the mean features (i.e., average-GMM or Mean-GMM) of different categories are obtained according to the above steps, and the Gaussian mixture model is trained and the parameters of the Gaussian mixture model are saved. How to use the mean features as a training set to train the Gaussian mixture model is well known to those skilled in the art and will not be described in detail here.

[0055] Step S5: input the sound data to be detected into a multi-class abnormal sound detection network and a Gaussian mixture model to obtain a detection result.

[0056] Step S501: input the mel-spectrogram to be detected into a trained multi-class abnormal sound detection network to obtain reconstructed mel-spectrogram data.

[0057] Step S502: subtract the reconstructed mel-spectrogram data from the corresponding input mel-spectrogram element by element to obtain a spectrogram difference.

[0058] Step S503: Take the average of the spectrogram difference by time frame, obtain the mean feature and input it into the Gaussian mixture model to obtain the abnormal score of the sound data to be detected. The sound data to be detected includes normal sound data and abnormal sound data. The abnormal score of normal sound data will be low or even zero; the abnormal score of abnormal sound data is higher. Then determine the abnormal score threshold for judging abnormality according to the following steps.

[0059] Step S504: determining an abnormality score threshold according to the abnormality scores of all the sound data to be detected, determining that the abnormality score is higher than the abnormality score threshold is abnormal, and determining that the abnormality score is lower than the abnormality score threshold is normal, thereby obtaining the final detection result.

[0060] According to an embodiment of the present invention, a device for detecting abnormal sounds of multiple types of machines based on a diffusion model is also provided. Figure 5 As shown, the device includes the following modules:

[0061] The acquisition module 510 is used to acquire normal sound data, which contains category information, and construct a training data set;

[0062] A preprocessing module 520 is used to preprocess the normal sound data in the training data set to generate a mel-spectrogram and generate a label corresponding to the category;

[0063] A first training module 530 is used to train a multi-class abnormal sound detection network based on a diffusion model according to the class corresponding labels and the mel spectrogram;

[0064] The second training module 540 is used to generate average-GMM features using the trained multi-class abnormal sound detection network and train the Gaussian mixture model;

[0065] The detection module 550 is used to input the sound data to be detected into the multi-class abnormal sound detection network and the Gaussian mixture model to obtain the detection result.

Claims

1. A method for detecting abnormal sounds of multiple types of machines based on a diffusion model, characterized in that: The steps include: Step S1: Collect normal sound data, which contains category information, and construct a training data set; Step S2: preprocess the normal sound data in the training data set to generate a mel-spectrogram and generate a label corresponding to the category; Step S3: According to the corresponding labels and mel spectrograms of the categories, a multi-class abnormal sound detection network based on a diffusion model is trained. The multi-class abnormal sound detection network adopts a U-Net network. The U-Net network has a symmetrical U-shaped structure, which consists of an encoder path, i.e., a downsampling path, and a decoder path, i.e., an upsampling path. The mel spectrogram data is first input into the downsampling path for feature extraction. The convolution kernels used are unified as 3×3 convolution kernels. The extracted features are then input into the upsampling path to restore the original resolution of the feature map. The downsampling path and the upsampling path are connected by a jump connection. The feature map in the downsampling path is transferred to the upsampling path through the jump connection and is spliced ​​with the upsampling feature map of the corresponding layer according to the channel dimension. In step S3, the loss function is: , in, is the loss function, is the mathematical expectation, is random Gaussian noise, is the network to be trained, It is the Mel spectrogram after multi-step noise addition, which is also the input of the network. is the number of steps to add noise; Step S4: using the trained multi-class abnormal sound detection network to generate average-GMM features and train the Gaussian mixture model; Step S5: input the sound data to be detected into a multi-class abnormal sound detection network and a Gaussian mixture model to obtain a detection result.

2. The method for detecting abnormal sounds of multiple types of machines based on a diffusion model according to claim 1, characterized in that: Step S1 includes: using an acoustic sensor to collect sound data of a corresponding machine when it is working normally, and recording the specific type of the machine in the file name of the sound data or the name of a folder containing the sound data.

3. The method for detecting abnormal sounds of multiple types of machines based on a diffusion model according to claim 2, characterized in that: In step S2, the normal sound data in the training data set is preprocessed to generate a Mel-spectrogram, including: for the collected normal sound data, the Mel-spectrogram is obtained using an audio processing library, and the preprocessing includes reading audio data, framing and windowing, performing short-time Fourier transform, mapping the spectrum to a Mel frequency scale, and taking the logarithm.

4. The method for detecting abnormal sounds of multiple types of machines based on a diffusion model according to claim 3, characterized in that: The category corresponding labels are added to the multi-category abnormal sound detection network through the conditional embedding module. The conditional embedding module includes an embedding layer, a fully connected layer, and an activation function. The embedding layer maps the discrete conditional input, i.e., the category corresponding labels, to a continuous vector space and represents them as low-dimensional real vectors. The fully connected layer maps the low-dimensional real vectors to the output through a learnable linear transformation through matrix multiplication and addition operations, thereby extracting new features. The activation function applies nonlinear changes to the new features to obtain the output, which is then linearly transformed through a fully connected layer to adjust the output of the conditional embedding module to adapt to the UNet network.

5. The method for detecting abnormal sounds of multiple types of machines based on a diffusion model according to claim 4, characterized in that: The process of training a Gaussian mixture model involves: Step S401: inputting the mel-spectrogram of the training data set into the trained multi-class abnormal sound detection network to obtain reconstructed mel-spectrogram data; Step S402: subtract the reconstructed Mel-spectrogram data from the corresponding input Mel-spectrogram element by element to obtain a spectrogram difference; Step S403: taking the average of the spectrum difference according to the time frame, obtaining the average feature and saving it; Step S404: for different categories, the mean features of different categories are obtained according to the above steps, and the Gaussian mixture model is trained based on them, and the parameters of the Gaussian mixture model are saved.

6. The method for detecting abnormal sounds of multiple types of machines based on a diffusion model according to claim 1, characterized in that: Step S5 includes: Step S501: inputting the mel-spectrogram to be detected into the trained multi-class abnormal sound detection network to obtain reconstructed mel-spectrogram data; Step S502: subtract the reconstructed Mel-spectrogram data from the corresponding input Mel-spectrogram element by element to obtain a spectrogram difference; Step S503: taking the average of the spectrogram differences according to the time frame, obtaining the mean feature and inputting it into the Gaussian mixture model to obtain the abnormal score of the sound data to be detected; Step S504: determining an abnormality score threshold according to the abnormality scores of all the sound data to be detected, determining that the abnormality score is higher than the abnormality score threshold is abnormal, and determining that the abnormality score is lower than the abnormality score threshold is normal, thereby obtaining the final detection result.

7. The method for detecting abnormal sounds of multiple types of machines based on a diffusion model according to claim 6, characterized in that: In step S503, the sound data to be detected includes normal sound data and abnormal sound data, and the abnormality score of the normal sound data is lower than the abnormality score of the abnormal sound data.

8. A device for detecting abnormal sounds of multiple types of machines based on a diffusion model, characterized in that: Includes the following modules: A collection module is used to collect normal sound data, which contains category information, and construct a training data set; The preprocessing module is used to preprocess the normal sound data in the training data set to generate a mel-spectrogram and generate a label corresponding to the category; The first training module is used to train a multi-class abnormal sound detection network based on a diffusion model according to the corresponding labels and mel spectrograms of the categories. The multi-class abnormal sound detection network adopts a U-Net network. The U-Net network has a symmetrical U-shaped structure and consists of an encoder path, i.e., a downsampling path, and a decoder path, i.e., an upsampling path. The mel spectrogram data is first input into the downsampling path for feature extraction. The convolution kernel used is unified as a 3×3 convolution kernel. The extracted features are then input into the upsampling path to restore the original resolution of the feature map. The downsampling path and the upsampling path are connected by a jump connection. The feature map in the downsampling path is transferred to the upsampling path through the jump connection and is spliced ​​with the upsampling feature map of the corresponding layer according to the channel dimension. In step S3, the loss function is: , in, is the loss function, is the mathematical expectation, is random Gaussian noise, is the network to be trained, It is the Mel spectrogram after multi-step noise addition, which is also the input of the network. is the number of steps to add noise; The second training module is used to use the trained multi-class abnormal sound detection network to produce average-GMM features and train the Gaussian mixture model; The detection module is used to input the sound data to be detected into a multi-class abnormal sound detection network and a Gaussian mixture model to obtain a detection result.

Citation Information

Patent Citations

  • Abnormal sound classification method, system and device and storage medium

    CN113689888A

  • Multi-class sound event positioning and detecting method based on audio-visual information fusion

    CN118430581A

Cited By

  • Equipment abnormity monitoring method based on audio signal analysis

    CN120766722A

  • A device anomaly monitoring method based on audio signal analysis

    CN120766722B