Industrial site high-frequency sound recognition method and storage medium

Through the dual-branch window Fourier transform and intelligent rejection mechanism, the problem of high-frequency sound recognition in industrial sites is solved, the accurate recognition and stable detection of high-frequency sounds are achieved, and the reliability of industrial acoustic monitoring is improved.

CN120496577BActive Publication Date: 2025-09-09SHANGHAI SANTONG AUTOMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510991499.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-09-09
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

Existing technologies have difficulty effectively identifying high-frequency sounds in industrial sites, especially because high-frequency sounds are widely distributed in the spectrum and are severely interfered by background noise, resulting in low recognition accuracy and scarce samples.

Method used

A short-time Fourier transform is performed on a double-branch window with the same frame shift and different window lengths to generate a double-branch spectrogram. The linear spectrogram of the high-time resolution and high-frequency resolution branch window is combined with a recurrent neural network and a multi-head attention layer for feature extraction, and the temperature coefficient and energy score are used to soften and suppress the scaling of the probability score.

Benefits of technology

It achieves precise capture of sub-millisecond transient events and synchronous identification of high-frequency components, overcomes the interference of sample scarcity and high-frequency background noise, improves the detection rate of fault sounds and reduces the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120496577B_ABST
    Figure CN120496577B_ABST
Patent Text Reader

Abstract

The present application relates to the field of sound recognition, and in particular to a method and storage medium for high-frequency sound recognition in industrial sites. The method comprises: performing short-time Fourier transform on the industrial site sound signal using a dual-branch window to obtain a dual-branch spectrogram; performing channel stacking on the dual-branch spectrogram to obtain a three-dimensional tensor; after classifying and calculating the extracted features, the classification head outputs a scoring vector containing probability scores of the three dimensions of target sound, ambient sound, and strong noise; softening the probability score using a temperature coefficient, and inputting the softened probability score into a classification function to obtain a probability distribution; calculating the energy score, and when the energy score is lower than a preset energy threshold, calculating the attenuation coefficient to scale and suppress the probability distribution to obtain a final probability distribution, determining whether the highest value in the final probability distribution is lower than the rejection threshold, and obtaining the recognition result. The method of the present application has greatly improved the detection rate of fault sounds and significantly reduced the false alarm rate in industrial measurements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sound recognition, and in particular to a method and storage medium for high-frequency sound recognition in industrial sites. Background Art

[0002] Audio detection tasks in industrial scenarios often involve identifying and analyzing high-frequency, short-duration transient acoustic signals, such as the sounds of connector plugging and unplugging, the collisions between components, and the mechanical impacts of equipment during operation. These sound events exhibit distinct spectral characteristics, characterized by short peak durations and a wide frequency distribution.

[0003] Common speech recognition methods use mel-spectrograms or linear spectrograms. Mel-spectrograms compress high-frequency regions, resulting in frequencies above 6kHz having a low proportion in the feature map, making them difficult to effectively represent. In industrial scenarios, however, many key events, such as wiring harness connections, metal impacts, and plastic breakage, are often concentrated in the high-frequency range of 6kHz to 20kHz, with some features even exceeding 15kHz.

[0004] Therefore, in industrial scenarios, the better choice is to use a linear spectrum without frequency compression, which completely preserves the distribution information of the audio in the high-frequency segment, ensuring that the model has a stronger sensitivity and recognition ability for the high-frequency features in industrial events. When performing linear short-time Fourier transform, the formula for linear short-time Fourier transform is known:

[0005] ,

[0006] in, Indicates signal After linear short-time Fourier transform, the time index (corresponding to the window position), frequency index The transformation result at (corresponding frequency point), Represents a short-time analysis window function, which is used to intercept a local segment of the signal. is the frame shift (sampling point), Indicates the sliding position of the window on the signal. The window function can highlight the local signal and suppress the irrelevant part. represents the complex exponential modulation factor, is an imaginary unit, is the number of FFT points (window length). At the same sampling rate, time resolution and frequency resolution are subject to complementary constraints. Time resolution and frequency resolution cannot be increased infinitely at the same time. Shortening the window length will inevitably lead to a coarser frequency scale, and vice versa.

