Fault Detection Method, Device, Equipment, Storage Medium and Program Product

By obtaining the normal operation data of the target equipment, fitting the Weble distribution, the problem of low accuracy caused by relying on assumptions in traditional fault detection methods is solved, and higher fault detection accuracy is achieved.

CN117806860BActive Publication Date: 2025-07-22TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311604922.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-07-22
Estimated Expiration
2043-11-28

AI Technical Summary

Technical Problem

Traditional fault detection methods rely on distribution assumptions, resulting in low accuracy in practical application scenarios and cannot meet the true distribution of device operation data.

Method used

By obtaining the normal operation data of the target device, fit the Weble distribution, use the parameters of the Weble distribution to obtain the data abnormal quantization value of the test run data, and then determine the fault detection result, avoiding the hypothesis-based detection method.

Benefits of technology

It improves the accuracy of fault detection, conforms to the real distribution of actual application scenarios, and improves the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117806860B_ABST
    Figure CN117806860B_ABST
Patent Text Reader

Abstract

The present application relates to a fault detection method, apparatus, device, storage medium, and program product. The method includes: for a target device to be fault-detected, obtaining normal operation data of the target device when it is operating normally, and fitting a Weibull distribution based on the normal operation data. Then, obtaining test operation data of the target device, and obtaining a data anomaly quantization value of the test operation data according to the test operation data and the Weibull parameters of the Weibull distribution. Further, determining a fault detection result of the target device according to the data anomaly quantization value. Using this method can improve the accuracy of fault detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of fault feature data extraction and fault diagnosis, and particularly relates to a fault detection method, device, equipment, storage medium, and program product. Background Art

[0002] Currently, process monitoring technology dominated by fault detection has become a hot topic in the field of industrial safety. For example, it is possible to perform fault detection on the data generated by the operating system of a device to determine whether the data is fault data, and thus determine whether the operating system has a fault.

[0003] Traditional fault detection methods rely on distribution assumptions, such as normal distribution, Poisson distribution, etc. That is, traditional fault detection methods perform fault detection on data based on distribution assumptions to determine whether the data is fault data.

[0004] However, the above-mentioned fault detection methods have the problem of low accuracy. Summary of the Invention

[0005] Based on this, in view of the above technical problems, it is necessary to provide a fault detection method, device, equipment, storage medium, and program product that can improve the accuracy of fault detection.

[0006] In a first aspect, this application provides a fault detection method. The method includes:

[0007] For a target device to be fault-detected, obtain the normal operation data of the target device when it is operating normally, and fit a Weibull distribution according to the normal operation data;

[0008] Obtain the test operation data of the target device, and obtain a data anomaly quantization value of the test operation data according to the test operation data and the Weibull parameters of the Weibull distribution;

[0009] Determine the fault detection result of the target device according to the data anomaly quantization value.

[0010] In one embodiment, fitting a Weibull distribution according to the normal operation data includes:

[0011] Input the normal operation data into the target feature extraction network in batches to obtain a plurality of first features;

[0012] Fit a Weibull distribution according to each first feature and the feature mean of the plurality of first features.

[0013] In one embodiment, fitting a Weibull distribution according to each first feature and the feature mean of the plurality of first features includes:

[0014] Obtain the first feature distances between each first feature and the feature mean value, and fit a Weibull distribution based on each first feature distance.

[0015] In one embodiment, according to the test run data and the Weibull parameters of the Weibull distribution, obtain the data anomaly quantification value of the test run data, including:

[0016] Input the test run data into the target feature extraction network to obtain a second feature;

[0017] Obtain the second feature distance between the second feature and the feature mean value, and substitute the second feature distance and the Weibull parameters into the preset probability cumulative function formula to obtain the data anomaly quantification value, and the size of the data anomaly quantification value is positively correlated with the second feature distance.

[0018] In one embodiment, according to the data anomaly quantification value, determine the fault detection result of the target device, including:

[0019] Detect whether the data anomaly quantification value is greater than the data anomaly threshold;

[0020] If the data anomaly quantification value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operating fault;

[0021] If the data anomaly quantification value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device has no operating fault.

[0022] In one embodiment, the target feature extraction network includes a plurality of dilated convolution modules, and the dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure.

[0023] In one embodiment, the method further includes:

[0024] Obtain sample run data;

[0025] Perform self-supervised contrast learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample run data to obtain the target feature extraction network, and the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0026] In one embodiment, perform self-supervised contrast learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample run data to obtain the target feature extraction network, including:

[0027] In the process of the k-th contrast learning, according to the sample run data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtain the sample feature data corresponding to the k-th contrast learning process;

[0028] Based on the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtain the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process;

[0029] Where k is a positive integer greater than 0. When k is equal to 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrast learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrast learning process.

[0030] In one embodiment, based on the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtaining the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process includes:

[0031] Calculate a loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrast learning process;

[0032] Adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrast learning process to obtain the negative sample feature extraction network corresponding to the k-th contrast learning process.

[0033] In a second aspect, the present application also provides a fault detection device. The device includes:

[0034] A fitting module, configured to obtain the normal operation data of the target device when the target device is operating normally for the target device to be fault-detected, and fit a Weibull distribution according to the normal operation data;

[0035] An acquisition module, configured to acquire the test operation data of the target device, and obtain a data anomaly quantization value of the test operation data according to the test operation data and the Weibull parameters of the Weibull distribution;

[0036] A detection module, configured to determine the fault detection result of the target device according to the data anomaly quantization value.

[0037] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method in the first aspect as described above are implemented.

[0038] Fourthly, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the first aspect are implemented.

[0039] Fifthly, the present application further provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the steps of the method in the first aspect are implemented.

