A black box domain adaptation industrial equipment diagnosis method and system and storage medium
By constructing N source domain models and training the target domain model with weighted pseudo-labels, the problems of source domain and target domain differences and negative migration in black-box domain adaptation are solved, achieving efficient industrial equipment diagnosis while ensuring data privacy and security.
Patent Information
- Application Number
- CN202310227528.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-03-10
AI Technical Summary
Existing black-box domain adaptation methods for industrial equipment diagnosis suffer from the problem that the average prediction results cannot characterize the differences between the source and target domains, and that the negative migration phenomenon is severe.
By constructing N source domain models, determining and weighting the model's weight parameters, retraining the target domain model using pseudo-labels, and calculating the weights using formulas I and G to measure the domain relevance and avoid negative transfer.
It effectively solves the problem of negative transfer, ensures data privacy and security, and achieves efficient transfer learning.
Smart Images

Figure CN116243680B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine equipment fault diagnosis technology, and more specifically to a black-box domain-adaptive industrial equipment diagnosis method, system, and storage medium. Background Technology
[0002] Deep learning techniques have been widely applied in fault diagnosis, achieving good results. Black-box domain adaptation, such as using LSTM, optimizes different tasks at different output positions, so that the information needed by these tasks is passed to the final task. Due to privacy protection and memory limitations, multiple industrial equipment diagnostic models cannot share parameters but are provided as black-box APIs. However, since industrial equipment fault diagnosis data involves privacy, how to implement industrial equipment diagnosis based on the APIs of these models and some known unlabeled samples is indeed a major challenge.
[0003] The drawback of existing black-box domain adaptation methods is that they simply average the prediction results of multiple source domain models on the target domain data, and then use the average result as pseudo-labels to retrain the model. This method has two problems. First, different source domain models have different correlations with the target domain, and averaging cannot characterize this difference. Second, in some scenarios, due to the existence of negative transfer (a source domain may have greatly different or even opposite patterns to the target domain), averaging amplifies the side effects of negative transfer.
[0004] Therefore, how to provide a black-box domain-adaptive industrial equipment diagnostic method, system, and storage medium is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention provides a black-box domain-adaptive industrial equipment diagnostic method, system, and storage medium to solve the problems existing in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] On one hand, the present invention provides a black-box domain-adaptive industrial equipment diagnostic method, comprising the following steps:
[0008] Acquire industrial equipment domain data and determine target domain data;
[0009] Construct N source domain models, input the target domain data into each of the N source domain models, and obtain N pseudo-labels;
[0010] Determine the weight parameters of the model, and then weight the model parameters according to the weight parameters;
[0011] Retrain a target domain model based on the weighted model parameters;
[0012] Fault diagnosis of industrial equipment based on target domain model.
[0013] Preferably, determining the model's weight parameters and weighting the model parameters according to the weight parameters includes:
[0014] Sort and filter the N pseudo-labels;
[0015] The positive and negative probabilities are calculated for the filtered pseudo-labels, and the number of positive probabilities, the maximum value of pseudo-labels in the positive probabilities, the number of negative probabilities, and the maximum value of pseudo-labels in the negative probabilities are obtained respectively.
[0016] Substitute the values into the following formula to calculate the value for combination I:
[0017]
[0018] In the formula, I represents the analysis result value for a certain multi-source domain combination, which is used for the calculation of the source domain model weights in the following text, and D S D represents a combination of multiple source domains in the input. T Indicates the target domain of the input. This indicates the number of positive probabilities. This represents the number of negative probabilities. This represents the maximum value of the pseudo-label in the positive probability. The maximum value of the pseudo-label in the negative probability. This represents each sample traversed from the target domain, calculating a corresponding I value for each sample in the target domain, and summing the I values for each sample.
[0019] Preferably, determining the model's weight parameters and weighting the model parameters according to the weight parameters further includes:
[0020] Based on the I-value of the samples, the influence of each source domain is measured by the domain-related importance measure, and the specific formula is as follows:
[0021]
[0022] In the formula, Let K represent a single source domain K, S' represent a subset of other combinations of source domains after removing source domain K, |S'| represent the number of source domains in the subset, and |S'|! represents the factorial of the number of source domains in the subset;
[0023] The weight parameters are obtained based on the degree of influence of each source domain;
[0024] The model parameters are weighted according to the weight parameters.
[0025] Preferably, the fault diagnosis of industrial equipment based on the target domain model includes:
[0026] Obtain test samples of industrial equipment;
[0027] Input the test samples into the trained target domain model;
[0028] Output the fault diagnosis results for the target domain.
[0029] On the other hand, the present invention provides a black-box domain-adaptive industrial equipment diagnostic system, comprising:
[0030] The acquisition module is used to acquire industrial equipment domain data and determine target domain data;
[0031] A construction module, connected to the acquisition module, is used to construct N source domain models, input the target domain data into the N source domain models respectively, and obtain N pseudo-labels;
[0032] The calculation module, connected to the construction module, is used to determine the weight parameters of the model and to weight the model parameters according to the weight parameters;
[0033] The training module, connected to the computing module, is used to retrain a target domain model based on the weighted model parameters.
[0034] The output module, connected to the training module, is used for fault diagnosis of industrial equipment based on the target domain model.
[0035] Preferably, the computing module includes a first computing processing unit, used to perform the following functions:
[0036] Sort and filter the N pseudo-labels;
[0037] The positive and negative probabilities are calculated for the filtered pseudo-labels, and the number of positive probabilities, the maximum value of pseudo-labels in the positive probabilities, the number of negative probabilities, and the maximum value of pseudo-labels in the negative probabilities are obtained respectively.
[0038] Substitute the values into the following formula to calculate the value for combination I:
[0039]
[0040] In the formula, I represents the analysis result value for a certain multi-source domain combination, which is used for the calculation of the source domain model weights in the following text, and D S D represents a combination of multiple source domains in the input. T Indicates the target domain of the input. This indicates the number of positive probabilities. This represents the number of negative probabilities. This represents the maximum value of the pseudo-label in the positive probability. The maximum value of the pseudo-label in the negative probability. This represents each sample traversed from the target domain, calculating a corresponding I value for each sample in the target domain, and summing the I values for each sample.
[0041] Preferably, the computing module includes a second computing processing unit connected to the first computing processing unit, for performing the following functions:
[0042] Based on the I-value of the samples, the influence of each source domain is measured by the domain-related importance measure, and the specific formula is as follows:
[0043]
[0044] In the formula, Let K represent a single source domain K, S' represent a subset of other combinations of source domains after removing source domain K, |S'| represent the number of source domains in the subset, and |S'|! represents the factorial of the number of source domains in the subset;
[0045] The weight parameters are obtained based on the degree of influence of each source domain;
[0046] The model parameters are weighted according to the weight parameters.
[0047] Preferably, the output module includes:
[0048] Acquisition unit, used to acquire test samples of industrial equipment;
[0049] An input unit, connected to the acquisition unit and the training module, is used to input test samples into the trained target domain model.
[0050] The output unit, connected to the training module, is used to output the fault diagnosis results of the target domain.
[0051] In another aspect, the present invention also provides a computer storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of a black-box domain-adaptive industrial equipment diagnostic method.
[0052] As can be seen from the above technical solution, compared with the prior art, the present invention provides a method to obtain the weights of different models using only the model API. This invention effectively avoids negative transfer and does not require source domain modeling data. Specific beneficial effects are as follows:
[0053] 1) This invention can effectively guarantee data privacy and security: This invention does not access the user data itself, but only uses the model's output to train a new model, thereby achieving the purpose of transfer learning.
[0054] 2) This invention can effectively solve the problem of negative transfer: When calculating weights, this invention imposes a certain penalty on the model that obtains results that are inconsistent with those obtained by most other models. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0056] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0057] Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] See appendix Figure 1 As shown, this embodiment of the invention discloses a black-box domain-adaptive industrial equipment diagnostic method, comprising the following steps:
[0060] Acquire industrial equipment domain data and determine target domain data;
[0061] Construct N source domain models, input the target domain data into each of the N source domain models, and obtain N pseudo-labels;
[0062] Determine the weight parameters of the model, and then weight the model parameters according to the weight parameters;
[0063] Retrain a target domain model based on the weighted model parameters;
[0064] Fault diagnosis of industrial equipment based on target domain model.
[0065] In one specific embodiment, the first step is to acquire industrial equipment domain data and determine the target domain data x. i ;
[0066] In one specific embodiment, the second step is to construct N source domain models and combine the target domain data x. iThe inputs are fed into N source domain models respectively, resulting in N pseudo-labels (j = 1, ..., N).
[0067] In a specific implementation, the third step is to calculate the weighting parameter α. i Then, y is obtained by weighting according to different weights. i .
[0068] Specifically, the key to this invention lies in the third step. Existing solutions directly calculate the average value, assuming that the weights of the N source domain models are equal. This invention proposes a method to characterize the different importance levels of the source domains, namely α. j Therefore, this invention improves the third step of the calculation, and the specific formula is as follows:
[0069]
[0070] In the formula, i refers to the i-th sample, j refers to the j-th source domain model, so α j It refers to the weight of the j-th source domain model.
[0071] In one specific embodiment, industrial equipment domain data is acquired, and target domain data is determined, as shown in Table 1:
[0072] Table 1
[0073] Data 1 Data 2 Model 1 0.92 0.08 Model 2 0.09 0.91 Model 3 0.50 0.60 Model 4 0.95 0.05
[0074] Choose the result with the highest probability > 0.9. For details, see Table 2:
[0075] Table 2
[0076] Data 1 Data 2 Model 1 0.92 0.08 Model 2 0.09 0.91 Model 4 0.95 0.05
[0077] Following the majority rule, the positive probability values are obtained, as shown in Table 3:
[0078] Table 3
[0079] Data 1 Data 2 Model 1 0.92 0.08 Model 4 0.95 0.05
[0080] so
[0081] The probability values for obtaining negative values are shown in Table 4:
[0082] Table 4
[0083]
[0084] so
[0085] Substitute the values into the following formula to calculate the value for combination I:
[0086]
[0087] In the above formula This represents the number of classes in which the minority follows the majority rule when the probability is greater than 0.9. This represents the number of elements that do not belong to the majority class. And... This represents the corresponding degree. And D... T For each sample, an I value is calculated, and then the values of each sample are summed.
[0088] In one specific embodiment, the method for measuring the importance of a domain-related domain is as follows:
[0089]
[0090] In the formula, Let K represent a single source domain, S' represent a subset of other combinations of source domains after removing K, |S'| represent the number of source domains in the subset, and |S'|! represent the factorial of the number of source domains in the subset. This allows us to obtain the degree of influence of each source domain.
[0091] Following the same algorithm, there are many combinations for measuring the weight of a source domain. Suppose there are three source domains L, M, and N. For example, the weight of source domain M can be calculated as follows:
[0092] There are no elements in S: empty.
[0093]
[0094] One element in S: LN.
[0095]
[0096] S has two elements: L+N.
[0097]
[0098] Therefore, the contribution of M is: G(M) = value_1 + value_2 + value_3
[0099] The above method yields the contribution values G(L), G(M), and G(N) of the three models L, M, and N, respectively, and then their respective weights are obtained.
[0100]
[0101]
[0102]
[0103] Step 4: Take (x) i,y i Simply train a model for the target domain. Note that we need to retrain it, rather than using the labels directly.
[0104] Specifically, in the field of machine equipment fault diagnosis, fault diagnosis data involves privacy and cannot be provided to application providers; instead, fault diagnosis services can only be provided through API interfaces. Therefore, application providers, based on the API services of multiple fault diagnosis models and their own fault diagnosis data, obtain their own fault diagnosis models. Specifically, assuming we are the application provider, we have different fault diagnosis models API1, AP2, and AP3 available for our use, and we also possess some unlabeled fault diagnosis data. This invention inputs this unlabeled fault diagnosis data into models API1, AP2, and API3 to obtain pseudo-labels, and then calculates w(API1), w(API2), and w(API3) according to the method described above. This allows for model training based on the weighted pseudo-label results.
[0105] Step 5: Perform fault diagnosis on industrial equipment based on the target domain model.
[0106] Specifically, including:
[0107] Obtain test samples of industrial equipment;
[0108] Input the test samples into the trained target domain model;
[0109] Output the fault diagnosis results for the target domain.
[0110] On the other hand, see appendix Figure 2 As shown, this embodiment of the invention also discloses a black-box domain-adaptive industrial equipment diagnostic system, comprising:
[0111] The acquisition module is used to acquire industrial equipment domain data and determine target domain data;
[0112] A construction module, connected to the acquisition module, is used to construct N source domain models, input the target domain data into the N source domain models respectively, and obtain N pseudo-labels;
[0113] The calculation module, connected to the construction module, is used to determine the weight parameters of the model and to weight the model parameters according to the weight parameters;
[0114] The training module, connected to the computing module, is used to retrain a target domain model based on the weighted model parameters.
[0115] The output module, connected to the training module, is used for fault diagnosis of industrial equipment based on the target domain model.
[0116] In one specific embodiment, the computing module includes a first computing processing unit, configured to perform the following functions:
[0117] Sort and filter the N pseudo-labels;
[0118] The positive and negative probabilities are calculated for the filtered pseudo-labels, and the number of positive probabilities, the maximum value of pseudo-labels in the positive probabilities, the number of negative probabilities, and the maximum value of pseudo-labels in the negative probabilities are obtained respectively.
[0119] Substitute the values into the following formula to calculate the value for combination I:
[0120]
[0121] In the formula, I represents the analysis result value for a certain multi-source domain combination, which is used for the calculation of the source domain model weights in the following text, and D S D represents a combination of multiple source domains in the input. T Indicates the target domain of the input. This indicates the number of positive probabilities. This represents the number of negative probabilities. This represents the maximum value of the pseudo-label in the positive probability. The maximum value of the pseudo-label in the negative probability. This represents each sample traversed from the target domain, calculating a corresponding I value for each sample in the target domain, and summing the I values for each sample.
[0122] In one specific embodiment, the computing module includes a second computing processing unit connected to the first computing processing unit, and is used to perform the following functions:
[0123] Based on the I-value of the samples, the influence of each source domain is measured by the domain-related importance measure, and the specific formula is as follows:
[0124]
[0125] In the formula, Let K represent a single source domain K, S' represent a subset of other combinations of source domains after removing source domain K, |S'| represent the number of source domains in the subset, and |S'|! represents the factorial of the number of source domains in the subset;
[0126] The weight parameters are obtained based on the degree of influence of each source domain;
[0127] The model parameters are weighted according to the weight parameters.
[0128] In one specific embodiment, the output module includes:
[0129] Acquisition unit, used to acquire test samples of industrial equipment;
[0130] An input unit, connected to the acquisition unit and the training module, is used to input test samples into the trained target domain model.
[0131] The output unit, connected to the training module, is used to output the fault diagnosis results of the target domain.
[0132] In another aspect, embodiments of the present invention also disclose a computer storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of a black-box domain-adaptive industrial equipment diagnostic method.
[0133] As can be seen from the above technical solution, compared with the prior art, this invention discloses a black-box domain-adaptive industrial equipment diagnostic method, system, and storage medium. This invention can obtain the weights of different models with only model APIs available. This invention can effectively avoid negative transfer and does not require the use of source domain modeling data. Specific beneficial effects are as follows:
[0134] 1) This invention can effectively guarantee data privacy and security: This invention does not access the user data itself, but only uses the model's output to train a new model, thereby achieving the purpose of transfer learning.
[0135] 2) This invention can effectively solve the problem of negative transfer: When calculating weights, this invention imposes a certain penalty on the model that obtains results that are inconsistent with those obtained by most other models.
[0136] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0137] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A black-box domain-adapted industrial equipment diagnostic method, characterized in that, Includes the following steps: Acquire industrial equipment domain data and determine target domain data; Construct N source domain models, input the target domain data into each of the N source domain models, and obtain N pseudo-labels; Determine the weight parameters of the source domain model, and then weight the parameters of the source domain model according to the weight parameters; Retrain a target domain model based on the weighted source domain model parameters; Fault diagnosis of industrial equipment based on target domain model; Determine the weight parameters of the source domain model, and then weight the parameters of the source domain model according to the weight parameters, including: Sort and filter the N pseudo-labels; The positive and negative probabilities are calculated for the filtered pseudo-labels, and the number of positive probabilities, the maximum value of pseudo-labels in the positive probabilities, the number of negative probabilities, and the maximum value of pseudo-labels in the negative probabilities are obtained respectively. Substitute the values into the following formula to calculate the value for combination I: In the formula, I represents the analysis result value for a certain multi-source domain combination, which is used for the calculation of the source domain model weights in the following text, and D S D represents a combination of multiple source domains in the input. T Indicates the target domain of the input. This indicates the number of positive probabilities. This represents the number of negative probabilities. This represents the maximum value of the pseudo-label in the positive probability. The maximum value of the pseudo-label in the negative probability. This represents each sample traversed from the target domain; For each sample in the target domain, calculate a corresponding I value, and sum the I values for each sample; Determining the weight parameters of the source domain model, and weighting the source domain model parameters according to the weight parameters, also includes: Based on the I-value of the samples, the influence of each source domain is measured by the domain-related importance measure, and the specific formula is as follows: In the formula, Let K represent a single source domain K, S' represent a subset of other combinations of source domains after removing source domain K, |S'| represent the number of source domains in the subset, and |S'|! represent the factorial of the number of source domains in the subset; The weight parameters are obtained based on the degree of influence of each source domain; The parameters of the source domain model are weighted according to the weight parameters.
2. The black-box domain-adaptive industrial equipment diagnostic method as described in claim 1, characterized in that, The fault diagnosis of industrial equipment based on the target domain model includes: Obtain test samples of industrial equipment; Input the test samples into the trained target domain model; Output the fault diagnosis results for the target domain.
3. A black-box domain-adapted industrial equipment diagnostic system utilizing the black-box domain-adapted industrial equipment diagnostic method according to any one of claims 1-2, characterized in that, include: The acquisition module is used to acquire industrial equipment domain data and determine target domain data; A construction module, connected to the acquisition module, is used to construct N source domain models, input the target domain data into the N source domain models respectively, and obtain N pseudo-labels; The calculation module, connected to the construction module, is used to determine the weight parameters of the source domain model and to weight the parameters of the source domain model according to the weight parameters; The training module, connected to the computing module, is used to retrain a target domain model based on the weighted source domain model parameters. The output module, connected to the training module, is used for fault diagnosis of industrial equipment based on the target domain model.
4. The black-box domain-adaptive industrial equipment diagnostic system according to claim 3, characterized in that, The computing module includes a first computing processing unit, which is used to perform the following functions: Sort and filter the N pseudo-labels; The positive and negative probabilities are calculated for the filtered pseudo-labels, and the number of positive probabilities, the maximum value of pseudo-labels in the positive probabilities, the number of negative probabilities, and the maximum value of pseudo-labels in the negative probabilities are obtained respectively. Substitute the values into the following formula to calculate the value for combination I: In the formula, I represents the analysis result value for a certain multi-source domain combination, which is used for the calculation of the source domain model weights in the following text, and D S D represents a combination of multiple source domains in the input. T Indicates the target domain of the input. This indicates the number of positive probabilities. This represents the number of negative probabilities. This represents the maximum value of the pseudo-label in the positive probability. The maximum value of the pseudo-label in the negative probability. This represents each sample traversed from the target domain; For each sample in the target domain, calculate a corresponding I value, and sum the I values for each sample.
5. The black-box domain-adaptive industrial equipment diagnostic system according to claim 4, characterized in that, The computing module includes a second computing processing unit connected to the first computing processing unit, and is used to perform the following functions: Based on the I-value of the samples, the influence of each source domain is measured by the domain-related importance measure, and the specific formula is as follows: In the formula, Let K represent a single source domain K, S' represent a subset of other combinations of source domains after removing source domain K, |S'| represent the number of source domains in the subset, and |S'|! represent the factorial of the number of source domains in the subset; The weight parameters are obtained based on the degree of influence of each source domain; The model parameters are weighted according to the weight parameters.
6. The black-box domain-adaptive industrial equipment diagnostic system according to claim 3, characterized in that, The output module includes: Acquisition unit, used to acquire test samples of industrial equipment; An input unit, connected to the acquisition unit and the training module, is used to input test samples into the trained target domain model. The output unit, connected to the training module, is used to output the fault diagnosis results of the target domain.
7. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the steps of a black-box domain-adaptive industrial equipment diagnostic method as described in any one of claims 1-2.
Citation Information
Patent Citations
Industrial system fault diagnosis method and system based on sub-field adaptation dictionary learning
CN115129029A