Fault detection method and device of industrial system, electronic equipment and storage medium
By dynamically adjusting the decision weight of the base classifier using multi-arm slot machines in industrial systems, the problem of difficulty in long-term use of diagnostic models and adapting to the complexity of industrial systems is solved, and the accuracy and robustness of fault detection are improved.
Patent Information
- Application Number
- CN202411831962.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-13
Smart Images

Figure CN119988069A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of equipment fault detection, and in particular to a fault detection method, device, electronic equipment and storage medium for an industrial system. Background Art
[0002] Real-time fault detection plays a vital role in various fields and has been applied in many scenarios, including healthcare, transportation, manufacturing, and control systems. Timely and accurate prediction and detection are essential to ensure safety and prevent adverse events. Current fault diagnosis methods are mainly divided into model-driven methods and data-driven methods.
[0003] With the advancement of sensor and data acquisition technology, industrial production can obtain and store a large amount of data in the monitoring link, which provides a basis for data-driven methods. Data-driven methods can mine hidden features from massive data and have attracted widespread attention in recent years. Among them, real-time fault diagnosis aims to detect and isolate faults in a timely manner during the operation of dynamic systems. Given the need to detect faults as early as possible, research on real-time fault diagnosis methods has become particularly urgent. However, related technologies often face the following challenges when dealing with problems in industrial scenarios:
[0004] 1) Design of update rules for online diagnosis models: Considering the real-time nature of industrial production, real-time fault diagnosis tasks require high timeliness of diagnosis methods. Traditional deep learning methods are difficult to adjust in a timely manner when there are a small number of labeled samples, so the online update rules of the model become crucial.
[0005] 2) Difficulty in fault detection tasks: In industrial production environments, fault detection tasks often face complex and changing challenges. These challenges include, but are not limited to, differences between equipment, changes in process parameters, and uncertainties in the working environment. Due to the complexity and diversity of industrial systems, a single failure mode often does not fully cover all possible failure conditions. Therefore, how to effectively capture and identify different types of fault signals, and maintain efficient and accurate diagnostic capabilities in the face of unknown faults, is one of the important challenges facing fault detection tasks. Solving this challenge requires comprehensive consideration of multiple data-driven methods and domain knowledge to improve the robustness and reliability of fault detection systems.
[0006] In summary, the difficulty in updating relevant technologies makes it difficult for diagnostic models to be used for a long time, and it is difficult to adapt to the complexity and diversity of industrial systems, resulting in poor accuracy of diagnostic results, which needs to be improved. Summary of the invention
[0007] The present application provides a fault detection method, device, electronic device and storage medium for an industrial system to solve the technical problems in the related art that the diagnostic model is difficult to use for a long time and difficult to adapt to the complexity and diversity of the industrial system, resulting in poor accuracy of the diagnostic results.
[0008] The first aspect of the present application provides a fault detection method for an industrial system, comprising the following steps: generating an initial training set based on labeled samples of the industrial system; training multiple base models using the initial training set, and assigning the same initial decision weight to each base model to obtain an integrated model; using a multi-armed bandit machine to assign weights to each base model to obtain an actual decision weight for each base model, and using the actual decision weight to update the integrated model to obtain a fault detection model of the industrial system, and using the fault detection model to output a fault detection result of the industrial system.
[0009] Optionally, in one embodiment of the present application, the use of a multi-armed bandit machine to assign weights to each base model to obtain the actual decision weight of each base model includes: obtaining a monitoring data sample at the current moment from the industrial system; using multiple base models to predict the confidence of the monitoring data sample at the current moment under each sample type to obtain a recommendation vector for the monitoring data sample at the current moment; combining the recommendation vector with the initial decision weight of each base model to obtain the confidence distribution of the sample type of the monitoring data sample at the current moment; using the sample fault detection result corresponding to the monitoring data sample at the current moment to assign a reward to the integrated model; inputting the monitoring data sample at the current moment into the integrated model to obtain a model detection result; and updating the actual decision weight based on the model detection result, the reward, and the sample fault detection result.
[0010] Optionally, in one embodiment of the present application, the update expression of the actual decision weight is:
[0011]
[0012]
[0013] in, represents the reward of the base model, K represents the potential category of the sample, Indicates confidence, represents the reward associated with the latent class of the sample, w n (t) represents the decision weight, and γ represents the exploration rate.
[0014] Optionally, in an embodiment of the present application, it also includes: obtaining real samples of the industrial system; inputting the real samples into the fault detection model to obtain corresponding fault detection results; and updating and optimizing the fault detection model using the fault detection results.
[0015] Optionally, in one embodiment of the present application, the use of the fault detection result to update and optimize the fault detection model includes: when the detection result is that a fault is detected, determining a base model in the fault detection model that detects the fault, and retraining the base model using the real sample to optimize the fault detection model; when the detection result is that no fault is detected, using the real sample to perform sample incremental update.
[0016] Optionally, in one embodiment of the present application, after using the fault detection result to update and optimize the fault detection model, it also includes: obtaining the current time step; determining whether the current time step satisfies a preset reset condition; if the current time step satisfies the preset reset condition, resetting the weights of all base models.
[0017] The second aspect of the present application provides a fault detection device for an industrial system, including: a generation module, used to generate an initial training set based on labeled samples of the industrial system; a training module, used to train multiple base models using the initial training set, and assign the same initial decision weight to each base model to obtain an integrated model; a detection module, used to use a multi-armed bandit machine to assign weights to each base model to obtain the actual decision weight of each base model, to update the integrated model using the actual decision weight, to obtain the fault detection model of the industrial system, and to use the fault detection model to output the fault detection result of the industrial system.
[0018] Optionally, in one embodiment of the present application, the detection module includes: an acquisition unit, used to acquire the monitoring data sample at the current moment from the industrial system; a prediction unit, used to use multiple base models to predict the confidence of the monitoring data sample at the current moment under each sample type, so as to obtain the recommendation vector of the monitoring data sample at the current moment; a first calculation unit, used to combine the recommendation vector with the initial decision weight of each base model to obtain the confidence distribution of the sample type of the monitoring data sample at the current moment; an assignment unit, used to assign a reward to the integrated model using the sample fault detection result corresponding to the monitoring data sample at the current moment; a second calculation unit, used to input the monitoring data sample at the current moment into the integrated model to obtain a model detection result; an update unit, used to update the actual decision weight based on the model detection result, the reward and the sample fault detection result.
[0019] Optionally, in one embodiment of the present application, the update expression of the actual decision weight is:
[0020]
[0021]
[0022] in, represents the reward of the base model, K represents the potential category of the sample, Indicates confidence, represents the reward associated with the latent class of the sample, w n (t) represents the decision weight, and γ represents the exploration rate.
[0023] Optionally, in one embodiment of the present application, it also includes: a first acquisition module, used to obtain real samples of the industrial system; a calculation module, used to input the real samples into the fault detection model to obtain corresponding fault detection results; and an optimization module, used to update and optimize the fault detection model using the fault detection results.
[0024] Optionally, in one embodiment of the present application, the optimization module includes: an optimization unit, used to determine a base model in the fault detection model that detects the fault when the detection result is that a fault is detected, and retrain the base model using the real sample to optimize the fault detection model; an updating unit, used to perform sample incremental update using the real sample when the detection result is that no fault is detected.
[0025] Optionally, in one embodiment of the present application, it also includes: a second acquisition module for acquiring the current time step; a judgment module for judging whether the current time step satisfies a preset reset condition; and a reset module for resetting the weights of all base models when the current time step satisfies the preset reset condition.
[0026] A third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the fault detection method for the industrial system as described in the above embodiment.
[0027] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the fault detection method for the industrial system as described in the above embodiment.
[0028] A fifth aspect of the present application provides a computer program product, including a computer program, which, when executed, is used to implement the above industrial system fault detection method.
[0029] The embodiment of the present application can generate an initial training set based on the labeled samples of the industrial system, and then train multiple base models, and assign the same initial decision weight to each base model to obtain an integrated model, and then use a multi-armed bandit to assign weights to each base model to obtain the actual decision weight of each base model, and use the actual decision weight to update the integrated model to obtain a fault detection model of the industrial system, and use the fault detection model to output the fault detection results of the industrial system, and in the subsequent process, use online data to update the model, through an integrated learning architecture based on a multi-armed bandit, it is possible to use the multi-armed bandit theory to dynamically adjust the decision weight of the base classifier, so that the accuracy of the integrated classifier is stably improved relative to the accuracy of the base classifier, so that the model can achieve higher fault detection accuracy when the number of labeled samples is limited. Thus, the technical problem that the diagnostic model is difficult to use for a long time and difficult to adapt to the complexity and diversity of industrial systems in the related art is solved, resulting in poor accuracy of the diagnostic results.
[0030] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0032] Figure 1 A flowchart of a fault detection method for an industrial system provided according to an embodiment of the present application;
[0033] Figure 2 It is a schematic diagram of the principle according to an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the cumulative classification accuracy of sample data according to an embodiment of the present application;
[0035] Figure 4 A schematic diagram of the actual value and predicted value of the system state according to an embodiment of the present application;
[0036] Figure 5 A schematic diagram of the structure of a fault detection device for an industrial system provided according to an embodiment of the present application;
[0037] Figure 6 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0038] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0039] The following describes the fault detection method, device, electronic device and storage medium of the industrial system of the embodiment of the present application with reference to the accompanying drawings. In view of the technical problem that the diagnostic model is difficult to use for a long time and difficult to adapt to the complexity and diversity of the industrial system in the related technology mentioned in the above background technology, the present application provides a fault detection method for an industrial system, in which an initial training set can be generated based on the labeled samples of the industrial system, and then multiple base models are trained, and the same initial decision weight is given to each base model to obtain an integrated model, and then a multi-armed bandit is used to assign weights to each base model to obtain the actual decision weight of each base model, and the integrated model is updated using the actual decision weight to obtain a fault detection model of the industrial system, and the fault detection model is used to output the fault detection result of the industrial system, and in the subsequent process, the model is updated using online data, and through an integrated learning architecture based on a multi-armed bandit, the decision weight of the base classifier can be dynamically adjusted using the multi-armed bandit theory, so that the accuracy of the integrated classifier is stably improved relative to the accuracy of the base classifier, so that the model can achieve higher fault detection accuracy when the number of labeled samples is limited. This solves the technical problem in related technologies that the diagnostic model is difficult to use for a long time and is difficult to adapt to the complexity and diversity of industrial systems, resulting in poor accuracy of diagnostic results.
[0040] Specifically, Figure 1 A flowchart of a fault detection method for an industrial system provided in an embodiment of the present application.
[0041] like Figure 1 As shown, the fault detection method of the industrial system includes the following steps:
[0042] In step S101, an initial training set is generated based on labeled samples of the industrial system.
[0043] In the actual implementation process, the embodiment of the present application can generate an initial training set {X0, Y0} using labeled samples (such as N0) of the industrial system in the offline stage to perform preliminary training of the model.
[0044] In step S102, multiple base models are trained using the initial training set, and the same initial decision weight is assigned to each base model to obtain an integrated model.
[0045] Understandably, ensemble architectures have gained considerable attention and demonstrated significant advantages in real-time fault detection due to their flexible adjustment capabilities and strong generalization performance. Ensemble learning combines various weak classifiers to form a strong classifier, using paradigms such as bootstrapping, boosting, and stacking. In real-time fault detection scenarios, the ability to dynamically adjust the weights of base classifiers is a key factor in making ensemble learning effective. The current mainstream weight allocation strategies are mainly related to the following factors:
[0046] 1) The performance of the base classifier. For example, the prediction accuracy is used to adjust the weight of the base classifier; the prediction error rate of the base classifier on each data block is used to attenuate its weight.
[0047] 2) The “age” of the base classifier. For example, in each weight update iteration, the newly established base classifier is assigned an initial weight, while the weights of all existing base classifiers decay in a certain proportion.
[0048] These weight assignment strategies have shown excellent performance in real-time fault detection tasks. However, the related art ignores the theoretical analysis of how the weight assignment strategy guarantees the performance of the ensemble classifier. In other words, most of the current weight assignment strategies are based on heuristics. In practical applications, weight assignment strategies that provide theoretical bounds on ensemble performance are crucial and urgently needed. It is of great significance to develop a weight assignment strategy for the base model of real-time fault detection with a performance lower bound.
[0049] On this basis, the embodiment of the present application can use the initial training set {X0, Y0} to train each base model, and assign the same decision weight to each base model to obtain an integrated model.
[0050] In step S103, a multi-armed bandit machine is used to assign weights to each base model to obtain the actual decision weight of each base model, and the integrated model is updated using the actual decision weight to obtain a fault detection model for the industrial system, and the fault detection model is used to output the fault detection results of the industrial system.
[0051] As a possible implementation method, in the offline stage, the embodiment of the present application can generate a batch of base models with different decision parameters, use offline data, that is, initial training samples to train these models, and assign the same decision weight to each model. After obtaining sensor data, the prediction results of each base model are combined to determine whether a fault has occurred, and request an expert to label it.
[0052] Subsequently, the embodiment of the present application can adjust the weights of all base classifiers according to the prediction results of different base models and whether the actual fault has occurred. If a fault is detected, the classifier will be retrained to adapt to the new data distribution and continue to give the prediction results of the system status; otherwise, the classifier will perform an incremental update process.
[0053] Optionally, in one embodiment of the present application, a multi-armed bandit machine is used to assign weights to each base model to obtain the actual decision weight of each base model, including: obtaining a monitoring data sample at the current moment from the industrial system; using multiple base models to predict the confidence of the monitoring data sample at the current moment under each sample type to obtain a recommendation vector for the monitoring data sample at the current moment; combining the recommendation vector with the initial decision weight of each base model to obtain the confidence distribution of the sample type of the monitoring data sample at the current moment; using the sample fault detection result corresponding to the monitoring data sample at the current moment to give the integrated model a reward; inputting the monitoring data sample at the current moment into the integrated model to obtain the model detection result; updating the actual decision weight based on the model detection result, reward and sample fault detection result. Among them, the update expression of the actual decision weight is:
[0054]
[0055]
[0056] in, represents the reward of the base model, K represents the potential category of the sample, Indicates confidence, represents the reward associated with the latent class of the sample, w n (t) represents the decision weight, and γ represents the exploration rate.
[0057] In order to complete the fault detection task, the decision weight adjustment strategy of each base model is crucial. The embodiment of the present application can introduce a multi-armed bandit with expert advice to assign weights to each base model, where each base model is regarded as an expert in the multi-armed bandit, and all possible categories of samples are regarded as arms of the multi-armed bandit, which are defined as follows:
[0058] set up represents a sequence of time steps, Represents a set of levers on a slot machine. represents a group of experts. After pulling a lever (i.e. after fault detection), the reward associated with lever k at time step t is obtained according to the actual result of whether a fault occurs at that moment The base classifiers are considered as experts, while the latent classes of the samples act as levers. In this case, the size of K is equal to the size of M.
[0059] When each sample arrives, the base classifier C n Predict the confidence that the sample belongs to each category, using Denote,as the proposal vector.
[0060] The embodiment of the present application can present the confidence distribution of the sample belonging to each category by combining the suggestion vector with the expert's weight, that is, selecting the confidence of each pull rod. Then, determine an action a t ∈{1,…,K}, and pull the corresponding lever to provide the final predicted category of the sample. The reward is in the form of 0 or 1, as shown in formula (1).
[0061]
[0062] When evaluating the expert’s performance, we need to consider the confidence that the expert assigns to the levers and the reward for selecting a lever. Therefore, the reward for expert n is defined as follows:
[0063]
[0064] in, Represents ξ n The kth component of (t).
[0065] By properly allocating weights of different base classifiers, the embodiments of the present application can maximize the performance and generalization ability of the integrated classifier.
[0066] Initially, the weights of all base classifiers can be set to w n (0) = 1. When the sample x in the data stream t When it arrives, each base classifier provides its proposal vector ξ n (t). Then, x is calculated based on the proposal vectors of all base classifiers. t The confidence level of belonging to category k is as follows:
[0067]
[0068] Among them, the first term represents the utilization term, the second term represents the exploration term, and γ is called the exploration rate.
[0069] Then, according to p k (t) predict x t The category of , and obtain the estimated reward at time t according to formulas (1) and (4). Dividing the actual reward by the probability has two purposes: to give higher rewards to low-probability events and to ensure
[0070]
[0071] In addition, the reward of the base classifier is defined as the weighted sum of the confidence vector and the reward vector. This reward is then used to update the weights of the base classifier, as shown in formula (5-6):
[0072]
[0073] After every ΔT time steps, the weights of all base classifiers will be reset to 1. In the embodiment of the present application, this algorithm may be referred to as REXP4, that is, the restart-EXP4 algorithm. REXP4 aims to improve the bound when T is large enough.
[0074] Optionally, in an embodiment of the present application, it also includes: obtaining real samples of the industrial system; inputting the real samples into the fault detection model to obtain corresponding fault detection results; and updating and optimizing the fault detection model using the fault detection results.
[0075] Furthermore, the embodiment of the present application can update and optimize the model based on real samples and real detection results, so that the embodiment of the present application only requires a small amount of labeled data in the model initialization stage, and then annotates a small amount of unlabeled samples collected in the online stage by mining, and updates and optimizes the model, so that the model can achieve higher fault detection accuracy when the number of labeled samples is limited.
[0076] For example, in the embodiment of the present application, in the data x t When it arrives, calculate p by formula (3) k (t), and according to p k (t) Predict the sample category, then query the expert to get the true category and update the base model weights and cognition.
[0077] Optionally, in one embodiment of the present application, the fault detection model is updated and optimized using the fault detection result, including: when the detection result is that a fault is detected, determining a base model in which the fault is detected in the fault detection model, and retraining the base model using real samples to optimize the fault detection model; when the detection result is that no fault is detected, using real samples to perform sample incremental update.
[0078] The embodiment of the present application can determine whether a fault occurs based on the predicted sample category and the real sample category. If a base classifier detects a fault, the base classifier is retrained using the latest stored sample data to adapt to the data distribution in the new environment. If the base classifier does not detect a fault, the current sample increment is used to update and improve the understanding of the current distribution. In addition, the weight of each base classifier will be dynamically adjusted using formula (6).
[0079] Optionally, in one embodiment of the present application, after updating and optimizing the fault detection model using the fault detection results, it also includes: obtaining the current time step; determining whether the current time step satisfies a preset reset condition; if the current time step satisfies the preset reset condition, resetting the weights of all base models.
[0080] In the actual execution process, the embodiment of the present application can determine whether the current time step is a multiple of ΔT. If it reaches a multiple of ΔT, the decision weights of all base classifiers are reset to 1.
[0081] It should be noted that in actual scenarios, labeling of system status does not necessarily require the full participation of human experts. The machine can combine artificial intelligence technology and the current environment to give a reference label.
[0082] Combination Figures 2 to 4 As shown, the working principle of the fault detection method of the industrial system of the embodiment of the present application is explained by taking an embodiment as an example.
[0083] like Figure 2 As shown, the embodiment of the present application may include three stages: an offline stage, a decision weight adjustment stage, and an online stage.
[0084] In the offline stage, the embodiment of the present application can generate a batch of base models with different decision parameters, train these models using offline data, and assign the same decision weight to each model. After acquiring the sensor data, the embodiment of the present application can combine the prediction results of each base model to determine whether a fault has occurred, and request annotation from experts. Subsequently, the embodiment of the present application can adjust the weights of all base classifiers accordingly based on the prediction results of different base models and the result of whether the actual fault has occurred. If a fault is detected, the classifier will be retrained to adapt to the new data distribution and continue to give prediction results for the system status; otherwise, the classifier will undergo an incremental update process. The specific contents are as follows:
[0085] Let S = {…, x t-1 ,x t ,x t+1 ,…} is a data stream, where is a d-dimensional vector, each x t Corresponding to a label y t ∈{1,2,...,M}. Note that each x can only be known after prediction. t Label y t . Once a sample passes through, it cannot be visited again. C represents a classifier that is used to determine the category of a sample and is initially trained using existing data. When a sample arrives, the category of the sample needs to be predicted. After obtaining the true label of the sample, the classifier needs to be updated to adapt to the current data distribution.
[0086] The embodiment of the present application may include the following steps:
[0087] Step S1: In the offline phase, N initial base models are constructed. The offline initial training set {X0, Y0} is a labeled sample, with a total of N0. Each base model is trained using the same initial training sample, and each base model is given the same decision weight to obtain an integrated model.
[0088] Step S2: Consider each base model as an expert in a multi-armed bandit with expert advice, and all possible categories of samples as arms of the multi-armed bandit.
[0089] Step S3: When data arrives, the probability distribution of the category to which the sample belongs is predicted using formula (3).
[0090]
[0091] Step S4: Select p k The subscript corresponding to the maximum element value in (t) is used as the predicted category.
[0092] Step S5: Calculate the reward of each base classifier according to equations (1)(2)(4)(5).
[0093]
[0094]
[0095]
[0096]
[0097] Step S6: Adjust the corresponding decision weight according to the reward of the base classifier as shown in formula (6).
[0098]
[0099] Step S7: Determine whether the current time is a multiple of ΔT. If so, reset the weights of all base classifiers to 1.
[0100] Step S8: Repeat steps S3 to S7.
[0101] Based on the above process, the embodiment of the present application can be tested using a real gearbox data set to verify the effectiveness of the embodiment of the present application.
[0102] The test bench of the data set used in the embodiment of the present application consists of a three-phase asynchronous motor with a power of 2.2Kw, a torque sensor, a two-stage parallel gearbox, a magnetic powder brake (load) and a measurement and control system. This data set sets different fault types and degrees for the intermediate shaft 36-tooth gear and the side support bearing under different working conditions to perform fault simulation and collect data. There are a total of 20 fault types and working conditions, 12 working condition categories, and a total of 240 groups of test data. The sampling frequency set in this experiment is 12.8KHz, and a total of 8 channel signals are collected, including motor key phase signal, gearbox input shaft torque, motor drive end three-axis vibration acceleration, and gearbox intermediate shaft three-axis vibration acceleration.
[0103] In this experimental setup, data of healthy, lightly worn, moderately worn and severely worn at a speed of 1000rpm and a torque of 10Nm were selected for testing. During the experiment, only the 6-dimensional data of the three-axis vibration acceleration of the motor drive end and the three-axis vibration acceleration of the gearbox intermediate shaft were used. In the experiment, a random vector chain neural network was used as the base classifier, and a small amount of balanced and labeled data was used as offline data. The online data stream changes with time, and unlabeled samples of four states of healthy, lightly worn, moderately worn and severely worn appear in sequence. The experiment measures the effectiveness of the embodiment of the present application by comparing the time when the actual fault occurs with the time when the fault is detected, and uses the accuracy rate to measure the prediction performance of the method.
[0104] The cumulative classification accuracy of the sample data (i.e., sensor data) of the embodiment of the present application can be expressed as Figure 3 As shown, the actual value and predicted value of the system state can be expressed as Figure 4 As shown, the overall accuracy is 99.88%.
[0105] According to the fault detection method for industrial systems proposed in the embodiment of the present application, an initial training set can be generated based on the labeled samples of the industrial system, and then multiple base models can be trained, and the same initial decision weight is assigned to each base model to obtain an integrated model, and then a multi-armed bandit is used to assign weights to each base model to obtain the actual decision weight of each base model, and the integrated model is updated using the actual decision weight to obtain a fault detection model for the industrial system, and the fault detection model is used to output the fault detection result of the industrial system, and in the subsequent process, the model is updated using online data, and through an integrated learning architecture based on a multi-armed bandit, the decision weight of the base classifier can be dynamically adjusted using the multi-armed bandit theory, so that the accuracy of the integrated classifier is stably improved relative to the accuracy of the base classifier, so that the model can achieve higher fault detection accuracy when the number of labeled samples is limited. Thus, the technical problem that the diagnostic model is difficult to use for a long time and difficult to adapt to the complexity and diversity of industrial systems in the related technology is solved, resulting in poor accuracy of the diagnostic results.
[0106] Next, a fault detection device for an industrial system proposed according to an embodiment of the present application is described with reference to the accompanying drawings.
[0107] Figure 5 It is a block diagram of a fault detection device for an industrial system according to an embodiment of the present application.
[0108] like Figure 5 As shown, the fault detection device 10 of the industrial system includes: a generation module 100 , a training module 200 and a detection module 300 .
[0109] Specifically, the generating module 100 is used to generate an initial training set based on labeled samples of the industrial system.
[0110] The training module 200 is used to train multiple base models using the initial training set and assign the same initial decision weight to each base model to obtain an integrated model.
[0111] The detection module 300 is used to use a multi-armed bandit machine to assign weights to each base model to obtain the actual decision weight of each base model, to update the integrated model using the actual decision weight, to obtain a fault detection model for the industrial system, and to output the fault detection results of the industrial system using the fault detection model.
[0112] Optionally, in one embodiment of the present application, the detection module 300 includes: an acquisition unit, a prediction unit, a first calculation unit, an assignment unit, a second calculation unit and an update unit.
[0113] The acquisition unit is used to acquire the monitoring data sample at the current moment from the industrial system.
[0114] The prediction unit is used to use multiple base models to predict the confidence of the monitoring data sample at the current moment under each sample type, so as to obtain a suggestion vector of the monitoring data sample at the current moment.
[0115] The first calculation unit is used to combine the suggestion vector with the initial decision weight of each base model to obtain the confidence distribution of the sample type of the monitoring data sample at the current moment.
[0116] The granting unit is used to grant the integrated model reward using the sample fault detection result corresponding to the monitoring data sample at the current moment.
[0117] The second calculation unit is used to input the monitoring data sample at the current moment into the integrated model to obtain the model detection result.
[0118] An updating unit is used to update the actual decision weight based on the model detection results, rewards and sample fault detection results.
[0119] Optionally, in one embodiment of the present application, the update expression of the actual decision weight is:
[0120]
[0121]
[0122] in, represents the reward of the base model, K represents the potential category of the sample, Indicates confidence, represents the reward associated with the latent class of the sample, w n (t) represents the decision weight, and γ represents the exploration rate.
[0123] Optionally, in one embodiment of the present application, the fault detection device 10 of the industrial system further includes: a first acquisition module, a calculation module and an optimization module.
[0124] Among them, the first acquisition module is used to obtain real samples of the industrial system.
[0125] The calculation module is used to input the real samples into the fault detection model to obtain the corresponding fault detection results.
[0126] The optimization module is used to update and optimize the fault detection model using the fault detection results.
[0127] Optionally, in one embodiment of the present application, the optimization module includes: an optimization unit and an update unit.
[0128] The optimization unit is used to determine the base model of the detected fault in the fault detection model when the detection result is that the fault is detected, and retrain the base model with real samples to optimize the fault detection model.
[0129] The updating unit is used to perform sample incremental update using real samples when the detection result is that no fault is detected.
[0130] Optionally, in one embodiment of the present application, the fault detection device 10 of the industrial system further includes: a second acquisition module, a judgment module and a reset module.
[0131] The second acquisition module is used to obtain the current time step.
[0132] The judgment module is used to judge whether the current time step meets the preset reset condition.
[0133] The reset module is used to reset the weights of all base models when the current time step meets the preset reset conditions.
[0134] It should be noted that the above explanation of the embodiment of the fault detection method for an industrial system is also applicable to the fault detection device for an industrial system of this embodiment, and will not be repeated here.
[0135] According to the fault detection device of the industrial system proposed in the embodiment of the present application, an initial training set can be generated based on the labeled samples of the industrial system, and then multiple base models can be trained, and the same initial decision weight is assigned to each base model to obtain an integrated model, and then a multi-armed bandit is used to assign weights to each base model to obtain the actual decision weight of each base model, and the integrated model is updated using the actual decision weight to obtain a fault detection model of the industrial system, and the fault detection model is used to output the fault detection result of the industrial system, and in the subsequent process, the model is updated using online data, and through an integrated learning architecture based on a multi-armed bandit, the decision weight of the base classifier can be dynamically adjusted using the multi-armed bandit theory, so that the accuracy of the integrated classifier is stably improved relative to the accuracy of the base classifier, so that the model can achieve higher fault detection accuracy when the number of labeled samples is limited. Thus, the technical problem that the diagnostic model is difficult to use for a long time and difficult to adapt to the complexity and diversity of industrial systems in the related art is solved, resulting in poor accuracy of the diagnostic results.
[0136] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0137] A memory 601 , a processor 602 , and a computer program stored in the memory 601 and executable on the processor 602 .
[0138] When the processor 602 executes the program, the fault detection method for the industrial system provided in the above embodiment is implemented.
[0139] Furthermore, the electronic device further comprises:
[0140] The communication interface 603 is used for communication between the memory 601 and the processor 602 .
[0141] The memory 601 is used to store computer programs that can be executed on the processor 602 .
[0142] The memory 601 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0143] If the memory 601, the processor 602 and the communication interface 603 are implemented independently, the communication interface 603, the memory 601 and the processor 602 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0144] Optionally, in a specific implementation, if the memory 601, the processor 602 and the communication interface 603 are integrated on a chip, the memory 601, the processor 602 and the communication interface 603 can communicate with each other through an internal interface.
[0145] The processor 602 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0146] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned fault detection method for the industrial system is implemented.
[0147] An embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the fault detection method for an industrial system provided by an embodiment of the present invention.
[0148] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0149] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0150] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0152] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0153] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0154] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0155] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A fault detection method for an industrial system, characterized in that: The following steps are involved: Generate an initial training set based on labeled samples from industrial systems; Using the initial training set to train multiple base models, and assigning the same initial decision weight to each base model to obtain an integrated model; A multi-armed bandit machine is used to assign weights to each base model to obtain an actual decision weight of each base model, and the integrated model is updated using the actual decision weight to obtain a fault detection model of the industrial system, and the fault detection model is used to output a fault detection result of the industrial system.
2. The method according to claim 1, characterized in that The method of using a multi-armed bandit machine to assign weights to each base model to obtain an actual decision weight of each base model includes: Acquire a monitoring data sample at the current moment from the industrial system; Predicting the confidence of the monitoring data sample at the current moment under each sample type using multiple base models to obtain a suggestion vector for the monitoring data sample at the current moment; Combining the suggestion vector with the initial decision weight of each base model to obtain the confidence distribution of the sample type of the monitoring data sample at the current moment; Using the sample fault detection result corresponding to the monitoring data sample at the current moment to give the integrated model a reward; Inputting the monitoring data sample at the current moment into the integrated model to obtain a model detection result; The actual decision weight is updated based on the model detection result, the reward and the sample fault detection result.
3. The method according to claim 2, characterized in that The update expression of the actual decision weight is: in, represents the reward of the base model, K represents the potential category of the sample, Indicates confidence, represents the reward associated with the latent class of the sample, w n (t) represents the decision weight, and γ represents the exploration rate.
4. The method according to claim 1, characterized in that: Also includes: Obtaining a real sample of the industrial system; Inputting the real sample into the fault detection model to obtain corresponding fault detection results; The fault detection model is updated and optimized using the fault detection result.
5. The method according to claim 4, characterized in that The method of updating and optimizing the fault detection model by using the fault detection result includes: In the case where the detection result is that a fault is detected, determining a base model in the fault detection model that detects the fault, and retraining the base model using the real sample to optimize the fault detection model; When the detection result is that no fault is detected, the real sample is used to perform sample incremental update.
6. The method according to claim 4, characterized in that After the fault detection model is updated and optimized using the fault detection result, the method further includes: Get the current time step; Determine whether the current time step satisfies a preset reset condition; If the current time step satisfies the preset reset condition, the weights of all base models are reset.
7. A fault detection device for an industrial system, characterized in that: include: A generation module is used to generate an initial training set based on the labeled samples of the industrial system; A training module, used for training multiple base models using the initial training set, and assigning the same initial decision weight to each base model to obtain an integrated model; The detection module is used to use a multi-armed bandit machine to assign weights to each base model to obtain the actual decision weight of each base model, to update the integrated model using the actual decision weight, to obtain the fault detection model of the industrial system, and to output the fault detection result of the industrial system using the fault detection model.
8. The device according to claim 7, characterized in that The detection module comprises: An acquisition unit, used for acquiring a monitoring data sample at a current moment from the industrial system; A prediction unit, used to predict the confidence of the monitoring data sample at the current moment under each sample type using multiple base models to obtain a suggestion vector of the monitoring data sample at the current moment; A first calculation unit, used for combining the suggestion vector with the initial decision weight of each base model to obtain a confidence distribution of the sample type of the monitoring data sample at the current moment; An awarding unit, configured to award the integrated model a reward using a sample fault detection result corresponding to the monitoring data sample at the current moment; A second calculation unit is used to input the monitoring data sample at the current moment into the integrated model to obtain a model detection result; An updating unit is used to update the actual decision weight based on the model detection result, the reward and the sample fault detection result.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the fault detection method for an industrial system according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the fault detection method for an industrial system according to any one of claims 1 to 6.