Device fault diagnosis method and device, storage medium and electronic device

By adopting an online semi-supervised fault diagnosis method based on prioritizing a few pseudo-labels, and utilizing pseudo-label technology to update the neural network model in real time, the accuracy problem of real-time fault diagnosis in industrial scenarios is solved, and efficient diagnosis is achieved under imbalanced datasets.

CN116776961BActive Publication Date: 2026-02-10TSINGHUA UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310586692.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2026-02-10
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

Existing technologies for real-time fault diagnosis in industrial scenarios suffer from difficulties in timely updates, sample imbalance, and high annotation costs, resulting in low diagnostic accuracy and failing to meet the needs of real-time fault diagnosis.

Method used

An online semi-supervised fault diagnosis method based on prioritizing a few pseudo-labels is adopted. The neural network model is initialized through offline training, new data blocks are processed using pseudo-label technology, and the model weights are updated in real time to achieve accurate diagnosis of imbalanced datasets.

Benefits of technology

It enables real-time fault diagnosis of equipment under conditions of scarce and imbalanced samples, improving diagnostic accuracy and speed, and is applicable to practical industrial systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776961B_ABST
    Figure CN116776961B_ABST
Patent Text Reader

Abstract

The application provides a device fault diagnosis method and device, a storage medium and an electronic device, and relates to the technical field of intelligent fault diagnosis. The method comprises the following steps: obtaining device operation data at a current time as a current sample set; based on the current sample set, performing online training on a pre-trained fault diagnosis model to obtain an updated fault diagnosis model; wherein the fault diagnosis model is a neural network model; for each sample in the current sample set, inputting the sample into the updated fault diagnosis model to enable the updated fault diagnosis model to output a fault diagnosis result corresponding to the sample. The technical scheme provided by the application can more accurately perform real-time fault diagnosis on a device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent fault diagnosis, in particular to a device fault diagnosis method and device, a storage medium and an electronic device. BACKGROUND

[0002] With the development and progress of science and technology in recent years, the structure of modern industrial equipment is becoming more and more complex, and the degree of automation is also becoming higher and higher. In actual production, due to the influence of many unavoidable factors, various equipment failures will occur, resulting in economic losses and even casualties, so industrial fault diagnosis has far-reaching significance for ensuring safe and efficient production. The existing fault diagnosis methods can be divided into two categories: model-driven methods and data-driven methods. With the development of sensors and data acquisition technology, industrial production can obtain and store a large amount of data in the monitoring link, which lays the foundation for data-driven methods. Data-driven methods can mine hidden features of data from massive data, and have attracted widespread attention in recent years. Among them, real-time fault diagnosis aims to detect and separate faults in the running process of dynamic systems in time. Considering the requirement of discovering faults as early as possible in real situations, the research on real-time fault diagnosis methods has become increasingly urgent. However, when dealing with the above problems, especially in industrial scenarios, the existing methods always face some problems:

[0003] 1) Online diagnosis model update rule design: Considering the real-time characteristics of industrial production, the timeliness of the diagnosis method is often required by real-time fault diagnosis tasks, and traditional deep learning methods are difficult to adjust in time under the constraint of a small amount of labeled samples. Under this background, how to update the diagnosis model online is of great significance and needs to be solved.

[0004] 2) Sample imbalance: When a fault is detected, engineers usually stop the operation of industrial equipment in time to prevent potential dangers. Therefore, in actual scenarios, the total amount of collected fault data is very scarce compared to normal samples.

[0005] 3) High labeling cost: In actual industrial processes, although the total amount of samples is sufficient, it is very difficult to obtain labels. Due to the complexity of fault signals and the need for human experience, relying solely on expert annotation to obtain sufficient labels is very expensive and time-consuming.

[0006] The above problems all make the diagnosis accuracy of the existing technology for equipment failure not high, which cannot meet the current real-time fault diagnosis requirements. SUMMARY

[0007] In view of the problems in the prior art, the present application provides a device fault diagnosis method and device, a storage medium and an electronic device, which can more accurately diagnose the real-time fault of the equipment.

[0008] To achieve the above object, the technical scheme of the present application is as follows:

[0009] In a first aspect, the embodiments of the present application provide a device fault diagnosis method, which comprises:

[0010] Obtaining device running data at a current time as a current sample set;

[0011] Based on the current sample set, pre-trained fault diagnosis model is trained online to obtain an updated fault diagnosis model; wherein the fault diagnosis model is a neural network model;

[0012] For each sample in the current sample set, the sample is input into the updated fault diagnosis model, so that the updated fault diagnosis model outputs a fault diagnosis result corresponding to the sample.

[0013] In some embodiments, pre-training the fault diagnosis model comprises:

[0014] The fault diagnosis model is pre-trained offline.

[0015] In some embodiments, the fault diagnosis model comprises an input layer, a hidden layer and an output layer; and the pre-training of the fault diagnosis model offline comprises:

[0016] Obtaining an offline training set; wherein each sample in the offline training set is a labeled sample;

[0017] Randomly selecting a plurality of samples from the offline training set as an anchor set;

[0018] Randomly generating weight values between the input layer and the hidden layer, and randomly generating bias values between the input layer and the hidden layer;

[0019] Based on the weight values, the bias values and a preset nonlinear function, an output matrix corresponding to the offline training set is obtained as a first output matrix, and an output matrix corresponding to the anchor set is obtained as a second output matrix;

[0020] Based on the first output matrix and the second output matrix, a target function of the fault diagnosis model is obtained;

[0021] Based on the target function, the fault diagnosis model is trained offline to obtain the pre-trained fault diagnosis model.

[0022] In some embodiments, the first output matrix is expressed by the following expression:

[0023] E0=[g(ω1 X0+θ 1 ), ..., g(ω) L X0+θ L ), x 1 , ..., x J ]

[0024] The second output matrix is ​​expressed by the following expression:

[0025]

[0026] Where E0 is the first output matrix; g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; X0 = {x 1 , ..., x J} represents all samples in the offline training set; E f This is the second output matrix; For all samples in the anchor point set.

[0027] In some embodiments, the objective function is expressed by the following expression:

[0028]

[0029] Where J(β) is the objective function; β is the weight between the hidden layer and the output layer; τ is the identity matrix corresponding to the offline training set; T0 is the label corresponding to each sample in the offline training set; E0 is the first output matrix; λ and γ are hyperparameters; Tr(·) is a matrix traces; E f This is the second output matrix; This is the similarity matrix between the offline training set and the anchor point set.

[0030] In some embodiments, the step of offline training of the fault diagnosis model based on the objective function to obtain the pre-trained fault diagnosis model includes:

[0031] Calculate the optimal solution of the objective function to obtain the weights between the hidden layer and the output layer.

[0032] In some embodiments, the step of training a pre-trained fault diagnosis model online based on the current sample set to obtain an updated fault diagnosis model includes:

[0033] Calculate the similarity matrix between the current sample set and the anchor point set;

[0034] Calculate the label probability transition matrix based on the similarity matrix between the current sample set and the anchor point set;

