Method and device for training fault diagnosis model, electronic equipment and storage medium

By calculating the distribution difference between the target domain and the source domain data in the fault diagnosis model, and selecting source domain data with similar distributions for training, the problem of poor training effect caused by data distribution differences under different working conditions is solved, and the accuracy of fault diagnosis is improved.

CN116776156BActive Publication Date: 2026-02-13INST OF ADVANCED TECH UNIV OF SCI & TECH OF CHINA +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310901745.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2026-02-13
Estimated Expiration
2043-07-20

AI Technical Summary

Technical Problem

In existing technologies, the difficulty in obtaining fault labeling data leads to differences in data distribution for deep learning-based fault diagnosis models under different operating conditions, resulting in poor training performance and consequently low fault diagnosis accuracy.

Method used

By acquiring labeled fault data under multiple operating conditions as source domain data and unlabeled fault data as target domain data, calculating the distribution difference between the two, and selecting source domain data with a distribution similar to that of the target domain data as training data, the fault diagnosis model is trained.

Benefits of technology

This improved the training effect of the fault diagnosis model and increased the accuracy of fault diagnosis for the target operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776156B_ABST
    Figure CN116776156B_ABST
Patent Text Reader

Abstract

The application discloses a fault diagnosis model training method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: acquiring fault data in each working condition set in a plurality of working conditions as source domain data, and acquiring fault data in a target working condition as target domain data, wherein the working condition set comprises at least one working condition in the plurality of working conditions, the fault data in the working condition set is data with a marked fault category, and the fault data in the target working condition is data without a marked fault category; determining a target distribution difference between the target domain data and each source domain data; selecting source domain data as training data according to the target distribution difference; and training a fault diagnosis model of the target working condition according to the training data. The application can improve the model training effect and thus improve the accuracy of fault diagnosis on the target working condition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computers, and particularly relates to a training method and device of a fault diagnosis model, an electronic device, and a storage medium. BACKGROUND

[0002] Fault diagnosis technology based on deep learning is becoming one of the important technologies for equipment fault prediction and health management, and has great development potential. However, the effectiveness of the current fault diagnosis model based on deep learning generally depends on the available amount of fault labeled data, and it is usually assumed that the source domain data and the target domain data are subject to the same or similar distribution. However, in the industrial scene, it takes a lot of time to accumulate a sufficient amount of fault data and maintenance records, so it is unrealistic to obtain a large amount of labeled data of equipment faults, especially in the early stage of equipment operation.

[0003] In actual application, due to the difficulty in obtaining fault labeled data, the training data of the fault diagnosis model usually only comes from certain working conditions of the equipment, and the data distribution under different working conditions may be different, which leads to the fact that the source domain data and the target domain data of the fault diagnosis model may be subject to different distributions. If the fault diagnosis model is trained based on the source domain data with different distributions, the training effect of the model is poor, and then the fault diagnosis model is used to diagnose the target domain data, which leads to a low fault diagnosis accuracy. SUMMARY

[0004] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a training method and device of a fault diagnosis model, an electronic device, and a storage medium, which can improve the training effect of the fault diagnosis model and thus improve the accuracy of fault diagnosis.

[0005] In a first aspect, the present application provides a training method of a fault diagnosis model, which comprises:

[0006] Obtaining fault data under each working condition set in a plurality of working conditions as source domain data, and obtaining fault data under a target working condition as target domain data, wherein the working condition set comprises at least one working condition in the plurality of working conditions, the fault data under the working condition set is data with labeled fault categories, and the fault data under the target working condition is data without labeled fault categories;

[0007] Determining the target distribution difference between the target domain data and each source domain data;

[0008] Selecting source domain data as training data according to the target distribution difference;

[0009] Training the fault diagnosis model of the target working condition according to the training data.

[0010] According to the training method of the fault diagnosis model, the distribution difference between the target domain data and each source domain data is determined, source domain data with the same or similar distribution as the target domain data is selected as training data, the fault diagnosis model of the target working condition is trained, the model training effect is improved, and the accuracy of fault diagnosis of the target working condition is improved.

[0011] According to an embodiment of the present application, the target distribution difference between the target domain data and each source domain data is determined, comprising:

[0012] The maximum mean difference between the target domain data and each source domain data is calculated.

[0013] According to the maximum mean difference between the target domain data and each source domain data, the target distribution difference between the target domain data and each source domain data is determined.

[0014] According to an embodiment of the present application, the maximum mean difference between the target domain data and each source domain data is calculated, comprising:

[0015] Randomly sampling from the target domain data and each source domain data multiple times;

[0016] Each time a sample is randomly sampled, the maximum mean difference between the target domain data and each source domain data is calculated according to the sample randomly sampled this time.

[0017] According to an embodiment of the present application, the target distribution difference between the target domain data and each source domain data is determined according to the maximum mean difference between the target domain data and each source domain data, comprising:

[0018] The mean of the multiple maximum mean differences between the target domain data and each source domain data is calculated as the target distribution difference between the target domain data and each source domain data.

[0019] According to an embodiment of the present application, the target domain data includes multiple target domain samples, each source domain data includes multiple source domain samples, and each time a sample is randomly sampled, it includes multiple samples randomly sampled from the multiple target domain samples and multiple samples randomly sampled from the multiple source domain samples.