[0040] For the above-mentioned fault detection method, device, equipment, storage medium and program product, for the target device to be fault-detected, the normal operation data of the target device during normal operation is obtained, and the Weibull distribution is fitted according to the normal operation data. Then, the test operation data of the target device is obtained, and according to the test operation data and the Weibull parameters of the Weibull distribution, the data anomaly quantization value of the test operation data is obtained. Furthermore, according to the data anomaly quantization value, the fault detection result of the target device is determined. In this way, by fitting the corresponding Weibull distribution with the obtained normal operation data, the obtained Weibull distribution is the true distribution that the data of the target device to be fault-detected obeys during normal operation. Based on this Weibull distribution, fault detection is performed on the test operation data, avoiding the problem of low accuracy caused by the assumption of data distribution in the traditional fault detection method that cannot meet the actual application scenario. The fault detection method provided by the embodiment of the present application has higher accuracy. Description of the Drawings

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 It is an application environment diagram of the fault detection method in an embodiment;

[0043] Figure 2 It is a schematic flowchart of the fault detection method in an embodiment;

[0044] Figure 3 It is a schematic flowchart of step 201 in another embodiment;

[0045] Figure 4 It is a schematic structural diagram of the dilated convolution module in another embodiment;

[0046] Figure 5 It is a schematic diagram of the process of expanding the receptive field in another embodiment;

[0047] Figure 6 It is a schematic flowchart of step 202 in another embodiment;

[0048] Figure 7 It is a schematic flowchart of the training process of the target feature extraction network in another embodiment;

[0049] Figure 8 It is a schematic flowchart of step 702 in another embodiment;

[0050] Figure 9 It is a schematic flowchart of step 802 in another embodiment;

[0051] Figure 10 It is a structural block diagram of a fault detection device in one embodiment;

[0052] Figure 11 It is an internal structure diagram of a computer device in one embodiment. Detailed implementation manners

[0053] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] Currently, the process monitoring technology dominated by fault detection has become a hot topic in the field of industrial safety. For example, it is possible to perform fault detection on the data generated by the operating system of a device to determine whether the data is fault data, so as to determine whether the operating system has a fault.

[0055] Traditional fault detection methods rely on distribution assumptions, such as normal distribution, Poisson distribution, etc. That is, traditional fault detection methods perform fault detection on data based on the data distribution assumption to determine whether the data is fault data. However, the data generated by the operating system of a device during operation does not necessarily satisfy the distribution assumption. If fault detection is performed on data based on the distribution assumption, it is difficult to meet the real scenario and there is a problem of low accuracy.

[0056] In view of this, the embodiments of the present application provide a fault detection method, apparatus, device, storage medium, and program product. For a target device to be fault-detected, normal operation data of the target device during normal operation is obtained, and a Weibull distribution is fitted based on the normal operation data. Then, test operation data of the target device is obtained, and a data anomaly quantization value of the test operation data is obtained according to the test operation data and the Weibull parameters of the Weibull distribution. Furthermore, a fault detection result of the target device is determined according to the data anomaly quantization value. In this way, by fitting the corresponding Weibull distribution with the obtained normal operation data, the obtained Weibull distribution is the true distribution that the data of the target device to be fault-detected follows during normal operation. Fault detection is performed on the test operation data based on this Weibull distribution, avoiding the problem of low accuracy caused by the assumption of data distribution in traditional fault detection methods, which cannot meet the actual application scenario. The fault detection method provided by the embodiments of the present application has higher accuracy.

[0057] The fault detection method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the data storage system can store the data that the server 102 needs to process. The data storage system can be integrated on the server 102, or placed in the cloud or other network servers. The server 102 can be implemented by an independent server or a server cluster composed of multiple servers.

[0058] In an exemplary embodiment, as Figure 2 shown, a fault detection method is provided. Taking the method applied to the Figure 1 server as an example for illustration, it includes the following steps 201 to 203.

[0059] Step 201, for a target device to be fault-detected, obtain normal operation data of the target device during normal operation, and fit a Weibull distribution based on the normal operation data.

[0060] The target device is the device to be fault-detected. During the operation of the system of the target device, a lot of data will be generated. To detect whether the target device is faulty, it is usually to detect whether the data generated during the operation of the system of the target device is abnormal, so as to determine whether the target device is faulty.

[0061] In a possible implementation, in order to make the fault detection result more conform to the real scenario, it is necessary to first obtain the normal operation data generated by the target device under normal operation. The normal operation data is multi-dimensional time-series data, which is a multi-dimensional time-series array obtained by eliminating the scale difference of the multi-dimensional data generated by the system of the target device under normal operation according to the preset standardization conditions. Optionally, the server obtains the uploaded normal operation data through other devices; optionally, the server obtains the normal operation data stored in the database by accessing the database. The method for the server to obtain the normal operation data is not specifically limited herein.

[0062] After the server obtains the normal operation data, it will fit the data distribution that conforms to the real scenario according to the normal operation data. In a possible implementation, the server fits the Weibull distribution based on the Weibull distribution model. Optionally, the server directly fits the Weibull distribution followed by the normal operation data; optionally, the server first extracts the features of the normal operation data, and then fits the Weibull distribution followed by the features according to the features of the normal operation data.

[0063] Step 202, obtain the test operation data of the target device, and obtain the data anomaly quantization value of the test operation data according to the test operation data and the Weibull parameters of the Weibull distribution.

[0064] After obtaining the Weibull distribution that conforms to the real scenario through step 201, the server will detect the test operation data currently generated by the target device through this Weibull distribution, so as to obtain the data anomaly quantization value corresponding to the test operation data. In a possible implementation, this data anomaly quantization value can characterize the anomaly degree of the test operation data different from the normal operation data, that is, the higher the data anomaly quantization value, the higher the anomaly degree of the test operation data.

[0065] Regarding the method for the server to obtain the data anomaly quantization value, in the embodiments of the present application, after the server obtains the Weibull distribution, it can determine the Weibull parameters of the Weibull distribution. The Weibull parameters include the shape parameter and the scale parameter. After determining the Weibull parameters, the corresponding probability cumulative function formula can be determined. According to the test operation data and this probability cumulative function formula, the server can obtain the data anomaly quantization value corresponding to the test operation data.

[0066] Step 203, determine the fault detection result of the target device according to the data anomaly quantization value.

[0067] After the server obtains the data anomaly quantization value corresponding to the test operation data, it can determine whether the test operation data is abnormal data according to the data anomaly quantization value. For example, when the data anomaly quantization value is too high, the server determines that the test operation data is abnormal data.