[0007] In summary, existing technologies struggle to effectively achieve accurate results for audio detection tasks in industrial scenarios. Furthermore, industrial acoustic data suffers from another drawback compared to consumer audio: the sheer number of samples. In a real production line, a critical fault sound often only occurs a few times a year, leaving engineers with limited material to annotate and replay. Furthermore, the environment is extremely noisy, with motor whistles, compressed air leaks, metal friction, and high-speed bearing wind shear. These "background" noises mostly fall above 8 or 9 kHz, in the same frequency range as the plug-in sounds or breakage noises we're most concerned about. However, these noises are difficult to systematically record, annotate, and incorporate into training data sets. Summary of the Invention

[0008] In order to solve the problem that it is difficult to identify high-frequency sounds in industrial sites in the prior art, the present application provides a method and storage medium for identifying high-frequency sounds in industrial sites, the method comprising:

[0009] Industrial scene sound sampling;

[0010] Performing a short-time Fourier transform on the collected sound signal using a double-branch window with the same frame shift and different window lengths to obtain a double-branch spectrogram, wherein the double-branch window includes a high-time-resolution branch window and a high-frequency-resolution branch window, and the double-branch spectrogram includes a first linear spectrum obtained by the high-time-resolution branch window and a second linear spectrum obtained by the high-frequency-resolution branch window;

[0011] Channel stacking is performed on the dual-branch spectrogram to obtain a three-dimensional tensor containing time domain features and frequency domain features;

[0012] After performing classification calculations on the features extracted from the three-dimensional tensor, the classification head outputs a score vector, which includes probability scores for the target sound, ambient sound, and strong noise in three dimensions;

[0013] Softening the probability score using a temperature coefficient, and inputting the softened probability score into a classification function to obtain a probability distribution;

[0014] An energy score is calculated based on all softened probability scores. When the energy score is lower than a preset energy threshold, an attenuation coefficient is calculated based on the difference between the energy score and the energy threshold. The probability distribution is scaled and suppressed based on the attenuation coefficient to obtain a final probability distribution with strict monotonicity. It is determined whether the highest value in the final probability distribution is lower than the rejection threshold. If so, the unknown event result is output; if not, the recognition result of the corresponding category is output.

[0015] Specifically, the high time resolution branch window is a sampling window with a window length of 256 sampling points and a frame shift of 32 sampling points, and the high frequency resolution branch window is a sampling window with a window length of 4096 sampling points and a frame shift of 32 sampling points;

[0016] The channel stacking of the double-branch spectrum comprises:

[0017] Based on a frame shift step of 32 sampling points, frames corresponding to the first linear spectrogram and the second linear spectrogram at the same time index are synchronized;

[0018] The frames of the first linear spectrogram and the frames of the second linear spectrogram at the same time index are spliced ​​along the channel dimension to form a two-dimensional fusion matrix containing time-domain pulse morphological features and frequency-domain peak position features readable by the convolution kernel;

[0019] The two-dimensional fusion matrices of 28 consecutive time indexes within the peak period of the industrial transient event are concatenated in time order to obtain the three-dimensional tensor.

[0020] Specifically, the method further includes:

[0021] Before performing channel stacking on the dual-branch spectrum, normalizing the dual-branch spectrum in the amplitude domain;

[0022] The normalized two-branch spectra are downsampled to a uniform two-dimensional size.

[0023] Specifically, the performing classification calculation on the features extracted from the three-dimensional tensor includes:

[0024] Capturing the long-term dependency of the sequence of the three-dimensional tensor through a recurrent neural network, and focusing on the long-term dependency through a multi-head attention layer to obtain a long-term dependency feature vector;

[0025] The long-term dependency feature vector is input into a fully connected layer, and a score vector that has not been calculated by a classification function is output through the classification head.

[0026] Specifically, the temperature coefficient is a constant greater than 1;

[0027] The method of softening the probability score using the temperature coefficient is to divide the probability score by the temperature coefficient to obtain the softened probability score. z i / t , z i Score the probability, t is the temperature coefficient, i ∈{1,2,3};

[0028] When the classification function calculates the softened probability score, the calculation formula is:

[0029] ,