[0035] Based on the label probability transition matrix, each sample in the current sample set is assigned a corresponding pseudo-label to obtain the pseudo-label matrix of the current sample set;

[0036] Based on the pseudo-label matrix, determine the number of faulty samples in the current sample set;

[0037] Based on the number of faulty samples, the number of non-faulty samples in the current sample set is determined; wherein, the number of faulty samples is equal to the number of non-faulty samples.

[0038] Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated fault diagnosis model.

[0039] In some embodiments, the similarity matrix between the current sample set and the anchor set is calculated using the following expression:

[0040]

[0041] in, X is the similarity matrix between the current sample set and the anchor point set; t For the current sample set; x i X is the i-th sample in the current sample set; f For the set of anchor points; x j Let be the j-th sample in the anchor point set; δ is a hyperparameter.

[0042] In some embodiments, the label probability transition matrix is ​​calculated using the following expression:

[0043]

[0044] Among them, P t The label probability transition matrix; The element in the i-th row and j-th column of the label probability transition matrix; Let be the similarity matrix between the current sample set and the anchor set; Q be the number of samples in the anchor set; r be the number of samples in the current sample set; R be the set of real numbers; and k be the kth sample in the anchor set.

[0045] In some embodiments, the step of assigning a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix to obtain the pseudo-label matrix of the current sample set includes:

[0046] For each row of the label probability transition matrix, perform the following operations to obtain the label for each sample in the current sample set: select the anchor point corresponding to the maximum value in the row; wherein the anchor point is a sample in the anchor point set; assign the label corresponding to the anchor point to the sample in the row; wherein the sample in the row is a sample in the current sample set.

[0047] Based on the label of each sample in the current sample set, obtain the pseudo-label matrix of the current sample set.

[0048] In some embodiments, the step of assigning a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix to obtain the pseudo-label matrix of the current sample set further includes:

[0049] Based on the label corresponding to each sample in the anchor set and the label probability transition matrix, calculate the pseudo-label probability matrix;

[0050] For each row of the pseudo-label probability matrix, perform the following operations to obtain the label category of each sample in the current sample set: select the column corresponding to the maximum value in the row; assign the label category of the anchor point corresponding to the column to the sample corresponding to the row; wherein, the sample corresponding to the row is a sample in the current sample set;

[0051] The step of obtaining the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set includes:

[0052] Based on the label of each sample in the current sample set and the label category of each sample in the current sample set, a pseudo-label matrix of the current sample set is obtained.

[0053] In some embodiments, the pseudo-label probability matrix is ​​calculated using the following expression:

[0054] F t =P t T f

[0055] Among them, F t P is the pseudo-label probability matrix; t Let T be the tag probability transition matrix; f The label is the label corresponding to each sample in the anchor set.

[0056] In some embodiments, the pseudo-label matrix of the current sample set is expressed by the following expression:

[0057]

[0058] Among them, y t This is the pseudo-label matrix of the current sample set; is an element in the pseudo-label probability matrix; V is the number of neurons in the output layer; j is the j-th category in the set of label categories; R is the set of real numbers; r is the number of samples in the current sample set.

[0059] In some embodiments, the step of training the pre-trained fault diagnosis model online based on the fault samples and the non-fault samples to obtain the updated fault diagnosis model includes:

[0060] Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated weights between the hidden layer and the output layer as the current weights; wherein, the current weights are expressed by the following expression:

[0061]

[0062]

[0063]

[0064]

[0065]

[0066] Where, β t ρ is the current weight; t μ t All are intermediate variables; E t τ is the output matrix corresponding to the current sample set; t T is the identity matrix corresponding to the current sample set; t The pseudo-label matrix is ​​a one-hot encoded representation; γ is a hyperparameter. E is the similarity matrix between the current sample set and the anchor point set; f The second output matrix is ​​denoted by g(·); g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; For all samples in the current sample set; Let i be the i-th sample in the current sample set.

[0067] Secondly, embodiments of the present invention provide a device for diagnosing equipment faults, the device comprising:

[0068] The current sample set acquisition unit is used to acquire the device operation data at the current moment as the current sample set.

[0069] An online training unit is used to train a pre-trained fault diagnosis model online based on the current sample set to obtain an updated fault diagnosis model; wherein the fault diagnosis model is a neural network model.

[0070] The diagnostic result acquisition unit is used to input each sample in the current sample set into the updated fault diagnosis model so that the updated fault diagnosis model outputs the fault diagnosis result corresponding to the sample.

[0071] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing program code, which, when executed by a processor, implements the device fault diagnosis method as described in any of the above embodiments.

[0072] Fourthly, embodiments of the present invention provide an electronic device, the electronic device including a memory and a processor, the memory storing program code executable on the processor, the program code being executed by the processor to implement the device fault diagnosis method as described in any of the above embodiments.

[0073] The equipment fault diagnosis method, apparatus, storage medium, and electronic device provided in this invention acquire the equipment's current operating data as a current sample set. Based on this current sample set, a pre-trained fault diagnosis model is trained online to obtain an updated fault diagnosis model. For each sample in the current sample set, the sample is input into the updated fault diagnosis model, so that the updated fault diagnosis model outputs a fault diagnosis result corresponding to that sample. This allows the invention to update the fault diagnosis model in real time based on the current sample set, thereby continuously improving the fault diagnosis model and making its fault diagnosis results for the current sample more accurate. Therefore, the technical solution provided in this invention can more accurately perform real-time fault diagnosis of equipment. Attached Figure Description

[0074] The scope of this invention can be better understood by reading the following detailed description of exemplary embodiments in conjunction with the accompanying drawings. The accompanying drawings are:

[0075] Figure 1 The method flow of this invention embodiment Figure One ;

[0076] Figure 2 The method flow of this invention embodiment Figure Two ;

[0077] Figure 3 The algorithm provided in this embodiment of the invention and the comparison algorithm show the G-mean changes under test 1;

[0078] Figure 4 The change in average fault classification accuracy between the algorithm provided in this embodiment and the comparison algorithm under test 2;

[0079] Figure 5 The training time changes of the algorithm provided in this embodiment of the invention and the comparison algorithm under test 3;

[0080] Figure 6 This is a structural diagram of the device according to an embodiment of the present invention. Detailed Implementation

[0081] To make the objectives, technical solutions, and advantages of the present invention clearer, the implementation method of the present invention will be described in detail below with reference to the accompanying drawings and embodiments, so that the process of how the present invention uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0082] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0083] Example One

[0084] To address the technical problem of inaccurate real-time fault diagnosis in existing technologies, this invention provides an online semi-supervised fault diagnosis method based on a minority pseudo-label priority approach (hereinafter referred to as MPPOS-RVFL). This algorithm introduces pseudo-label technology to reduce the negative impact of data stream imbalance, and in this context, designs a minority pseudo-label priority method to enhance the fault diagnosis model's ability to identify unlabeled minority samples. This algorithm has the advantages of low complexity and high computational speed, and can achieve accurate and real-time fault diagnosis even under conditions of scarce sample labels and sample imbalance, making it particularly suitable for practical industrial systems.