[0020] According to an embodiment of the present application, the fault data is time series data, the time series data includes data corresponding to each time series point, the data corresponding to each target number of time series points in the fault data is a sample, the target domain sample is a sample in the fault data under the target working condition, and the source domain sample is a sample in the fault data under the working condition set.

[0021] According to one embodiment of the present application, the selecting source domain data as training data according to the target distribution difference comprises:

[0022] According to the corresponding relationship between the distribution difference and the fault diagnosis accuracy, a target fault diagnosis accuracy corresponding to each target distribution difference is determined.

[0023] The source domain data with a target fault diagnosis accuracy greater than a reference accuracy is selected as training data.

[0024] According to one embodiment of the present application, the method further comprises:

[0025] The distribution difference between the target domain test data and the source domain test data of each combination is determined, wherein the target domain test data of each combination is the fault data under one working condition of the plurality of working conditions, and the source domain test data of each combination is the fault data under at least one remaining working condition of the plurality of working conditions.

[0026] According to the source domain test data and the target domain test data of each combination, a fault diagnosis test model is trained and tested to obtain a fault diagnosis accuracy corresponding to each combination.

[0027] According to the distribution difference and the fault diagnosis accuracy corresponding to each combination, a corresponding relationship between the distribution difference and the fault diagnosis accuracy is constructed.

[0028] According to one embodiment of the present application, the training and testing of the fault diagnosis test model according to the source domain test data and the target domain test data of each combination to obtain a fault diagnosis accuracy corresponding to each combination comprises:

[0029] The fault diagnosis test model is trained according to the source domain test data of each combination.

[0030] The trained fault diagnosis test model is tested according to the target domain test data of each combination to obtain a fault diagnosis accuracy corresponding to each combination.

[0031] In a second aspect, the present application provides a training device of a fault diagnosis model, which comprises:

[0032] The acquisition module is configured to acquire fault data under each working condition set of a plurality of working conditions as source domain data, and acquire fault data under a target working condition as target domain data, wherein the working condition set comprises at least one working condition of the plurality of working conditions, the fault data under the working condition set is data with a marked fault category, and the fault data under the target working condition is data without a marked fault category.

[0033] The first determination module is configured to determine a target distribution difference between the target domain data and each source domain data.

[0034] The selecting module is configured to select source domain data as training data according to the target distribution difference.

[0035] The training module is configured to train the fault diagnosis model of the target working condition according to the training data.

[0036] According to the training device of the fault diagnosis model, the distribution difference between the target domain data and each source domain data is determined, and the source domain data with the same or similar distribution as the target domain data is selected as the training data, so as to train the fault diagnosis model of the target working condition, improve the model training effect, and further improve the accuracy of fault diagnosis of the target working condition.

[0037] According to an embodiment of the present application, the first determining module is further configured to:

[0038] Calculate the maximum mean difference between the target domain data and each source domain data.

[0039] According to the maximum mean difference between the target domain data and each source domain data, the target distribution difference between the target domain data and each source domain data is determined.

[0040] According to an embodiment of the present application, the first determining module is further configured to:

[0041] Randomly sample from the target domain data and each source domain data.

[0042] Each time a sample is randomly sampled, the maximum mean difference between the target domain data and each source domain data is calculated according to the sample randomly sampled this time.

[0043] According to an embodiment of the present application, the first determining module is further configured to:

[0044] Calculate the mean of the plurality of maximum mean differences between the target domain data and each source domain data as the target distribution difference between the target domain data and each source domain data.

[0045] According to an embodiment of the present application, the target domain data includes a plurality of target domain samples, each source domain data includes a plurality of source domain samples, and each time a sample is randomly sampled, the sample includes a plurality of samples randomly sampled from the plurality of target domain samples and a plurality of samples randomly sampled from the plurality of source domain samples.

[0046] According to one embodiment of the present application, the fault data is time series data, the time series data includes data corresponding to each time point, data corresponding to each target number of time points in the fault data is taken as a sample, the target domain sample is a sample in the fault data under the target working condition, and the source domain sample is a sample in the fault data under the working condition set.

[0047] According to one embodiment of the present application, the selecting module is further configured to:

[0048] According to a corresponding relationship between the distribution difference and the fault diagnosis accuracy, a target fault diagnosis accuracy corresponding to each target distribution difference is determined.

[0049] The source domain data with a target fault diagnosis accuracy greater than a reference accuracy is selected as training data.

[0050] According to one embodiment of the present application, the apparatus further includes:

[0051] The second determining module is configured to determine a distribution difference between combined target domain test data and combined source domain test data, the combined target domain test data is fault data under one working condition in the plurality of working conditions, and the combined source domain test data is fault data under at least one remaining working condition in the plurality of working conditions.

[0052] The testing module is configured to train and test a fault diagnosis test model according to the combined source domain test data and the combined target domain test data, and obtain a fault diagnosis accuracy corresponding to each combination.

[0053] The constructing module is configured to construct a corresponding relationship between the distribution difference and the fault diagnosis accuracy according to the distribution difference and the fault diagnosis accuracy corresponding to each combination.

[0054] According to one embodiment of the present application, the testing module is further configured to:

[0055] The fault diagnosis test model is trained according to the combined source domain test data.

[0056] The trained fault diagnosis test model is tested according to the combined target domain test data, and a fault diagnosis accuracy corresponding to each combination is obtained.

[0057] In a third aspect, the present application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the fault diagnosis model training method of the first aspect when executing the computer program.