[0030] in, is the probability distribution, C is the number of categories, C The value of is 3.

[0031] Specifically, the method for calculating the energy score based on all softened probability scores is:

[0032] The softened probability score is calculated using the energy score formula, which is:

[0033] ,

[0034] in, is the energy fraction, is the softened probability score, C is the number of categories, C The value of is 3.

[0035] Specifically, the method for calculating the attenuation coefficient is:

[0036] The energy score and the energy threshold are calculated using an attenuation coefficient formula, where the attenuation coefficient formula is:

[0037]

[0038] in, is the attenuation coefficient, To control the adjustable value of the compression slope, greater than 0, is the energy threshold, is the energy fraction, It means taking only the positive part;

[0039] The method for scaling and suppressing the probability distribution according to the attenuation coefficient is:

[0040] The attenuation coefficient is multiplied by the probability distribution to obtain the final probability distribution.

[0041] Specifically, when sampling the industrial scene sound, a monophonic WAV format sound file is collected at a sampling rate of 44100 Hz.

[0042] Specifically, when performing classification calculations on the features extracted from the three-dimensional tensor, a pre-trained model is used to perform the classification calculations. During training, for samples of the target sound category and the strong noise category, the system randomly selects a background sample from the ambient sound category with a probability of 50%, and mixes them using a random ratio between 0.1 and 0.9.

[0043] This application has the following technical effects:

[0044] At the level of sound signal processing, it breaks through the physical bottleneck of the mutual constraints between time resolution and frequency resolution in traditional methods, allowing the temporal dynamics of sub-millisecond transient events and the fine spectrum of kilohertz-level high-frequency components to be captured synchronously and accurately.

[0045] In terms of adaptability to industrial scenarios, it has successfully overcome the dual dilemma of extreme scarcity of key fault sound samples and difficulty in distinguishing high-frequency background noise, enabling the model to stably identify target events and actively filter unknown noise under harsh conditions of scarce labeled data and strong environmental interference.

[0046] The dual guarantees of collaborative analysis of the comprehensive dual-branch spectrum and the intelligent rejection mechanism enable the method of this application to achieve a significant increase in the fault sound detection rate and a significant reduction in the false alarm rate in industrial measurements, providing highly reliable technical support for acoustic monitoring of production lines. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding numbers represent the same or corresponding parts.

[0048] Figure 1 This is a linear spectrum diagram of the sound of a typical connector plugging and unplugging in an embodiment of the present application;

[0049] Figure 2 This is a flow chart of a method for identifying high-frequency sound in an industrial field according to an embodiment of the present application;

[0050] Figure 3 is a first linear spectrum obtained by a high time resolution branch window in an embodiment of the present application;

[0051] Figure 4 This is a second linear spectrum diagram obtained through a high frequency resolution branch window in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0053] This example designs a highly targeted deep neural network architecture for high-frequency transient characteristic sounds commonly found in industrial production, such as collisions, plugging and unplugging, and unusual noises. This model is optimized for industrial applications in multiple aspects, including feature extraction, input structure, time series modeling capabilities, and output mechanism. Figure 1 The linear spectrum of a typical connector plugging and unplugging sound is shown. The figure clearly shows a characteristic peak with highly concentrated energy at approximately 0.04 seconds. This indicates that these industrial acoustic events share a very short duration, typically around 0.02 seconds, and possess distinct spectral characteristics, with frequency components concentrated in the higher frequency bands. Furthermore, frequency analysis reveals that the characteristics of these signals are more pronounced above 4 kHz, particularly in the 8 kHz to 12 kHz band, where they exhibit a significant concentration and enhancement of frequency energy. This prominent characteristic of this frequency band facilitates subsequent analysis and identification tasks.

[0054] In summary, effectively capturing and modeling short-term transient acoustic signals in the high-frequency range (especially 8 kHz to 12 kHz) is the key to achieving industrial audio anomaly detection and condition monitoring, and is also the core task of this research work.

[0055] In the feature extraction stage, this embodiment does not use the Mel Spectrogram commonly used in traditional speech recognition, but instead uses a linear spectrogram. The formula for linear short-time Fourier transform is known:

[0056] ,

