Fault detection method and device, electronic equipment and storage medium

By combining a multi-head attention mechanism layer and the WDCNN model, adaptive fusion of multi-source data is achieved, which solves the problems of high complexity and inaccuracy of fault detection models in existing technologies, and improves the accuracy and efficiency of fault detection.

CN116127383BActive Publication Date: 2026-06-26NANJING SHANGTIE ELECTRONIC ENG CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING SHANGTIE ELECTRONIC ENG CO LTD
Filing Date
2022-10-18
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing fault detection models have too many computational parameters, resulting in high complexity and making them unsuitable for fault diagnosis of complex and large machinery. Furthermore, they lack effective utilization of information from multiple sensor sources, leading to inaccurate detection and a huge workload.

Method used

By employing a multi-head attention mechanism layer combined with the WDCNN model, autonomous weight allocation and feature extraction are performed using running data from multiple detection points, achieving end-to-end fusion of multi-source data, reducing model parameters and improving detection accuracy.

Benefits of technology

It reduces the complexity of the fault detection model, improves detection accuracy and efficiency, adapts to fault detection under different working conditions, and reduces the amount of calculation and engineering work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116127383B_ABST
    Figure CN116127383B_ABST
Patent Text Reader

Abstract

The application provides a fault detection method and device, electronic equipment and storage medium. The method comprises: obtaining running data corresponding to a plurality of detection points of a target device; inputting the plurality of running data into a pre-trained fault detection model, wherein the fault detection model comprises at least an input layer, a multi-head attention mechanism layer, a plurality of feature extraction layers, a full connection layer and an output layer according to the transmission order of the running data; calculating the weight of each running data through the multi-head attention mechanism layer, and fusing the plurality of running data based on the weight; and extracting and classifying the fused running data through the plurality of feature extraction layers and the full connection layer, and outputting the fault probability of the target device through the output layer. The application solves the technical problem of excessive model parameters of the fault detection model in the prior art, and reduces the complexity of the fault detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fault detection technology, and in particular to a fault detection method, apparatus, electronic device and storage medium. Background Technology

[0002] With the continuous progress of modern science and the rapid development of the economy, the level of social production has been greatly improved. The industrial production sector has become the main force of productivity. Its key equipment is mainly rotating machinery, such as electric motors, engines, and transmission shafts. If they malfunction but are not detected and dealt with in time, they will cause economic losses, and even more seriously, casualties.

[0003] Rotating machinery is also developing towards greater complexity, with stronger interrelationships and coupling between equipment modules. Fault diagnosis of single equipment based on fault mechanism analysis is no longer applicable to complex and large machinery. Existing technologies for fault diagnosis of equipment use fault detection models with too many calculation parameters, which increases the complexity of the fault detection model and makes the computational workload of the fault detection model enormous. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a fault detection method, apparatus, electronic device and storage medium to overcome all or part of the deficiencies in the prior art.

[0005] To achieve the above objectives, this application provides a fault detection method, comprising: acquiring operational data corresponding to multiple detection points of a target device; inputting the multiple operational data into a pre-trained fault detection model, wherein the fault detection model includes at least an input layer, a multi-head attention mechanism layer, multiple feature extraction layers, a fully connected layer, and an output layer according to the transmission order of the operational data; calculating the weight of each operational data through the multi-head attention mechanism layer, and fusing the multiple operational data based on the weights; performing feature extraction and classification on the fused operational data through the multiple feature extraction layers and the fully connected layer, and outputting the fault probability of the target device through the output layer.

[0006] Optionally, the fault detection model is a WDCNN model, and the feature extraction layer sequentially includes a convolutional layer and a pooling layer.

[0007] Optionally, the weight of each running data is calculated through the multi-head attention mechanism layer, and multiple running data are fused based on the weight, including: multiplying the running data with the corresponding weight value to obtain a product value; merging multiple product values ​​into a product value matrix; and performing a linear transformation operation on the product value matrix to obtain fused running data.