[0058] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the training method of the fault diagnosis model according to the first aspect.

[0059] Additional aspects and advantages of the present application will be made apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0060] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description, taken in conjunction with the accompanying drawings, in which:

[0061] Figure 1 is a flowchart of the training method of the fault diagnosis model provided by the embodiments of the present application;

[0062] Figure 2 is a corresponding relationship curve between the distribution difference and the fault diagnosis accuracy rate provided by the embodiments of the present application;

[0063] Figure 3 is a structural schematic diagram of the training device of the fault diagnosis model provided by the embodiments of the present application;

[0064] Figure 4 is a structural schematic diagram of the electronic device provided by the embodiments of the present application;

[0065] Figure 5 is a hardware schematic diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.

[0067] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a class, and are not limited to the number of objects, for example, the first object can be one or more.

[0068] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application. Figures 1 to 5The training method, apparatus, electronic device and storage medium of the fault diagnosis model provided in this application are described in detail through specific embodiments and application scenarios.

[0069] The training method for the fault diagnosis model can be applied to the terminal, specifically executed by the hardware or software within the terminal.

[0070] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0071] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.

[0072] The fault diagnosis model training method provided in this application embodiment can be executed by an electronic device or a functional module or functional entity in an electronic device that can implement the fault diagnosis model training method. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras and wearable devices. The following uses an electronic device as the execution subject to illustrate the fault diagnosis model training method provided in this application embodiment.

[0073] like Figure 1 As shown, the training method for the fault diagnosis model includes steps 110, 120, 130, and 140.

[0074] Step 110: Obtain fault data under each working condition set in multiple working conditions, and use them as source domain data. Also obtain fault data under the target working condition, and use it as target domain data. The working condition set includes at least one working condition among multiple working conditions. The fault data under the working condition set is data with fault categories marked, and the fault data under the target working condition is data with unmarked fault categories.

[0075] In this system, multiple operating conditions are labeled, meaning that the fault data for each of these conditions has been categorized. At least one operating condition can constitute a set of operating conditions; that is, by taking one, two, ..., all operating conditions as sets, multiple sets of operating conditions can be obtained. The fault data within each set is categorized, and the fault data within each set can serve as source domain data.

[0076] For example, the number of working conditions is k, and the working conditions are s1, s2, s3,..., s k 1 working condition, 2 working conditions,..., k working conditions in the plurality of working conditions are taken as working condition sets respectively, 2 k-1 -1 working condition sets can be obtained. The fault data under 2 k-1 -1 working condition sets are taken as source domain data, and 2 k-1 -1 source domain data are obtained.

[0077] The target working condition is an unmarked working condition, that is, the fault data under the target working condition is not marked with a fault category. The target working condition is different from the plurality of working conditions (marked working conditions), that is, the plurality of working conditions (marked working conditions) do not include the target working condition. The fault data under the target working condition can be taken as target domain data.

[0078] The fault data is the equipment operation data collected according to a certain collection frequency, that is, the fault data is time series data. The time series data includes data corresponding to each time series point, and the time series point is the collection point. The data corresponding to each target number of time series points in the fault data is taken as a sample, and the target number can be T, that is, the fault data is cut every T time series points, so that the data corresponding to every T time series points is taken as a sample. If the last cut data of the fault data is less than the data corresponding to T time series points, the part of data is discarded.

[0079] The fault data under each working condition in the plurality of working conditions (marked working conditions) is cut into a plurality of samples, so that the fault data under each working condition set includes a plurality of samples, that is, each source domain data includes a plurality of source domain samples, and the source domain sample is the sample in the fault data under the corresponding working condition set. Since the fault data under each working condition set is marked with a fault category, the sample in the fault data under each working condition set is marked with a corresponding fault category.

[0080] The fault data under the target working condition is cut into a plurality of samples, so that the fault data under the target working condition includes a plurality of samples, that is, the target domain data includes a plurality of target domain samples, and the target domain sample is the sample in the fault data under the target working condition. Since the fault data under the target working condition is not marked with a fault category, the sample in the fault data under the target working condition is not marked with a fault category.

[0081] In this embodiment, the fault data is cut into a plurality of samples to enrich the sample quantity and improve the training effect of the subsequent training of the fault diagnosis model.

[0082] Step 120, determining the target distribution difference between the target domain data and each source domain data.

[0083] The target distribution difference between the target domain data and the source domain data refers to a difference degree between a target domain data distribution and a source domain data distribution. The target distribution difference can be determined based on a maximum mean discrepancy (MMD).

[0084] In some embodiments, the determining of the target distribution difference between the target domain data and each source domain data in step 120 comprises: calculating a maximum mean discrepancy between the target domain data and each source domain data; and determining the target distribution difference between the target domain data and each source domain data according to the maximum mean discrepancy between the target domain data and each source domain data.

[0085] When the target domain data comprises a plurality of target domain samples and the source domain data comprises a plurality of source domain samples, the maximum mean discrepancy between the target domain data and each source domain data can be determined by a target domain sample in the target domain data and a source domain sample in each source domain data.

[0086] In some embodiments, the calculating of the maximum mean discrepancy between the target domain data and each source domain data comprises: randomly sampling a plurality of times from the target domain data and each source domain data; and calculating the maximum mean discrepancy between the target domain data and each source domain data according to the sample randomly sampled each time.

