A method for judging device abnormality based on positive samples and online extraction of audio features
By establishing a positive sample library and reverse sample library, the audio features are extracted and the combined probability density score is calculated, the problem that is difficult to judge the abnormal device in the existing technology, and achieves high accuracy and reliability equipment abnormal testing.
Patent Information
- Application Number
- CN202411686871.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The prior art is difficult to effectively judge device abnormalities through machine learning, especially in the normal working state of high-value devices, which is difficult to obtain abnormal audio signals.
Using a method based on positive samples, the positive sample library and reverse sample library of the running status of the device are established. By extracting audio features such as the Merl's inversion coefficient, the short -term over time, and the short -term energy spectrum, the joint probability density score is calculated. , Judge the running status of the device.
The device is effectively judged by effectively judging the abnormal equipment of the device under the normal operation state of the device. Through the automatic update of the sample library, the accuracy and reliability of the equipment abnormal detection is improved.
Smart Images

Figure CN119181384B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of abnormality detection of equipment running status, and specifically relates to a method for judging equipment abnormality based on positive samples and online extraction of audio features. Background Art
[0002] Equipment operation status monitoring is an important part of industrial production, equipment maintenance, and safety monitoring. Equipment anomaly monitoring detects abnormal signals in advance through equipment operation status monitoring, and promptly handles potential or existing equipment anomalies to ensure production safety. In the field of anomaly detection, intelligent processing of audio signals using machine learning is an important detection method.
[0003] In actual engineering applications, for some high-value equipment, the audio signals obtained are in most cases signals of normal working status, and it is difficult (or almost impossible) to obtain abnormal audio signals. As a result, the general machine learning method of building a model through a large number of calibrated abnormal audio signal samples and judging equipment abnormalities is not applicable.
[0004] Currently, there is an urgent need to develop a method based on positive samples and online extraction of audio features to determine device abnormalities. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method for judging device abnormality based on positive samples and online extraction of audio features, so as to overcome the defects of the prior art.
[0006] The method of the present invention for judging device abnormality based on positive samples and online extraction of audio features comprises the following steps:
[0007] S10. Establish a forward sample library and a reverse sample library of the equipment operation status;
[0008] Collect audio data when the device is working normally, extract eigenvalues after framing and windowing the audio data. The eigenvalues reflect information about the sound, including pitch, frequency, energy, and changes, and are used to fully characterize the audio data. The eigenvalues include Mel cepstral coefficients, short-time zero-crossing rate, and short-time energy spectrum. Calculate the probability distribution of the eigenvalues, obtain the probability distribution of positive samples of normal operation, and establish a positive sample library.
[0009] If there is a reverse sample, the reverse sample library is established in the same way; if there is no reverse sample, the reverse sample library is empty;
[0010] S20. Calculate the joint probability density score of the forward sample library and the reverse sample library;
[0011] Collect audio data of the device in real time and extract characteristic values including Mel cepstral coefficients, short-time zero-crossing rate and short-time energy spectrum;
[0012] According to the eigenvalue, the real-time audio data of the device is calculated according to the probability distribution in the positive sample library of S10 to calculate the joint probability density score of the positive sample library. p Similarly, according to the eigenvalue, the real-time audio data of the device is calculated according to the probability in the reverse sample library of S10 to calculate the joint probability density score of the reverse sample library q ;
[0013] S30. Determine the audio status decision threshold;
[0014] According to the joint probability density score of the positive sample library calculated in S20 p and the joint probability density score of the reverse sample library q , set the audio status judgment threshold to determine whether the real-time audio data of the device is in normal operation;
[0015] When setting the audio state judgment threshold, first calculate the joint probability density score of all feature values in the forward sample library p , the joint probability density scores p Sort from small to large; then take the joint probability density score of all eigenvalues based on existing expert experience p The minimum value in , or the joint probability density score of a part of the eigenvalues p The minimum value in is used as the decision threshold; then the audio state decision threshold is continuously iterated through the real-time audio data of the device, and finally the audio state decision threshold is determined;
[0016] S40. Iterate the forward sample library and the reverse sample library of the device operation status;
[0017] If S30 determines that the real-time audio data of the device is normal, it automatically updates the positive sample library of S10 and recalculates the joint probability density score of the positive sample library. p If S30 determines that the real-time audio data of the device is abnormal, the real-time audio data of the current device is automatically updated to the reverse sample library, and the joint probability density score of the reverse sample library is recalculated. q .
[0018] Furthermore, the method for calculating the probability distribution of positive samples in the positive sample library and the reverse sample library of the device operation status in S10 includes the following process:
[0019] Assuming that the positive sample is a mixture of K normal distributions, each normal distribution k has corresponding parameters: mean ,variance and weight , weight satisfy ,and , then the probability density function of the forward sample is It is expressed as:
[0020] ;
[0021] in, is the density function of each normal distribution k, Represents data points The probability of coming from the kth normal distribution, Represents the i-th sample data;
[0022] First, at the initial stage, the mean of each normal distribution k is given ,variance and weight Assign initial value;
[0023] Second, calculate each data point The posterior probability of belonging to each normal distribution k ,in Represents data points The latent variable belongs to the kth normal distribution; the posterior probability The calculation formula is as follows:
[0024] ;
[0025] in, is the density function of the kth normal distribution;
[0026] Again, based on the posterior probability , update the mean of the kth normal distribution ,variance and weight , the update formula is as follows:
[0027] ;
[0028] Where N is the number of data points, is the calculated posterior probability;
[0029] Then order:
[0030] ;
[0031] Then, the posterior probability is repeatedly calculated , and update the mean of the kth normal distribution ,variance and weight , until convergence or reaching the preset number of iterations;
[0032] Finally, get the mean of each normal distribution k ,variance and weight ;
[0033] The probability distribution of the reverse sample is calculated in the same way as the probability distribution of the forward sample.
[0034] Furthermore, the method for calculating the joint probability density score of the positive sample library in the step of calculating the joint probability density score of the positive sample library and the reverse sample library in S20 includes the following process:
[0035] According to the eigenvalue, the audio data of the real-time acquisition device is calculated according to the probability in the S10 forward sample library to calculate the joint probability density score. p :
[0036] ;
[0037] in, p ( x ) is the data point The probability distribution of the positive sample is calculated using the same formula as S10;
[0038] The probability density function of each normal distribution k :
[0039] ;
[0040] Substitution p ( x ), get the data point x The joint probability density score of p :
[0041] ;
[0042] Joint probability density score p For evaluating data points x The degree of fit in the positive sample distribution, the joint probability density score p The higher the data point x The larger the probability density in the positive sample distribution, the more likely the data point x The higher the probability of appearing in the positive sample library, the higher the probability that the audio data currently running in the real-time acquisition device is in a normal state;
[0043] Joint probability density score of the reverse sample library of audio data running on real-time acquisition device q , the joint probability density score of the positive sample library with the audio data of the real-time acquisition device running p The calculation method is the same.
[0044] The method for judging device abnormality by extracting audio features online based on positive samples of the present invention divides the device operation status features into a positive sample library and a reverse sample library, and the reverse sample library may have no data during initial operation; the forward sample library is established by using the audio data generated by the device under normal operation; the audio features are analyzed by the real-time audio data extracted subsequently, and the similarity between the audio features and the positive samples of the forward sample library is calculated to judge whether the real-time audio data is an abnormal signal; after the abnormal signal is detected, the abnormal signal is automatically added to the reverse sample library; when there are enough abnormal signals in the reverse sample library, the reverse sample library can be established, and after the statistical data is formed, the real-time audio data is first compared with the positive samples of the forward sample library, and then the real-time audio data is compared with the reverse samples of the reverse sample library, and a comprehensive analysis is performed to confirm whether the current real-time audio is abnormal.
[0045] The method for online extraction of audio features based on positive samples to judge device abnormality of the present invention starts from the positive sample library, determines the audio state judgment threshold by calculating the joint probability density score of the positive sample library, and establishes a reverse sample library. The method is simple, reliable and has practical engineering value. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of the method for extracting audio features online based on positive samples to determine device abnormality of the present invention;
[0047] Figure 2 The probability density diagram of the short-time zero-crossing rate of the positive sample library obtained in the embodiment;
[0048] Figure 3 The probability density diagram of the first coefficient of the Mel-frequency cepstral coefficient of the forward sample library obtained in the embodiment. DETAILED DESCRIPTION
[0049] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0050] Example: Figure 1 As shown, the method for judging device abnormality based on positive samples and online extraction of audio features in this embodiment includes the following steps:
[0051] S10. Establish a forward sample library and a reverse sample library of the equipment operation status;
[0052] Collect audio data when the device is working normally, extract eigenvalues after framing and windowing the audio data. The eigenvalues reflect information about the sound, including pitch, frequency, energy, and changes, and are used to fully characterize the audio data. The eigenvalues include Mel cepstral coefficients, short-time zero-crossing rate, and short-time energy spectrum. Calculate the probability distribution of the eigenvalues, obtain the probability distribution of positive samples of normal operation, and establish a positive sample library.
[0053] If there is a reverse sample, the reverse sample library is established in the same way; if there is no reverse sample, the reverse sample library is empty;
[0054] S20. Calculate the joint probability density score of the forward sample library and the reverse sample library;
[0055] Collect audio data of the device in real time and extract characteristic values including Mel cepstral coefficients, short-time zero-crossing rate and short-time energy spectrum;
[0056] According to the eigenvalue, the real-time audio data of the device is calculated according to the probability distribution in the positive sample library of S10 to calculate the joint probability density score of the positive sample library. p Similarly, according to the eigenvalue, the real-time audio data of the device is calculated according to the probability in the reverse sample library of S10 to calculate the joint probability density score of the reverse sample library q ;
[0057] S30. Determine the audio status decision threshold;
[0058] According to the joint probability density score of the positive sample library calculated in S20 p and the joint probability density score of the reverse sample library q , set the audio status judgment threshold to determine whether the real-time audio data of the device is in normal operation;
[0059] When setting the audio state judgment threshold, first calculate the joint probability density score of all feature values in the forward sample library p , the joint probability density scores p Sort from small to large; then take the joint probability density score of all eigenvalues based on existing expert experience p The minimum value in , or the joint probability density score of a part of the eigenvalues p The minimum value in is used as the decision threshold; then the audio state decision threshold is continuously iterated through the real-time audio data of the device, and finally the audio state decision threshold is determined;
[0060] S40. Iterate the forward sample library and the reverse sample library of the device operation status;
[0061] If S30 determines that the real-time audio data of the device is normal, it automatically updates the positive sample library of S10 and recalculates the joint probability density score of the positive sample library. p If S30 determines that the real-time audio data of the device is abnormal, the real-time audio data of the current device is automatically updated to the reverse sample library, and the joint probability density score of the reverse sample library is recalculated. q .
[0062] Furthermore, the method for calculating the probability distribution of positive samples in the positive sample library and the reverse sample library of the device operation status in S10 includes the following process:
[0063] Assuming that the positive sample is a mixture of K normal distributions, each normal distribution k has corresponding parameters: mean ,variance and weight , weight satisfy ,and , then the probability density function of the positive sample is expressed as:
[0064] ;
[0065] in, is the density function of each normal distribution k, Represents data points The probability of coming from the kth normal distribution, Represents the i-th sample data;
[0066] First, at the initial stage, the mean of each normal distribution k is given ,variance and weight Assign initial value;
[0067] Second, calculate each data point The posterior probability of belonging to each normal distribution k ,in Represents data points The latent variable belongs to the kth normal distribution; the posterior probability The calculation formula is as follows:
[0068] ;
[0069] in, is the density function of the kth normal distribution;
[0070] Again, based on the posterior probability , update the mean of the kth normal distribution ,variance and weight , the update formula is as follows:
[0071] ;
[0072] Where N is the number of data points, is the calculated posterior probability;
[0073] Then order:
[0074] ;
[0075] Then, the posterior probability is repeatedly calculated , and update the mean of the kth normal distribution ,variance and weight , until convergence or reaching the preset number of iterations;
[0076] Finally, get the mean of each normal distribution k ,variance and weight ;
[0077] The probability distribution of the reverse sample is calculated in the same way as the probability distribution of the forward sample.
[0078] Figure 2 The probability density diagram of the short-time zero-crossing rate of the positive sample library obtained in this embodiment is given, wherein the histogram is the distribution histogram of the short-time zero-crossing rate of the positive sample library, and the curve is the probability distribution diagram of the short-time zero-crossing rate of the positive sample library obtained by the above algorithm. It can be seen that the parameters obtained by the above algorithm accurately reflect the distribution of the short-time zero-crossing rate of the sample library; Figure 3 The probability density diagram of the first coefficient of the Mel-cepstral coefficients of the positive sample library obtained in this embodiment is given, wherein the histogram is the distribution histogram of the first parameter in the Mel-cepstral coefficients of the positive sample library, and the curve is the probability density diagram of the first parameter of the Mel-cepstral coefficients of the positive sample library obtained by the above algorithm. It can be seen that the parameters obtained by the above algorithm accurately reflect the distribution of the first parameter of the Mel-cepstral coefficients of the positive sample library.
[0079] Furthermore, the method for calculating the joint probability density score of the positive sample library in the step of calculating the joint probability density score of the positive sample library and the reverse sample library in S20 includes the following process:
[0080] According to the eigenvalue, the audio data of the real-time acquisition device is calculated according to the probability in the S10 forward sample library to calculate the joint probability density score. p :
[0081] ;
[0082] in, p ( x ) is the data point The probability distribution of the positive sample is calculated using the same formula as S10;
[0083] The probability density function of each normal distribution k :
[0084] ;
[0085] Substitution p ( x ), get the data point x The joint probability density score of p :
[0086] ;
[0087] Joint probability density score p For evaluating data points x The degree of fit in the positive sample distribution, the joint probability density score p The higher the data point x The larger the probability density in the positive sample distribution, the more likely the data point x The higher the probability of appearing in the positive sample library, the higher the probability that the audio data currently running in the real-time acquisition device is in a normal state;
[0088] Joint probability density score of the reverse sample library of audio data running on real-time acquisition device q , the joint probability density score of the positive sample library with the audio data of the real-time acquisition device running p The calculation method is the same.
[0089] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. For those familiar with the art, all features disclosed in the present invention, or steps in all methods or processes disclosed, except for mutually exclusive features and / or steps, can be combined in any way without departing from the principles of the present invention. The present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for judging device abnormality based on positive samples and online extraction of audio features, characterized in that: The following steps are involved: S10. Establish a forward sample library and a reverse sample library of the equipment operation status; Collect audio data when the device is working normally, extract eigenvalues after framing and windowing the audio data. The eigenvalues reflect information about the sound, including pitch, frequency, energy, and changes, and are used to fully characterize the audio data. The eigenvalues include Mel cepstral coefficients, short-time zero-crossing rate, and short-time energy spectrum. Calculate the probability distribution of the eigenvalues, obtain the probability distribution of positive samples of normal operation, and establish a positive sample library. If there are reverse samples, the reverse sample library is established in the same way; If there is no reverse sample, the reverse sample library is empty; S20. Calculate the joint probability density score of the forward sample library and the reverse sample library; Collect audio data of the device in real time and extract characteristic values including Mel cepstral coefficients, short-time zero-crossing rate and short-time energy spectrum; According to the eigenvalue, the real-time audio data of the device is calculated according to the probability distribution in the positive sample library of S10 to calculate the joint probability density score of the positive sample library. p Similarly, according to the eigenvalue, the real-time audio data of the device is calculated according to the probability distribution in the reverse sample library of S10 to calculate the joint probability density score of the reverse sample library q ; S30. Determine the audio status decision threshold; According to the joint probability density score of the positive sample library calculated in S20 p and the joint probability density score of the reverse sample library q , set the audio status judgment threshold to determine whether the real-time audio data of the device is in normal operation; When setting the audio state judgment threshold, first calculate the joint probability density score of all feature values in the forward sample library p , the joint probability density scores p Sort from small to large; then take the joint probability density score of all eigenvalues based on existing expert experience p The minimum value in , or the joint probability density score of a part of the eigenvalues p The minimum value among is taken as the decision threshold; Then, the audio status judgment threshold is continuously iterated through the real-time audio data of the device, and finally the audio status judgment threshold is determined; S40. Iterate the forward sample library and the reverse sample library of the device operation status; If S30 determines that the real-time audio data of the device is normal, it automatically updates the positive sample library of S10 and recalculates the joint probability density score of the positive sample library. p If S30 determines that the real-time audio data of the device is abnormal, the real-time audio data of the current device is automatically updated to the reverse sample library, and the joint probability density score of the reverse sample library is recalculated. q .
2. The method for judging device abnormality based on positive samples and online extraction of audio features according to claim 1 is characterized in that: The method for calculating the probability distribution of the positive samples in the positive sample library and the reverse sample library of the device operation status in S10 includes the following process: Assuming that the positive sample is a mixture of K normal distributions, each normal distribution k has corresponding parameters: mean ,variance and weight , weight satisfy ,and , then the probability density function of the forward sample is It is expressed as: ; in, is the density function of each normal distribution k; First, at the initial stage, the mean of each normal distribution k is given ,variance and weight Assign initial value; Second, calculate each data point The posterior probability of belonging to each normal distribution k ,in Represents data points The latent variable belongs to the kth normal distribution; the posterior probability The calculation formula is as follows: ; in, is the density function of the kth normal distribution, Represents the i-th sample data; Again, based on the posterior probability , update the mean of the kth normal distribution ,variance and weight , the update formula is as follows: ; Where N is the number of data points, is the calculated posterior probability; Then order: ; Then, the posterior probability is repeatedly calculated , and update the mean of the kth normal distribution ,variance and weight , until convergence or reaching the preset number of iterations; Finally, get the mean of each normal distribution k ,variance and weight ; The probability distribution of the reverse sample is calculated in the same way as the probability distribution of the forward sample.
3. The method for judging device abnormality based on positive samples and online extraction of audio features according to claim 2 is characterized in that: The method for calculating the joint probability density score of the positive sample library in the calculation of the joint probability density score of the positive sample library and the reverse sample library in S20 includes the following process: According to the eigenvalue, the audio data of the real-time acquisition device is calculated according to the probability in the S10 forward sample library to calculate the joint probability density score. p : ; in, p ( x ) is the data point x The probability distribution of the positive sample is calculated using the same formula as S10; The probability density function of each normal distribution k : ; Substitution p ( x ), get the data point x The joint probability density score of p : ; Joint probability density score p For evaluating data points x The degree of fit in the positive sample distribution, the joint probability density score p The higher the data point x The larger the probability density in the positive sample distribution, the more likely the data point x The higher the probability of appearing in the positive sample library, the higher the probability that the audio data currently running in the real-time acquisition device is in a normal state; Joint probability density score of the reverse sample library of audio data running on real-time acquisition device q , the joint probability density score of the positive sample library with the audio data of the real-time acquisition device running p The calculation method is the same.
Citation Information
Patent Citations
Digital lung sound characteristic dimension reducing method based on relevance vector machine
CN105913066A
Audio quality detection method and audio quality detection system
CN107170465A