[0085] The purpose of this invention is to provide an online semi-supervised fault diagnosis method based on a minority pseudo-label priority approach. The neural network parameters are initialized using an offline training set. During the online training phase, when a new data block arrives, the sample labels are first processed using a minority pseudo-label priority approach, and then the weight matrix is ​​updated in real time through incremental update calculation. This enables fault diagnosis of imbalanced datasets lacking sample labels.

[0086] Based on the above ideas, embodiments of the present invention provide a method for diagnosing equipment faults, such as... Figure 1 As shown, the equipment fault diagnosis method described in this embodiment includes steps S101, S102, and S103. The specific contents of these steps are described in detail below:

[0087] Step S101: Obtain the device operation data at the current moment as the current sample set;

[0088] In this embodiment, current operating data of multiple devices can be collected simultaneously to form the current sample set, where each sample in the current sample set represents the current operating data of a certain device.

[0089] Step S102: Based on the current sample set, the pre-trained fault diagnosis model is trained online to obtain an updated fault diagnosis model; wherein, the fault diagnosis model is a neural network model;

[0090] To facilitate the training of the fault diagnosis model and to ensure that the trained fault diagnosis model has high diagnostic accuracy, in this embodiment, the pre-training of the fault diagnosis model includes: performing offline training on the fault diagnosis model in advance.

[0091] In this embodiment, the fault diagnosis model includes an input layer, a hidden layer, and an output layer. The offline pre-training of the fault diagnosis model in this embodiment includes: obtaining an offline training set; wherein each sample in the offline training set is a labeled sample; randomly selecting multiple samples from the offline training set as an anchor set; randomly generating weight values ​​between the input layer and the hidden layer, and randomly generating deviation values ​​between the input layer and the hidden layer; based on the weight values, the deviation values, and a preset nonlinear function, obtaining an output matrix corresponding to the offline training set as a first output matrix, and obtaining an output matrix corresponding to the anchor set as a second output matrix; obtaining the objective function of the fault diagnosis model based on the first output matrix and the second output matrix; and performing offline training on the fault diagnosis model based on the objective function to obtain the pre-trained fault diagnosis model.

[0092] Specifically, each sample in the offline training set is pre-collected operational data of a certain device. The label indicates whether the sample corresponds to operational data where the device malfunctions or operational data where the device does not malfunction. That is, the labeled samples in this embodiment can be divided into fault samples and non-fault samples. For fault samples, they can be further classified into fault categories, indicating which type of fault they belong to.

[0093] To obtain the first and second output matrices more accurately, in this embodiment, the first output matrix is ​​expressed by the following expression:

[0094] E0=[g(ω 1 X0+θ 1 ), ..., g(ω) L X0+θ L ), x 1 , ..., x J ]

[0095] The second output matrix mentioned above is expressed by the following expression:

[0096]

[0097] Where E0 is the first output matrix; g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; X0 = {x 1 , ..., x J} represents all samples in the offline training set; E f This is the second output matrix; For all samples in the anchor point set.

[0098] To obtain the objective function more accurately, in this embodiment, the objective function is expressed by the following expression:

[0099]

[0100] Where J(β) is the objective function; β is the weight between the hidden layer and the output layer; τ is the identity matrix corresponding to the offline training set; T0 is the label corresponding to each sample in the offline training set; E0 is the first output matrix; λ and γ are hyperparameters; Tr(·) is a matrix traces; E f This is the second output matrix; This is the similarity matrix between the offline training set and the anchor point set.

[0101] To more effectively train the fault diagnosis model offline and obtain a model with higher diagnostic accuracy, this embodiment describes offline training of the fault diagnosis model based on the objective function to obtain the pre-trained fault diagnosis model, which includes: calculating the optimal solution of the objective function and obtaining the weights between the hidden layer and the output layer.

[0102] Specifically, based on the expression of the objective function, the corresponding β value can be obtained by calculating the minimum value of the objective function J(β), that is, the weight between the hidden layer and the output layer can be obtained. After obtaining the weight between the hidden layer and the output layer, the offline training of the fault diagnosis model is completed.

[0103] To more effectively train and update the fault diagnosis model after offline training, this embodiment describes online training of the pre-trained fault diagnosis model based on the current sample set to obtain an updated fault diagnosis model. This includes: calculating a similarity matrix between the current sample set and the anchor set; calculating a label probability transition matrix based on the similarity matrix; assigning a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix to obtain a pseudo-label matrix for the current sample set; determining the number of faulty samples in the current sample set based on the pseudo-label matrix; determining the number of non-faulty samples in the current sample set based on the number of faulty samples, wherein the number of faulty samples is equal to the number of non-faulty samples; and training the pre-trained fault diagnosis model online based on the faulty samples and the non-faulty samples to obtain the updated fault diagnosis model.

[0104] To obtain the similarity matrix between the current sample set and the anchor point set more accurately, this embodiment uses the following expression to calculate the similarity matrix between the current sample set and the anchor point set:

[0105]

[0106] in, X is the similarity matrix between the current sample set and the anchor point set; t For the current sample set; x i X is the i-th sample in the current sample set; f For the set of anchor points; x j Let be the j-th sample in the anchor point set; δ is a hyperparameter.

[0107] To calculate the label probability transition matrix more accurately, this embodiment uses the following expression to calculate the label probability transition matrix:

[0108]

[0109] Among them, P t The label probability transition matrix; The element in the i-th row and j-th column of the label probability transition matrix; Let be the similarity matrix between the current sample set and the anchor set; Q be the number of samples in the anchor set; r be the number of samples in the current sample set; R be the set of real numbers; and k be the kth sample in the anchor set.

[0110] To more conveniently and accurately assign pseudo-labels to samples in the current sample set, this embodiment describes assigning a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix, thereby obtaining the pseudo-label matrix of the current sample set, including:

[0111] For each row of the label probability transition matrix, perform the following operations to obtain the label for each sample in the current sample set: select the anchor point corresponding to the maximum value in the row; wherein the anchor point is a sample in the anchor point set; assign the label corresponding to the anchor point to the sample in the row; wherein the sample in the row is a sample in the current sample set; and obtain the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set.

[0112] To ensure that the obtained pseudo-label matrix reflects the label category, this embodiment assigns a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix to obtain the pseudo-label matrix of the current sample set. This further includes: calculating a pseudo-label probability matrix based on the label corresponding to each sample in the anchor set and the label probability transition matrix; and performing the following operations for each row of the pseudo-label probability matrix to obtain the label category of each sample in the current sample set: selecting the column corresponding to the maximum value in that row; assigning the label category of the anchor point corresponding to that column to the sample corresponding to that row; wherein the sample corresponding to that row is a sample in the current sample set.

[0113] Under the above premise, the method of obtaining the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set in this embodiment includes: obtaining the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set and the label category of each sample in the current sample set.

