Equipment fault detection method and device, electronic equipment and storage medium
Through the machine learning-based fault detection method, the equipment fault characteristics are extracted using audio signals, real-time monitoring and fault prediction of equipment status are achieved, and the shortcomings of manual inspection and complex equipment fault identification problems in traditional methods are solved, and the fault prediction accuracy is improved. Equipment reliability.
Patent Information
- Application Number
- CN202411298008.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-17
AI Technical Summary
Traditional equipment fault detection methods rely on regular manual inspections, which are time-consuming and labor-intensive, and are prone to misjudgment or delayed detection due to human factors. They cannot meet the requirements of modern industry for real-time monitoring and efficient maintenance of equipment, and are difficult to accurately capture many in complex equipment. The characteristics of the fault signal can not be monitored in real time, and it is easy to miss the precursor of the fault, resulting in long-term shutdown.
Using machine learning-based fault detection method, the audio signal of the device is collected and input into the pre-trained fault detection model, FBank features are extracted and target embedding vectors are generated, position encoding is added to retain time series information, and fault types are automatically identified and Send alarm messages. The model includes a multi-head self-attention mechanism, a feedforward neural network, and residual connections, trained using cross-entropy loss and Adam optimization algorithm.
Real-time monitoring of equipment status is realized, timely detection of fault precursors, improve fault prediction accuracy, reduce manual intervention, reduce equipment downtime, and avoid the installation of a large number of vibration sensors and data instability problems.
Smart Images