[0008] Optionally, according to the transmission order of the running data, the first feature extraction layer includes a wide convolutional layer and a pooling layer, and other feature extraction layers include narrow convolutional layers and pooling layers. Multiple feature extraction layers and the fully connected layer are used to extract and classify features from the fused running data, and the failure probability of the target device is output via the output layer. This includes: performing a short-time feature extraction operation on the fused running data through the wide convolutional layer to obtain a feature map, wherein the short-time feature extraction is an operation that suppresses high-frequency noise and extracts low-frequency signals; transmitting the feature map sequentially through other feature extraction layers to obtain a target feature map, wherein each narrow convolutional layer performs a convolution operation on the current feature map, and each pooling layer performs a feature amplification operation on the current feature map; performing logistic regression calculation on the target feature map through the fully connected layer to obtain the failure probability of the target device, and outputting the failure probability via the output layer.

[0009] Optionally, combining multiple product values ​​into a product value matrix includes obtaining the product value matrix using the following calculation formula:

[0010] U1 = QK T (batch, n) Q ,n K )

[0011]

[0012] U3=U2.masked_fill(mask,-∞)

[0013] A = softmax(U3)

[0014] output = AV

[0015] Wherein, U1 is matrix one, U2 is matrix two, U3 is matrix three, n is the number of representation values ​​in the vector, d represents the dimension of the vector data, Q is the query fault feature parameter value, K is the key value of the running data, V is the running data, A is the weight matrix, and output is the product value matrix.

[0016] Optionally, it further includes: performing a convolution operation on the current feature map through each narrow convolutional layer to obtain an intermediate feature map, and obtaining the intermediate feature map using the following formula. in, and b L j Let represent the weights and biases of the j-th convolutional kernel in the L-th narrow convolutional layer, respectively; J is the number of convolutional kernels in the L-th narrow convolutional layer; s is the stride; k is the size of the convolutional kernel in the L-th narrow convolutional layer; and Q is the number of convolutional kernels in the (L-1)-th narrow convolutional layer. This represents the q-th intermediate feature map of size M output by the (L-1)-th narrow convolutional layer. Let p represent the j-th intermediate feature map of size i output by the L-th narrow convolutional layer, where i is the size of the intermediate feature map and p is the padding size.

[0017] Optionally, the pre-training method of the fault detection model includes: acquiring historical fault data of the device; generating training samples using an adversarial network based on the historical fault data; randomly dividing the training samples into training set data and test set data according to a preset ratio; initializing the weights of the fault detection model; iteratively training the fault detection model using the training set data; testing the iteratively trained fault detection model based on the test set data to obtain the test accuracy; and obtaining the trained fault detection model when the test accuracy is greater than a preset accuracy.

[0018] Based on the same inventive concept, this application also provides a fault detection device, including an acquisition module configured to acquire operational data corresponding to multiple detection points of a target device; an input module configured to input multiple operational data into a pre-trained fault detection model, wherein the fault detection model includes at least an input layer, a multi-head attention mechanism layer, multiple convolutional layers, multiple pooling layers, a fully connected layer, and an output layer in the order of transmission of the operational data; a fusion module configured to calculate the weight of each operational data through the multi-head attention mechanism layer and fuse the multiple operational data based on the weights; and an output module configured to extract features and classify the fused operational data through multiple convolutional layers, multiple pooling layers, and the fully connected layer, and output the fault probability of the target device through the output layer.

[0019] Based on the same inventive concept, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.

[0020] Based on the same inventive concept, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the method described above.

[0021] As can be seen from the above, the fault detection method, apparatus, electronic device, and storage medium provided in this application achieve multi-source detection data by acquiring operational data corresponding to multiple detection points of the target device, thereby reducing the inaccuracy caused by single detection data. Multiple operational data are input into a pre-trained fault detection model, which includes a multi-head attention mechanism layer. This layer calculates the weight of each operational data point and fuses the multiple operational data points based on their weights, thus achieving multi-source operational data fusion. Furthermore, multiple feature extraction layers and the fully connected layer are used to extract and classify features from the fused operational data, reducing the problem of excessive model parameters in the fault detection model and lowering its complexity. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the fault detection method according to an embodiment of this application;

[0024] Figure 2 This is a schematic diagram of the multi-head attention mechanism in an embodiment of this application;

[0025] Figure 3 This is a schematic diagram of the hierarchical structure of the WDCNN model in an embodiment of this application;

[0026] Figure 4 This is a schematic diagram of the structure of the fault detection device according to an embodiment of this application;