[0114] In this embodiment, the pseudo-label matrix not only reflects the label of each sample in the current sample set, but also reflects the label category of each sample. That is, the pseudo-label matrix indicates whether each sample in the current sample set is operational data of a device malfunction, and if so, it further indicates what type of malfunction the device has experienced.

[0115] To calculate the pseudo-label probability matrix more conveniently and accurately, this embodiment uses the following expression to calculate the pseudo-label probability matrix:

[0116] F t =P t T f

[0117] Among them, F t P is the pseudo-label probability matrix; t Let T be the tag probability transition matrix; f The label is the label corresponding to each sample in the anchor set.

[0118] To obtain the pseudo-label matrix of the current sample set more conveniently and accurately, in this embodiment, the pseudo-label matrix of the current sample set is expressed by the following expression:

[0119]

[0120] Among them, y t This is the pseudo-label matrix of the current sample set; is an element in the pseudo-label probability matrix; V is the number of neurons in the output layer; j is the j-th category in the set of label categories; R is the set of real numbers; r is the number of samples in the current sample set.

[0121] To further improve the online training accuracy of the pre-trained fault diagnosis model and achieve higher fault diagnosis accuracy, this embodiment describes online training of the pre-trained fault diagnosis model based on the fault samples and the non-fault samples to obtain the updated fault diagnosis model, including:

[0122] Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated weights between the hidden layer and the output layer as the current weights; wherein, the current weights are expressed by the following expression:

[0123]

[0124]

[0125]

[0126]

[0127]

[0128] Where, β t ρ is the current weight; t μ t All are intermediate variables; E t τ is the output matrix corresponding to the current sample set; t T is the identity matrix corresponding to the current sample set; t The one-hot encoding of the pseudo-label matrix has a dimension of T. t ∈R r×V γ is a hyperparameter; E is the similarity matrix between the current sample set and the anchor point set; f The second output matrix is ​​denoted by g(·); g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; For all samples in the current sample set; Let i be the i-th sample in the current sample set.

[0129] Step S103: For each sample in the current sample set, input the sample into the updated fault diagnosis model so that the updated fault diagnosis model outputs the fault diagnosis result corresponding to the sample.

[0130] In this embodiment, the fault diagnosis result includes: whether the device corresponding to the sample has malfunctioned, and if so, what type of fault it is.

[0131] The equipment fault diagnosis method provided in this invention obtains the equipment's current operating data as the current sample set. Based on this current sample set, a pre-trained fault diagnosis model is trained online to obtain an updated fault diagnosis model. For each sample in the current sample set, the sample is input into the updated fault diagnosis model, so that the updated fault diagnosis model outputs a fault diagnosis result corresponding to that sample. This allows the invention to update the fault diagnosis model in real time based on the current sample set, thereby continuously improving the fault diagnosis model and making its fault diagnosis results for the current sample more accurate. Therefore, the technical solution provided in this invention can more accurately perform real-time fault diagnosis of equipment.

[0132] Example Two

[0133] The following describes the equipment fault diagnosis method provided by this invention in further detail, using a practical application example. The flowchart of the online semi-supervised fault diagnosis method based on a few pseudo-labels as described in this invention is as follows: Figure 2 As shown, by performing offline initialization training on labeled samples, when new unlabeled data blocks arrive, the sample labels are processed by preferentially assigning pseudo-labels to a minority of samples, and then the output weights of the neural network are updated in real time, ultimately achieving real-time fault diagnosis of imbalanced unlabeled datasets. The online semi-supervised fault diagnosis method based on preferential assignment of minority pseudo-labels of this invention is specifically implemented according to the following steps:

[0134] (1) Offline training phase

[0135] Assume the neural network in this embodiment has J input layer neurons, L hidden layer neurons, and V output layer neurons. The offline training set {X0, T0} consists of all labeled samples, totaling N. off From this set of Q anchor points, let the anchor point set be {X}. f T f First, the weights ω and biases θ between the input layer and the hidden layer are randomly generated. Then, the output matrix E0 corresponding to the offline training set and the output matrix E1 corresponding to the anchor set are obtained by mapping through the g(·) nonlinear function. f :

[0136] E0=[g(ω 1 X0+θ 1 ), ..., g(ω) L X0+θ L ), x 1 , ..., x J ]

[0137]

[0138] Where E0 is the first output matrix; g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; X0 = {x 1 , ..., x J} represents all samples in the offline training set; E f This is the second output matrix; For all samples in the anchor point set.

[0139] Adding an anchor-based regularization term to this structure yields the objective function:

[0140]

[0141] Where J(β) is the objective function; β is the weight between the hidden layer and the output layer; τ is the identity matrix corresponding to the offline training set; T0 is the label corresponding to each sample in the offline training set; E0 is the first output matrix; λ and γ are hyperparameters; Tr(·) is a matrix traces; E f This is the second output matrix; This is the similarity matrix between the offline training set and the anchor point set.

[0142] Since the offline samples are all labeled, i.e., all are labeled samples, τ in the above objective function is N. off ×N off The identity matrix. By obtaining the optimal solution of the objective function, i.e., by finding the minimum value of the function J(β), the initial output weight matrix β0 for offline training can be obtained, which is the weight between the hidden layer and the output layer. For ease of expression and subsequent incremental calculation, intermediate variables ρ0 and μ0 are defined:

[0143]

[0144]

[0145]

[0146] Where E0 is the output matrix corresponding to the offline training set; τ is the identity matrix corresponding to the offline training set; I is the standard identity matrix; T0 is the label corresponding to the offline training set; λ and γ are hyperparameters; E is the similarity matrix between the offline training set and the anchor point set; f is the output matrix corresponding to the anchor point set.

[0147] (2) Online training phase

[0148] Define each new data block arriving during the online phase as containing r unlabeled samples, denoted by {X}. t T t} represents the samples arriving at time t and their corresponding sample labels, that is, r unlabeled samples arriving at time t, X t This represents the r unlabeled samples. Since all new samples arriving during online learning are unlabeled by default, T... t The default value is a zero matrix. The output matrix E at time t can be calculated using the following formula.t :

[0149]

[0150] Among them, E t Let g(·) be the output matrix corresponding to the sample set at time t (i.e., the current sample set in Example 1, hereinafter referred to as the current sample set); g(·) is a preset nonlinear function; L is the number of neurons in the hidden layer of the neural network; ω 1 ,...,ω L θ represents the weights between the input and hidden layers of the neural network. 1 , ..., θ L This represents the deviation value between the input layer and the hidden layer of the neural network. Let be all samples in the sample set at time t.

[0151] Then it can be based on the new data block X t With anchor set X f Calculate the similarity matrix between the two.

[0152]

[0153] in, X is the similarity matrix between the current sample set and the anchor point set; t For the current sample set; x i X is the i-th sample in the current sample set; f For the set of anchor points; x j Let be the j-th sample in the anchor point set; δ is a hyperparameter.

[0154] And according to the new data block X t With anchor set X f Similarity matrix Calculate the label probability transition matrix P t :