[0087] For the target domain data and each source domain data, a plurality of times (e.g., M times) of sampling are performed. In each time of sampling, a plurality of samples are randomly sampled from a plurality of target domain samples of the target domain data, and a plurality of samples are randomly sampled from a plurality of source domain samples of the source domain data, so that each time of sampling includes a plurality of samples randomly sampled from the plurality of target domain samples and a plurality of samples randomly sampled from the plurality of source domain samples. Wherein, the number of samples randomly sampled from the target domain data is m, and the number of samples randomly sampled from the source domain data is n, m is much smaller than n. In addition, in the M times of sampling, the number of samples randomly sampled from the target domain data is the same each time, and the number of samples randomly sampled from the source domain data is the same each time.

[0088] For the target domain data and each source domain data, M times of sampling are performed. In each time of sampling, the maximum mean discrepancy between the target domain data and the source domain data is calculated according to m samples randomly sampled from the target domain data and n samples randomly sampled from the source domain data. The calculation formula of the maximum mean discrepancy is as follows:

[0089]

[0090] Wherein, MMD 2 [S, T] is the square of the maximum mean discrepancy between the target domain data T and the source domain data S, s is is the i th sample in n randomly selected samples in the source domain data S i′ s is the i th sample in n randomly selected samples in the source domain data S j t is the j th sample in m randomly selected samples in the target domain data T j′ t is the j th sample in m randomly selected samples in the target domain data T

[0091] After M times of random sampling, M maximum mean differences between the target domain data and the source domain data can be obtained.

[0092] According to the M maximum mean differences, a target distribution difference between the target domain data and the source domain data is determined.

[0093] In some embodiments, according to the maximum mean differences between the target domain data and each source domain data, the target distribution difference between the target domain data and each source domain data is determined, including: calculating a mean of the plurality of maximum mean differences between the target domain data and each source domain data as the target distribution difference between the target domain data and each source domain data.

[0094] For the target domain data and each source domain data, M maximum mean differences are obtained. A mean of the M maximum mean differences is calculated, and the mean is taken as the target distribution difference between the target domain data and the source domain data.

[0095] Step 130, selecting the source domain data as training data according to the target distribution difference.

[0096] After determining the target distribution difference between the target domain data and each source domain data, at least one source domain data can be selected as training data according to the target distribution difference, so as to ensure that the distribution of the target domain data is the same as or similar to the distribution of the selected source domain data, and improve the effectiveness of the training data.

[0097] In some embodiments, the size of the target distribution difference can be judged based on the fault diagnosis accuracy. In step 130, the source domain data is selected as training data according to the target distribution difference, including: determining the target fault diagnosis accuracy corresponding to each target distribution difference according to the corresponding relationship between the distribution difference and the fault diagnosis accuracy; selecting the source domain data with a target fault diagnosis accuracy greater than a reference accuracy as training data.

[0098] The corresponding relationship between the distribution difference and the fault diagnosis accuracy rate can be constructed in advance. After the target distribution difference between the target domain data and the source domain data is determined, the target fault diagnosis accuracy rate corresponding to each target distribution difference can be directly determined according to the corresponding relationship, so as to determine the target fault diagnosis accuracy rate corresponding to each source domain data. The source domain data with a large target fault diagnosis accuracy rate is selected as the training data, so as to improve the subsequent model training effect.

[0099] In step 140, the fault diagnosis model of the target working condition is trained according to the training data.

[0100] Since the training data is the selected source domain data, and the source domain data has been labeled with the fault category, the fault diagnosis model of the target working condition is trained according to the selected source domain data and the labeled fault category. The trained fault diagnosis model is used for fault diagnosis of the target working condition. The fault data under the target working condition is input into the trained fault diagnosis model, so that the trained fault diagnosis model outputs the fault category, which is the predicted fault category of the fault data under the target working condition.

[0101] In this embodiment, the distribution difference between the target domain data and each source domain data is determined, so that the source domain data with the same or similar distribution as the target domain data is selected as the training data, the fault diagnosis model of the target working condition is trained, the model training effect is improved, and the accuracy of fault diagnosis of the target working condition is further improved.

[0102] In some embodiments, the corresponding relationship between the distribution difference and the fault diagnosis accuracy rate is constructed according to the fault data under a plurality of working conditions (labeled working conditions). The training method of the fault diagnosis model further includes: determining the distribution difference between the combined target domain test data and the source domain test data, the combined target domain test data being the fault data under one working condition of the plurality of working conditions, and the combined source domain test data being the fault data under at least one remaining working condition of the plurality of working conditions; training and testing the fault diagnosis test model according to the combined source domain test data and the target domain test data to obtain the fault diagnosis accuracy rate corresponding to each combination; and constructing the corresponding relationship between the distribution difference and the fault diagnosis accuracy rate according to the distribution difference and the fault diagnosis accuracy rate corresponding to each combination.

[0103] The fault data under one working condition is selected as the target domain test data from a plurality of working conditions (labeled working conditions), and the fault data under at least one working condition is selected as the source domain test data from the remaining working conditions. The target domain test data and the source domain test data form a combination, that is, {[source domain test data], [target domain test data]}.