[0068] Next, an exemplary introduction will be given on how the server determines the fault detection result of the target device based on the data anomaly quantification value:

[0069] First, the server detects whether the data anomaly quantification value is greater than the data anomaly threshold, and the data anomaly threshold is a preset value. Then, based on the detection result, the server can determine whether the test run data is abnormal data, and thus determine whether there is a fault in the target device. If the data anomaly quantification value is greater than the data anomaly threshold, the server determines that the fault detection result is that the target device has an operating fault; if the data anomaly quantification value is less than or equal to the data anomaly threshold, it is determined that the fault detection result is that the target device does not have an operating fault.

[0070] In the above fault detection method, for the target device to be fault-detected, the normal operation data of the target device during normal operation is obtained, and the Weibull distribution is fitted based on the normal operation data. Then, the test run data of the target device is obtained, and based on the test run data and the Weibull parameters of the Weibull distribution, the data anomaly quantification value of the test run data is obtained. Furthermore, based on the data anomaly quantification value, the fault detection result of the target device is determined. In this way, by fitting the corresponding Weibull distribution to the obtained normal operation data, the obtained Weibull distribution is the true distribution that the data of the target device to be fault-detected follows during normal operation. Fault detection is performed on the test run data based on this Weibull distribution, avoiding the problem of low accuracy caused by the assumption of data distribution in traditional fault detection methods that cannot meet the actual application scenario. The fault detection method provided by the embodiments of the present application has higher accuracy.

[0071] In one embodiment, based on Figure 2 the embodiment shown, refer to Figure 3 This embodiment of the present application relates to the process of fitting the Weibull distribution according to the normal operation data. As Figure 3 shown, step 201 may include Figure 3 steps 301 and 302 shown below.

[0072] Step 301: Input the normal operation data in batches into the target feature extraction network to obtain multiple first features.

[0073] After the server obtains the test run data, it can determine whether the test run data is abnormal by judging whether the features of the test run data (i.e., the second features) are similar to the features of the normal operation data (i.e., the first features). Regarding the method of feature extraction, in the embodiments of the present application, the features of the data are extracted by a pre-trained target feature extraction network.

[0074] Due to the small receptive field of traditional feature extraction algorithms, they can only extract shallow features of data, which makes the feature data extracted based on traditional feature extraction algorithms inaccurate. Therefore, in the embodiments of the present application, the target feature extraction network includes multiple dilated convolution modules. The dilated convolution module includes multiple dilated convolutional layers and an activation function layer, and the multiple dilated convolutional layers and the activation function layer form a residual network structure.

[0075] The dilated convolution module is one of the network modules in the target feature extraction network. It can process the input data through the dilated convolutional layer to expand the receptive field, thereby enhancing the ability of the target feature extraction network to express the hidden features of the data. Therefore, the dilated convolution module contains multiple dilated convolutional layers and an activation function layer for activating the dilated convolutional layer. However, due to the problem of gradient disappearance in deep neural networks, in the embodiments of the present application, each dilated convolutional layer and the activation function layer are set to form a residual network structure, thereby improving the convergence effect of the target feature extraction network during training and alleviating the problem of gradient disappearance.

[0076] Regarding the specific structure of the dilated convolution module, refer to Figure 4 , and an exemplary specific structure of the dilated convolution module is given.

[0077] The dilated convolution module includes two dilated convolutional layers, and an activation function layer is set before each dilated convolutional layer. When the dilated convolution module receives the input data, while the input data is being processed by the dilated convolution module, it is also fed forward to the output end and added to the output data of the dilated convolution module as the final output data of the dilated convolution module. Such a residual structure can effectively alleviate the problem of gradient disappearance in the target feature extraction network during training.

[0078] Regarding the above activation function layer, the activation function set can be the GeLU activation function (Gaussian Error Linerar Units) or the ReLU activation function (Rectified Linear Unit). In the embodiments of the present application, the GeLU activation function is set. Setting the activation function layer of the GeLU activation function can multiply the output data x of the dilated convolutional layer by the probability density function of the normal distribution corresponding to x, and use the product as the output and input it into the next dilated convolutional layer, so that the input and output of the dilated convolutional layer satisfy the following formula:

[0079] y = x * P(X ≤ x), X ~ N(0,1) (1)

[0080] Among them, X is a random variable subject to the standard Gaussian distribution.

[0081] In this way, when the output data x is very small, its corresponding probability density function approaches 0, causing the output data to decay. Conversely, the output is maintained, thus achieving the effect of screening useful features. The attenuation degree of the output is controlled by the probability density function of the Gaussian distribution, making the target feature extraction network smoother and the gradient more stable.

[0082] Regarding the dilated convolutional layer, it is an improved convolutional layer that can disperse the convolutional kernel at a certain interval and then perform convolution on the input data at the corresponding positions, thereby expanding the receptive field without increasing the parameters of the network model. The interval distance is the dilation coefficient. In the example shown in Figure 4 , the dilation coefficient of the dilated convolutional layer is 2 i , where i is the number of dilated convolutional layers.

[0083] See Figure 5 for an example of the process of expanding the receptive field. When the input data is input into the dilated convolutional layer with a dilation coefficient of 2 1 , the distance between the original convolutional kernels becomes 2. And when the data with the distance between the convolutional kernels changed to 2 is input into the dilated convolutional layer with a dilation coefficient of 2 2 , the original distance between the convolutional kernels becomes 4.

[0084] In this way, by setting multiple dilated convolutional layers in the dilated convolutional module, the dilation coefficient increases as the number of layers increases, thereby achieving the purpose of gradually expanding the receptive field and enhancing the feature extraction ability of the target feature extraction network.

[0085] The target feature extraction network contains multiple dilated convolutional modules. For example, it can be 5. The number of dilated convolutional modules needs to be adjusted according to the actual application scenario. For example, according to the length of the input data. Here, the number of dilated convolutional modules included in the target feature extraction network is not specifically limited.

[0086] Through the target feature network introduced in the above embodiments, the server inputs the normal operation data into the target feature extraction network, and the target feature extraction network will output the feature array corresponding to the normal operation data. This feature array is a latent feature array that synthesizes the multi-dimensional features and temporal features of the output data, denoted as , where T is the sequence time dimension and D is the latent feature dimension. Finally, the last vector in the temporal dimension of this feature array is used as the first feature corresponding to the normal operation data.

