STM32-based sampling cabinet abnormal sound detection method and system
Through the STM32-based abnormal sound detection method of sampling cabinet, real-time monitoring and remote alarm of abnormal sound in the on-site sampling cabinet of the power plant is achieved, which solves the problem that existing technology is difficult to prevent potential accidents, and improves the safe and stable operation and production efficiency of the power plant.
Patent Information
- Application Number
- CN202510230347.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-06
AI Technical Summary
In the power plant environment, it is difficult for the existing technology to realize real-time monitoring and remote alarm of abnormal sounds in the on-site sampling cabinet, resulting in difficult prevention of potential accidents and affecting the safe and stable operation of the power plant.
The abnormal sound detection method of the sampling cabinet based on STM32 is adopted. By collecting sound data, preprocessing, feature extraction and building a sound detection model, abnormal sound mode is identified, and information is fused through the dual-channel long and short-term memory network and attention mechanism, the abnormal probability of continuous frames is output, and the alarm is triggered.
Real-time abnormal sound detection and remote alarm of potential hazard detection points in power plants are realized, effectively preventing the occurrence of serious accidents, ensuring the safe operation of equipment and the safety of personnel's lives, and reducing labor and material costs.
Smart Images

Figure CN120108417A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sound recognition, and in particular to an abnormal sound detection method and system for a sampling cabinet based on STM32. Background Art
[0002] With the development of artificial intelligence technology, voice recognition technology has been widely used in many fields such as smart home, smart security and voice assistant. In the power plant environment, on-site sampling devices are crucial to ensure the accuracy of data at specific measuring points. The measuring medium of some measuring points, such as the main steam pressure measuring point, is highly dangerous and may cause serious accidents if a leak occurs. Therefore, being able to detect and handle these problems in a timely manner in a non-contact manner will greatly improve the safety and production efficiency of power plant operations, while ensuring the personal safety of employees.
[0003] Based on this, there is an urgent need for a sound recognition method to monitor the sound in the local cabinet in real time and realize the remote alarm function to effectively prevent the occurrence of potential accidents and provide strong technical support for the safe and stable operation of the power plant. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above existing problems, the present invention is proposed.
[0006] Therefore, the present invention provides a method and system for detecting abnormal sound in a sampling cabinet based on STM32 to solve the problems mentioned in the background technology.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In a first aspect, an embodiment of the present invention provides a method for detecting abnormal sound in a sampling cabinet based on STM32, comprising: collecting sound data of an on-site sampling cabinet, and preprocessing the sound data;
[0009] Performing feature extraction on the preprocessed sound data;
[0010] A sound detection model is constructed to identify abnormal sound patterns of the features.
[0011] As a preferred solution of the abnormal sound detection method for a sampling cabinet based on STM32 described in the present invention, before the sound data is preprocessed, the method further includes: performing signal conversion on the collected sound data to preprocess the sound data.
[0012] As a preferred solution of the abnormal sound detection method of the sampling cabinet based on STM32 described in the present invention, the preprocessing of the sound data includes: separating useful information and noise in the sound signal, and removing the noise component through a first threshold strategy.
[0013] As a preferred solution of the abnormal sound detection method of the sampling cabinet based on STM32 described in the present invention, wherein: feature extraction of the pre-processed sound data includes: high-frequency feature extraction and low-frequency feature extraction;
[0014] The extracted high-frequency features include energy changes of the sound signal of the first frequency band in the time step dimension and the frequency of the sound signal crossing the zero value line;
[0015] The extracted low-frequency features include Mel-frequency cepstral coefficients of the second frequency band.
[0016] As a preferred solution of the abnormal sound detection method of the sampling cabinet based on STM32 described in the present invention, wherein: constructing a sound detection model, identifying the abnormal sound pattern of the feature includes: inputting the high-frequency feature and the low-frequency feature into a dual-channel long short-term memory network respectively, fusing the information of the high-frequency and low-frequency channels through an attention mechanism, and the model outputs the abnormal probability of continuous frames;
[0017] When the probability of three consecutive frames exceeds the preset threshold, an alarm is triggered.
[0018] As a preferred solution of the abnormal sound detection method of the sampling cabinet based on STM32 described in the present invention, it also includes: when an energy mutation occurs, if the energy of a single frame signal suddenly increases to a second threshold value compared with the baseline value or the energy proportion of the first frequency band exceeds 30% of the total energy, the cloud platform alarm mechanism is triggered.
[0019] As a preferred solution of the abnormal sound detection method of the sampling cabinet based on STM32 described in the present invention, the first threshold strategy includes: using the improved Stein unbiased risk estimation threshold to perform hierarchical threshold optimization on the coefficients of each layer after wavelet decomposition, which is expressed as:
[0020] σ j =Median(|cD j |) / 0.6745
[0021] Among them, σ j is the j-th layer detail coefficient, N jis the coefficient length.
[0022] In a second aspect, the present invention provides a sampling cabinet abnormal sound detection system based on STM32, comprising: a data acquisition module for collecting sound data of an on-site sampling cabinet and preprocessing the sound data;
[0023] A feature extraction module, used for extracting features from the preprocessed sound data;
[0024] The abnormality recognition module is used to build a sound detection model to identify abnormal sound patterns of the features.
[0025] In a third aspect, the present invention provides an electronic device, comprising:
[0026] Memory and processor;
[0027] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the abnormal sound detection method of the sampling cabinet based on STM32 are implemented.
[0028] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the abnormal sound detection method for a sampling cabinet based on STM32.
[0029] Compared with the prior art, the present invention has the following beneficial effects: The present invention can effectively prevent serious accidents by timely detecting leakage and issuing early warnings at potentially dangerous measuring points in power plants, thus ensuring the safe operation of equipment and the safety of personnel. Relatively low-cost but reliable components are used to achieve 24-hour uninterrupted real-time monitoring, significantly reducing labor costs and material costs caused by unexpected downtime or damage. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0031] Figure 1 The present invention is a flowchart of a method and system for detecting abnormal sound in a sampling cabinet based on STM32 according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0034] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0035] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0036] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0037] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0038] Example 1
[0039] Reference Figure 1, is an embodiment of the present invention, which provides a method for detecting abnormal sound in a sampling cabinet based on STM32, comprising:
[0040] S100: Collecting sound data from the local sampling cabinet and preprocessing the sound data;
[0041] S200: extracting features from the pre-processed sound data;
[0042] S300: Build a sound detection model to identify characteristic abnormal sound patterns.
[0043] It should be noted that for power plants, especially measuring points such as main steam pressure, they are inherently dangerous. Once a leak occurs, the pressure leaking from the sampling tube is unimaginable, which seriously threatens the safe production of the operating unit and may cause serious life-threatening situations. Therefore, a certain early warning and monitoring mechanism is required to ensure the safety of both equipment and personnel. Whether it is STM32, sound sensor, or lora data transmission module, its cost is very low, but it can achieve 24-hour uninterrupted real-time monitoring, which greatly saves labor costs and material costs. The stability and reliability of STM32 have been widely verified, which can ensure the long-term stable operation of the sampling cabinet leakage sound detection system. And its low-power design characteristics enable the detection system to run for a long time without frequent power supply replacement, which is suitable for application scenarios that require long-term monitoring. At the same time, at the software level, both MFCC and mel spectrum have been widely used, and there is no problem in extracting the characteristic values of sound signals, and the results are widely trusted. And through LSTM time, the established model is more universal, able to cope with different working conditions of power plant units, and has extremely high reliability.
[0044] In the embodiment of the present application, before the sound data is preprocessed, the process further includes: performing signal conversion on the collected sound data to preprocess the sound data.
[0045] It should be noted that the signal conversion in the embodiment of the present application is to convert the sound data into a digital signal.
[0046] In the embodiment of the present application, preprocessing the sound data includes: separating useful information and noise in the sound signal, and removing the noise component by a first threshold strategy.
[0047] For example, this application uses librosa library in python to process sound data and wavelet transform in scipy library to perform noise reduction. The following are some functional sections:
[0048] wavelet = 'db1' # Wavelet type used for wavelet transform
[0049] level=1#The number of decomposition levels of wavelet transform
[0050] # Load the audio file
[0051] y,sr=librosa.load(audio_file,sr=sr)
[0052] #Sound data segmentation
[0053] frame_samples=int(frame_length*sr)
[0054] y_frames=[y[i:i+frame_samples]for iin range(0,len(y)-frame_samples,hop_length)]
[0055] # Wavelet transform denoising
[0056] def wavelet_denoise(signal,wavelet,level):
[0057] coeffs=pywt.wavedec(signal,wavelet,level=level)
[0058] #Here we simply set the threshold to 0. In fact, we should choose a suitable threshold according to the noise situation.
[0059] threshold=0.01*np.max(np.abs(coeffs[-1]))#Threshold processing of detail coefficients
[0060] sigma=(1 / 0.6745)*np.median(np.abs(coeffs[-1])-np.median(np.abs(coeffs[-1])))#Mad estimate
[0061] uthresh = sigma * np.sqrt(2 * np.log(len(coeffs[-1]))) # Donoho and Johnstone threshold
[0062] coeffs[-1]=pywt.threshold(coeffs[-1],value=uthresh,mode='soft')#Perform soft threshold processing on detail coefficients
[0063] reconstructed_signal=pywt.waverec(coeffs,wavelet)
[0064] return reconstructed_signal
[0065] # Denoise each audio clip
[0066] y_frames_denoised=[wavelet_denoise(frame,wavelet,level)for frame iny_frames]
[0067] The above functional segments can pre-process the original sound.
[0068] Furthermore, by selecting an adaptive wavelet basis, comparing the signal-to-noise ratio (SNR) performance of wavelet bases such as db1, sym2, and coif1 in leakage signals, experiments show that the sym2 wavelet has the best retention effect on impulse noise (SNR increased by 8.2dB). Then, the layered threshold is optimized. For each layer coefficient after wavelet decomposition, the improved SURE (Stein unbiased risk estimation) threshold is used to avoid signal distortion caused by the traditional fixed threshold.
[0069] In the embodiment of the present application, the first threshold strategy includes: using the improved Stein unbiased risk estimation threshold to perform layered threshold optimization on the coefficients of each layer after wavelet decomposition, which is expressed as:
[0070] σ j =Median(|cD j |) / 0.6745
[0071] Among them, σ j is the j-th layer detail coefficient, N j is the coefficient length.
[0072] In the embodiment of the present application, feature extraction of the preprocessed sound data includes: high-frequency feature extraction and low-frequency feature extraction;
[0073] The extracted high-frequency features include the energy change of the sound signal in the first frequency band in the time step dimension and the frequency at which the sound signal crosses the zero value line;
[0074] The extracted low-frequency features include Mel-frequency cepstral coefficients of the second frequency band.
[0075] It should be noted that in the embodiment of the present application, the first frequency band can be set to a frequency band above 4 kHz, and the second frequency band can be set to a range of 200 Hz to 1 kHz.
[0076] Furthermore, the extraction of sound data feature values can be done using two methods: Mel spectrum and Mel frequency cepstral coefficients. Mel spectrum is a method of converting the spectrum of an audio signal into a Mel scale. It aims to simulate the human ear's perception of frequency, because the human ear's perception of frequency is nonlinear, especially more sensitive in the low frequency band. Mel frequency cepstral coefficients are features extracted from the Mel spectrum and are used to capture the spectral features of the audio signal. The purpose of using these two feature values is to simulate the human ear's perception of the sound leaking from the sampling cabinet, and to train an LSTM model that can distinguish the leakage noise from the sampling cabinet.
[0077] Furthermore, based on the physical characteristics of the sound leakage in the sampling cabinet (superposition of high-frequency transient pulses and low-frequency continuous noise), a dual-band feature fusion strategy is proposed. High-frequency features: Extract the short-time energy (STE) and zero-crossing rate (ZCR) in the frequency band above 4kHz to capture the transient impact signal at the initial stage of leakage. Low-frequency features: Calculate the 1st to 3rd order coefficients of MFCC in the range of 200Hz to 1kHz to characterize the steady-state characteristics of continuous leakage. Dynamically adjust the feature threshold according to the environmental background noise (such as fan vibration) to avoid misjudgment.
[0078] Exemplarily, when the background noise is >60dB, the trigger sensitivity of the high-frequency feature is increased.
[0079] Specifically, the sound feature extraction function code is expressed as:
[0080] #Extract features (Mel spectrum and MFCC)
[0081] def extract_features(frame,sr,n_mels,n_mfcc,n_fft=2048):
[0082] S=librosa.feature.melspectrogram(y=frame,sr=sr,n_mels=n_mels,n_fft=n_fft,hop_length=hop_length)
[0083] S_log = librosa.power_to_db(S,ref = np.max) #Convert to logarithmic scale
[0084] mel_spectrogram = S_log.T # transpose to [time_steps, input_size]
[0085] mfccs=librosa.feature.mfcc(y=frame,sr=sr,n_mfcc=n_mfcc,n_fft=n_fft,hop_length=hop_length)
[0086] mfcc_features = mfccs.T # transpose to [time_steps, input_size]
[0087] return mel_spectrogram,mfcc_features
[0088] X_mel,X_mfcc=[],[]
[0089] #Traverse each denoised audio clip and extract features
[0090] for frame in y_frames_denoised:
[0091] mel,mfcc=extract_features(frame,sr,n_mels,n_mfcc)
[0092] X_mel.append(mel)
[0093] X_mfcc.append(mfcc)
[0094] #Convert the features to a numpy array and add the batch and time step dimensions
[0095] X_mel=np.array(X_mel)[:,np.newaxis,:,:]#[num_frames,1,time_steps,input_size_mel]
[0096] X_mfcc=np.array(X_mfcc)[:,np.newaxis,:,:]#[num_frames,1,time_steps,input_size_mfcc]
[0097] It should be noted that by extracting and converting the feature values of the audio data and turning it into a data type that conforms to the LSTM model input, and labeling these data, since this is a binary problem with only abnormal and normal differences, you only need to attach a label when using it.
[0098] In an embodiment of the present application, a sound detection model is constructed to identify characteristic abnormal sound patterns, including: inputting high-frequency features and low-frequency features into a dual-channel long short-term memory network, fusing the information of the high-frequency and low-frequency channels through an attention mechanism, and the model outputs the abnormal probability of consecutive frames;
[0099] When the probability of three consecutive frames exceeds the preset threshold, an alarm is triggered.
[0100] It should be noted that the sound detection model constructed in this application is a dual-channel LSTM model, which fuses timing information through the attention mechanism. This application adds residual connections between stacked bidirectional LSTM layers to alleviate the gradient vanishing problem. Experiments show that the training convergence speed is increased by 40%.
[0101] It should also be noted that the model output in the embodiment of the present application is an abnormal probability P∈[0,1], and an alarm is triggered when P>0.9 for three consecutive frames to avoid false alarms caused by instantaneous interference.
[0102] In an embodiment of the present application, it also includes: when an energy mutation occurs, if the energy of a single frame signal suddenly increases to a second threshold value compared to the baseline value or the energy proportion of the first frequency band exceeds 30% of the total energy, the cloud platform alarm mechanism is triggered.
[0103] It should be noted that in the embodiment of the present application, the second threshold can be set to any number greater than 20 dB.
[0104] For example, when the energy of a single-frame signal suddenly increases by more than 20dB compared to the baseline value or the energy in the frequency band above 4kHz accounts for more than 30% of the total energy, an alarm is triggered on the cloud platform, thereby enabling real-time monitoring of the transmitter cabinet in the power plant, effectively saving manpower and material costs.
[0105] Example 2
[0106] The above embodiment is a schematic scheme of a method for detecting abnormal sound in a sampling cabinet based on STM32. It should be noted that the technical scheme of the abnormal sound detection system in the sampling cabinet based on STM32 and the technical scheme of the abnormal sound detection method in the sampling cabinet based on STM32 belong to the same concept. The details of the technical scheme of the abnormal sound detection system in the sampling cabinet based on STM32 in this embodiment that are not described in detail can all be referred to the description of the technical scheme of the abnormal sound detection method in the sampling cabinet based on STM32.
[0107] In this embodiment, a sampling cabinet abnormal sound detection system based on STM32 includes:
[0108] A data acquisition module is used to collect sound data from the local sampling cabinet and pre-process the sound data;
[0109] A feature extraction module, used for extracting features from the preprocessed sound data;
[0110] The anomaly recognition module is used to build a sound detection model and identify characteristic abnormal sound patterns.
[0111] It should be noted that the STM32 chip used in the embodiment of the present application has many advantages, which can improve the accuracy and robustness of recognition. For example, hardware adaptability: the 128-pin package of STM32F407VET6 provides rich I / O resources, supports parallel acquisition of multi-channel analog input (such as sound sensor, temperature sensor, etc.) and digital signal, and meets the real-time monitoring requirements of multiple parameters in complex industrial environments; real-time and low power consumption: the chip has built-in FPU (floating point unit) and DSP instruction set, which can efficiently process real-time noise reduction and feature extraction of audio signals, and the calculation speed is increased by more than 3 times compared with the traditional 8-bit / 16-bit controller (experimental data: it only takes 12ms to process 1 second of audio data), and the standby power consumption is less than 1mW, which is suitable for 24-hour uninterrupted operation; communication scalability: through the RS485 interface and the LoRa module, low-power remote transmission within a range of 1km is realized (measured packet loss rate <0.1%), which solves the stability problem of traditional WiFi / 4G under strong electromagnetic interference in power plants.
[0112] In the embodiment of the present application, the data acquisition module is also used to: perform signal conversion on the collected sound data to pre-process the sound data.
[0113] In the embodiment of the present application, the data acquisition module is also used to: separate useful information and noise in the sound signal, and remove the noise component through a first threshold strategy.
[0114] In the embodiment of the present application, the data acquisition module is also used to: use the improved Stein unbiased risk estimation threshold to perform layered threshold optimization on the coefficients of each layer after wavelet decomposition, expressed as:
[0115] σ j =Median(|cD j |) / 0.6745
[0116] Among them, σ j is the j-th layer detail coefficient, N j is the coefficient length.
[0117] In an embodiment of the present application, the feature extraction module is also used for: high-frequency feature extraction and low-frequency feature extraction; the extracted high-frequency features include the energy change of the sound signal in the first frequency band in the time step dimension and the frequency of the sound signal crossing the zero value line; the extracted low-frequency features include the Mel-frequency cepstral coefficients of the second frequency band.
[0118] In the embodiment of the present application, the abnormality recognition module is also used to: construct a sound detection model, and the abnormal sound pattern of the recognition feature includes: inputting the high-frequency features and the low-frequency features into a dual-channel long short-term memory network respectively, fusing the information of the high-frequency and low-frequency channels through the attention mechanism, and the model outputs the abnormality probability of continuous frames;
[0119] When the probability of three consecutive frames exceeds the preset threshold, an alarm is triggered.
[0120] In an embodiment of the present application, the anomaly identification module is also used to: when an energy mutation occurs, if the energy of a single frame signal suddenly increases to a second threshold value compared to the baseline value or the energy proportion of the first frequency band exceeds 30% of the total energy, the cloud platform alarm mechanism is triggered.
[0121] This embodiment also provides an electronic device, which is applicable to the abnormal sound detection method of the sampling cabinet based on STM32, including:
[0122] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the abnormal sound detection method of the sampling cabinet based on STM32 as proposed in the above embodiment.
[0123] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the abnormal sound detection method for a sampling cabinet based on STM32 as proposed in the above embodiment is implemented.
[0124] The storage medium proposed in this embodiment and the abnormal sound detection method for a sampling cabinet based on STM32 proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0125] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
[0126] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for detecting abnormal sound in a sampling cabinet based on STM32, characterized in that: include: Collecting sound data from the on-site sampling cabinet and preprocessing the sound data; Performing feature extraction on the preprocessed sound data; A sound detection model is constructed to identify abnormal sound patterns of the features.
2. The abnormal sound detection method of the sampling cabinet based on STM32 as claimed in claim 1, characterized in that, Before the sound data is preprocessed, the method further includes: performing signal conversion on the collected sound data to preprocess the sound data.
3. The abnormal sound detection method of the sampling cabinet based on STM32 as claimed in claim 2, characterized in that, Preprocessing the sound data includes: separating useful information and noise in the sound signal, and removing the noise component by a first threshold strategy.
4. The abnormal sound detection method of the sampling cabinet based on STM32 as claimed in claim 3, characterized in that, Extracting features from the preprocessed sound data includes: extracting high-frequency features and extracting low-frequency features; The extracted high-frequency features include energy changes of the sound signal of the first frequency band in the time step dimension and the frequency of the sound signal crossing the zero value line; The extracted low-frequency features include Mel-frequency cepstral coefficients of the second frequency band.
5. The abnormal sound detection method of the sampling cabinet based on STM32 as claimed in claim 4 is characterized in that, Constructing a sound detection model to identify abnormal sound patterns of features includes: inputting the high-frequency features and the low-frequency features into a dual-channel long short-term memory network respectively, fusing the information of the high-frequency and low-frequency channels through an attention mechanism, and the model outputting the abnormal probability of consecutive frames; When the probability of three consecutive frames exceeds the preset threshold, an alarm is triggered.
6. The abnormal sound detection method of the sampling cabinet based on STM32 as claimed in claim 5, characterized in that: Also includes: When a sudden energy change occurs, if the energy of a single frame signal suddenly increases to a second threshold compared to the baseline value or the energy of the first frequency band accounts for more than 30% of the total energy, the cloud platform alarm mechanism is triggered.
7. The abnormal sound detection method of the sampling cabinet based on STM32 as described in claim 3 or 6, characterized in that: The first threshold strategy includes: using the improved Stein unbiased risk estimation threshold to optimize the layered threshold of each layer coefficient after wavelet decomposition, which is expressed as: Among them, σ j is the j-th layer detail coefficient, N j is the coefficient length.
8. An abnormal sound detection system for a sampling cabinet based on STM32, characterized in that: include: A data acquisition module, used to collect sound data from the on-site sampling cabinet and pre-process the sound data; A feature extraction module, used for extracting features from the preprocessed sound data; The abnormality recognition module is used to build a sound detection model to identify abnormal sound patterns of the features.
9. An electronic device, comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the abnormal sound detection method for a sampling cabinet based on STM32 are implemented as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the abnormal sound detection method for a sampling cabinet based on STM32 as described in any one of claims 1 to 7.