[0104] For example, the number of the plurality of working conditions (labeled working conditions) is k, and the plurality of working conditions are s1, s2, s3,..., sk The fault data of one of the working conditions is selected as the target domain test data, and the fault data of at least one of the remaining working conditions is selected as the source domain test data, so as to obtain k(2 k-1 For example, k is 4, and the four working conditions are s1, s2, s3 and s4. There are 28 combinations: {[s2], [s1]}, {[s3], [s1]}, {[s4], [s1]}, {[s2, s3], [s1]}, {[s2, s4], [s1]}, {[s3, s4], [s1]}, {[s2, s3, s4], [s1]}, {[s1], [s2]}, {[s3], [s2]}, {[s4], [s2]}, {[s1, s3], [s2]}, {[s1, s4], [s2]}, {[s3, s4], [s2]}, {[s1, s3, s4], [s2]}, and so on.

[0105] For each combination, the distribution difference between the target domain test data and the source domain test data is determined in the same way as the determination of the target distribution difference between the target domain data and the source domain data in step 120. According to the maximum mean difference between the target domain test data and the source domain test data, the distribution difference between the target domain test data and the source domain test data is determined.

[0106] Since the target domain test data is the fault data of one of the working conditions, and the source domain test data is the fault data of at least one of the working conditions, the target domain test data includes multiple samples, and the source domain test data includes multiple samples. In some embodiments, for each combination, samples are randomly extracted multiple times (such as N times). At each time of randomly extracting samples, p samples are randomly extracted from the target domain test data, and q samples are randomly extracted from the source domain test data, p is much smaller than q. According to the randomly extracted p samples and q samples, the maximum mean difference (MMD) between the target domain test data and the source domain test data is calculated. After N times of random extraction, N maximum mean differences are obtained. Then, the mean of the N maximum mean differences is calculated, and the mean is taken as the distribution difference between the target domain test data and the source domain test data.

[0107] For each combination, the fault diagnosis test model is trained and tested according to the target domain test data and the source domain test data of the combination, and the fault diagnosis accuracy corresponding to the combination can be obtained according to the test result.

[0108] In some embodiments, the fault diagnosis test model is trained and tested based on the source domain test data and target domain test data of each combination to obtain the fault diagnosis accuracy corresponding to each combination, including: training the fault diagnosis test model based on the source domain test data and target domain test data of each combination; and testing the trained fault diagnosis test model based on the target domain test data of each combination to obtain the fault diagnosis accuracy corresponding to each combination.

[0109] Since the source domain test data consists of fault data under at least one of multiple operating conditions (labeled operating conditions), the source domain test data already has fault categories labeled, meaning the samples in the source domain test data have fault categories labeled. For each combination, the fault diagnosis test model is trained based on the samples in the source domain test data and the labeled fault categories. After the fault diagnosis test model is trained, it is applied to the target domain test data, i.e., the target domain test data is input into the trained fault diagnosis test model to predict the fault category of each sample in the target domain test data. Since the target domain test data consists of fault data under one of multiple operating conditions (labeled operating conditions), the target domain test data already has fault categories labeled, meaning the samples in the target domain test data have fault categories labeled. The fault categories labeled for each sample in the target domain test data are compared with the fault categories predicted by the fault diagnosis test model to determine the accuracy of the fault diagnosis test model's prediction; this accuracy is the fault diagnosis accuracy.

[0110] For example, if the target domain test data includes 5 samples A1, A2, A3, A4 and A5, and the fault categories predicted by samples A1 and A2 are the same as the labeled fault categories, while the fault categories predicted by samples A3, A4 and A5 are different from the labeled fault categories, then the fault diagnosis accuracy is 40%.

[0111] After determining the fault diagnosis accuracy rate corresponding to each combination, a curve is plotted with the distribution difference corresponding to each combination as the horizontal axis and the fault diagnosis accuracy rate corresponding to each combination as the vertical axis. This yields the corresponding relationship between the distribution difference and the fault diagnosis accuracy rate.

[0112] For example, fault data under multiple operating conditions (labeled conditions) are bearing vibration signal data. Based on the fault data under multiple operating conditions (labeled conditions), a curve relating distribution differences to fault diagnosis accuracy is constructed, such as... Figure 2 As shown in the figure. It can be seen that when the distribution difference is between 0 and 0.9 × 10⁻⁶, -4 When the accuracy of fault diagnosis is between 50% and 80%, the distributional variation is between 0 and 0.9 × 10⁻⁶. -4 Source domain data between these points can be used as training data, showing good performance in training fault diagnosis models for target operating conditions. When the distribution difference is within 0.9 × 10⁻⁶...-4 between 2x10 -4 When the fault diagnosis accuracy is less than 43% when the distribution difference is between 2x10 If the fault diagnosis accuracy corresponding to all distribution differences is low, it indicates that the effect of training the fault diagnosis model of the target working condition based on the fault data of other labeled working conditions is poor, and other models or other methods can be used to perform fault diagnosis on the target working condition.

[0113] According to the fault diagnosis model training method provided in the embodiments of the present application, by determining the distribution difference between the target domain data and each source domain data, the source domain data with the same or similar distribution as the target domain data is selected as the training data, the fault diagnosis model of the target working condition is trained, the model training effect is improved, and the accuracy of fault diagnosis on the target working condition is improved.

[0114] The fault diagnosis model training method provided in the embodiments of the present application can be executed by a fault diagnosis model training device. In the embodiments of the present application, the fault diagnosis model training method executed by the fault diagnosis model training device is taken as an example to illustrate the fault diagnosis model training device provided in the embodiments of the present application.

[0115] The embodiments of the present application also provide a fault diagnosis model training device.

[0116] As shown in Figure 3 The fault diagnosis model training device includes an acquisition module 310, a determination module 320, a selection module 330, and a training module 340.

[0117] The acquisition module 310 is configured to acquire fault data in each working condition set in a plurality of working conditions as source domain data, and acquire fault data in a target working condition as target domain data. The working condition set includes at least one working condition in the plurality of working conditions. The fault data in the working condition set is data with a labeled fault category, and the fault data in the target working condition is data without a labeled fault category.

[0118] The first determination module 320 is configured to determine a target distribution difference between the target domain data and each source domain data.

[0119] The selection module 330 is configured to select the source domain data as training data according to the target distribution difference.

[0120] The training module 340 is configured to train a fault diagnosis model of the target working condition according to the training data.

[0121] According to the training device of the fault diagnosis model provided in the embodiment, the distribution difference between the target domain data and each source domain data is determined, so that the source domain data with the same or similar distribution as the target domain data is selected as the training data, the fault diagnosis model of the target working condition is trained, the model training effect is improved, and the accuracy of fault diagnosis on the target working condition is improved.

[0122] In some embodiments, the first determination module 320 is further configured to:

[0123] calculate the maximum mean difference between the target domain data and each source domain data;

[0124] determine the target distribution difference between the target domain data and each source domain data according to the maximum mean difference between the target domain data and each source domain data.

[0125] In some embodiments, the first determination module 320 is further configured to:

[0126] randomly sample from the target domain data and each source domain data;

[0127] each time a sample is randomly sampled, the maximum mean difference between the target domain data and each source domain data is calculated according to the sample randomly sampled this time.

[0128] In some embodiments, the first determination module 320 is further configured to:

[0129] calculate the mean of the plurality of maximum mean differences between the target domain data and each source domain data as the target distribution difference between the target domain data and each source domain data.

[0130] In some embodiments, the target domain data includes a plurality of target domain samples, each source domain data includes a plurality of source domain samples, and each time a sample is randomly sampled, the sample includes a plurality of samples randomly sampled from the plurality of target domain samples and a plurality of samples randomly sampled from the plurality of source domain samples.

[0131] In some embodiments, the fault data is time series data, the time series data includes data corresponding to each time series point, and the data corresponding to each target number of time series points in the fault data is a sample. The target domain sample is a sample in the fault data under the target working condition, and the source domain sample is a sample in the fault data under the working condition set.

[0132] In some embodiments, the selection module 330 is further configured to:

[0133] determine the target fault diagnosis accuracy corresponding to each target distribution difference according to the corresponding relationship between the distribution difference and the fault diagnosis accuracy;

[0134] select the source domain data with a target fault diagnosis accuracy greater than a reference accuracy as the training data.

[0135] In some embodiments, the apparatus further includes:

[0136] a second determining module configured to determine distribution difference between the combined target domain test data and the combined source domain test data, the combined target domain test data being fault data under one working condition of the plurality of working conditions, and the combined source domain test data being fault data under at least one remaining working condition of the plurality of working conditions;

[0137] a testing module configured to train and test the fault diagnosis test model according to the combined source domain test data and the combined target domain test data, to obtain the fault diagnosis accuracy corresponding to each combination;

[0138] a constructing module configured to construct a corresponding relationship between the distribution difference and the fault diagnosis accuracy according to the distribution difference and the fault diagnosis accuracy corresponding to each combination.

[0139] In some embodiments, the testing module is further configured to:

[0140] train the fault diagnosis test model according to the combined source domain test data;

[0141] test the trained fault diagnosis test model according to the combined target domain test data, to obtain the fault diagnosis accuracy corresponding to each combination.

[0142] The training apparatus of the fault diagnosis model in the embodiments of the present applicationapplicationbe an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic deviceapplicationbe a terminal or other devices than a terminal. For example, the electronic deviceapplicationbe a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), andapplicationbe a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, and the embodiments of the present application do not make a specific limitation.