[0155]

[0156] Among them, P t The label probability transition matrix; The element in the i-th row and j-th column of the label probability transition matrix; Let be the similarity matrix between the current sample set and the anchor set; Q be the number of samples in the anchor set; r be the number of samples in the current sample set; R be the set of real numbers; and k be the kth sample in the anchor set.

[0157] For the newly arrived i-th sample (i.e., the i-th sample among the r unlabeled samples mentioned above), P tThe i-th row vector This indicates the degree of similarity between the vector and each anchor point (each number in the row vector corresponds to an anchor point, with larger values ​​indicating greater similarity). The anchor point corresponding to the maximum value is used to assign the label corresponding to the i-th unlabeled sample. This is the method of attaching pseudo-labels in this algorithm. The pseudo-label probability matrix F is then calculated as follows:

[0158] F t =P t T f

[0159] Among them, F t P is the pseudo-label probability matrix; t Let T be the tag probability transition matrix; f The label is the label corresponding to each sample in the anchor set.

[0160] For the newly arrived i-th sample, f ij (An element in the pseudo-label probability matrix F) represents the probability that the sample label belongs to class j. The row vector f is selected. i The column corresponding to the maximum value in the matrix represents the category of the pseudo-label, i.e., the label class. This allows us to obtain the most likely pseudo-label matrix y. t :

[0161]

[0162] Among them, y t This is the pseudo-label matrix of the current sample set; is an element in the pseudo-label probability matrix; V is the number of neurons in the output layer; j is the j-th category in the set of label categories; R is the set of real numbers; r is the number of samples in the current sample set.

[0163] This algorithm does not assign pseudo-labels to all new samples. Due to data imbalance, it is necessary to pay more attention to minority samples. We need to determine the number u of pseudo-labels for minority samples and mark their indices within the data block. Then, we determine u majority samples and mark their indices within the data block.

[0164] In this embodiment, minority samples refer to samples labeled "failed", or simply faulty samples; majority samples refer to samples labeled "no failure", or simply non-failed samples. Based on the above labeling, τ is determined. t :

[0165]

[0166] Where, τ tThe identity matrix corresponding to the current sample set; For all samples in the current sample set; It is the i-th sample in the current sample set.

[0167] The purpose of attaching pseudo-labels is to allow some minority samples and majority samples to undergo additional training while performing unsupervised learning. By prioritizing the labeling of minority samples with pseudo-labels, the dataset is balanced to some extent, and the diagnostic performance of the neural network for minority samples is enhanced.

[0168] The current weight matrix β can be obtained by updating the calculation according to the following formula. t :

[0169]

[0170]

[0171]

[0172]

[0173]

[0174] Where, β t ρ is the current weight; t μ t All are intermediate variables; E t τ is the output matrix corresponding to the current sample set; t T is the identity matrix corresponding to the current sample set; t The one-hot encoding of the pseudo-label matrix has a dimension of T. t ∈R r×V γ is a hyperparameter; E is the similarity matrix between the current sample set and the anchor point set; f The second output matrix is ​​denoted by g(·); g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; For all samples in the current sample set; It is the i-th sample in the current sample set.

[0175] To verify the accuracy and real-time performance of the pseudo-label-first online semi-supervised learning method described in this invention for handling real-time fault diagnosis tasks, the Tennessee Eastman (TEP) dataset was used for testing. TEP is widely used in control, optimization, process monitoring, and fault diagnosis research because it excellently simulates many classic features of real-world complex industrial processes. The validation platform used in the experiments was PyCharm. Three metrics were used to measure the algorithm's diagnostic performance: Average Fault Classification Accuracy (ATA), G-mean, and Total Time Consumption. G-mean is an effective metric reflecting the prediction accuracy of imbalanced problems, and its calculation formula is: Where N min N maj n represents the total number of minority and majority samples in the test set, respectively. min n maj These represent the number of minority and majority samples that were correctly predicted, respectively.

[0176] Three sets of experiments were conducted:

[0177] 1) With the total number of samples in both the offline and online training sets remaining constant, the imbalance ratio of the samples was changed, and the change in G-mean was observed. The comparative methods used in the experiment were K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Wide Learning System (BLS), Extreme Learning Machine (ELM), Randomized Vector Function Chain Neural Network (RVFL), Online Semi-Supervised ELM (SOS-ELM), Online Semi-Supervised BLS (OSS-BLS), and Incremental Semi-Supervised BLS (ISS-BLS). One fault type (d01) and one normal type (d00) were introduced into the training and test sets. To ensure data integrity, all 52 state variables were included.

[0178] Experimental results are as follows Figure 3 As shown in Table 1, the proposed MPPOS-RVFL method has a higher G-mean compared to traditional data-driven algorithms and can maintain good diagnostic performance when the imbalance ratio increases.

[0179] Table 1. Changes in G-mean under different imbalance ratios using various methods.

[0180]

[0181] 2) With the number of offline training set samples unchanged and the imbalance ratio set to 20:1, the size of the online training set was changed, and the changes in ATA of each method were observed. Two fault types (d01, d02) and one normal type (d00) were introduced into the training and test sets, and all 52 state variables were introduced.

[0182] Experimental results are as follows Figure 4 As shown, the proposed MPPOS-RVFL algorithm has a significant advantage in diagnostic accuracy compared to other online semi-supervised learning methods.

[0183] 3) With the number of samples in the offline training set remaining unchanged and the data imbalance ratio set to 20:1, the size of the online training set was changed, and the changes in the online training time of each method were observed. Two fault types (d01, d02) and one normal type (d00) were introduced into the training and test sets, and all 52 state variables were introduced.

[0184] Experimental results are as follows Figure 5 As shown in Table 2, the proposed algorithm has a significantly shorter online training time than other online semi-supervised algorithms, demonstrating a faster training speed.

[0185] Table 2 shows the time consumption of various methods under different numbers of online training samples.

[0186]

[0187] This invention provides a real-time fault diagnosis scheme based on a minority pseudo-label-first online semi-supervised learning method, enabling real-time fault diagnosis of unlabeled imbalanced data streams. The algorithm ensures accuracy in fault diagnosis, is simple, trains quickly, and guarantees real-time performance. Specifically, samples collected in actual industrial processes are typically unlabeled, and the number of fault samples is far lower than the number of normal (non-fault) samples. The proposed MPPOS-RVFL method achieves accurate and efficient fault diagnosis performance under these conditions.

[0188] Example Three

[0189] Corresponding to the above method embodiments, the present invention also provides a device for diagnosing equipment faults, such as... Figure 6 As shown, the apparatus described in this embodiment includes:

[0190] The current sample set acquisition unit 201 is used to acquire the device operation data at the current moment as the current sample set;

[0191] The online training unit 202 is used to train the pre-trained fault diagnosis model online based on the current sample set to obtain an updated fault diagnosis model; wherein the fault diagnosis model is a neural network model.

[0192] The diagnostic result acquisition unit 203 is used to input each sample in the current sample set into the updated fault diagnosis model so that the updated fault diagnosis model outputs the fault diagnosis result corresponding to the sample.