[0057] in, Indicates signal After linear short-time Fourier transform, the time index (corresponding to the window position), frequency index The transformation result at (corresponding frequency point), Represents a short-time analysis window function, which is used to intercept a local segment of the signal. is the frame shift (sampling point), Indicates the sliding position of the window on the signal. The window function can highlight the local signal and suppress the irrelevant part. represents the complex exponential modulation factor, is an imaginary unit, is the number of FFT points (window length);

[0058] set up:

[0059] ,

[0060] in, x (t )∈ L ²( R ) represents a continuous-time signal x ( t ) belongs to the space of square integrable functions (total energy is limited, which is convenient for Fourier transform), X ( f )express x ( t )’s Fourier transform result (signal representation in the frequency domain), represents the integral over the entire time domain, Represents the complex exponential kernel of the Fourier transform, used for frequency decomposition;

[0061] Time variance:

[0062] ,

[0063] in, Represents the time variance of the signal in the time domain, quantifying the degree of energy diffusion in time. Indicates the energy center position in the time domain, the molecule is the weighted square deviation integral, |x(t)|² represents the time domain energy density, and the denominator is is the total energy normalization term;

[0064] Frequency variance:

[0065] ,

[0066] in, It represents the frequency variance of the signal in the frequency domain and quantifies the degree of diffusion of the spectrum energy in frequency. Indicates the center position of frequency domain energy, the molecule is the weighted squared deviation integral, represents the frequency domain energy density, the denominator is the total energy normalization term;

[0067] Introducing the operator:

[0068] ,

[0069] in, Represents time operator Acting on a signal x ( t ) multiplied by the time variable t (quantized temporal position), Frequency operator By taking the derivative of the signal and multiplying it by To quantify the frequency domain changes;

[0070] There is a commutation relation ( I is the unit operator), and from the Cauchy–Schwarz + Robertson uncertainty formula:

[0071] ,

[0072] in, Represents time operator and frequency operators The commutator (defined as ), Cauchy–Schwarz + Robertson uncertainty formula derives the time-frequency variance product The lower bound ;

[0073] Right now , if and only if When the solution is established, take the equality sign, and the only square-integrable solution of this differential equation is the Gaussian function:

[0074] ,

[0075] in, represents the lower bound of the product of the time-frequency standard deviation (the core of the Heisenberg uncertainty principle derived from the previous step), if and only if The differential equation of takes the equal sign when the solution is established, where is the offset time operator, is a complex coefficient, is the shift frequency operator, and the only square-integrable solution to this equation is the Gaussian function , C is the normalization constant, is the Gaussian envelope (controls the time domain width), is phase modulation (introducing a frequency shift);

[0076] Therefore, at the same sampling rate, time resolution and frequency resolution are subject to complementary constraints. Time resolution and frequency resolution cannot be increased infinitely at the same time. Shortening the window length will inevitably lead to a coarser frequency scale, and vice versa. In order to fully model the performance characteristics of sound signals at different time scales, this method designs a self-developed spectrum fusion input operator and proposes the following around this operator: Figure 2 The industrial site high-frequency sound recognition method shown includes the following steps:

[0077] Industrial scene sound sampling;

[0078] Performing a short-time Fourier transform on the collected sound signal using a double-branch window with the same frame shift and different window lengths to obtain a double-branch spectrogram, wherein the double-branch window includes a high-time-resolution branch window and a high-frequency-resolution branch window, and the double-branch spectrogram includes a first linear spectrum obtained by the high-time-resolution branch window and a second linear spectrum obtained by the high-frequency-resolution branch window;

[0079] Perform channel stacking on the dual-branch spectrogram to obtain a three-dimensional tensor containing time domain features and frequency domain features;

[0080] After classifying and calculating the features extracted from the three-dimensional tensor, the classification head outputs a score vector containing probability scores for the target sound, ambient sound, and strong noise.

[0081] The probability score is softened using a temperature coefficient, and the softened probability score is input into the classification function to obtain a probability distribution;