[0143] The training apparatus of the fault diagnosis model in the embodiments of the present application can be an apparatus with an operating system. The operating system can be a Microsoft (Windows) operating system, an Android operating system, an IOS operating system, or other possible operating systems, and the embodiments of the present application do not make specific limitations.

[0144] The training apparatus of the fault diagnosis model provided in the embodiments of the present application can realize Figures 1 to 2 The method embodiments realize various processes, and to avoid repetition, the various processes are not described herein again.

[0145] In some embodiments, as shown in Figure 4 The embodiments of the present application also provide an electronic device 400, which includes a processor 401, a memory 402, and a computer program stored in the memory 402 and capable of running on the processor 401. When the program is executed by the processor 401, various processes of the above-mentioned fault diagnosis model training method embodiments are realized, and the same technical effects can be achieved. To avoid repetition, the various processes are not described herein again.

[0146] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device described above.

[0147] Figure 5 To realize the hardware structure of an electronic device in the embodiments of the present application.

[0148] The electronic device 500 includes but is not limited to the following components: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510, etc.

[0149] Those skilled in the art can understand that the electronic device 500 can also include a power supply (such as a battery) for supplying power to various components. The power supply can be logically connected to the processor 510 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the embodiments of the present application does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown, or combine certain components, or have different component arrangements, which are not described herein again.