[0027] Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0029] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0030] As described in the background section, existing fault detection models include multi-scale convolutional neural network models, which are used for multi-source information fault detection decision fusion. These models contain multiple parallel 1DCNN branches, each sampling the input signal at different scales through an average pooling layer. The sampled time series is used as the input to each branch, and the features extracted from each branch are then fused for final fault identification. This method primarily performs coarse-grained processing on the input, i.e., smoothing filtering and downsampling operations on the original signal. Then, for each scale signal, abstract features are extracted through two alternating convolutional and pooling layers. The feature learning process for signals at different scales is performed in parallel. The final feature vectors are concatenated and then used with fully connected layers and softmax layers for decision-making, outputting the corresponding probability information. However, multi-scale convolutional neural network models have the following drawbacks: 1) Decision fusion is performed after data feature extraction, which requires multiple parallel networks, increasing the number of computational parameters and making the model more complex; 2) It deals with the same input time series, performing coarse-grained splitting without utilizing information from other sensors. To obtain comprehensive information, a dataset needs to be constructed, which involves a huge amount of engineering work; 3) The distribution of the original signal varies under different devices or operating conditions, but many parameters of the multi-scale convolutional neural network model remain unchanged. Using this model for feature extraction may not be suitable, so the model does not have good transferability.

[0031] In view of this, embodiments of this application propose a fault detection method, referring to... Figure 1 This includes the following steps:

[0032] Step 101: Obtain the operational data corresponding to multiple detection points of the target device.

[0033] In this step, a sensor is set at each of the multiple detection points of the target device to collect the operating data of the target device. The operating data includes, but is not limited to, the vibration signal and the operating time signal of the target device. The sensor makes data collection and storage more convenient. By deploying the sensor at multiple detection points, the target device can be monitored simultaneously using multiple sensors, and comprehensive operating information can be obtained. This solves the problem of single operating data collected in the prior art, and more comprehensively reflects the problems existing in the target device, thus improving the accuracy of fault detection.

[0034] Step 102: Input multiple running data into a pre-trained fault detection model. The fault detection model includes at least an input layer, a multi-head attention mechanism layer, multiple feature extraction layers, a fully connected layer, and an output layer, according to the transmission order of the running data.

[0035] In this step, the input layer of the fault detection model includes at least one channel, each channel being independent of each other, transmitting operational data from different detection points. Considering that different detection points have different sensitivities to faults, and that different detection points are correlated with the same fault, the fault detection model introduces a multi-head attention mechanism layer, which enables the autonomous allocation of weights for operational data that are highly correlated with the fault of the target device, thereby improving the accuracy of the fault detection model.

[0036] The multi-head attention mechanism layer is used to learn different behaviors based on the same attention mechanism when given the same set of queries, keys and values. Different behaviors are combined as knowledge to capture dependencies of various ranges within the sequence. For example, taking Case Western Reserve data as an example, the detection of inner ring faults at the drive end has data from three different position sensors, including the base end, drive end and fan end. At this time, the number of channels established is 3-dimensional, and the multi-head attention is set to 3-head attention.

[0037] Step 103: Calculate the weight of each piece of running data through the multi-head attention mechanism layer, and fuse multiple pieces of running data based on the weights.

[0038] In this step, the multi-head attention mechanism layer can learn autonomously, acquire the sensitivity and dependence of each channel information in the input layer on the fault, assign different weight values ​​to each channel, and fuse the data into the data before feature extraction through weight fusion. The autonomous learning mechanism of the multi-head attention mechanism layer has the advantages of not requiring manual settings, reducing the parameters of the fault detection model, and improving the learning efficiency and fault detection efficiency of the fault detection model.

[0039] Step 104: The fused operating data is subjected to feature extraction and classification through multiple feature extraction layers and the fully connected layer, and the failure probability of the target device is output through the output layer.

[0040] In this step, the feature extraction layer of the fault detection model transforms the fused operational data and highlights representative features. Through data analysis and transformation, it extracts and amplifies the required features. The fully connected layer of the fault detection model has each node connected to all nodes in the previous layer, which integrates the previously extracted features and improves the accuracy of the fault detection model.

[0041] The above scheme realizes an end-to-end multi-source data fusion fault detection method. For the operating data of the equipment collected by different sensors, adaptive information fusion is achieved through a fault detection model with a multi-head attention mechanism layer. No operation by professionals is required. At the same time, the number of fault detection model parameters is reduced. Compared with the parallel feature extraction of multi-scale convolutional neural network models, the computational load of the model is reduced. The data-level fusion of the fault detection model reduces the complexity of the model compared with the feature-level fusion.