[0082] The energy score is calculated based on all softened probability scores. When the energy score is lower than the preset energy threshold, the attenuation coefficient is calculated based on the difference between the energy score and the energy threshold. The probability distribution is scaled and suppressed according to the attenuation coefficient to obtain a final probability distribution with strict monotonicity. It is determined whether the highest value in the final probability distribution is lower than the rejection threshold. If so, the unknown event result is output; if not, the recognition result of the corresponding category is output.

[0083] Specifically, in this embodiment, during the sound collection phase, sound is collected for each process in the industrial site. The specific configuration is as follows:

[0084] Sampling rate: 44,100 Hz (standard audio sampling rate, balancing high-frequency details and computational efficiency);

[0085] Number of channels: Mono;

[0086] File format: lossless .wav format to ensure data integrity;

[0087] Duration of each segment: Each file covers the entire process of 30-120 seconds;

[0088] During the short-time Fourier transform (SFT) phase, we want to sample enough spectral frames within the audio peak segment (20 ms). This ensures that: short-term energy changes are not "swallowed" by a single window function; the convolutional layer or LSTM layer can perceive the fluctuation of the peak; and the multi-substructure in the high-frequency signal can be reconstructed by dividing the frames. The number of sampling points can be inferred from the time interval. When the sampling rate is 44100Hz, the fastest FFT-friendly frame shift length can be obtained, which is a power of 2 and rounded down. .

[0089] For the window length in the high time resolution branch, according to the principle that the window length does not exceed half of the peak value, the upper limit of the window length is 441 sampling points. Then according to the overlap rate formula:

[0090] ,

[0091] in, Represents the overlap rate of adjacent windows in STFT, which is used to quantify the overlap ratio between window functions to suppress leakage and reduce time ambiguity ( The higher the value, the smoother the reconstruction), formula middle L It's frame shift. Refers to the window length, corresponding to the short-time Fourier transform formula in the previous article , that is, the number of FFT points, usually taken as a power of 2, indicating the number of sampling points covered by the window function;

[0092] Under strict conditions (transient duration < 50ms), usually ,(Right now ) means that each moment is simultaneously covered by at least four windows, significantly suppressing window leakage and reducing temporal ambiguity. The lower limit of the window length is deduced from the overlap ratio to be 128. In the range from 128 to 441, the closest power of 2 is 256. This method passes theoretical consistency tests such as Gabor frame completeness, Heisenberg-Gabor test, and frame coverage verification, achieving high-density sampling of greater than or equal to 28 frames within a 20 ms transient peak range.

[0093] For the high-frequency resolution branch, the window length is limited to 2205 sampling points based on the Rayleigh ideal resolution lower bound principle. This is corrected by the window function main lobe width (ENBW) to an upper limit of 4096. Based on theoretical consistency checks such as Slepian-Pollak time-band limit verification, Heisenberg-Gabor uncertainty checks, Gabor sampling grid completeness and overlap, and COLA requirements, a window length of 4096 sampling points is adopted.

[0094] Figure 3 Providing a higher time resolution and more time features to the first linear spectrum obtained by the high time resolution branch window; Figure 4 The second linear spectrum obtained by the high-frequency resolution branch window provides higher frequency resolution and more frequency features. Now it is necessary to fuse the two-branch spectrum, including:

[0095] Based on a frame shift step of 32 sampling points, the frames corresponding to the first linear spectrum graph and the second linear spectrum graph at the same time index are synchronized;

[0096] The frames of the first linear spectrogram and the frames of the second linear spectrogram at the same time index are spliced ​​along the channel dimension to form a two-dimensional fusion matrix containing time-domain pulse morphological features and frequency-domain peak position features readable by the convolution kernel;

[0097] The two-dimensional fusion matrices of 28 consecutive time indices within the peak period of the industrial transient event are concatenated in time order to obtain a three-dimensional tensor.

[0098] In this embodiment, because both spectrograms slide with a step size of 0.73 ms, their corresponding frames at the same time index can be fed directly into the convolution kernel side by side. This allows the convolution layer to simultaneously read: the instantaneous energy profile from a 256-sample window—informing the network of whether a pulse is present and how it rises and falls—and the fine-grained frequency coordinates from a 4096-sample window—informing the network of whether the main energy of the pulse falls precisely at 8.04kHz or 8.20kHz. After fusion, it can reconstruct the precise frequency and sub-millisecond rhythm at which the transient occurred.