[0193] In this embodiment, pre-training the fault diagnosis model includes:

[0194] The fault diagnosis model is pre-trained offline.

[0195] In this embodiment, the fault diagnosis model includes an input layer, a hidden layer, and an output layer; the offline training of the fault diagnosis model includes:

[0196] Obtain an offline training set; wherein each sample in the offline training set is a labeled sample;

[0197] Multiple samples are randomly selected from the offline training set as anchor points;

[0198] Randomly generate weight values ​​between the input layer and the hidden layer, and randomly generate deviation values ​​between the input layer and the hidden layer;

[0199] Based on the weight values, the deviation values, and the preset nonlinear function, the output matrix corresponding to the offline training set is obtained as the first output matrix, and the output matrix corresponding to the anchor set is obtained as the second output matrix.

[0200] Based on the first output matrix and the second output matrix, the objective function of the fault diagnosis model is obtained;

[0201] The fault diagnosis model is trained offline based on the objective function to obtain the pre-trained fault diagnosis model.

[0202] In this embodiment, the first output matrix is ​​expressed by the following expression:

[0203] E0=[g(ω 1 X0+θ 1 ), ..., g(ω) L X0+θ L ), x 1 , ..., x J ]

[0204] The second output matrix is ​​expressed by the following expression:

[0205]

[0206] Where E0 is the first output matrix; g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; X0 = {x 1 , ..., x J} represents all samples in the offline training set; E f This is the second output matrix; For all samples in the anchor point set.

[0207] In this embodiment, the objective function is expressed by the following expression:

[0208]

[0209] Where J(β) is the objective function; β is the weight between the hidden layer and the output layer; τ is the identity matrix corresponding to the offline training set; T0 is the label corresponding to each sample in the offline training set; E0 is the first output matrix; λ and γ are hyperparameters; Tr(·) is a matrix traces; E f This is the second output matrix; This is the similarity matrix between the offline training set and the anchor point set.

[0210] In this embodiment, the step of offline training of the fault diagnosis model based on the objective function to obtain the pre-trained fault diagnosis model includes:

[0211] Calculate the optimal solution of the objective function to obtain the weights between the hidden layer and the output layer.

[0212] In this embodiment, the online training unit 202 includes:

[0213] A similarity matrix calculation unit is used to calculate the similarity matrix between the current sample set and the anchor point set;

[0214] The label probability transition matrix calculation unit is used to calculate the label probability transition matrix based on the similarity matrix between the current sample set and the anchor point set;

[0215] The pseudo-labeling unit is used to assign a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix, thereby obtaining the pseudo-label matrix of the current sample set.

[0216] The fault sample quantity determination unit is used to determine the quantity of fault samples in the current sample set based on the pseudo-label matrix.

[0217] The non-fault sample quantity determination unit is used to determine the quantity of non-fault samples in the current sample set based on the quantity of fault samples; wherein the quantity of fault samples is equal to the quantity of non-fault samples;

[0218] An online training subunit is used to train the pre-trained fault diagnosis model online based on the fault samples and the non-fault samples to obtain the updated fault diagnosis model.

[0219] In this embodiment, the similarity matrix calculation unit calculates the similarity matrix between the current sample set and the anchor point set using the following expression:

[0220]

[0221] in, X is the similarity matrix between the current sample set and the anchor point set; t For the current sample set; x i X is the i-th sample in the current sample set; f For the set of anchor points; x j Let be the j-th sample in the anchor point set; δ is a hyperparameter.

[0222] In this embodiment, the tag probability transition matrix calculation unit calculates the tag probability transition matrix using the following expression:

[0223]

[0224] Among them, P t The label probability transition matrix; The element in the i-th row and j-th column of the label probability transition matrix; Let be the similarity matrix between the current sample set and the anchor set; Q be the number of samples in the anchor set; r be the number of samples in the current sample set; R be the set of real numbers; and k be the kth sample in the anchor set.

[0225] In this embodiment, the fake tag assignment unit includes:

[0226] The label acquisition unit is configured to perform the following operations for each row of the label probability transition matrix to obtain the label of each sample in the current sample set: select the anchor point corresponding to the maximum value in the row; wherein the anchor point is a sample in the anchor point set; assign the label corresponding to the anchor point to the sample in the row; wherein the sample in the row is a sample in the current sample set.

[0227] The pseudo-label matrix acquisition unit is used to obtain the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set.

[0228] In this embodiment, the fake tag assignment unit further includes:

[0229] The pseudo-label probability matrix calculation unit is used to calculate the pseudo-label probability matrix based on the label corresponding to each sample in the anchor set and the label probability transition matrix;

[0230] The label category acquisition unit is configured to perform the following operations for each row of the pseudo-label probability matrix to obtain the label category of each sample in the current sample set: select the column corresponding to the maximum value in the row; assign the label category of the anchor point corresponding to the column to the sample corresponding to the row; wherein the sample corresponding to the row is a sample in the current sample set;

[0231] The pseudo-label matrix acquisition unit is further configured to obtain the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set and the label category of each sample in the current sample set.

[0232] In this embodiment, the pseudo-tag probability matrix calculation unit calculates the pseudo-tag probability matrix using the following expression:

[0233] F t =P t T f

[0234] Among them, F t P is the pseudo-label probability matrix; t Let T be the tag probability transition matrix; f The label is the label corresponding to each sample in the anchor set.

[0235] In this embodiment, the pseudo-label matrix acquisition unit is further configured to express the pseudo-label matrix of the current sample set using the following expression:

[0236]

[0237] Among them, y t This is the pseudo-label matrix of the current sample set; is an element in the pseudo-label probability matrix; V is the number of neurons in the output layer; j is the j-th category in the set of label categories; R is the set of real numbers; r is the number of samples in the current sample set.

[0238] In this embodiment, the online training subunit trains the pre-trained fault diagnosis model online in the following manner to obtain the updated fault diagnosis model:

[0239] Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated weights between the hidden layer and the output layer as the current weights; wherein, the current weights are expressed by the following expression:

[0240]

[0241]

[0242]

[0243]

[0244]

[0245] Where, β t ρ is the current weight; t μ t All are intermediate variables; E t τ is the output matrix corresponding to the current sample set; t T is the identity matrix corresponding to the current sample set; t The pseudo-label matrix is ​​a one-hot encoded representation; γ is a hyperparameter. E is the similarity matrix between the current sample set and the anchor point set; f The second output matrix is ​​denoted by g(·); g(·) is the preset nonlinear function; L is the number of neurons in the hidden layer; ω 1 ,...,ω L The weight values ​​between the input layer and the hidden layer; θ 1 , ..., θ L The deviation value between the input layer and the hidden layer; For all samples in the current sample set; Let i be the i-th sample in the current sample set.

[0246] For details regarding the working principle, workflow, and specific implementation methods of the aforementioned device, please refer to the specific implementation methods of the equipment fault diagnosis method provided by this invention. The same technical content will not be described in detail here.