[0150] The processor 510 is configured to obtain fault data in each working condition set of the plurality of working conditions as source domain data, respectively, and obtain fault data in a target working condition as target domain data, the working condition set including at least one working condition of the plurality of working conditions, the fault data in the working condition set being data with marked fault categories, and the fault data in the target working condition being data without marked fault categories; determine a target distribution difference between the target domain data and each source domain data; select source domain data as training data according to the target distribution difference; and train a fault diagnosis model for the target working condition according to the training data.

[0151] According to the electronic device provided in the embodiments of the present application, the distribution difference between the target domain data and each source domain data is determined to select source domain data with the same or similar distribution as the target domain data as training data, so as to train a fault diagnosis model for the target working condition, improve the model training effect, and further improve the accuracy of fault diagnosis for the target working condition.

[0152] In some embodiments, the processor 510 is further configured to calculate a maximum mean difference between the target domain data and each source domain data; and determine the target distribution difference between the target domain data and each source domain data according to the maximum mean difference between the target domain data and each source domain data.

[0153] In some embodiments, the processor 510 is further configured to randomly sample from the target domain data and each source domain data multiple times; and each time a sample is randomly sampled, calculate a maximum mean difference between the target domain data and each source domain data according to the sample randomly sampled this time.

[0154] In some embodiments, the processor 510 is further configured to calculate a mean of the plurality of maximum mean differences between the target domain data and each source domain data as the target distribution difference between the target domain data and each source domain data.

[0155] In some embodiments, the processor 510 is further configured to determine a target fault diagnosis accuracy rate corresponding to each target distribution difference according to a corresponding relationship between the distribution difference and the fault diagnosis accuracy rate; and select source domain data with a target fault diagnosis accuracy rate greater than a reference accuracy rate as training data.

[0156] In some embodiments, the processor 510 is further configured to determine a distribution difference between combined target domain test data and combined source domain test data, the combined target domain test data being fault data in one working condition of the plurality of working conditions, and the combined source domain test data being fault data in at least one remaining working condition of the plurality of working conditions; train and test a fault diagnosis test model according to each combination of the source domain test data and the target domain test data to obtain a fault diagnosis accuracy rate corresponding to each combination; and construct a corresponding relationship between the distribution difference and the fault diagnosis accuracy rate according to the distribution difference and the fault diagnosis accuracy rate corresponding to each combination.

[0157] In some embodiments, the processor 510 is further configured to train the fault diagnosis test model according to the combined source domain test data, and test the trained fault diagnosis test model according to the combined target domain test data to obtain a fault diagnosis accuracy corresponding to each combination.

[0158] It should be understood that in the embodiments of the present application, the input unit 504 can include a graphics processor (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 can include a display panel 5061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 can include a touch detection device and a touch controller. The other input devices 5072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, and the like, which will not be described here.

[0159] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 509 can include a volatile memory or a non-volatile memory, or the memory 509 can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 509 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.

[0160] The processor 510 can include one or more processing units; the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 510.

[0161] The embodiments of the present application also provide a non-transitory computer readable storage medium, which stores a computer program, the computer program is executed by a processor to implement each process of the training method embodiments of the fault diagnosis model, and can achieve the same technical effects. To avoid repetition, it will not be repeated here.

[0162] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0163] The present application also provides a computer program product, including a computer program, which is executed by a processor to implement the training method of the fault diagnosis model.

[0164] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0165] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or device including a series of elements does not only include those elements, but also includes other elements not explicitly listed, or includes elements inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the present application is not limited to the order of performing the functions shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.

[0166] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, or network equipment, etc.) execute the method described in each embodiment of the present application.

[0167] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, all of which belong to the protection of the present application.

[0168] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the exemplary description of the above terms does not necessarily mean the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0169] Although the embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made thereto without departing from the principles and spirit of the present application, and the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for training a failure diagnosis model, characterized in that, The method comprises the following steps: obtaining fault data in each condition set in a plurality of conditions as source domain data, and obtaining fault data in a target condition as target domain data, wherein the condition set comprises at least one condition in the plurality of conditions, the fault data in the condition set is data with marked fault categories, and the fault data in the target condition is data without marked fault categories; determining target distribution differences between the target domain data and each source domain data; selecting source domain data as training data according to the target distribution differences; training a fault diagnosis model for the target condition according to the training data; the step of selecting source domain data as training data according to the target distribution differences comprises the following step: determining target fault diagnosis accuracies corresponding to each target distribution difference according to a corresponding relationship between the distribution differences and the fault diagnosis accuracies; source domain data with a target fault diagnosis accuracy greater than a reference accuracy is selected as training data.

2. The method of claim 1, wherein, the step of determining target distribution differences between the target domain data and each source domain data comprises the following steps: calculating maximum mean differences between the target domain data and each source domain data; determining target distribution differences between the target domain data and each source domain data according to the maximum mean differences between the target domain data and each source domain data.

3. The method of claim 2, wherein, the step of calculating maximum mean differences between the target domain data and each source domain data comprises the following steps: randomly sampling samples from the target domain data and each source domain data multiple times; each time a sample is randomly sampled, a maximum mean difference between the target domain data and each source domain data is calculated according to the sample randomly sampled this time.

4. The method of claim 3, wherein, the step of determining target distribution differences between the target domain data and each source domain data according to the maximum mean differences between the target domain data and each source domain data comprises the following step: calculating a mean of a plurality of maximum mean differences between the target domain data and each source domain data as a target distribution difference between the target domain data and each source domain data.