[0042] In some embodiments, in step 102, the fault detection model, according to the transmission order of the running data, includes at least an input layer, a multi-head attention mechanism layer, multiple feature extraction layers, a fully connected layer, and an output layer, specifically including:

[0043] Step 1021: The fault detection model is a WDCNN model, and the feature extraction layer includes a convolutional layer and a pooling layer in sequence.

[0044] In the above scheme, the WDCNN model is a first-layer wide convolutional network model. The first convolutional layer is a wide convolutional layer, which captures all the required abnormal fluctuations within the convolutional window. Its function is similar to that of the short-time Fourier transform, which aims to extract short-time features. The difference is that the window function of the short-time Fourier transform is a sine function, while the wide convolutional layer of the WDCNN model is trained through an optimization algorithm, which can automatically learn features for fault detection and remove features that are not helpful for detection.

[0045] In some embodiments, step 103 involves calculating the weight of each piece of running data through the multi-head attention mechanism layer, and fusing multiple pieces of running data based on the weights, specifically including:

[0046] Step 1031: Multiply the running data by the corresponding weight value to obtain the product value.

[0047] Step 1032: Combine the multiple product values ​​into a product value matrix.

[0048] Step 1033: Perform a linear transformation operation on the product value matrix to obtain the fused running data.

[0049] In the above scheme, attention is calculated on the running data to determine weights. The outputs of the multi-head generators are then coupled according to these weights to obtain a product value. The multi-head generator will then produce multiple outputs. For example... Figure 2 As shown, Figure 2 This diagram illustrates the multi-head attention mechanism in an embodiment of this application. The values ​​of the running data Q, K, and V are input into the Linear layer to obtain multiple weight values. The running data and weight values ​​are multiplied in the SDA layer to obtain a product value. The multiple outputs are coupled through the concat layer of the multi-head attention mechanism layer to obtain a product matrix. The multiple product matrices are converted into fused running data through the linear layer of the multi-head attention mechanism layer according to their weights. This enables adaptive multi-source information fusion. The weight parameters are determined through autonomous learning without manual setting, reducing the number of model parameters.

[0050] In some embodiments, in step 102, according to the transmission order of the running data, the first feature extraction layer includes a wide convolutional layer and a pooling layer, and other feature extraction layers include narrow convolutional layers and pooling layers. Features are extracted and classified from the fused running data through multiple feature extraction layers and the fully connected layer, and the failure probability of the target device is output via the output layer. Specifically, this includes:

[0051] Step 1022: Perform short-time feature extraction on the fused running data through the wide convolutional layer to obtain a feature map, wherein the short-time feature extraction is an operation to suppress high-frequency noise and extract low-frequency signals.

[0052] Step 1023: The feature map is sequentially transmitted to other feature extraction layers to obtain the target feature map, wherein a convolution operation is performed on the current feature map through each narrow convolutional layer, and a feature amplification operation is performed on the current feature map through each pooling layer.

[0053] Step 1024: Perform logistic regression calculation on the target feature map through the fully connected layer to obtain the failure probability of the target device, and output the failure probability through the output layer.

[0054] In the above scheme, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the hierarchical structure of the WDCNN model in this application embodiment. The fused running data is input into a wide convolutional layer, and short-term features are extracted using a wide window. The max pooling function of the pooling layer is used to amplify the features and reduce the data dimension of the feature map. Then, a narrow convolutional layer is used to slowly analyze the deep semantic features of the feature map, suppress high-frequency noise and extract mid- and low-frequency signals. After passing through multiple narrow convolutional layers and max pooling layers, the feature map is integrated in a fully connected layer, and the corresponding fault probability result is output after logistic regression calculation.

[0055] In some embodiments, step 103, merging the multiple product values ​​into a product value matrix, specifically includes:

[0056] Step 1034: Obtain the product value matrix using the following formula:

[0057] U1 = QK T (batch, n) Q ,n K )

[0058]

[0059] U3=U2.masked_fill(mask,-∞)

[0060] A = softmax(U3)

[0061] output = AV

[0062] Wherein, U1 is matrix one, U2 is matrix two, U3 is matrix three, n is the number of representation values ​​in the vector, d represents the dimension of the vector data, Q is the query fault feature parameter value, K is the key value of the running data, V is the running data, A is the weight matrix, and output is the product value matrix.

[0063] In the above scheme, the product value matrix is ​​calculated through specific formulas, which concretizes the abstract numerical values ​​and makes the fault detection model more accurate in fault detection.