[0099] According to the Slepian–Pollak time–bandwidth limited theory.

[0100] Assume that the single frame observation window length N Points, sampling rate , if we try to If two sinusoids are distinguished, the upper limit of the distinguishable "independent narrow-band degrees of freedom" is:

[0101] ,

[0102] The main lobe width of the commonly used window function is also ≈ 2 bins. Therefore, when K<2, the energy of the two spectral peaks is highly overlapped - almost inseparable from the perspective of a single frame spectrum.

[0103] This step of cross-frame accumulation just makes up for the single frame The high-frequency resolution branch can only vaguely distinguish two 16 Hz-spaced sinusoids. However, when these sinusoids exhibit a "synchronous rise and fall" pattern over time over 28 frames, the temporal rhythm information provided by the high-temporal resolution branch enables the network to distinguish them. It also offers the following advantages:

[0104] Zero alignment cost: The uniform hop length means that no interpolation or padding is required, and the GPU can simultaneously calculate two spectrograms in one forward pass.

[0105] Extremely low parameter count: The first-layer convolution kernel naturally sees a pair of "fine time + fine frequency" pixels, which can reduce the number of convolution parameters by nearly half compared to the solution of adding an additional branch and then aligning.

[0106] Explainable: When debugging, simply visualizing the activations of the two channels separately allows you to intuitively determine whether the model relies on "time domain pulses" or "frequency domain spikes."

[0107] In this embodiment, before channel stacking is performed on the dual-branch spectra, the dual-branch spectra are normalized in the amplitude domain;

[0108] The normalized two-branch spectra are downsampled to a uniform two-dimensional size.

[0109] Through this input operator, the model has the ability to integrate the multi-scale time-frequency characteristics of sound at the initial stage, avoiding information loss and helping to improve overall recognition accuracy.

[0110] To address the sudden, short-duration, and high-frequency characteristics of industrial sound events, this example introduces a combined design of a recurrent neural network (LSTM) structure and a multi-head attention mechanism in the time series modeling layer. The classification calculations for features extracted from the three-dimensional tensor include:

[0111] Capture the long-term dependencies of the three-dimensional tensor sequence through a recurrent neural network, and focus on the long-term dependencies through a multi-head attention layer to obtain the long-term dependency feature vector;

[0112] The long-term dependency feature vector is input into the fully connected layer, and the classification head outputs the score vector that has not been calculated by the classification function.

[0113] The LSTM module in this embodiment adopts a single-layer or multi-layer structure, with a hidden layer dimension of 1024. It has the ability to remember the dynamic changes in the context of the time series and can capture complex patterns such as "initial sound + trailing vibration";

[0114] The attention mechanism module is used to automatically find time segments in the sequence output that contribute more to the final judgment;

[0115] Based on a multi-head mechanism (e.g., 8 heads), multiple acoustic feature dimensions can be focused on in parallel;

[0116] It is particularly suitable for enhancing the ability to distinguish short-term, high-energy burst signals (such as impact and rupture).

[0117] This combination not only improves the temporal expression of the model, but also significantly improves its sensitivity to high-frequency transient abnormal events.