[0247] The equipment fault diagnosis device provided in this embodiment of the invention acquires the equipment's current operating data as the current sample set. Based on this current sample set, it performs online training on a pre-trained fault diagnosis model to obtain an updated fault diagnosis model. For each sample in the current sample set, the sample is input into the updated fault diagnosis model, so that the updated fault diagnosis model outputs a fault diagnosis result corresponding to that sample. This allows the invention to update the fault diagnosis model in real time based on the current sample set, thereby continuously improving the fault diagnosis model and making its fault diagnosis results for the current sample more accurate. Therefore, the technical solution provided in this embodiment of the invention can more accurately perform real-time fault diagnosis of equipment.

[0248] Example Four

[0249] According to an embodiment of the present invention, a computer-readable storage medium is also provided, wherein program code is stored on the computer-readable storage medium, and when the program code is executed by a processor, it implements the device fault diagnosis method as described in the above method embodiments.

[0250] Example Five

[0251] According to an embodiment of the present invention, an electronic device is also provided, the electronic device including a memory and a processor, the memory storing program code that can run on the processor, and when the program code is executed by the processor, implementing the device fault diagnosis method as described in the above method embodiment.

[0252] The equipment fault diagnosis method, apparatus, storage medium, and electronic device provided in this invention acquire the equipment's current operating data as a current sample set. Based on this current sample set, a pre-trained fault diagnosis model is trained online to obtain an updated fault diagnosis model. For each sample in the current sample set, the sample is input into the updated fault diagnosis model, so that the updated fault diagnosis model outputs a fault diagnosis result corresponding to that sample. This allows the invention to update the fault diagnosis model in real time based on the current sample set, thereby continuously improving the fault diagnosis model and making its fault diagnosis results for the current sample more accurate. Therefore, the technical solution provided in this invention can more accurately perform real-time fault diagnosis of equipment.

[0253] This invention provides a real-time fault diagnosis scheme based on a minority pseudo-label-first online semi-supervised learning method, enabling real-time fault diagnosis of unlabeled imbalanced data streams. The algorithm ensures accuracy in fault diagnosis, is simple, trains quickly, and guarantees real-time performance. Specifically, samples collected in actual industrial processes are typically unlabeled, and the number of fault samples is far lower than the number of normal (non-fault) samples. The proposed MPPOS-RVFL method achieves accurate and efficient fault diagnosis performance under these conditions.

[0254] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0255] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0256] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0257] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0258] While the embodiments disclosed in this invention are as described above, the content is merely for the purpose of facilitating understanding of the invention and is not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and changes in form and detail of the implementation without departing from the spirit and scope disclosed herein; however, the scope of protection of this invention shall still be determined by the scope defined in the appended claims.

Claims

1. A method for diagnosing equipment faults, characterized in that, The method includes: Obtain the device operation data at the current moment as the current sample set; Based on the current sample set, the pre-trained fault diagnosis model is trained online to obtain an updated fault diagnosis model; wherein, the fault diagnosis model is a neural network model; the fault diagnosis model includes: an input layer, a hidden layer, and an output layer; the pre-training of the fault diagnosis model includes: Obtain an offline training set; wherein each sample in the offline training set is a labeled sample; Multiple samples are randomly selected from the offline training set as anchor points; Randomly generate weight values ​​between the input layer and the hidden layer, and randomly generate deviation values ​​between the input layer and the hidden layer; Based on the weight values, the deviation values, and the preset nonlinear function, an output matrix corresponding to the offline training set is obtained as the first output matrix, and an output matrix corresponding to the anchor set is obtained as the second output matrix. Based on the first output matrix and the second output matrix, the objective function of the fault diagnosis model is obtained; The fault diagnosis model is trained offline based on the objective function to obtain the pre-trained fault diagnosis model; For each sample in the current sample set, the sample is input into the updated fault diagnosis model so that the updated fault diagnosis model outputs a fault diagnosis result corresponding to the sample. The step of training the pre-trained fault diagnosis model online based on the current sample set to obtain an updated fault diagnosis model includes: Calculate the similarity matrix between the current sample set and the anchor set; wherein, the similarity matrix between the current sample set and the anchor set is calculated using the following expression: in, This is the similarity matrix between the current sample set and the anchor point set; The current sample set; For the current sample set, the first i One sample; For the set of anchor points; For the anchor point set, the first j One sample; For hyperparameters; Based on the similarity matrix between the current sample set and the anchor point set, the label probability transition matrix is ​​calculated; wherein, the label probability transition matrix is ​​calculated using the following expression: in, The label probability transition matrix; The first element in the label probability transition matrix i Line number j The element corresponding to the column; This is the similarity matrix between the current sample set and the anchor point set; The number of samples in the anchor point set; The number of samples in the current sample set; It is the set of real numbers; For the set of anchor points, the first One sample; Based on the label probability transition matrix, each sample in the current sample set is assigned a corresponding pseudo-label to obtain the pseudo-label matrix of the current sample set; Based on the pseudo-label matrix, determine the number of faulty samples in the current sample set; Based on the number of faulty samples, the number of non-faulty samples in the current sample set is determined; wherein, the number of faulty samples is equal to the number of non-faulty samples. Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated fault diagnosis model; The step of assigning a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix to obtain the pseudo-label matrix of the current sample set includes: For each row of the label probability transition matrix, perform the following operations to obtain the label of each sample in the current sample set: select the anchor point corresponding to the maximum value in the row; wherein the anchor point is a sample in the anchor point set; assign the label corresponding to the anchor point to the sample in the row; wherein the sample in the row is a sample in the current sample set; and obtain the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set. Based on the label corresponding to each sample in the anchor set and the label probability transition matrix, a pseudo-label probability matrix is ​​calculated; for each row in the pseudo-label probability matrix, the following operations are performed to obtain the label category of each sample in the current sample set: select the column corresponding to the maximum value in the row; assign the label category of the anchor corresponding to the column to the sample corresponding to the row; wherein, the sample corresponding to the row is a sample in the current sample set; obtaining the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set includes: obtaining the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set and the label category of each sample in the current sample set; The pseudo-label probability matrix is ​​calculated using the following expression: in, The pseudo-label probability matrix; The label probability transition matrix; The label corresponding to each sample in the anchor set; The pseudo-label matrix of the current sample set is expressed by the following expression: in, This is the pseudo-label matrix of the current sample set; It is an element in the pseudo-label probability matrix; V The number of neurons in the output layer; j The first in the set of said tag categories j One category; It is the set of real numbers; The number of samples in the current sample set; The step of training the pre-trained fault diagnosis model online based on the fault samples and the non-fault samples to obtain the updated fault diagnosis model includes: Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated weights between the hidden layer and the output layer as the current weights; wherein, the current weights are expressed by the following expression: in, The current weight; , All are intermediate variables; This is the output matrix corresponding to the current sample set; The identity matrix corresponding to the current sample set; This is the one-hot encoding of the pseudo-label matrix; For hyperparameters; This is the similarity matrix between the current sample set and the anchor point set; This is the second output matrix; The preset nonlinear function; L The number of neurons in the hidden layer; The weight values ​​between the input layer and the hidden layer; The deviation value between the input layer and the hidden layer; , which represents all samples in the current sample set; For the first sample in the current sample set i One sample.