[0064] In some embodiments, step 102 specifically includes:

[0065] Step 1025: Perform a convolution operation on the current feature map through each narrow convolutional layer to obtain an intermediate feature map. The intermediate feature map is obtained using the following formula: in, and Let represent the weights and biases of the j-th convolutional kernel in the L-th narrow convolutional layer, respectively; J is the number of convolutional kernels in the L-th narrow convolutional layer; s is the stride; k is the size of the convolutional kernel in the L-th narrow convolutional layer; and Q is the number of convolutional kernels in the (L-1)-th narrow convolutional layer. This represents the q-th intermediate feature map of size M output by the (L-1)-th narrow convolutional layer. Let p represent the j-th intermediate feature map of size i output by the L-th narrow convolutional layer, where i is the size of the intermediate feature map and p is the padding size.

[0066] In the above scheme, the intermediate feature maps of the narrow convolutional layer are determined by a specific formula, making the abstract numerical values ​​concrete and improving the accuracy of the fault detection model. It should be noted that the wide convolutional layer in the first feature extraction layer is calculated using the following formula. in, Let y represent the intermediate feature map of size x output from the first wide convolutional layer, y represent the number of convolutional kernels in the first wide convolutional layer, z represent the size of the convolutional kernels in the first wide convolutional layer, 1 represent the first wide convolutional layer, and T represent the runtime signal data of the target device. and These represent the weights and biases of the first convolutional kernel in the first wide convolutional layer, respectively.

[0067] In some embodiments, the pre-training method of the fault detection model specifically includes:

[0068] Step 1051: Obtain historical fault data of the equipment.

[0069] Step 1052: Generate training samples using an adversarial network based on the historical fault data.

[0070] Step 1053: The training samples are randomly divided into training set data and test set data according to a preset ratio.

[0071] Step 1054: Initialize the weights of the fault detection model and iteratively train the fault detection model using the training set data.

[0072] Step 1055: Test the fault detection model that has been iteratively trained based on the test set data to obtain the test accuracy. When the test accuracy is greater than the preset accuracy, the trained fault detection model is obtained.

[0073] In the above scheme, a dataset is constructed using historical fault data of the equipment. When the proportion of equipment fault information is small, a dataset with a normal ratio is constructed by generating adversarial networks. It can be divided into training and test sets in an 8:2 ratio. The model is iteratively trained using training samples and parameters are adjusted. The model is tested using test set data to obtain the test accuracy. When the test accuracy is greater than or equal to the preset accuracy, the trained fault detection model is obtained. It should be noted that when there is sufficient historical fault data of the equipment, the historical fault data can be used directly for training without the need to use adversarial networks to generate data.

[0074] In another embodiment provided in this application, data related to multiple sensors are combined for coordinated optimization and comprehensive processing. Utilizing the multi-channel characteristics of the convolutional neural network model, and combining it with a multi-head attention mechanism, weights of highly correlated information are autonomously allocated. The model automatically learns the sensitivity and dependence of each channel in the input layer on faults, highlighting fault-sensitive channels while simultaneously enabling multi-sensor collaborative identification, thus improving the model's learning efficiency. Using the WDCNN model, short-term features of the weighted fused information are extracted, and then batch normalization is performed using the AdaBN algorithm to increase the network's generalization ability, addressing different distributions of the target domain under various operating conditions. The WDCNN model, through model transfer using the AdaBN algorithm, exhibits greater generalization ability compared to multi-scale convolutional neural network models. Cross-domain transfer can be achieved simply by replacing the mean and variance of the target domain with those of the source domain. For example, the distribution of data from monitored equipment may differ under different loads or rotational speeds, making the model's generalization ability particularly important in such situations.

[0075] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0076] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0077] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a fault detection device.

[0078] refer to Figure 4 The fault detection device includes:

[0079] The acquisition module 10 is configured to acquire the running data corresponding to multiple detection points of the target device.

[0080] The input module 20 is configured to input multiple running data into a pre-trained fault detection model, which includes at least an input layer, a multi-head attention mechanism layer, multiple convolutional layers, multiple pooling layers, a fully connected layer, and an output layer in the order of transmission of the running data.

[0081] The fusion module 30 is configured to calculate the weight of each piece of running data through the multi-head attention mechanism layer, and fuse multiple pieces of running data based on the weight.