[0087] Step 302: Fit a Weibull distribution according to each first feature and the feature mean of multiple first features.

[0088] In a possible implementation, after inputting multiple normal operation data into the target feature extraction network, multiple first features are obtained, and the feature mean value of each first feature is calculated.

[0089] Regarding the calculation process of the feature mean value, the following is an exemplary introduction:

[0090] Denote the first feature set composed of multiple first features as [v1, …, v N , where N is the number of features, then the calculation formula for the feature mean value v n is:

[0091]

[0092] According to the feature mean value and each first feature, a Weibull distribution is fitted. In a possible implementation, the fitting process is as follows:

[0093] Obtain the first feature distance between each first feature and the feature mean value, and fit a Weibull distribution according to each first feature distance.

[0094] The first feature distance, that is, the degree of deviation between the first feature and the feature mean value. This first feature distance d i can be denoted as d i = Dist(q i , q n ). Regarding this first feature distance, it can be the Euclidean distance between the first feature and the feature mean value. Calculate the first feature distance between each first feature and the feature mean value, and then fit a Weibull distribution according to each first feature distance. Regarding the probability density expression corresponding to this Weibull distribution:

[0095]

[0096] The parameter d is the first feature distance, β, η, and γ are all Weibull parameters. β is the shape parameter, η is the scale parameter, γ is the hyperparameter, and the three parameters are all estimated by the least squares method according to each first feature distance. β can affect the shape of the Weibull distribution, η affects the peak position of the Weibull distribution, and γ affects the center position of the Weibull distribution.

[0097] In one embodiment, based on Figure 3 the embodiment shown, refer to Figure 6 , the embodiment of the present application relates to the process of obtaining the data anomaly quantization value of the test operation data according to the test operation data and the Weibull parameters of the Weibull distribution. As Figure 6 shown, step 202 may include Figure 6 the steps 601 and 602 shown.

[0098] Step 601: Input the test run data into the target feature extraction network to obtain the second feature.

[0099] After obtaining the Weibull distribution that the first feature of the normal run data follows, it is necessary to extract the second feature corresponding to the test run data.

[0100] Based on Figure 3 In the target feature extraction network of the embodiment shown, the server inputs the test run data into the target feature extraction network, outputs the feature array corresponding to the test run data, and takes the last one-dimensional vector in the time dimension of the feature array as the second feature corresponding to the test run data.

[0101] Step 602: Obtain the second feature distance between the second feature and the feature mean, and substitute the second feature distance and the Weibull parameters into the preset probability cumulative function formula to obtain the data anomaly quantification value.

[0102] Based on Figure 3 In the method for calculating the first feature distance in the embodiment shown, calculate the second feature distance between the second feature and the feature mean. Let the second feature be v test , then the second feature distance can be denoted as:

[0103] d test = Dist(q test , q n ) (4)

[0104] The probability cumulative function formula is determined according to the probability density expression corresponding to the Weibull distribution. The formula content is shown in formula (5):

[0105]

[0106] Then, substitute the second feature distance and the Weibull parameters β, η, and γ into formula (5) to obtain the data anomaly quantification value corresponding to the test run data, denoted as formula (6):

[0107] s test = F(d test ; β, η, γ) (6)

[0108] The size of the data anomaly quantification value is positively correlated with the second feature distance. The larger the data anomaly quantification value s test , the more different the second feature is from the feature mean, and the more the second feature deviates from the feature mean. When the data anomaly quantification value is too large, for example, exceeding the data anomaly threshold, it is determined that the test run data is abnormal data.

[0109] In one embodiment, based on Figure 7 In the embodiment shown, see Figure 3 andFigure 4 , the embodiments of the present application relate to the training process of the target feature extraction network. As Figure 7 shown, this process includes step 701 and step 702.

[0110] Step 701, obtain sample operation data.

[0111] The sample operation data is multi-dimensional time series data obtained after processing the multi-dimensional data generated during the historical operation of the target device. Optionally, the server obtains the sample operation data through other devices. Optionally, the server obtains the multi-dimensional data generated during the historical operation of the target device, and after eliminating the scale difference of the multi-dimensional data according to the preset standardization conditions, the multi-bit time series array obtained is the sample operation data, and the sample operation data can be denoted as where T is the sequence time dimension and M is the number of other dimensions.

[0112] Step 702, perform self-supervised contrastive learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain the target feature extraction network.

[0113] Traditional feature extraction algorithms often rely on a large amount of labeled sample data for supervised training. However, in some scenarios, the generation cost of abnormal data is high, resulting in a high labeling cost of sample data. There are only a large number of normal data in the labeled sample data, and there is a problem of insufficient training.

[0114] Therefore, in the embodiments of the present application, the server is based on the self-supervised contrastive learning method, that is, by training the feature extraction network to compare the features of the same sample operation data under different data transformation forms (referred to as positive sample feature data) with the features of different samples (referred to as negative sample feature data), so that the features finally extracted by the feature extraction network for the input data are closer to the positive sample feature data and farther away from the negative sample feature data, forcing the feature extraction network to learn and extract the key features that can represent the input data, avoiding the problems of high training cost and insufficient training existing in traditional feature extraction algorithms due to relying on a large amount of labeled sample data for supervised training.

[0115] In the embodiments of the present application, two initial feature extraction networks to be trained are set. One is the initial positive sample feature extraction network for extracting the positive sample features used in contrastive learning, and the other is the initial negative sample feature extraction network for extracting the negative sample features used in contrastive learning. Among them, the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0116] Regarding the specific training process, it will be specifically introduced below.

[0117] In one embodiment, based on Figure 8 the embodiment shown, refer to Figure 7 , the embodiment of the present application relates to a process of self-supervised contrastive learning on an initial positive sample feature extraction network and an initial negative sample feature extraction network according to sample operation data to obtain a target feature extraction network. As Figure 8 shown, step 702 includes step 801 and step 802.

[0118] Step 801, in the process of the k-th contrastive learning, according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtain the sample feature data corresponding to the k-th contrastive learning process.