2. The equipment fault diagnosis method according to claim 1, characterized in that, The first output matrix is ​​expressed by the following expression: The second output matrix is ​​expressed by the following expression: in, This is the first output matrix; The preset nonlinear function; L The number of neurons in the hidden layer; The weight values ​​between the input layer and the hidden layer; The deviation value between the input layer and the hidden layer; , which represents all samples in the offline training set; This is the second output matrix; , which represents all samples in the anchor point set.

3. The equipment fault diagnosis method according to claim 2, characterized in that, The objective function is expressed by the following expression: in, The objective function is... The weights between the hidden layer and the output layer; The identity matrix corresponding to the offline training set; The label corresponding to each sample in the offline training set; This is the first output matrix; , For hyperparameters; For matrix traces; This is the second output matrix; This is the similarity matrix between the offline training set and the anchor point set.

4. The equipment fault diagnosis method according to claim 1, characterized in that, The step of offline training of the fault diagnosis model based on the objective function to obtain the pre-trained fault diagnosis model includes: Calculate the optimal solution of the objective function to obtain the weights between the hidden layer and the output layer.

5. A device for diagnosing equipment faults, characterized in that, The device includes: The current sample set acquisition unit is used to acquire the device operation data at the current moment as the current sample set; An online training unit is used to train a pre-trained fault diagnosis model online based on the current sample set to obtain an updated fault diagnosis model; wherein, the fault diagnosis model is a neural network model; the fault diagnosis model includes: an input layer, a hidden layer, and an output layer; pre-training the fault diagnosis model includes: Obtain an offline training set; wherein each sample in the offline training set is a labeled sample; Multiple samples are randomly selected from the offline training set as anchor points; Randomly generate weight values ​​between the input layer and the hidden layer, and randomly generate deviation values ​​between the input layer and the hidden layer; Based on the weight values, the deviation values, and the preset nonlinear function, an output matrix corresponding to the offline training set is obtained as the first output matrix, and an output matrix corresponding to the anchor set is obtained as the second output matrix. Based on the first output matrix and the second output matrix, the objective function of the fault diagnosis model is obtained; The fault diagnosis model is trained offline based on the objective function to obtain the pre-trained fault diagnosis model; The diagnostic result acquisition unit is used to input each sample in the current sample set into the updated fault diagnosis model so that the updated fault diagnosis model outputs the fault diagnosis result corresponding to the sample. The online training unit includes: A similarity matrix calculation unit is used to calculate the similarity matrix between the current sample set and the anchor set; wherein, the similarity matrix between the current sample set and the anchor set is calculated using the following expression: in, This is the similarity matrix between the current sample set and the anchor point set; The current sample set; For the current sample set, the first i One sample; For the set of anchor points; For the anchor point set, the first j One sample; For hyperparameters; The label probability transition matrix calculation unit is used to calculate the label probability transition matrix based on the similarity matrix between the current sample set and the anchor point set; wherein, the label probability transition matrix is ​​calculated using the following expression: in, The label probability transition matrix; The first element in the label probability transition matrix i Line number j The element corresponding to the column; This is the similarity matrix between the current sample set and the anchor point set; The number of samples in the anchor point set; The number of samples in the current sample set; It is the set of real numbers; For the set of anchor points, the first One sample; The pseudo-labeling unit is used to assign a corresponding pseudo-label to each sample in the current sample set based on the label probability transition matrix, thereby obtaining the pseudo-label matrix of the current sample set. The fault sample quantity determination unit is used to determine the quantity of fault samples in the current sample set based on the pseudo-label matrix. The non-fault sample quantity determination unit is used to determine the quantity of non-fault samples in the current sample set based on the quantity of fault samples; wherein the quantity of fault samples is equal to the quantity of non-fault samples; An online training subunit is used to train the pre-trained fault diagnosis model online based on the fault samples and the non-fault samples to obtain the updated fault diagnosis model. The pseudo-labeling unit includes: a label acquisition unit, a pseudo-label matrix acquisition unit, a pseudo-label probability matrix calculation unit, and a label category acquisition unit; The label acquisition unit is configured to perform the following operations for each row of the label probability transition matrix to obtain the label of each sample in the current sample set: select the anchor point corresponding to the maximum value in the row; wherein the anchor point is a sample in the anchor point set; assign the label corresponding to the anchor point to the sample in the row; wherein the sample in the row is a sample in the current sample set; the pseudo-label matrix acquisition unit is configured to obtain the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set; The pseudo-label probability matrix calculation unit is used to calculate the pseudo-label probability matrix based on the label corresponding to each sample in the anchor set and the label probability transition matrix; the label category acquisition unit is used to perform the following operations for each row in the pseudo-label probability matrix to obtain the label category of each sample in the current sample set: select the column corresponding to the maximum value in the row; assign the label category of the anchor corresponding to the column to the sample corresponding to the row; wherein, the sample corresponding to the row is a sample in the current sample set; the pseudo-label matrix acquisition unit is also used to obtain the pseudo-label matrix of the current sample set based on the label of each sample in the current sample set and the label category of each sample in the current sample set; The pseudo-label probability matrix is ​​calculated using the following expression: in, The pseudo-label probability matrix; The label probability transition matrix; The label corresponding to each sample in the anchor set; The pseudo-label matrix of the current sample set is expressed by the following expression: in, This is the pseudo-label matrix of the current sample set; It is an element in the pseudo-label probability matrix; V The number of neurons in the output layer; j The first in the set of said tag categories j One category; It is the set of real numbers; The number of samples in the current sample set; The online training subunit trains the pre-trained fault diagnosis model online in the following manner to obtain the updated fault diagnosis model: Based on the fault samples and the non-fault samples, the pre-trained fault diagnosis model is trained online to obtain the updated weights between the hidden layer and the output layer as the current weights; wherein, the current weights are expressed by the following expression: in, The current weight; , All are intermediate variables; This is the output matrix corresponding to the current sample set; The identity matrix corresponding to the current sample set; This is the one-hot encoding of the pseudo-label matrix; For hyperparameters; This is the similarity matrix between the current sample set and the anchor point set; This is the second output matrix; The preset nonlinear function; L The number of neurons in the hidden layer; The weight values ​​between the input layer and the hidden layer; The deviation value between the input layer and the hidden layer; , which represents all samples in the current sample set; For the first sample in the current sample set i One sample.

6. A computer-readable storage medium storing program code thereon, characterized in that, When the program code is executed by the processor, it implements the equipment fault diagnosis method as described in any one of claims 1 to 4.

7. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores program code that can run on the processor. When the program code is executed by the processor, it implements the device fault diagnosis method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Online intelligent fault diagnosis method and system for rotating machinery for lifelong learning

    CN113962289A