[0082] The output module 40 is configured to extract and classify features from the fused operational data through multiple convolutional layers, multiple pooling layers, and the fully connected layer, and output the failure probability of the target device via the output layer.

[0083] The device provided in this application is a multi-source information fusion fault detection device that can achieve end-to-end processing. For equipment operation data collected by different sensors, adaptive information fusion can be achieved through a fault detection model with a multi-head attention mechanism layer. It does not require operation by professionals and reduces the number of fault detection model parameters. Compared with the parallel feature extraction of multi-scale convolutional neural network models, it reduces the computational load of the model. The data-level fusion reduces the complexity of the model compared with the feature fusion.

[0084] In some embodiments, the fault detection model is a WDCNN model, and the feature extraction layer sequentially includes a convolutional layer and a pooling layer.

[0085] In some embodiments, the fusion module 30 is further configured to: multiply the running data with the corresponding weight value to obtain a product value; merge multiple product values ​​into a product value matrix; and perform a linear transformation operation on the product value matrix to obtain fused running data.

[0086] In some embodiments, the output module 40 is further configured to: perform short-time feature extraction on the fused running data through the wide convolutional layer to obtain a feature map, wherein the short-time feature extraction is an operation to suppress high-frequency noise and extract low-frequency signals; transmit the feature map sequentially through other feature extraction layers to obtain a target feature map, wherein a convolution operation is performed on the current feature map through each narrow convolutional layer, and a feature amplification operation is performed on the current feature map through each pooling layer; perform logistic regression calculation on the target feature map through the fully connected layer to obtain the failure probability of the target device, and output the failure probability through the output layer.

[0087] In some embodiments, the fusion module 30 includes a merging unit configured to obtain the product matrix using the following calculation formula:

[0088] U1 = QKT (batch, n) Q ,n K )

[0089]

[0090] U3=U2.masked_fill(mask,-∞)

[0091] A = softmax(U3)

[0092] output = AV

[0093] Wherein, U1 is matrix one, U2 is matrix two, U3 is matrix three, n is the number of representation values ​​in the vector, d represents the dimension of the vector data, Q is the query fault feature parameter value, K is the key value of the running data, V is the running data, A is the weight matrix, and output is the product value matrix.

[0094] In some embodiments, the output module 40 includes an operation unit configured to: in, and b L j Let represent the weights and biases of the j-th convolutional kernel in the L-th narrow convolutional layer, respectively; J is the number of convolutional kernels in the L-th narrow convolutional layer; s is the stride; k is the size of the convolutional kernel in the L-th narrow convolutional layer; and Q is the number of convolutional kernels in the (L-1)-th narrow convolutional layer. This represents the q-th intermediate feature map of size M output by the (L-1)-th narrow convolutional layer. Let p represent the j-th intermediate feature map of size i output by the L-th narrow convolutional layer, where i is the size of the intermediate feature map and p is the padding size.

[0095] In some embodiments, a training module 50 is further configured to: acquire historical fault data of the device; generate training samples using an adversarial network based on the historical fault data; randomly divide the training samples into training set data and test set data according to a preset ratio; initialize the weights of the fault detection model; iteratively train the fault detection model using the training set data; test the iteratively trained fault detection model based on the test set data to obtain the test accuracy; and obtain the trained fault detection model when the test accuracy is greater than a preset accuracy.

[0096] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0097] The apparatus of the above embodiments is used to implement the corresponding fault detection method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0098] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the fault detection method described in any of the above embodiments.

[0099] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0100] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0101] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0102] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0103] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0104] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0105] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0106] The electronic devices described above are used to implement the corresponding fault detection methods in any of the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0107] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the fault detection method as described in any of the above embodiments.

[0108] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0109] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the fault detection method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0110] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0111] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0112] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0113] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.

Claims