[0119] In contrastive learning, to improve the training effect of the feature extraction network, as many negative sample feature data as possible are needed to provide more information for training. However, an increase in the number of negative sample feature data means an increase in the number of sample operation data, and the computing resources occupied during the training process will also increase. However, due to the limitation of the graphics card computing power, the number of sample operation data that can be calculated simultaneously is limited, so that the number of negative sample feature data cannot increase.

[0120] Therefore, in a possible implementation manner, randomly collect the sample operation data, and divide the sample operation data into multiple batches of sample operation data X i , denoted as It can be understood that X i is still a multi-dimensional time series array of T*M.

[0121] In this way, the sample operation data is split into multiple batches of sample operation data. During the training process, maintain a negative sample feature queue. In each training process, the server extracts features from each batch of sample operation data according to the intermediate positive sample feature extraction network and the intermediate negative sample feature extraction network, and sequentially enqueues the negative sample feature data output by the intermediate negative sample feature extraction network. The length of the negative sample feature queue is much larger than the number of sample operation data that the graphics card computing power can bear, that is, the number of negative sample feature data is much larger than the number of sample operation data, and the number of negative sample feature data increases significantly.

[0122] Next, a rational introduction to the process of extracting sample feature data is given.

[0123] First, based on the idea of contrastive learning, through the method of data augmentation, transform multiple batches of sample operation data into different forms. In a possible implementation manner, the data transformation methods include random dislocation transformation, random scale transformation, random offset transformation, and random perturbation transformation. The transformation process includes:

[0124] A. Random dislocation transformation: Randomly sample \(n\sim U(0, T_0)\), where \(U(0, T_0)\) represents the uniform distribution from 0 to \(T_0\), and run the data \(X\) for a batch of samples i , so that the transformed sample running data , that is, for \(X\) i randomly sample and fill with 0;

[0125] B. Random scale transformation: Let \(\epsilon\sim N(0, 1)\), the transformed sample running data

[0126] C. Random bias transformation: Let \(\epsilon\sim N(0, 1)\), the transformed sample running data

[0127] D. Random perturbation transformation: Let the transformed sample running data

