A Method and System for Detecting Abnormal Machine Sounds Based on Dynamic Attention Mechanism
The machine abnormal sound detection method based on dynamic attention mechanism solves the problem of insufficient model accuracy in high-noise environments, realizes accurate detection and real-time monitoring of weak abnormal sounds, and improves detection accuracy and stability.
Patent Information
- Application Number
- CN202510162421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-02-14
Smart Images

Figure CN120108423B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of neural network audio detection technology, specifically relating to a method and system for detecting abnormal machine sounds based on a dynamic attention mechanism. Background Technology
[0002] Machine anomaly sound detection technology is an important branch of sound signal analysis, widely used in scenarios such as fault prediction of industrial equipment and monitoring of production environments. With the continuous development of industrial automation, the operating status of equipment has a significant impact on production efficiency, product quality, and factory safety. Traditional equipment monitoring methods mainly rely on manual inspections or periodic maintenance, but these methods are often limited by the timeliness and coverage of manual labor, easily missing subtle abnormal signals and affecting the safety and stability of production.
[0003] Abnormal machine noises typically originate from wear, loosening, or friction in mechanical parts. These abnormal noises often have low frequencies and weak loudness in their early stages, making them difficult to detect using traditional methods. By employing sound-based monitoring technology, the sound signals generated during equipment operation can be collected, analyzed, and processed in real time, allowing for timely identification of abnormalities. This prevents the spread of faults or accidents, ensuring the normal operation of the equipment.
[0004] Currently, sound-based anomaly detection primarily relies on machine learning and deep learning techniques, especially the application of convolutional neural networks (CNNs) and recurrent neural networks (RNNs) in anomaly detection. While traditional models can achieve good detection results in some scenarios, in high-noise environments, the difference between abnormal machine sounds and normal sounds is often very subtle, limiting the accuracy of existing models. Although complex network models can improve detection accuracy, their high computational cost and latency make them unsuitable for direct application in real-time monitoring systems. Summary of the Invention
[0005] To address the shortcomings of existing technologies and improve the accuracy and stability of abnormal sound detection in machines, this invention adopts the following technical solution:
[0006] The abnormal machine sound detection method based on dynamic attention mechanism includes the following steps:
[0007] Step 1: Construct a feature extraction network to extract frequency and time domain features of machine audio to characterize the acoustic features of the target machine audio. Fuse the frequency and time domain features to obtain an acoustic feature fusion spectrum.
[0008] Step 2: Construct a machine abnormal sound detection network based on a dynamic attention mechanism. Replace the convolutional module in the spatial attention mechanism with a full-dimensional dynamic convolutional module. The full-dimensional dynamic convolutional module dynamically generates kernel weights and progressively adjusts the weights of convolutional operations. It provides adaptive convolutional operations based on the different dimensional characteristics of features. This adaptive function enables the full-dimensional dynamic convolutional module to capture more complex and varied patterns in the data, allowing the model to adaptively extract contextual information and further improve the ability to recognize different types of abnormal sounds. Traditional spatial attention modules use standard convolutional layers to generate spatial attention maps, while this invention uses ODConv to generate spatial attention weights. Integrating ODConv into CBAM can enhance the module's ability to adapt to different input features, thereby improving the attention mechanism. By dynamically adjusting the convolutional kernels according to input features, the modified CBAM can capture more subtle spatial and channel dependencies.
[0009] Step 3: Acquire machine audio data and annotate it;
[0010] Step 4: Based on the labeled machine audio data, extract frequency domain and time domain features through the constructed feature extraction network, and train the constructed machine abnormal sound detection network.
[0011] Step 5: The machine audio to be detected is processed through a feature extraction network and a trained machine abnormal sound detection network to obtain the final detection result.
[0012] Further, step 1 includes the following steps:
[0013] Step 1.1: Extract frequency domain features of machine audio characteristics using spectrograms; extract time domain features with periodicity and pattern characteristics; extract time domain features over long time spans;
[0014] Step 1.2: The extracted frequency domain and time domain features are fused using the concat strategy to integrate multi-dimensional information of the machine audio signal, providing a more comprehensive feature representation for subsequent anomaly detection;
[0015] The feature fusion spectrum is expressed as follows:
[0016] F TWM =Concat(F Mel ,F Wave ,F Tgram )
[0017] Among them, F TWM F represents the fused characteristic spectrum. Mel F represents the frequency domain features extracted from the log-Mel spectrum. Wave F represents the temporal features extracted by the improved WaveNet network. TgramThis represents the temporal features extracted by the TgramNet network.
[0018] Furthermore, in step 1.1, the original waveform is pre-emphasized to enhance high-frequency information. Then, the audio signal is framed, windowed, and subjected to a short-time Fourier transform (STFT). Based on this, a Mel-Mel filter bank is applied to obtain the log-Mel spectrum frequency domain representation, which effectively captures the spectral characteristics of the audio signal. The log-Mel spectrum is obtained as follows:
[0019]
[0020] Among them, F Mel This represents the log-mel spectrum, where x represents the input machine audio. denoted as Mel filter bank, and STFT denotes short-time Fourier transform.
[0021] Furthermore, in step 1.1, a neural network with a depthwise convolution structure is used to extract temporal features with periodicity and pattern characteristics, particularly for processing periodic signals in machine audio. The improved WaveNet network satisfies the requirement of lightweight design while effectively capturing the rapid changes and temporal patterns of sound signals, making it suitable for high-dimensional time-series data. The features derived from the improved WaveNet network can be represented as follows:
[0022] F Wave =WN(x)
[0023] Among them, F Wave The WN function represents the feature derived from the WaveNet network, and the WN(·) function represents the improved WaveNet model used to generate latent feature representations with causal relationships. x represents the input audio of the model.
[0024] Further, in step 1.1, a neural network is constructed, including a one-dimensional large kernel convolution and a set of convolutional neural network blocks. Each neural network block includes a layer normalization, a LeakyReLU activation function, and a one-dimensional convolution. The large kernel convolution serves as the initial processing layer, capable of capturing a wide range of temporal contextual information. Simultaneously, layer normalization and the LeakyReLU activation function enhance the robustness of the features. The features derived from the TgramNet network can be represented as follows:
[0025] F Tgram =TN(x)
[0026] Among them, F TgramTN(·) represents the features derived from the TgramNet network, and the function TN(·) represents the TgramNet model, used to compensate for missing anomalous information in the log-Mel spectrogram. x represents the input audio of the model.
[0027] Furthermore, in step 2, the formula processed by the dynamic attention mechanism is as follows:
[0028]
[0029] Where x represents the joint input feature map of machine audio frequency and time domain features, y represents the output feature map after processing by the dynamic attention mechanism, and α wi Indicates w i Scalar attention weights of the kernel, α ci ∈R Cin α fi ∈R Cout α si ∈R k×k This represents the attention weights calculated along the input, output, and spatial dimensions. * indicates a multiplication operation, and m is the index parameter, representing the m-th weight matrix and its corresponding attention mechanism. Spatial attention si assigns different weights to each spatial location of the convolution kernel, enhancing the ability to capture spatial information; input channel attention ci assigns different weights to each input channel, enhancing the ability to distinguish input features; output channel attention fi assigns different weights to each output channel, enhancing the ability to express output features; and convolution kernel attention w... i Assign a scalar weight to the entire convolutional kernel to adjust its global importance.
[0030] Furthermore, the dynamic attention mechanism in step 2 includes channel attention and spatial attention. Channel attention first performs max pooling and average pooling operations on the features fused in step 1, then performs addition operations after passing through a convolutional layer, and obtains the output features of channel attention after an activation function. The output features of channel attention are multiplied with the fused features, and the multiplied features are used as the input to spatial attention. Spatial attention performs max pooling and average pooling operations on the input features, then passes through the full-dimensional dynamic convolutional module, and obtains the output features of spatial attention after an activation function. The output features of spatial attention are multiplied with the multiplied features to obtain the output features of the dynamic attention mechanism, which are used for detection in the machine abnormal sound detection network. The channel attention mechanism assigns different weights to different feature channels along the channel dimension, thus emphasizing the contribution to key features; while the spatial attention mechanism weights features according to the spatial structure of the feature map, focusing on the feature representation of important regions. Through the layer-by-layer superposition of channel and spatial attention, the model's ability to express key features can be effectively enhanced, especially improving the accuracy of feature extraction when processing multi-dimensional features.
[0031] Furthermore, the machine abnormal sound detection network in step 2 sequentially includes a first convolution, a depthwise separable convolution, batch normalization, a second convolution, the dynamic attention mechanism, a linear global depthwise convolution, and a linear convolution.
[0032] Furthermore, the machine abnormal sound detection network in step 2 employs the M-Arcface loss function to dynamically adjust the angular margins based on the complexity or uncertainty of the samples, thereby better controlling intra-class compactness and inter-class separability. A margin adjustment module is introduced, which assigns appropriate margin values to different categories or samples through an attention mechanism. The M-Arcface loss function formula is as follows:
[0033] cos(θ+m)=cos(θ)cos(m)-sin(θ)sin(m)
[0034] Where m represents dynamically adjusted angular margins, used to introduce additional intervals in the angular space to enhance the discriminative power of features, and θ is represented by an angular vector.
[0035] A machine abnormal sound detection system based on dynamic attention mechanism includes a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they implement the machine abnormal sound detection method based on dynamic attention mechanism.
[0036] The advantages and beneficial effects of this invention are as follows:
[0037] This invention extracts frequency-time domain features from machine audio using log-Mel spectrograms, improved WaveNet, and TgramNet networks to obtain a feature fusion spectrogram, effectively improving the performance of feature information in machine operating audio and providing richer features for subsequent anomaly detection models. By constructing a machine anomaly sound detection network and introducing a dynamic attention mechanism, the model automatically adjusts its focus on different audio features, enabling it to accurately detect faint anomaly sounds even in complex environments, thus improving detection accuracy and solving the problem of difficulty in identifying subtle anomaly sounds in existing technologies. This is particularly effective in extracting and detecting anomaly sounds in noisy industrial environments. Machine audio is obtained by recording different operating states of different types of machines, and the obtained machine audio is labeled and preprocessed to construct a machine audio dataset. The model adopts a lightweight design, enabling efficient processing of audio data and supporting real-time anomaly sound monitoring, making it particularly suitable for real-time monitoring in industrial production. This invention can adapt to different types of machines and changing working environments. By adaptively learning the sound characteristics under different machine states, it improves the universality and adaptability of the model. By improving the accuracy and real-time performance of abnormal sound detection, it reduces equipment downtime due to malfunctions, lowers maintenance costs and production losses, and reduces reliance on manual inspections, thus optimizing resource allocation. Attached Figure Description
[0038] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of the feature extraction network in an embodiment of the present invention.
[0040] Figure 3 This is a schematic diagram of the OCBAM dynamic attention mechanism module in an embodiment of the present invention.
[0041] Figure 4 This is a schematic diagram of the OConv full-dimensional dynamic convolution structure in an embodiment of the present invention.
[0042] Figure 5 This is a schematic diagram of the structure of the OCBAM-MFN network in an embodiment of the present invention. Detailed Implementation
[0043] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0044] Machine abnormal sound detection technology has received widespread attention in applications such as industrial automation, intelligent manufacturing, equipment monitoring, and intelligent maintenance. In recent years, with the rapid development of deep learning technology, deep learning models have emerged that utilize neural networks to extract key features from audio signals to achieve abnormal sound detection. However, current deep learning models still have certain limitations in handling complex noise environments, nonlinear sound features, and weak abnormal signals, leading to a decrease in detection accuracy and robustness, especially in high-noise environments and under variable working conditions.
[0045] To address the aforementioned issues, this application proposes a machine abnormal sound detection method based on a dynamic attention mechanism. By optimizing the feature extraction network structure and introducing a multi-scale dynamic attention mechanism, the method enhances the model's ability to capture fine-grained features of audio signals. This improves the accuracy and stability of abnormal sound detection and supports efficient deployment for real-time monitoring tasks. Figure 1 As shown, the specific steps include the following:
[0046] Step 1: Construct a feature extraction network to extract frequency and time domain features of the machine audio to characterize the acoustic features of the target machine audio. Then, fuse the frequency and time domain features to obtain a fused acoustic feature spectrum, including the following steps:
[0047] Step 1.1: Extract frequency domain features of the machine audio using the log-Mel spectrum; pre-emphasize the original waveform to enhance high-frequency information, then perform short-time Fourier transform (STFT) on the audio signal after framing and windowing, and apply a Mel filter bank to obtain the frequency domain representation of the log-Mel spectrum, which can effectively capture the spectral features in the audio signal. The log-Mel spectrum can be obtained as follows:
[0048]
[0049] Among them, F Mel This represents the log-mel spectrum, where x represents the input machine audio. denoted as Mel filter bank, and STFT denotes short-time Fourier transform.
[0050] The improved WaveNet network meets the requirement of lightweight design and employs a depthwise convolution structure, enabling it to extract temporal features with periodicity and pattern characteristics, making it particularly suitable for processing periodic signals in machine audio. The improved WaveNet network not only satisfies the need for lightweight design but also effectively captures the rapid changes and temporal patterns of sound signals, making it suitable for high-dimensional time-series data. The features derived from the improved WaveNet network can be represented as:
[0051] F Wave =WN(x)
[0052] Among them, F Wave The WN function represents the feature derived from the WaveNet network, and the WN(·) function represents the improved WaveNet model used to generate latent feature representations with causal relationships. x represents the input audio of the model.
[0053] The TgramNet network consists of a one-dimensional large kernel convolution and three CNN blocks, each consisting of a layer normalization, a LeakyReLU activation, and a one-dimensional convolution. Using the large kernel convolution as the initial processing layer allows it to capture a wider range of temporal contextual information, while layer normalization and the LeakyReLU activation function enhance the robustness of the features. TgramNet is suitable for extracting temporal features spanning long periods in sound signals. The features derived from the TgramNet network can be represented as:
[0054] F Tgram =TN(x)
[0055] Among them, F Tgram TN(·) represents the features derived from the TgramNet network, and the function TN(·) represents the TgramNet model, used to compensate for missing anomalous information in the log-Mel spectrogram. x represents the input audio of the model.
[0056] Step 1.2: The Concat strategy is used to fuse the frequency domain and time domain features extracted in the above operations, integrating the multi-dimensional information of the machine audio signal to provide a more comprehensive feature representation for subsequent anomaly detection;
[0057] The feature fusion spectrum is expressed as follows:
[0058] F TWM =Concat(F Mel ,F Wave ,F Tgram )
[0059] Among them, F TWM F represents the fused characteristic spectrum. Mel F represents the frequency domain features extracted from the log-Mel spectrum. Wave F represents the temporal features extracted by the improved WaveNet network. Tgram This represents the temporal features extracted by the TgramNet network.
[0060] Step 2: Construct an improved machine abnormal sound detection network based on a dynamic attention mechanism; introduce features such as... on the existing MobileFaceNet (MFN) architecture. Figure 3 The Omni-dimensional Dynamic Convolutional Block Attention Module (OCBAM) dynamic attention mechanism shown uses the M-Arcface loss function to construct a new machine abnormal sound detection network, OCBAM-MFN.
[0061] CBAM is an attention mechanism that enhances the features of a standard convolutional neural network (CNN) by focusing on important features and suppressing unnecessary features. A CBAM block contains a hybrid attention mechanism that utilizes both channel attention and spatial attention, given a fused feature map F∈R. h×w×c Where h, w, and c represent height, width, and channel, respectively, and f x×x The convolutional layer representing the kernel size, and the channel attention and spatial attention modules in CBAM can be calculated using the following equations.
[0062]
[0063] Where W0 and W1 represent the weights of the multilayer perceptron (MLP), and σ represents the sigmoid activation function. The feature maps generated from the average and maximum values are respectively aggregated. Two attention modules sequentially compute the input feature maps, then multiply these attention maps based on the input feature maps to transform the features according to the input. Based on the above two formulas, the calculation of the CBAM module is as follows:
[0064]
[0065] in, F represents element-wise multiplication and addition, respectively. ′ F represents the result of channel attention. ″ This represents the result of spatial attention.
[0066] In the CBAM attention mechanism, a dynamic convolutional module (ODConv) is introduced to replace the ordinary convolutional module in spatial attention. The ODconv structure is as follows: Figure 4 a to Figure 4As shown in d. Unlike traditional convolutions with fixed weights, ODConv dynamically generates kernel weights. This adaptive capability allows ODConv to capture more complex and varied patterns in the data. By progressively adjusting the weights of convolution operations (including position, channels, filters, and kernel dimensions), it provides more adaptive convolution operations based on the different dimensional characteristics of the features. This enables the model to adaptively extract contextual information, further improving its ability to recognize different types of abnormal sounds. The calculation formula is shown below:
[0067]
[0068] Where x represents the joint input feature map of machine audio frequency and time domain features, y represents the output feature map after processing by the dynamic attention mechanism, and α wi Indicates w i Scalar attention weights of the kernel, α ci ∈R Cin α fi ∈R Cout α si ∈R k×k This represents three new attention weights, calculated along the input, output, and spatial dimensions. * indicates a multiplication operation, and m is an index parameter representing the m-th weight matrix and its corresponding attention mechanism.
[0069] In ODConv, each convolutional kernel w i Dynamic adjustments are made through four attention mechanisms:
[0070] Spatial attention si assigns different weights to each spatial location of the convolution kernel, enhancing the ability to capture spatial information;
[0071] Input channel attention (ci) assigns different weights to each input channel, enhancing the ability to distinguish input features;
[0072] The output channel attention fi assigns different weights to each output channel to enhance the expressive power of the output features;
[0073] Convolution kernel attention w i Assign a scalar weight to the entire convolutional kernel to adjust its global importance.
[0074] Figure 4 a and Figure 4 In b, to more clearly illustrate the structure of the convolution kernel and the branches of dynamic convolution, the superscript m is introduced to represent the m-th component or sub-kernel of the i-th convolution kernel. Similarly, n is used to illustrate the branching situation.
[0075] Traditional spatial attention modules use standard convolutional layers to generate spatial attention maps, while this invention uses ODConv to generate spatial attention weights. Integrating ODConv into CBAM can enhance the module's ability to adapt to different input features, thereby improving the attention mechanism. By dynamically adjusting the convolutional kernel according to the input features, the modified CBAM can capture more subtle spatial and channel dependencies.
[0076] The OCBAM-MFN network structure for detecting abnormal machine sounds is as follows: Figure 5 As shown, after the 1×1 convolution in MobileFaceNet and before the 7×7 linear global depthwise convolution, an OCBAM dynamic attention mechanism module is introduced. This module dynamically combines channel attention and spatial attention mechanisms to weight different parts of the input feature map. The channel attention mechanism assigns different weights to different feature channels along the channel dimension, thus emphasizing the contribution to key features; while the spatial attention mechanism weights based on the spatial structure of the feature map, focusing on the feature representation of important regions. Through the layer-by-layer superposition of channel and spatial attention, the model's ability to express key features can be effectively enhanced, especially when dealing with multi-dimensional features, improving the accuracy of feature extraction.
[0077] The M-Arcface loss function dynamically adjusts the angular margin *m* based on sample complexity or uncertainty to better control intra-class compactness and inter-class separability. A margin adjustment module is introduced, which assigns appropriate margin values to different classes or samples through an attention mechanism. The M-Arcface loss formula is as follows:
[0078] cos(θ+m)=cos(θ)cos(m)-sin(θ)sin(m)
[0079] Where m represents dynamically adjusted angular margins, used to introduce additional intervals in angular space to enhance the discriminative power of features, and θ represents angular vector representation.
[0080] Step 3: Acquire and label machine audio data. The collected and labeled machine audio data includes sound recordings of different types of machines in normal and fault states. The labeling should cover the specific machine type and its corresponding operating state. To improve the model's generalization ability, the labeling should cover machine audio under various operating conditions and load states as much as possible. Each audio sample should be labeled as either "Normal" or "Anomaly." This data will serve as the training dataset to provide effective supervision information for the model.
[0081] In this embodiment of the invention, the collected and labeled audio dataset is divided into a training dataset, a validation dataset, and a test dataset in a ratio of 6:2:2. The validation dataset and the test dataset are used for the validation and testing of the machine abnormal sound detection network.
[0082] Step 4: Train the model. After extracting frequency and time domain features from the training dataset through the constructed feature extraction network, input the extracted features into the constructed machine abnormal sound detection network to complete the training.
[0083] Specifically, the labeled training dataset is input into the constructed feature extraction network to extract frequency and time domain features; by processing the audio samples, feature fusion spectrograms are obtained; these feature maps are used as input to the machine abnormal sound detection network OCBAM-MFN for training; during the training process, the cross-entropy loss function and M-Arcface are used to optimize the model to ensure that it can make accurate classifications between normal and abnormal sounds.
[0084] Step 5: Input the machine audio into the trained model to complete the abnormal sound detection and obtain the final detection result.
[0085] Specifically, the trained machine abnormal sound detection model can be used for actual machine abnormal sound detection tasks. During detection, the machine audio to be detected is input into the trained model. After feature extraction and model processing, the model will output an abnormal score, indicating whether there is an abnormal sound.
[0086] By implementing this invention of a machine abnormal sound detection method based on a dynamic attention mechanism, it is possible to efficiently detect machine abnormal sounds in resource-constrained environments, providing high detection accuracy and versatility. This method is not only applicable to fault detection in single devices, but also enables efficient cross-device abnormal sound detection across multiple devices, demonstrating broad application prospects.
[0087] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A machine abnormal sound detection method based on a dynamic attention mechanism, characterized by Comprising the following steps: Step 1: constructing a feature extraction network, extracting frequency domain and time domain features of machine audio, for representing the acoustic features of the target machine audio, fusing the frequency domain and time domain features to obtain an acoustic feature fusion spectrogram; Step 2: constructing a machine abnormal sound detection network based on a dynamic attention mechanism, replacing the convolution module in the spatial attention with a full-dimensional dynamic convolution module, which gradually adjusts the weight of the convolution operation by dynamically generating kernel weights, and provides adaptive convolution operation according to the different dimensional characteristics of the features; The dynamic attention mechanism includes channel attention and spatial attention; the channel attention first performs maximum pooling and average pooling operations on the fused features in step 1, then performs addition operation through the convolution layer, and obtains the output features of the channel attention through the activation function; the output features of the channel attention are multiplied with the fused features, and the multiplied features are used as the input of the spatial attention; the spatial attention performs maximum pooling and average pooling operations on the input features, then passes through the full-dimensional dynamic convolution module, and obtains the output features of the spatial attention through the activation function; the output features of the spatial attention are multiplied with the multiplied features to obtain the output features of the dynamic attention mechanism, which are used for detection of the machine abnormal sound detection network; Step 3: obtaining machine audio data and labeling the data; Step 4: based on the labeled machine audio data, extracting frequency domain and time domain features through the constructed feature extraction network, and training the constructed machine abnormal sound detection network; Step 5: obtaining the final detection result by passing the machine audio to be detected through the feature extraction network and the trained machine abnormal sound detection network.
2. The method of claim 1, wherein the method is based on a dynamic attention mechanism. The step 1 comprises the following steps: Step 1.1: extracting frequency domain features of machine audio features using spectrograms; extracting time domain features with periodicity and pattern characteristics; extracting long-time span time domain features; Step 1.2: fusing the extracted frequency domain and time domain features using a concatenation strategy.
3. The method of claim 2, wherein the method further comprises: In step 1.1, the original waveform is pre-emphasized to enhance high-frequency information, then the audio signal is framed and windowed for short-time Fourier transform, and the log-Mel spectrogram frequency domain representation is obtained based on the application of the Mel filter bank.
4. The method of claim 2, wherein the method further comprises: In step 1.1, the neural network with deep separable convolution structure is used to extract time domain features with periodicity and pattern characteristics.
5. The method of claim 2, wherein the method further comprises: In step 1.1, a neural network is constructed, including a large kernel convolution and a group of convolutional neural network blocks, which include layer normalization, activation function and convolution.
6. The method of claim 1, wherein: In step 2, the formula of the dynamic attention mechanism processing is as follows: wherein x represents the joint input feature map of the machine audio frequency domain and time domain features, y represents the output feature map processed by the dynamic attention mechanism, denotes the scalar attention weight of the kernel, , denotes the attention weight calculated along the input dimension, the output dimension and the spatial dimension, denotes the multiplication operation, m is an index parameter, and denotes the mth weight matrix and its corresponding attention mechanism.
7. The method of claim 1, wherein: The machine abnormal sound detection network in step 2 comprises a first convolution, a deep separable convolution, a batch normalization, a second convolution, the dynamic attention mechanism, a linear global depth convolution and a linear convolution in sequence.
8. The method of claim 1, wherein: The machine abnormal sound detection network in step 2 adopts an M-Arcface loss function, dynamically adjusts an angle margin according to complexity or uncertainty of samples, better controls in-class compactness and inter-class separability, introduces a margin adjustment module, and adjusts appropriate margin values for different categories or samples through an attention mechanism. The M-Arcface loss function formula is as follows: wherein, represents a dynamic adjustment of the angle margin, for introducing additional spacing in the angle space to enhance the discriminativeness of the feature, is an angular vector representation. 9.A machine abnormal sound detection system based on a dynamic attention mechanism, comprising a memory and one or more processors, characterized in that: The memory stores executable code, and the one or more processors execute the executable code to implement the machine abnormal sound detection method based on the dynamic attention mechanism in any one of claims 1-8.