1. A fault detection method, characterized in that, include: Acquire operational data corresponding to multiple detection points of the target device; Multiple operational data are input into a pre-trained fault detection model, which, in the order of transmission of the operational data, includes at least an input layer, a multi-head attention mechanism layer, multiple feature extraction layers, a fully connected layer, and an output layer. The weight of each piece of running data is calculated through the multi-head attention mechanism layer, and the multiple pieces of running data are fused based on the weights; The fused operational data is processed through multiple feature extraction layers and the fully connected layer to extract and classify features, and the failure probability of the target device is output through the output layer. Following the transmission order of the operational data, the first feature extraction layer includes a wide convolutional layer and a pooling layer, while other feature extraction layers include narrow convolutional layers and pooling layers. Multiple feature extraction layers and the fully connected layer are used to extract and classify features from the fused operational data, and the output layer outputs the failure probability of the target device. This process includes: performing short-term feature extraction on the fused operational data through the wide convolutional layer to obtain a feature map, wherein the short-term feature extraction is an operation that suppresses high-frequency noise and extracts low-frequency signals; transmitting the feature map sequentially through other feature extraction layers to obtain a target feature map, wherein each narrow convolutional layer performs a convolution operation on the current feature map, and each pooling layer performs a feature amplification operation on the current feature map; performing logistic regression calculation on the target feature map through the fully connected layer to obtain the failure probability of the target device, and outputting the failure probability through the output layer.

2. The method according to claim 1, characterized in that, The fault detection model is the WDCNN model, and the feature extraction layer includes a convolutional layer and a pooling layer in sequence.

3. The method according to claim 1, characterized in that, The weight of each piece of running data is calculated through the multi-head attention mechanism layer, and the multiple pieces of running data are fused based on the weights, including: The running data is multiplied by the corresponding weight value to obtain the product value; Combine the multiple product values ​​into a product value matrix; A linear transformation operation is performed on the product matrix to obtain the fused running data.

4. The method according to claim 3, characterized in that, Combining multiple product values ​​into a product value matrix includes: The product matrix is ​​obtained using the following formula: in, For matrix one, For matrix two, For matrix three, The number of representation values ​​in the vector. The dimension of data represented as a vector. To query the fault characteristic parameter values, The key value of the running data, For the aforementioned running data, This is the weight matrix. Let be the product value matrix.

5. The method according to claim 1, characterized in that, Also includes: An intermediate feature map is obtained by performing a convolution operation on the current feature map through each narrow convolutional layer. The intermediate feature map is obtained using the following formula. , , in, and They represent the first The first narrow convolutional layer The weights and biases of each convolutional kernel. For the first The number of convolution kernels in a narrow convolutional layer Step size, For the first The size of the convolution kernel in a narrow convolutional layer, For the first The number of convolutional kernels in a narrow convolutional layer. Indicates the first The output of the narrow convolutional layer Each size is The intermediate feature map, Indicates the first The output of the narrow convolutional layer Each size is The intermediate feature map, The size of the intermediate feature map. To fill the dimensions.

6. The method according to claim 1, characterized in that, The pre-training method for the fault detection model includes: Obtain historical fault data of the equipment; Training samples are generated using an adversarial network based on the historical fault data. The training samples are randomly divided into training set data and test set data according to a preset ratio; Initialize the weights of the fault detection model, and iteratively train the fault detection model using the training set data; The fault detection model, which has been iteratively trained, is tested based on the test set data to obtain the test accuracy. When the test accuracy is greater than the preset accuracy, the fault detection model that has been trained is obtained.

7. A fault detection device, characterized in that, include: The acquisition module is configured to acquire operational data corresponding to multiple detection points of the target device; The input module is configured to input multiple running data into a pre-trained fault detection model, which, in the order of transmission of the running data, includes at least an input layer, a multi-head attention mechanism layer, multiple convolutional layers, multiple pooling layers, a fully connected layer, and an output layer. The fusion module is configured to calculate the weight of each piece of running data through the multi-head attention mechanism layer, and fuse multiple pieces of running data based on the weights; The output module is configured to extract and classify features from the fused operational data through multiple convolutional layers, multiple pooling layers, and the fully connected layer, and output the failure probability of the target device via the output layer. Following the transmission order of the running data, the first feature extraction layer includes a wide convolutional layer and a pooling layer, while other feature extraction layers include narrow convolutional layers and pooling layers. The output module is further configured to perform short-term feature extraction on the fused running data through the wide convolutional layer to obtain a feature map, wherein the short-term feature extraction is an operation that suppresses high-frequency noise and extracts low-frequency signals. The feature map is then transmitted sequentially through other feature extraction layers to obtain a target feature map, wherein a convolution operation is performed on the current feature map through each narrow convolutional layer, and a feature amplification operation is performed on the current feature map through each pooling layer. Logistic regression calculation is performed on the target feature map through the fully connected layer to obtain the fault probability of the target device, and the fault probability is output through the output layer.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 6.