[0128] According to the above four data transformation methods, the server transforms each batch of sample running data into different transformed data. In a possible implementation, for each batch of sample running data, randomly select two from the above-mentioned data transformation methods to transform each sample running data. That is, for a batch of sample running data, after data transformation, two forms of sample running data are obtained. Here, for the convenience of distinction, the two forms of sample running data after data transformation are denoted as \(t(X\) i ) and \(t'(X\) i ).

[0129] Next, for a batch of sample running data \(X\) i , input \(t(X\) i ) into the intermediate positive sample feature extraction network to obtain intermediate positive sample feature data, input \(t'(X\) i ) into the intermediate negative sample feature extraction network to obtain intermediate negative sample feature data. The one-to-one correspondence between the intermediate positive sample feature data and the intermediate negative sample feature data corresponding to this batch of sample running data forms the sample feature data corresponding to this batch of sample running data. Process each batch of sample running data according to the above method, and the multiple sample feature data obtained are the sample feature data corresponding to the \(k\) -th contrast learning process. Enqueue each intermediate negative sample feature data until the queue is full. At this time, if there are still remaining intermediate negative sample feature data, then in the process of the \((k + 1)\) -th contrast learning, remove all negative sample feature data in the negative sample feature queue, and enqueue the remaining intermediate negative sample feature data and the intermediate negative sample feature data extracted in the \((k + 1)\) -th contrast learning in sequence.

[0130] Step 802: Based on the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtain the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process.

[0131] Based on the intermediate positive sample feature data and the intermediate negative sample feature data included in the sample feature data obtained above, adjust the network parameters of the intermediate positive sample feature extraction network and the intermediate negative sample feature extraction network, so as to obtain the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process.

[0132] Where k is a positive integer greater than 0. When k equals 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrast learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrast learning process.

[0133] In one embodiment, based on Figure 9 the embodiment shown, refer to Figure 8 , this application embodiment relates to the process of obtaining the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process according to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network. As Figure 9 shown, step 802 includes step 901 and step 902.

[0134] Step 901: Calculate the loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrast learning process.

[0135] For the k-th training, let the intermediate positive sample feature extraction network be the Q network and the intermediate negative sample feature extraction network be the K network. Then, for a batch of sample operation data X i , after inputting X i into the Q network and the K network, the output sample feature data is a pair of data (q i , k i ), where q i is the intermediate positive sample feature data output by the Q network, and k i is the intermediate negative sample feature data output by the K network. Suppose there are a total of N batches of sample operation data [X1, X2,... X N, there are N pairs of sample feature data [(q1, k1), …, (q N , k N )].

[0136] Assume that the queue length of the negative sample feature queue is J, then the intermediate negative sample feature data [k1, …, k J is enqueued.

[0137] Substitute the feature data corresponding to the sample feature data into the loss function to calculate the loss value. The loss function is shown in formula (7):

[0138]

[0139] Among them, τ is a temperature parameter used to control the shape of the loss function and can be adjusted according to the actual application situation; q i is the intermediate positive sample feature data corresponding to the i-th batch of sample running data, and k i is the intermediate negative sample feature data corresponding to the i-th batch of sample running data. Take q i and k i as the positive sample pair for the k-th contrast learning. Then, the other intermediate negative sample features in the negative sample feature queue except k i are used as the negative samples for the k-th contrast learning. Substitute the positive sample pair and the negative samples into formula (7) to obtain the loss value of the k-th contrast learning.

[0140] After obtaining the loss value, the server will adjust the network parameters of the feature extraction network to be trained according to the loss value. However, the negative sample feature queue maintained in the embodiments of the present application may also enqueue the intermediate negative sample feature data that was not enqueued during the k-th contrast learning during the (k + 1)-th contrast learning. However, the network parameters of the intermediate positive sample feature extraction network and the intermediate negative sample feature extraction network used during the (k + 1)-th contrast learning have been updated after the k-th contrast learning. This results in updating the network parameters using the intermediate negative sample feature data extracted by the old network and the intermediate positive sample feature data extracted by the new network during a certain contrast learning process. It can be understood that there are natural differences between the intermediate positive sample feature data extracted by the new network and the intermediate negative sample feature data extracted by the old network. If no corresponding measures are taken, the effect of contrast learning will not be significant.

[0141] Therefore, in a possible implementation manner, when the embodiments of the present application update the network parameters of the intermediate positive sample feature extraction network and the intermediate negative sample feature extraction network using the loss value, a momentum update method is adopted. The following is an introduction to the momentum update process:

[0142] First, adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value. In the embodiment of the present application, the network parameters of the intermediate positive sample feature extraction network are optimized by gradient according to the loss value to obtain the updated network parameters of the intermediate positive sample feature extraction network; then, calculate the weighted value of the updated network parameters of the intermediate positive sample feature extraction network and the unupdated network parameters of the intermediate negative sample feature extraction network, and update the network parameters of the intermediate negative sample feature extraction network according to the weighted value.

[0143] Step 902: Adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrast learning process to obtain the negative sample feature extraction network corresponding to the k-th contrast learning process.

[0144] Next, an exemplary introduction to the momentum update process is given:

[0145] For the k-th contrast learning process, still set the intermediate positive sample feature extraction network as the Q network and the intermediate negative sample feature extraction network as the K network. Then the network parameters of the Q network are θ q , and the network parameters of the K network are θ k . Optimize the gradient of the network parameters θ q of the Q network according to the loss value obtained in the k-th contrast learning process. The calculation formula is shown in formula (8):

[0146]

[0147] where, are the updated network parameters of the Q network, are the network parameters of the Q network before update, represents the gradient of the loss value L with respect to the Q network, and α is the learning rate.

[0148] When the server updates θ q , update the network parameters θ k of the K network. The update formula is shown in formula (9):

[0149]

[0150] where, are the updated network parameters of the K network, are the network parameters of the K network before update, and w is the weight. Then in the embodiment of the present application, update the network parameters of the K network according to the weighted sum of the updated network parameters of the intermediate positive sample feature extraction network and the unupdated network parameters of the intermediate negative sample feature extraction network.

[0151] After updating the network parameters of the intermediate positive sample feature extraction network and the network parameters of the intermediate negative sample feature extraction network, the server removes the intermediate negative sample features in the negative sample feature queue, and then queues the intermediate negative sample features that have not been queued. If the negative sample feature queue is not full, during the (k + 1)-th contrast learning process, the newly extracted intermediate negative sample features are queued.

[0152] Thus, the k-th contrast learning process is completed.

[0153] In one embodiment, a fault detection method is provided. The method includes the following steps:

[0154] Step a, for the target device to be fault-detected, obtain the normal operation data when the target device is operating normally.

[0155] Step b, obtain the sample operation data.

[0156] Step c, during the k-th contrast learning process, according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtain the sample feature data corresponding to the k-th contrast learning process.

[0157] Step d, calculate the loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrast learning process.

[0158] Step e, adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrast learning process to obtain the negative sample feature extraction network corresponding to the k-th contrast learning process.

[0159] Where k is a positive integer greater than 0. When k is equal to 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network. When k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrast learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrast learning process.

[0160] Where the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0161] Where the target feature extraction network includes a plurality of dilated convolution modules, and each dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure.

[0162] Step f: Input the normal operation data in batches into the target feature extraction network to obtain multiple first features.

[0163] Step g: Obtain the first feature distances between each first feature and the feature mean, and fit a Weibull distribution based on each first feature distance.

[0164] Step h: Obtain the test operation data of the target device.

[0165] Step i: Input the test operation data into the target feature extraction network to obtain second features.

[0166] Step j: Obtain the second feature distances between the second features and the feature mean, and substitute the second feature distances and the Weibull parameters into the preset probability cumulative function formula to obtain data anomaly quantization values, where the magnitudes of the data anomaly quantization values are positively correlated with the second feature distances.

[0167] Step k: Detect whether the data anomaly quantization value is greater than the data anomaly threshold.

[0168] Step l: If the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault.

[0169] Step m: If the data anomaly quantization value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device has no operation fault.

[0170] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily execute in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily execute at the same moment, but can execute at different moments. The execution order of these steps or stages is not necessarily sequential either, but can alternate or be executed in turn with at least a part of other steps or steps or stages in other steps.

[0171] Based on the same inventive concept, an embodiment of the present application also provides a fault detection device for implementing the above-mentioned fault detection method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following fault detection devices can refer to the limitations on the fault detection method in the above text and will not be repeated here.

[0172] In an exemplary embodiment, as Figure 10As shown, a fault detection device is provided, including: a fitting module 1001, an acquisition module 1002, and a detection module 1003, where:

[0173] The fitting module 1001 is configured to obtain the normal operation data of the target device during normal operation for the target device to be fault-detected, and fit a Weibull distribution according to the normal operation data;

[0174] The acquisition module 1002 is configured to obtain the test operation data of the target device, and obtain a data anomaly quantization value according to the test operation data and the Weibull parameters of the Weibull distribution;

[0175] The detection module 1003 is configured to determine the fault detection result of the target device according to the data anomaly quantization value.

[0176] In one embodiment, the fitting module 1001 includes:

[0177] The first feature extraction unit is configured to input the normal operation data in batches into the target feature extraction network to obtain a plurality of first features;

[0178] The distribution fitting unit is configured to fit a Weibull distribution according to each first feature and the feature mean value of the plurality of first features.

[0179] In one embodiment, the distribution fitting unit is further configured to:

[0180] Obtain the first feature distance between each first feature and the feature mean value, and fit a Weibull distribution according to each first feature distance.

[0181] In one embodiment, the acquisition module 1002 includes:

[0182] The second feature extraction unit is configured to input the test operation data into the target feature extraction network to obtain a second feature;

[0183] The data anomaly quantization value acquisition unit is configured to obtain the second feature distance between the second feature and the feature mean value, and substitute the second feature distance and the Weibull parameters into a preset probability cumulative function formula to obtain a data anomaly quantization value, and the magnitude of the data anomaly quantization value is positively correlated with the second feature distance.

[0184] In one embodiment, the detection module 1003 includes:

[0185] The comparison unit is configured to detect whether the data anomaly quantization value is greater than the data anomaly threshold;

[0186] The fault determination unit is configured to, if the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault;

[0187] A non-fault determination unit, configured to determine that the fault detection result is that the target device has no operating fault if the data anomaly quantization value is less than or equal to the data anomaly threshold.

[0188] In one embodiment, the target feature extraction network includes a plurality of dilated convolution modules, and each dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure.

[0189] In one embodiment, the fault detection device further includes:

[0190] A sample acquisition module, configured to acquire sample operation data;

[0191] A contrast learning module, configured to perform self-supervised contrast learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain a target feature extraction network, and the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0192] In one embodiment, when performing self-supervised contrast learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data, the contrast learning module includes:

[0193] A sample feature data extraction unit, configured to obtain sample feature data corresponding to the k-th contrast learning process according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network during the k-th contrast learning process;

[0194] A network acquisition unit, configured to obtain the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process according to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0195] Where k is a positive integer greater than 0. When k is equal to 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrast learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrast learning process.

[0196] In one embodiment, the network acquisition unit is further configured to:

[0197] Calculate a loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrast learning process;

[0198] Adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrast learning process, so as to obtain the negative sample feature extraction network corresponding to the k-th contrast learning process.

[0199] Each module in the above-mentioned fault detection device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0200] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store fault detection data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a fault detection method.