5. The method of claim 3, wherein the training of the failure diagnosis model is performed by using a plurality of pieces of training data, each of which includes a feature vector and a label indicating a failure type of a device. the target domain data comprises a plurality of target domain samples, each source domain data comprises a plurality of source domain samples, and each time a sample is randomly sampled, the sample comprises a plurality of samples randomly sampled from the plurality of target domain samples and a plurality of samples randomly sampled from the plurality of source domain samples.

6. The method of claim 5, wherein, the fault data is time series data, the time series data comprises data corresponding to each time series point, data corresponding to each target number of time series points in the fault data is a sample, the target domain sample is a sample in the fault data in the target condition, and the source domain sample is a sample in the fault data in the condition set. 7.The method of claim 1, wherein, The method further comprises the following steps: determining distribution differences between combined target domain test data and source domain test data, wherein the combined target domain test data is fault data in one condition in the plurality of conditions, and the combined source domain test data is fault data in at least one remaining condition in the plurality of conditions; training and testing a fault diagnosis test model according to each combined source domain test data and target domain test data to obtain a fault diagnosis accuracy corresponding to each combination. According to the distribution difference and the fault diagnosis accuracy of each combination, a corresponding relationship between the distribution difference and the fault diagnosis accuracy is constructed. 8.The method of claim 7, wherein, The training and testing of the fault diagnosis test model according to the source domain test data and the target domain test data of each combination are performed to obtain the fault diagnosis accuracy corresponding to each combination, including: The fault diagnosis test model is trained according to the source domain test data of each combination; The trained fault diagnosis test model is tested according to the target domain test data of each combination to obtain the fault diagnosis accuracy corresponding to each combination.

9. A device for training a failure diagnosis model, which implements the method for training a failure diagnosis model according to any one of claims 1 to 8, characterized by, It includes: The acquisition module is used for acquiring fault data under each working condition set in a plurality of working conditions as source domain data, and acquiring fault data under a target working condition as target domain data, wherein the working condition set includes at least one working condition in the plurality of working conditions, the fault data under the working condition set is data with labeled fault categories, and the fault data under the target working condition is data without labeled fault categories; The first determination module is used for determining the target distribution difference between the target domain data and each source domain data; The selection module is used for selecting source domain data as training data according to the target distribution difference; The training module is used for training the fault diagnosis model of the target working condition according to the training data.

10. The device for training a failure diagnosis model according to claim 9, wherein The first determination module is also used for: calculating the maximum mean difference between the target domain data and each source domain data; determining the target distribution difference between the target domain data and each source domain data according to the maximum mean difference between the target domain data and each source domain data.

11. The device for training a failure diagnosis model according to claim 10, wherein The first determination module is also used for: randomly sampling samples from the target domain data and each source domain data multiple times; each time a sample is randomly sampled, the maximum mean difference between the target domain data and each source domain data is calculated according to the sample randomly sampled this time.

12. The device for training a failure diagnosis model according to claim 11, wherein The first determination module is also used for: calculating the mean of a plurality of maximum mean differences between the target domain data and each source domain data as the target distribution difference between the target domain data and each source domain data.

13. The device for training a failure diagnosis model according to claim 11, wherein The target domain data includes a plurality of target domain samples, each source domain data includes a plurality of source domain samples, and each time a sample is randomly sampled, a plurality of samples are randomly sampled from the plurality of target domain samples and a plurality of samples are randomly sampled from the plurality of source domain samples.

14. The device for training a failure diagnosis model according to claim 13, wherein The fault data is time series data, the time series data includes data corresponding to each time series point, and the data corresponding to each target number of time series points in the fault data is a sample, the target domain sample is a sample in the fault data under the target working condition, and the source domain sample is a sample in the fault data under the working condition set.

15. The device for training a failure diagnosis model according to claim 9, wherein The selection module is also used for: determining the target fault diagnosis accuracy corresponding to each target distribution difference according to the corresponding relationship between the distribution difference and the fault diagnosis accuracy; selecting source domain data with a target fault diagnosis accuracy greater than a reference accuracy as training data.

16. The device for training a failure diagnosis model according to claim 9, wherein The device further includes: The second determining module is configured to determine distribution differences between combined target domain test data and source domain test data, the combined target domain test data being fault data under one working condition of the plurality of working conditions, and the combined source domain test data being fault data under at least one remaining working condition of the plurality of working conditions. The testing module is configured to train and test the fault diagnosis test model according to the source domain test data and the target domain test data of each combination, to obtain a fault diagnosis accuracy corresponding to each combination. The constructing module is configured to construct a corresponding relationship between the distribution differences and the fault diagnosis accuracies according to the distribution differences and the fault diagnosis accuracies corresponding to each combination.

17. The device for training a failure diagnosis model according to claim 16, wherein The testing module is further configured to: train the fault diagnosis test model according to the source domain test data of each combination; and test the trained fault diagnosis test model according to the target domain test data of each combination, to obtain a fault diagnosis accuracy corresponding to each combination.

18. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the training method of the fault diagnosis model according to any one of claims 1-8. 19.A non-transitory computer-readable storage medium having stored thereon a computer program. The computer program is executed by the processor to implement the training method of the fault diagnosis model according to any one of claims 1-8.

Citation Information

Patent Citations

  • Rotating machinery variable working condition fault diagnosis method and system

    CN115165366A