Figure CN119152885A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of industrial equipment fault detection, and in particular to an equipment fault detection method, device, electronic device and storage medium. Background Art
[0002] In modern industry and manufacturing, stable operation of equipment is essential to ensure production efficiency and safety. However, during operation, equipment is often affected by various factors, such as mechanical wear, electrical failure, environmental noise, etc. These problems may cause equipment performance degradation or even serious failure. Therefore, real-time monitoring of equipment status and timely detection of potential failures have become important tasks in industrial equipment management.
[0003] Traditional fault detection methods mainly rely on regular manual inspections and empirical judgments. This method is not only time-consuming and labor-intensive, but may also lead to misjudgments or delayed detection due to human factors, and cannot meet the requirements of modern industry for real-time monitoring and efficient maintenance of equipment. In addition, with the increasing complexity of equipment structures, traditional methods are often unable to identify various types of faults and it is difficult to accurately capture the characteristics of fault signals. Therefore, the existing technology has the problem of being unable to monitor the status of equipment in real time, easily missing fault precursors, difficult to prevent sudden faults, and prone to long-term downtime, and the need to install a large number of vibration sensors, which requires high investment, and vibration sensors are easily damaged, resulting in unstable data. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a method, device, electronic device and storage medium for detecting equipment faults, which can analyze equipment noise based on machine learning, automatically extract fault features, have high prediction accuracy, and monitor equipment status in real time to detect fault precursors in a timely manner.
[0005] The present disclosure provides a method for detecting a device failure, including:
[0006] Collect audio signals of devices in the area to be detected, and input the audio signals into a pre-trained fault detection model;
[0007] In the fault detection model, extracting FBank features corresponding to the audio signal, and embedding the FBank features into a high-dimensional space to generate a target embedding vector;
[0008] Adding a position code to the target embedding vector, wherein the position code is used to retain the time series information of the audio signal, and marking the target embedding vector to which the position code is added as a normal state or a fault state;
[0009] For the audio signal marked as the fault state, a fault type corresponding to the audio signal is determined, and warning information corresponding to the fault type is sent to the user.
[0010] In an optional implementation, the FBank feature is extracted based on the following steps:
[0011] Pre-emphasize the audio signal by first-order difference, and divide the pre-emphasized audio signal into short-time frames;
[0012] Windowing is performed on each of the short-time frames, and after windowing, a fast Fourier transform is performed to determine a corresponding frequency spectrum;
[0013] Determine a power spectrum corresponding to the frequency spectrum, process the power spectrum through a Mel filter bank, perform logarithmic transformation on the output of each Mel filter, and organize them into the FBank feature.
[0014] In an optional implementation, the fault detection model includes a multi-head self-attention mechanism, a feedforward neural network, residual connections and layer normalization, and a plurality of stacked encoder layers;
[0015] A plurality of stacked encoder layers form a deep model;
[0016] In each of the encoder layers, the features after the self-attention processing are nonlinearly transformed by the feedforward neural network;
[0017] In each of the encoder layers, the input features are added to the output after self-attention and the feedforward neural network through a residual connection, and layer normalization is performed.
[0018] In an optional implementation, the fault detection model is trained based on the following steps:
[0019] Collecting a training audio signal and configuring a corresponding data label for the training audio signal, wherein the data label includes a normal audio signal and an abnormal audio signal;
[0020] Dividing the training audio signal into a training set and a validation set, and inputting the training set and the corresponding data labels into the fault detection model;
[0021] Using cross entropy loss as the loss function of the classification task between the normal state and the fault state, using Adam optimization algorithm to train the fault detection model, and adjusting the model parameters of the fault detection model through back propagation;
[0022] After the fault detection model training is completed, the verification set is input into the fault detection model, and the prediction accuracy of the fault detection model is determined according to preset evaluation indicators, and the preset evaluation indicators at least include accuracy and loss value.
[0023] In an optional implementation, after using the Adam optimization algorithm to train the fault detection model and adjusting the model parameters of the fault detection model through back propagation, the method further includes:
[0024] According to the evaluation result of the fault detection model, adjusting the hyperparameters corresponding to the fault detection model;
[0025] The hyperparameters include at least model dimension, number of attention heads, number of encoder layers, feedforward network dimension, learning rate, and batch size.
[0026] The present disclosure also provides a device for detecting equipment failure, including:
[0027] An audio acquisition module is used to collect audio signals of devices in the area to be detected and input the audio signals into a pre-trained fault detection model;
[0028] A feature extraction module, used to extract FBank features corresponding to the audio signal in the fault detection model, and embed the FBank features into a high-dimensional space to generate a target embedding vector;
[0029] A fault prediction module, used for adding a position code to the target embedding vector, wherein the position code is used to retain the time series information of the audio signal, and marking the target embedding vector to which the position code is added as a normal state or a fault state;
[0030] The alarm module is used to determine the fault type corresponding to the audio signal marked as the fault state, and send alarm information corresponding to the fault type to the user.
[0031] In an optional implementation manner, the feature extraction module is specifically used to:
[0032] Pre-emphasize the audio signal by first-order difference, and divide the pre-emphasized audio signal into short-time frames;
[0033] Windowing is performed on each of the short-time frames, and after windowing, a fast Fourier transform is performed to determine a corresponding frequency spectrum;
[0034] Determine a power spectrum corresponding to the frequency spectrum, process the power spectrum through a Mel filter bank, perform logarithmic transformation on the output of each Mel filter, and organize them into the FBank feature.
[0035] In an optional implementation, the device further includes a model training module, and the model training module is specifically used to:
[0036] Collecting a training audio signal and configuring a corresponding data label for the training audio signal, wherein the data label includes a normal audio signal and an abnormal audio signal;
[0037] Dividing the training audio signal into a training set and a validation set, and inputting the training set and the corresponding data labels into the fault detection model;
[0038] Using cross entropy loss as the loss function of the classification task between the normal state and the fault state, using Adam optimization algorithm to train the fault detection model, and adjusting the model parameters of the fault detection model through back propagation;
[0039] After the fault detection model training is completed, the verification set is input into the fault detection model, and the prediction accuracy of the fault detection model is determined according to preset evaluation indicators, and the preset evaluation indicators at least include accuracy and loss value.
[0040] An embodiment of the present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned device fault detection method or steps in any possible implementation of the above-mentioned device fault detection method are performed.
[0041] The embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for detecting device faults or steps in any possible implementation of the method for detecting device faults is executed.
[0042] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned device fault detection method, or the steps in any possible implementation of the above-mentioned device fault detection method.
[0043] The disclosed embodiments provide a method, device, electronic device and storage medium for detecting equipment faults, which collects audio signals of equipment in the area to be detected and inputs the audio signals into a pre-trained fault detection model; in the fault detection model, extracts the FBank features corresponding to the audio signals, and embeds the FBank features into a high-dimensional space to generate a target embedding vector; adds a position code to the target embedding vector, the position code is used to retain the time series information of the audio signal, and marks the target embedding vector with the position code added as a normal state or a fault state; for the audio signal marked as the fault state, determines the fault type corresponding to the audio signal, and sends an alarm message corresponding to the fault type to the user. Based on machine learning, equipment noise can be analyzed, fault features can be automatically extracted, prediction accuracy is high, and equipment status can be monitored in real time to detect precursors of faults in a timely manner.
[0044] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0046] Figure 1 A flow chart of a device fault detection method provided by an embodiment of the present disclosure is shown;
[0047] Figure 2 A flow chart of a fault detection model training method provided by an embodiment of the present disclosure is shown;
[0048] Figure 3 A schematic diagram of a device fault detection apparatus provided by an embodiment of the present disclosure is shown;
[0049] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0051] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0052] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0053] Research has found that traditional fault detection methods mainly rely on regular manual inspections and empirical judgments. This method is not only time-consuming and labor-intensive, but may also lead to misjudgments or delayed detection due to human factors, and cannot meet the requirements of modern industry for real-time monitoring and efficient maintenance of equipment. In addition, with the increasing complexity of equipment structures, traditional methods are often unable to identify various types of faults and it is difficult to accurately capture the characteristics of fault signals. Therefore, the existing technology has the problem of being unable to monitor the status of equipment in real time, easily missing fault precursors, difficult to prevent sudden faults, and prone to long-term downtime, and the need to install a large number of vibration sensors, which requires high investment, and vibration sensors are easily damaged, resulting in unstable data.
[0054] Based on the above research, the present disclosure provides a method, device, electronic device and storage medium for detecting equipment faults, which collects audio signals of equipment in the area to be detected and inputs the audio signals into a pre-trained fault detection model; in the fault detection model, extracts the FBank features corresponding to the audio signals, and embeds the FBank features into a high-dimensional space to generate a target embedding vector; adds a position code to the target embedding vector, the position code is used to retain the time series information of the audio signal, and marks the target embedding vector with the position code added as a normal state or a fault state; for the audio signal marked as the fault state, determines the fault type corresponding to the audio signal, and sends the user an alarm message corresponding to the fault type. Based on machine learning, equipment noise can be analyzed, fault features can be automatically extracted, prediction accuracy is high, and equipment status can be monitored in real time to detect precursors of faults in a timely manner.
[0055] To facilitate understanding of this embodiment, a device fault detection method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the device fault detection method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the device fault detection method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0056] See also Figure 1 FIG. 1 is a flow chart of a device fault detection method provided by an embodiment of the present disclosure, the method comprising steps S101 to S104, wherein:
[0057] S101 , collecting audio signals of devices in a to-be-detected area, and inputting the audio signals into a pre-trained fault detection model.
[0058] In specific implementation, select a suitable location to install the microphone sensor based on the application scenario and the distribution of noise sources. The sensor can be installed near the equipment that may fail, above the key components of the equipment, or in a specific area around the equipment. The collection location should ensure that the noise signal related to the failure can be accurately captured.
[0059] Here, in scenarios where noise signals are concentrated and fault characteristics are obvious, a single microphone can be used for collection, which is suitable for simple scenarios; in complex scenarios, noise signals may come from multiple directions or multiple equipment parts. Multiple microphone sensors can be deployed to cover all possible noise sources to capture richer signal information and improve the accuracy of fault identification.
[0060] Among them, the sound signal collected by the microphone is usually an analog signal, which needs to be converted into a digital signal through an analog-to-digital converter (ADC).
[0061] It should be noted that the sampling rate determines the digitization accuracy of the audio signal. In the embodiment of the present application, the sampling rate can be set to 16kHz, that is, 16,000 data points are collected per second, which can capture sound signals with a frequency range of 0 to 8kHz. The sampling rate of 16kHz is sufficient to capture the noise signals generated by most devices, including high-frequency mechanical noise.
[0062] As a possible implementation, the collected digital signal is stored in a local or cloud storage device through a data acquisition device (such as a data acquisition card or an embedded processor). The data is usually saved in a standard audio format (such as WAV format). WAV format is a lossless format that retains all the details of the original audio and is suitable for model training.
[0063] Furthermore, the collected audio signal is input into a pre-trained fault detection model, which includes a multi-head self-attention mechanism, a feedforward neural network, residual connections and layer normalization, and multiple stacked encoder layers; the multiple stacked encoder layers form a deep model; in each encoder layer, the features after self-attention processing are nonlinearly transformed through the feedforward neural network; in each encoder layer, the input features are added to the output after self-attention and the feedforward neural network through a residual connection, and layer normalization is performed.
[0064] Here, the multi-head self-attention mechanism allows the model to pay attention to each position in the input sequence in different representation subspaces, thereby capturing the complex relationship between the positions in the sequence. The outputs of multiple self-attention heads will be spliced and the final attention output will be obtained through linear transformation. Each encoder layer also includes a two-layer feedforward neural network (FFN) for further nonlinear transformation of the features after self-attention processing. In each encoder layer, the input is added to the output after self-attention and feedforward networks through a residual connection, followed by layer normalization to ensure numerical stability and accelerate convergence. Multiple encoder layers are usually stacked together to form a deep model, which enables the model to extract more complex features layer by layer.
[0065] In the specific implementation, the training method of the fault detection model can be found in Figure 2 FIG. 2 is a flowchart of a fault detection model training method provided by an embodiment of the present disclosure, wherein the method includes steps S201 to S204, wherein:
[0066] S201: Collect training audio signals, and configure corresponding data labels for the training audio signals, where the data labels include normal audio signals and abnormal audio signals.
[0067] S202: Divide the training audio signal into a training set and a validation set, and input the training set and the corresponding data labels into the fault detection model.
[0068] S203, using cross entropy loss as the loss function of the classification task of the normal state and the fault state, using Adam optimization algorithm to train the fault detection model, and adjusting the model parameters of the fault detection model through back propagation.
[0069] S204. After the fault detection model is trained, the verification set is input into the fault detection model, and the prediction accuracy of the fault detection model is determined according to preset evaluation indicators, where the preset evaluation indicators at least include accuracy rate and loss value.
[0070] In the specific implementation, in order to conduct effective model training, the collected audio data needs to be classified into normal and abnormal situations. This can be achieved through manual annotation or automatic annotation based on historical records. The labels are usually saved in the file naming method, such as "Normal.WAV" and "Abnormal.WAV", and the collected data is randomly divided into training set and verification set. Preferably, 80% of the data is used for training and 20% of the data is used for verification. This division ensures that the model can learn various normal and abnormal situations during the training process, and the generalization ability of the model can be tested during the verification process.
[0071] Here, before the audio signal is input into the fault detection model, it is necessary to first perform data normalization processing to eliminate the magnitude differences of different input data and make the numerical range of the features relatively consistent, thereby avoiding numerical instability during model training and improving training efficiency and model convergence speed.
[0072] Among them, during the training process, cross-entropy loss is selected as the loss function of the classification task to measure the difference between the model prediction results and the true labels. The Adam optimization algorithm is used to train the model, and the model parameters are adjusted through backpropagation.
[0073] Furthermore, the processed training data is input into the model for multiple rounds of iterative training. The model optimizes parameters by minimizing the loss function and gradually improves the ability to identify fault features in noise signals.
[0074] Afterwards, the validation set data is used to evaluate the model performance. The evaluation indicators include accuracy, loss, etc. These indicators are used to judge the generalization ability and prediction accuracy of the model.
[0075] As a possible implementation, according to the evaluation result of the fault detection model, the hyperparameters corresponding to the fault detection model are adjusted; the hyperparameters include at least model dimension, number of attention heads, number of encoder layers, feedforward network dimension, learning rate and batch size.
[0076] Here, model dimension defines the dimension of each input feature vector, and the initial value can be 128, 256, 512 or 1024; the number of attention heads is the number of heads of the multi-head attention mechanism, usually 8 or 16; the number of encoder layers is the number of layers of the Transformer encoder, and 6 or 12 layers are commonly selected; the feedforward network dimension is the hidden layer dimension of the feedforward neural network, and the initial value can be 2048 or 4096; the learning rate is the learning rate of the optimization algorithm, and the initial value can be 0.001; the batch size is the number of samples in each training iteration, and the initial value can be 32 or 64.
[0077] S102. In the fault detection model, extract the FBank features corresponding to the audio signal, and embed the FBank features into a high-dimensional space to generate a target embedding vector.
[0078] In a specific implementation, the audio signal is pre-emphasized through a first-order difference, and the pre-emphasized audio signal is divided into short-time frames; each of the short-time frames is windowed, and a fast Fourier transform is performed after windowing to determine the corresponding frequency spectrum; the power spectrum corresponding to the frequency spectrum is determined, the power spectrum is processed through a Mel filter bank, the output of each Mel filter is logarithmically transformed, and organized into the FBank feature.
[0079] Specifically, pre-emphasis is used to enhance high-frequency components and compensate for possible high-frequency attenuation during voice signal transmission, which helps to improve the overall spectral characteristics of the signal and makes subsequent feature extraction more sensitive to high-frequency information, especially for the detection of fault signals such as mechanical noise.
[0080] Here, the pre-emphasis process can use a first-order differential high-pass filter. Through this filtering process, the high-frequency component is enhanced and the influence of the low-frequency part is weakened, thereby optimizing the spectrum distribution of the signal. The specific formula is as follows:
[0081] y(t)=x(t)-αx(t-1)
[0082] Wherein, x(t) represents the collected original audio signal; y(t) represents the pre-emphasized signal; α represents the pre-emphasis coefficient, which can be preferably set to 0.97.
[0083] Furthermore, the continuous audio signal is divided into multiple short-time frames, and the time length contained in each frame is limited, so that the signal can be approximated as a stationary signal within each frame. Audio signals are usually non-stationary, but can be regarded as stationary in a short time, so that Fourier transform can be performed on each frame to extract spectral information.
[0084] Here, the pre-emphasized signal is divided according to the set frame length, usually 20-40 milliseconds, and the frame shift is 10-20 milliseconds. After framing, the signal of each frame is windowed to reduce the spectrum leakage problem caused by truncation. The purpose of windowing is to smoothly reduce the signal amplitude at the beginning and end of the frame while ensuring that the main signal is not distorted, thereby reducing the edge effect when calculating the Fourier transform.
[0085] Among them, the window function used in the windowing process can be a Hamming window. After the windowing process, the edge of the signal is smoothed, reducing the interference between spectral lines in the frequency domain analysis. It is defined as:
[0086]
[0087] Where w(n) represents the windowing function; N represents the window length; n represents the time point number in the frame, and the value range is n=0,1,…,N-1. The audio signal after windowing is: w (n) = x(n)·w(n).
[0088] Furthermore, the windowed time domain signal is converted to the frequency domain to obtain the spectrum information of each frame. w (n) Perform fast Fourier transform and calculate its spectrum. The formula is as follows:
[0089]
[0090] Among them, X(k) represents the spectrum; k represents the frequency index; X(k) represents the complex value of the kth frequency component in the spectrum.
[0091] Here, the power spectrum is the energy distribution of the signal, which characterizes the energy of the signal at each frequency component. By calculating the power spectrum, the Mel filter bank coefficients that reflect the signal characteristics can be further extracted. The calculation formula of the power spectrum P(k) is:
[0092]
[0093] Furthermore, the power spectrum is processed by a group of Mel filters. These filters can be triangular filters, which are evenly distributed on the Mel scale. The Mel filter group maps the power spectrum to the Mel frequency scale. The relationship between the Mel scale m and the frequency f is:
[0094]
[0095] f=700(10 m / 2595 -1)
[0096] Here, the output is calculated for each filter:
[0097]
[0098] Among them, S m represents the output of the mth filter; H m (k) represents the frequency response of the mth Mel filter.
[0099] Furthermore, each filter bank output is logarithmically transformed: F m =log(S m ), F m is the filter bank output after logarithmic transformation, and all filter outputs are combined into FBank feature vector: F = [F1, F2, F3, ..., FM ]. The FBank feature vector will be passed as input data to the fault detection model for further processing.
[0100] Furthermore, the FBank feature input sequence is embedded into a high-dimensional vector space using a linear transformation: t =W·Ft t +b, W represents the weight matrix, b represents the bias vector, E t Represents the embedded high-dimensional vector, which represents the audio features at time t.
[0101] S103: Add a position code to the target embedding vector, where the position code is used to retain time series information of the audio signal, and mark the target embedding vector to which the position code is added as a normal state or a fault state.
[0102] In the specific implementation, since the Transformer model does not have the ability to process sequential data, it is necessary to introduce time series information through positional encoding to ensure that the model can identify the relative positions of elements in the sequence.
[0103] Here, the position encoding is added to the embedding vector, and the formula is as follows:
[0104]
[0105] Among them, PE (pos,2i) Represents the position code at time 2i; PE (pos,2i+1) Represents the position encoding at time 2i+1; pos represents the position; i represents the dimension index; d represents the embedding dimension. The position encoding is added to the input embedding vector to preserve the time series information.
[0106] Furthermore, the model analyzes the real-time input noise signal based on the patterns learned during training. If a characteristic pattern corresponding to the abnormal label in the training data is detected, the system will mark the current state as a fault state.
[0107] S104: for the audio signal marked as the fault state, determine the fault type corresponding to the audio signal, and send warning information corresponding to the fault type to the user.
[0108] In specific implementation, the model can also classify the type of fault based on the identified features. For example, the model can distinguish different types of abnormal conditions such as mechanical failure, electrical failure, and environmental noise. When the system detects a current or possible future failure, it will alert the user through the early warning system. These early warning messages include the type of failure, severity, and possible causes. For serious failures, the system will trigger an alarm mechanism and issue an immediate alert to the user. These alarm messages will not only be displayed on the system interface, but can also be sent to relevant personnel through text messages, emails, etc.
[0109] As a possible implementation method, the system will record all warning and alarm information, including the time of occurrence, the type of fault detected, the predicted fault development trend, etc. This information will be saved as a log file for future analysis and auditing.
[0110] The disclosed embodiment provides a method for detecting equipment faults, which collects audio signals of equipment in a detection area and inputs the audio signals into a pre-trained fault detection model; in the fault detection model, extracts the FBank features corresponding to the audio signals, and embeds the FBank features into a high-dimensional space to generate a target embedding vector; adds a position code to the target embedding vector, the position code is used to retain the time series information of the audio signal, and marks the target embedding vector with the position code added as a normal state or a fault state; for the audio signal marked as the fault state, determines the fault type corresponding to the audio signal, and sends an alarm message corresponding to the fault type to the user. Based on machine learning, equipment noise can be analyzed, fault features can be automatically extracted, prediction accuracy is high, and equipment status can be monitored in real time to detect precursors of faults in a timely manner.
[0111] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0112] Based on the same inventive concept, an equipment fault detection device corresponding to the equipment fault detection method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned equipment fault detection method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0113] See also Figure 3 , Figure 3 Schematic diagram of a device fault detection device provided by an embodiment of the present disclosure. Figure 3 As shown in , the device fault detection device 300 provided in the embodiment of the present disclosure includes:
[0114] The audio collection module 310 is used to collect audio signals of devices in the area to be detected, and input the audio signals into a pre-trained fault detection model.
[0115] The feature extraction module 320 is used to extract the FBank features corresponding to the audio signal in the fault detection model, and embed the FBank features into a high-dimensional space to generate a target embedding vector.
[0116] The fault prediction module 330 is used to add a position code to the target embedding vector, where the position code is used to retain the time series information of the audio signal, and mark the target embedding vector to which the position code is added as a normal state or a fault state.
[0117] The alarm module 340 is used to determine the fault type corresponding to the audio signal marked as the fault state, and send alarm information corresponding to the fault type to the user.
[0118] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0119] The disclosed embodiment provides a device for detecting equipment faults, which collects audio signals of equipment in a detection area and inputs the audio signals into a pre-trained fault detection model; in the fault detection model, extracts the FBank features corresponding to the audio signals, and embeds the FBank features into a high-dimensional space to generate a target embedding vector; adds a position code to the target embedding vector, the position code is used to retain the time series information of the audio signal, and marks the target embedding vector with the position code added as a normal state or a fault state; for the audio signal marked as the fault state, determines the fault type corresponding to the audio signal, and sends an alarm message corresponding to the fault type to the user. Based on machine learning, equipment noise can be analyzed, fault features can be automatically extracted, prediction accuracy is high, and equipment status can be monitored in real time to detect precursors of faults in a timely manner.
[0120] Corresponds to Figure 1 The device fault detection method in the present disclosure also provides an electronic device 400, such as Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present disclosure, including:
[0121] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including memory 421 and external memory 422; memory 421 here is also called internal memory, which is used to temporarily store operation data in processor 41 and data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through memory 421. When the electronic device 400 is running, the processor 41 communicates with the memory 42 through bus 43, so that the processor 41 executes Figure 1 Steps of the device fault detection method in.
[0122] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the device fault detection method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0123] The present disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, the steps of the device fault detection method described in the above method embodiment can be executed. For details, please refer to the above method embodiment, which will not be repeated here.
[0124] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0125] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0128] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0129] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A device fault detection method, characterized in that: include: Collect audio signals of devices in the area to be detected, and input the audio signals into a pre-trained fault detection model; In the fault detection model, extracting FBank features corresponding to the audio signal, and embedding the FBank features into a high-dimensional space to generate a target embedding vector; Adding a position code to the target embedding vector, wherein the position code is used to retain the time series information of the audio signal, and marking the target embedding vector to which the position code is added as a normal state or a fault state; For the audio signal marked as the fault state, a fault type corresponding to the audio signal is determined, and warning information corresponding to the fault type is sent to the user.
2. The method according to claim 1, characterized in that The FBank features are extracted based on the following steps: Pre-emphasize the audio signal by first-order difference, and divide the pre-emphasized audio signal into short-time frames; Windowing is performed on each of the short-time frames, and after windowing, a fast Fourier transform is performed to determine a corresponding frequency spectrum; Determine a power spectrum corresponding to the frequency spectrum, process the power spectrum through a Mel filter bank, perform logarithmic transformation on the output of each Mel filter, and organize them into the FBank feature.
3. The method according to claim 1, characterized in that: The fault detection model includes a multi-head self-attention mechanism, a feedforward neural network, residual connections and layer normalization, and multiple stacked encoder layers; A plurality of stacked encoder layers form a deep model; In each of the encoder layers, the features after the self-attention processing are nonlinearly transformed by the feedforward neural network; In each of the encoder layers, the input features are added to the output after self-attention and the feedforward neural network through a residual connection, and layer normalization is performed.
4. The method according to claim 1, characterized in that: The fault detection model is trained based on the following steps: Collecting a training audio signal and configuring a corresponding data label for the training audio signal, wherein the data label includes a normal audio signal and an abnormal audio signal; Dividing the training audio signal into a training set and a validation set, and inputting the training set and the corresponding data labels into the fault detection model; Using cross entropy loss as the loss function of the classification task between the normal state and the fault state, using Adam optimization algorithm to train the fault detection model, and adjusting the model parameters of the fault detection model through back propagation; After the fault detection model training is completed, the verification set is input into the fault detection model, and the prediction accuracy of the fault detection model is determined according to preset evaluation indicators, and the preset evaluation indicators at least include accuracy and loss value.
5. The method according to claim 4, characterized in that After training the fault detection model using the Adam optimization algorithm and adjusting the model parameters of the fault detection model by back propagation, the method further includes: According to the evaluation result of the fault detection model, adjusting the hyperparameters corresponding to the fault detection model; The hyperparameters include at least model dimension, number of attention heads, number of encoder layers, feedforward network dimension, learning rate, and batch size.
6. A device for detecting equipment failure, characterized in that: include: An audio acquisition module is used to collect audio signals of devices in the area to be detected and input the audio signals into a pre-trained fault detection model; A feature extraction module, used to extract FBank features corresponding to the audio signal in the fault detection model, and embed the FBank features into a high-dimensional space to generate a target embedding vector; A fault prediction module, used for adding a position code to the target embedding vector, wherein the position code is used to retain the time series information of the audio signal, and marking the target embedding vector to which the position code is added as a normal state or a fault state; The alarm module is used to determine the fault type corresponding to the audio signal marked as the fault state, and send alarm information corresponding to the fault type to the user.
7. The device according to claim 6, characterized in that The feature extraction module is specifically used for: Pre-emphasize the audio signal by first-order difference, and divide the pre-emphasized audio signal into short-time frames; Windowing is performed on each of the short-time frames, and after windowing, a fast Fourier transform is performed to determine a corresponding frequency spectrum; Determine a power spectrum corresponding to the frequency spectrum, process the power spectrum through a Mel filter bank, perform logarithmic transformation on the output of each Mel filter, and organize them into the FBank feature.
8. The device according to claim 6, characterized in that The device also includes a model training module, which is specifically used to: Collecting a training audio signal and configuring a corresponding data label for the training audio signal, wherein the data label includes a normal audio signal and an abnormal audio signal; Dividing the training audio signal into a training set and a validation set, and inputting the training set and the corresponding data labels into the fault detection model; Using cross entropy loss as the loss function of the classification task between the normal state and the fault state, using Adam optimization algorithm to train the fault detection model, and adjusting the model parameters of the fault detection model through back propagation; After the fault detection model training is completed, the verification set is input into the fault detection model, and the prediction accuracy of the fault detection model is determined according to preset evaluation indicators, and the preset evaluation indicators at least include accuracy and loss value.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the device fault detection method as described in any one of claims 1 to 5 are performed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device fault detection method according to any one of claims 1 to 6 are executed.