[0118] In industrial sites, running sound streams often carry new events or noise that have not appeared in the training phase. In order to allow the model to automatically reduce confidence and trigger rejection when encountering such unfamiliar inputs, this embodiment uses two "gates" at the output end: temperature factor t and energy score E ( x The method of softening the probability score using the temperature coefficient is to divide the probability score by the temperature coefficient to obtain the softened probability score. z i / t , z i Score the probability, t is the temperature coefficient, i ∈{1,2,3};

[0119] When the classification function calculates the softened probability score, the calculation formula is:

[0120] ,

[0121] in, is the probability distribution, C is the number of categories, C The value of is 3.

[0122] The larger τ is, the lower the maximum probability will be. In other words, the larger τ is, the less confident the network is. t As it increases, the total entropy:

[0123] ,

[0124] right t Taking partial derivatives, we can get:

[0125] ,

[0126] This means that temperature softening will definitely increase the output entropy, that is, make the distribution more "flat", and unknown samples will often make all Closer, t When it is increased, the entropy will increase more significantly and the maximum probability will fall below the threshold faster.

[0127] After temperature softening, the probability score of a certain category may still be accidentally high. Therefore, an energy score is introduced. The method for calculating the energy score based on all the softened probability scores is:

[0128] The softened probability score is calculated using the energy score formula, which is:

[0129] ,

[0130] in, is the energy fraction, is the softened probability score, C is the number of categories, C The value of is 3. If the probability scores of all categories are similar, then the exponential sum has no dominant term, E If some items are much larger than the rest, E Natural rise.

[0131] Set reference threshold ,when Below this line, an exponential function is used to generate an overall attenuation coefficient. The method for calculating the attenuation coefficient is:

[0132] The energy score and energy threshold are calculated using the attenuation coefficient formula, which is:

[0133]

[0134] in, is the attenuation coefficient, To control the adjustable value of the compression slope, greater than 0, is the energy threshold, is the energy fraction, Indicates that only the positive part is taken, when the energy ≥ threshold d Exactly 1, no reduction is done.

[0135] The method of scaling and suppressing the probability distribution according to the attenuation coefficient is:

[0136] The decay coefficient is multiplied by the probability distribution to get the final probability distribution, the probability after decay:

[0137] .

[0138] Compute the derivative:

[0139] ,

[0140] It can be found that d As the energy increases monotonically, it means that every time the energy decreases by 1, d Will be multiplied If you take , a drop will make It decreases by about 63%, and the overall probability is proportionally reduced. The original maximum probability is , which decays to , when the sample is an unknown event, E Usually 1 to 2 units below the threshold; if ,but .

[0141] Even after the temperature softens, there is still a maximum probability of 0.4 that it will be crushed instantly. , which is far below the commonly used unknown event OOD decision line (0.3). On the contrary, the energy of known samples is mostly above the threshold, and the highest probability remains above 0.8, which is almost unaffected. Temperature softening "flattens" the distribution once, and energy suppression gives exponential compression based on the overall confidence. The two-step superposition makes

[0142]

[0143] This forms a strictly monotonic chain. Low energy inevitably corresponds to a low maximum probability, causing OOD samples to naturally fall below the threshold and be rejected by the system. If the maximum probability remains above 0.3 after temperature softening and energy decay, it is allowed to pass; otherwise, it is directly classified as OOD and sent to subsequent processes for alarm or ignored. In actual measurements, "unprecedented" signals such as the sound of equipment failure and sudden background noise often hit both the temperature and energy thresholds, causing the maximum probability to drop to 0.1 or even lower, resulting in correct rejection by the system.

[0144] By default, t You can start from 1; E ref Set it to 6.5 to 7.5; set the highest probability threshold to 0.3. If the noise level is very high, or if "missed alarm" is more unacceptable than "false alarm", then t To the major key, E ref Practice has shown that this "temperature + energy" double insurance is more robust than simple temperature scaling or a simple maximum probability threshold, and it is also easier to achieve the ideal rejection-recognition balance through a small amount of on-site trial adjustments.

[0145] This embodiment also includes using a pre-trained model to perform classification calculations on features extracted from a three-dimensional tensor. During training, for samples of the target sound category and the strong noise category, the system randomly selects a background sample from the ambient sound category with a probability of 50%, and mixes them using a random ratio between 0.1 and 0.9.

[0146] Obviously, the embodiments described above are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0147] It should be understood that when the terms "first," "second," etc. are used in the claims, specification, and drawings of this application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "comprise" and "comprising" used in the specification and claims of this application indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or combinations thereof.

Claims