[0201] Those skilled in the art can understand that Figure 11 the structure shown in

[0202] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0203] For the target device to be fault-detected, obtain the normal operation data of the target device when it is operating normally, and fit the Weibull distribution according to the normal operation data;

[0204] Obtain the test run data of the target device, and obtain the data anomaly quantization value of the test run data according to the test run data and the Weibull parameters of the Weibull distribution;

[0205] Determine the fault detection result of the target device according to the data anomaly quantization value.

[0206] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0207] Input the normal operation data into the target feature extraction network in batches to obtain a plurality of first features;

[0208] Fit the Weibull distribution according to each first feature and the feature mean value of the plurality of first features.

[0209] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0210] Obtain the first feature distance between each first feature and the feature mean value, and fit the Weibull distribution according to each first feature distance.

[0211] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0212] Input the test run data into the target feature extraction network to obtain a second feature;

[0213] Obtain the second feature distance between the second feature and the feature mean value, and substitute the second feature distance and the Weibull parameters into the preset probability cumulative function formula to obtain the data anomaly quantization value, and the size of the data anomaly quantization value is positively correlated with the second feature distance.

[0214] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0215] Detect whether the data anomaly quantization value is greater than the data anomaly threshold;

[0216] If the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault;

[0217] If the data anomaly quantization value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device does not have an operation fault.

[0218] In one embodiment, the target feature extraction network includes a plurality of dilated convolution modules, and the dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure.

[0219] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0220] Obtain sample operation data;

[0221] Perform self-supervised contrastive learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain the target feature extraction network. The initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0222] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0223] During the k-th contrastive learning process, obtain the sample feature data corresponding to the k-th contrastive learning process according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0224] Obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process and the negative sample feature extraction network corresponding to the k-th contrastive learning process according to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0225] Where k is a positive integer greater than 0. When k is equal to 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrastive learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrastive learning process.

[0226] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0227] Calculate the loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process;

[0228] Adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrastive learning process to obtain the negative sample feature extraction network corresponding to the k-th contrastive learning process.

[0229] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0230] For the target device to be fault-detected, obtain the normal operation data when the target device is operating normally, and fit the Weibull distribution according to the normal operation data;

[0231] Obtain the test run data of the target device, and obtain the data anomaly quantization value of the test run data according to the test run data and the Weibull parameters of the Weibull distribution;

[0232] Determine the fault detection result of the target device according to the data anomaly quantization value.

[0233] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0234] Input the normal operation data into the target feature extraction network in batches to obtain a plurality of first features;

[0235] Fit a Weibull distribution according to each first feature and the feature mean of the plurality of first features.

[0236] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0237] Obtain the first feature distance between each first feature and the feature mean, and fit a Weibull distribution according to each first feature distance.

[0238] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0239] Input the test run data into the target feature extraction network to obtain a second feature;

[0240] Obtain the second feature distance between the second feature and the feature mean, and substitute the second feature distance and the Weibull parameters into the preset probability cumulative function formula to obtain the data anomaly quantization value, and the size of the data anomaly quantization value is positively correlated with the second feature distance.

[0241] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0242] Detect whether the data anomaly quantization value is greater than the data anomaly threshold;

[0243] If the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault;

[0244] If the data anomaly quantization value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device has no operation fault.

[0245] In one embodiment, the target feature extraction network includes a plurality of dilated convolution modules, and the dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure.

[0246] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0247] Obtain sample operation data;

[0248] Perform self-supervised contrastive learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain the target feature extraction network, and the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0249] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0250] During the k-th contrastive learning process, obtain the sample feature data corresponding to the k-th contrastive learning process according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0251] Obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process and the negative sample feature extraction network corresponding to the k-th contrastive learning process according to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0252] Where k is a positive integer greater than 0. When k is equal to 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrastive learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrastive learning process.

[0253] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0254] Calculate a loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process;

[0255] Adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrastive learning process to obtain the negative sample feature extraction network corresponding to the k-th contrastive learning process.

[0256] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0257] For the target device to be fault-detected, obtain the normal operation data when the target device is operating normally, and fit the Weibull distribution according to the normal operation data;

[0258] Obtain the test run data of the target device, and obtain the data anomaly quantization value of the test run data according to the test run data and the Weibull parameters of the Weibull distribution;

[0259] Determine the fault detection result of the target device according to the data anomaly quantization value.

[0260] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0261] Input the normal operation data into the target feature extraction network in batches to obtain a plurality of first features;

[0262] Fit a Weibull distribution according to each first feature and the feature mean of the plurality of first features.

[0263] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0264] Obtain the first feature distance between each first feature and the feature mean, and fit a Weibull distribution according to each first feature distance.

[0265] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0266] Input the test run data into the target feature extraction network to obtain a second feature;

[0267] Obtain the second feature distance between the second feature and the feature mean, and substitute the second feature distance and the Weibull parameters into the preset probability cumulative function formula to obtain the data anomaly quantization value, and the size of the data anomaly quantization value is positively correlated with the second feature distance.

[0268] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0269] Detect whether the data anomaly quantization value is greater than the data anomaly threshold;

[0270] If the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault;

[0271] If the data anomaly quantization value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device has no operation fault.

[0272] In one embodiment, the target feature extraction network includes a plurality of dilated convolution modules, and the dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure.

[0273] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0274] Obtain sample operation data;

[0275] Perform self-supervised contrastive learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain the target feature extraction network, and the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

[0276] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0277] During the k-th contrastive learning process, obtain the sample feature data corresponding to the k-th contrastive learning process according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0278] Obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process and the negative sample feature extraction network corresponding to the k-th contrastive learning process according to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network;

[0279] Wherein, k is a positive integer greater than 0. When k is equal to 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrastive learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrastive learning process.

[0280] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0281] Calculate the loss value according to the sample feature data, and adjust the network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process;

[0282] Adjust the network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrastive learning process to obtain the negative sample feature extraction network corresponding to the k-th contrastive learning process.

[0283] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0284] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0285] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0286] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A fault detection method, characterized in that, The method includes: For the target device to be fault-detected, obtain the normal operation data when the target device is operating normally, and input the normal operation data into the target feature extraction network in batches to obtain multiple first features; obtain the first feature distances between each of the first features and the feature mean of the multiple first features, and fit a Weibull distribution according to each of the first feature distances; Obtain the test operation data of the target device, and input the test operation data into the target feature extraction network to obtain second features; obtain the second feature distances between the second features and the feature mean, and substitute the second feature distances and the Weibull parameters into a preset probability cumulative function formula to obtain the data anomaly quantization value, where the magnitude of the data anomaly quantization value is positively correlated with the second feature distances; Detect whether the data anomaly quantization value is greater than the data anomaly threshold; If the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault; If the data anomaly quantization value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device does not have an operation fault; Wherein, the target feature extraction network includes multiple dilated convolution modules, and each dilated convolution module includes multiple dilated convolution layers and an activation function layer, and the multiple dilated convolution layers and the activation function layer form a residual network structure; The probability cumulative function formula is determined according to the probability density expression corresponding to the Weibull distribution, and the probability cumulative function formula is as follows: Substitute the second characteristic distance , the Weibull parameter β, η and γ , to obtain the data anomaly quantization value: 。 2. The method according to claim 1, characterized in that, The method further includes: Obtain sample operation data; Perform self-supervised contrast learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain the target feature extraction network, where the initial network parameters of the initial positive sample feature extraction network and the initial negative sample feature extraction network are the same.

3. The method according to claim 2, characterized in that, The performing self-supervised contrast learning on the initial positive sample feature extraction network and the initial negative sample feature extraction network according to the sample operation data to obtain the target feature extraction network includes: During the k-th contrast learning process, obtain the sample feature data corresponding to the k-th contrast learning process according to the sample operation data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network; According to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network, obtain the positive sample feature extraction network corresponding to the k-th contrast learning process and the negative sample feature extraction network corresponding to the k-th contrast learning process; Where k is a positive integer greater than 0. When k equals 1, the intermediate positive sample feature extraction network is the initial positive sample feature extraction network, and the intermediate negative sample feature extraction network is the initial negative sample feature extraction network; when k is greater than 1, the intermediate positive sample feature extraction network is the positive sample feature extraction network corresponding to the (k - 1)-th contrastive learning process, and the intermediate negative sample feature extraction network is the negative sample feature extraction network corresponding to the (k - 1)-th contrastive learning process.

4. The method according to claim 3, wherein Obtaining the positive sample feature extraction network corresponding to the k-th contrastive learning process and the negative sample feature extraction network corresponding to the k-th contrastive learning process according to the sample feature data, the intermediate positive sample feature extraction network, and the intermediate negative sample feature extraction network includes: Calculating a loss value according to the sample feature data, and adjusting network parameters of the intermediate positive sample feature extraction network according to the loss value to obtain the positive sample feature extraction network corresponding to the k-th contrastive learning process; Adjusting network parameters of the intermediate negative sample feature extraction network according to the network parameters of the positive sample feature extraction network corresponding to the k-th contrastive learning process to obtain the negative sample feature extraction network corresponding to the k-th contrastive learning process.

5. A fault detection device, characterized in that, The device includes: A fitting module, configured to obtain normal operation data of a target device to be fault-detected when the target device is operating normally, and input the normal operation data into a target feature extraction network in batches to obtain a plurality of first features; obtain first feature distances between each of the first features and a feature mean of the plurality of first features, and fit a Weibull distribution according to each of the first feature distances; An obtaining module, configured to obtain test operation data of the target device, and input the test operation data into the target feature extraction network to obtain a second feature; obtain a second feature distance between the second feature and the feature mean, and substitute the second feature distance and the Weibull parameters into a preset probability cumulative function formula to obtain a data anomaly quantization value, where the magnitude of the data anomaly quantization value is positively correlated with the second feature distance; A detection module, configured to detect whether the data anomaly quantization value is greater than a data anomaly threshold; if the data anomaly quantization value is greater than the data anomaly threshold, determine that the fault detection result is that the target device has an operation fault; if the data anomaly quantization value is less than or equal to the data anomaly threshold, determine that the fault detection result is that the target device has no operation fault; Wherein, the target feature extraction network includes a plurality of dilated convolution modules, and each dilated convolution module includes a plurality of dilated convolution layers and an activation function layer, and the plurality of dilated convolution layers and the activation function layer form a residual network structure; The probability cumulative function formula is determined according to a probability density expression corresponding to the Weibull distribution, and the probability cumulative function formula is as follows: Substitute the second characteristic distance , the Weibull parameter β, η and γ , to obtain the data anomaly quantization value: 。 6. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Open set fault diagnosis method for bearing of high-speed motor train unit

    CN113375941A

  • Device monitoring and preventive maintenance system

    JP2000259222A