1. A method for identifying high-frequency sounds in industrial sites, characterized in that: The following steps are involved: Industrial scene sound sampling; Performing a short-time Fourier transform on the collected sound signal using a double-branch window with the same frame shift and different window lengths to obtain a double-branch spectrogram, wherein the double-branch window includes a high-time-resolution branch window and a high-frequency-resolution branch window, and the double-branch spectrogram includes a first linear spectrum obtained by the high-time-resolution branch window and a second linear spectrum obtained by the high-frequency-resolution branch window; Channel stacking is performed on the dual-branch spectrogram to obtain a three-dimensional tensor containing time domain features and frequency domain features; After performing classification calculations on the features extracted from the three-dimensional tensor, the classification head outputs a score vector, which includes probability scores for the target sound, ambient sound, and strong noise in three dimensions; Softening the probability score using a temperature coefficient, and inputting the softened probability score into a classification function to obtain a probability distribution; An energy score is calculated based on all softened probability scores. When the energy score is lower than a preset energy threshold, an attenuation coefficient is calculated based on the difference between the energy score and the energy threshold. The probability distribution is scaled and suppressed based on the attenuation coefficient to obtain a final probability distribution with strict monotonicity. It is determined whether the highest value in the final probability distribution is lower than the rejection threshold. If so, the unknown event result is output; if not, the recognition result of the corresponding category is output.

2. The method according to claim 1, characterized in that The high time resolution branch window is a sampling window with a window length of 256 sampling points and a frame shift of 32 sampling points, and the high frequency resolution branch window is a sampling window with a window length of 4096 sampling points and a frame shift of 32 sampling points; The channel stacking of the double-branch spectrum comprises: Based on a frame shift step of 32 sampling points, frames corresponding to the first linear spectrogram and the second linear spectrogram at the same time index are synchronized; The frames of the first linear spectrogram and the frames of the second linear spectrogram at the same time index are spliced ​​along the channel dimension to form a two-dimensional fusion matrix containing time-domain pulse morphological features and frequency-domain peak position features readable by the convolution kernel; The two-dimensional fusion matrices of 28 consecutive time indexes within the peak period of the industrial transient event are concatenated in time order to obtain the three-dimensional tensor.

3. The method according to claim 1, characterized in that The method further comprises: Before performing channel stacking on the dual-branch spectrum, normalizing the dual-branch spectrum in the amplitude domain; The normalized two-branch spectra are downsampled to a uniform two-dimensional size.

4. The method according to claim 1, wherein The performing classification calculation on the features extracted from the three-dimensional tensor comprises: Capturing the long-term dependency of the sequence of the three-dimensional tensor through a recurrent neural network, and focusing on the long-term dependency through a multi-head attention layer to obtain a long-term dependency feature vector; The long-term dependency feature vector is input into a fully connected layer, and a score vector that has not been calculated by a classification function is output through the classification head.

5. The method according to claim 1, wherein The temperature coefficient is a constant greater than 1; The method of softening the probability score using the temperature coefficient is to divide the probability score by the temperature coefficient to obtain the softened probability score. z i / τ , z i Score the probability, τ is the temperature coefficient, i ∈{1,2,3}; When the classification function calculates the softened probability score, the calculation formula is: , in, is the probability distribution, C is the number of categories, C The value of is 3.

6. The method according to claim 1, characterized in that The method for calculating the energy score based on all softened probability scores is: The softened probability score is calculated using the energy score formula, which is: , in, is the energy fraction, is the softened probability score, C is the number of categories, C The value of is 3, z i Score the probability, τ is the temperature coefficient, i ∈{1,2,3}.

7. The method according to claim 1, characterized in that The method for calculating the attenuation coefficient is: The energy score and the energy threshold are calculated using an attenuation coefficient formula, where the attenuation coefficient formula is: , in, is the attenuation coefficient, To control the adjustable value of the compression slope, greater than 0, is the energy threshold, is the energy fraction, It means taking only the positive part; The method for scaling and suppressing the probability distribution according to the attenuation coefficient is: The attenuation coefficient is multiplied by the probability distribution to obtain the final probability distribution.

8. The method according to claim 1, characterized in that When sampling the industrial field sound, a monophonic WAV format sound file is collected at a sampling rate of 44100 Hz.

9. The method according to claim 1, characterized in that When performing classification calculations on the features extracted from the three-dimensional tensor, a pre-trained model is used to perform the classification calculations. During training, for samples of the target sound category and the strong noise category, the system randomly selects a background sample from the ambient sound category with a probability of 50%, and mixes them using a random ratio between 0.1 and 0.

9.

10. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Voiceprint segmentation method, apparatus and device, and readable storage medium

    CN112201256A

  • Sound event detection method based on double-branch discriminant feature neural network

    CN114881212A