CN116227586A - Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network - Google Patents

Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network Download PDF

Info

Publication number
CN116227586A
CN116227586A CN202211539067.3A CN202211539067A CN116227586A CN 116227586 A CN116227586 A CN 116227586A CN 202211539067 A CN202211539067 A CN 202211539067A CN 116227586 A CN116227586 A CN 116227586A
Authority
CN
China
Prior art keywords
training
sample
fault diagnosis
module
mechanical equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211539067.3A
Other languages
Chinese (zh)
Inventor
袁烨
张永
胡俊伟
何心
周炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanshi Intelligent Technology Nantong Co ltd
Original Assignee
Yuanshi Intelligent Technology Nantong Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuanshi Intelligent Technology Nantong Co ltd filed Critical Yuanshi Intelligent Technology Nantong Co ltd
Priority to CN202211539067.3A priority Critical patent/CN116227586A/en
Publication of CN116227586A publication Critical patent/CN116227586A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention provides a meta learning fault diagnosis method and device based on a depth residual error shrinkage prototype network, wherein the method comprises the following steps: inputting a target data pair constructed according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of the sample mechanical equipment in each preset fault category into a feature extraction module of the depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; inputting the first feature vector and the second feature vector to a measurement embedding module of a depth residual error shrinkage prototype network to obtain a similarity measurement value so as to obtain a fault diagnosis predicted value of target mechanical equipment; the feature extraction module performs meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is used for performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment under the target domain output by the feature extraction module. The invention improves the accuracy of fault diagnosis when fault sample data are scarce.

Description

Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network
Technical Field
The invention relates to the technical field of mechanical equipment fault diagnosis, in particular to a meta-learning fault diagnosis method and device based on a depth residual error shrinkage prototype network.
Background
With the increasing development of modern industrial informatization, rotary mechanical devices play an indispensable role in the fields of energy, manufacturing, aerospace and the like. The equipment fault is accurately and timely identified in the running process of the equipment, and the method has important significance for ensuring the safe running of the equipment and avoiding economic loss and serious disastrous accidents.
In recent years, machine learning has been widely applied to mechanical equipment failure diagnosis techniques with sufficient marking of failure samples, and good performance has been achieved below. While machine learning has outstanding performance, it relies heavily on a large number of labeled samples and is weak in the test data of new tasks.
In an actual industrial scene, the equipment operates in a normal state, when some sudden and catastrophic faults occur, the system needs to be immediately shut down for maintenance, so that fault sample data which are effectively marked are relatively scarce, and the accuracy of the fault diagnosis result of the mechanical equipment is difficult to ensure.
Disclosure of Invention
The invention provides a meta learning fault diagnosis method and device based on a depth residual error shrinkage prototype network, which are used for solving the defect that in the prior art, effectively marked fault sample data are relatively scarce and the accuracy of a mechanical equipment fault diagnosis result is difficult to ensure, and improving the accuracy of the mechanical equipment fault diagnosis result under the condition that the effectively marked fault sample data are scarce.
The invention provides a meta learning fault diagnosis method based on a depth residual error shrinkage prototype network, which comprises the following steps:
constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
inputting the target data pair to a feature extraction module of a depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set;
Inputting the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network to obtain similarity measurement values between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment under each preset fault category in the first sample data set;
obtaining a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value;
the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
According to the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network, the feature extraction module is trained based on the following steps:
constructing training data sets corresponding to a plurality of first meta-training tasks based on the sample data sets under the source domain; the training data set corresponding to each first meta-training task comprises operation parameters of a plurality of sample mechanical devices and fault diagnosis true values of the plurality of sample mechanical devices;
Based on training data sets corresponding to the plurality of first meta training tasks and the classification module of the depth residual error shrinkage prototype network, performing global meta learning training to obtain the feature extraction module;
the global meta learning training aims at minimizing a loss function of the classification module; the loss function of the classification module is constructed according to the fault diagnosis true value of the sample mechanical equipment in the data set corresponding to each first meta-training task and the fault diagnosis predicted value of the sample mechanical equipment in the data set corresponding to each first meta-training task output by the classification module; the fault diagnosis predicted value is obtained by classifying the feature vectors of the operation parameters of the sample mechanical equipment in the data set corresponding to each unitary training task output by the feature extraction module by the classification module.
According to the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network, which is provided by the invention, the measurement embedding module is trained based on the following steps:
constructing training data sets corresponding to a plurality of second binary training tasks based on the second sample data set under the target domain; the training data set corresponding to each second binary training task comprises a plurality of groups of sample data pairs and fault diagnosis true values of two sample mechanical devices in the sample data pairs;
For each second training task, the following is performed:
sample data pairs in a training data set corresponding to a current second binary training task are input to the feature extraction module, and feature vectors of operation parameters of two sample mechanical devices in the sample data pairs output by the feature extraction module are obtained;
inputting the feature vectors of the operation parameters of the two sample mechanical devices in the sample data pair into an initial measurement embedding module after the training and updating of the last second binary training task to obtain similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair;
obtaining a loss function corresponding to the current second binary training task according to similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair and similarity between fault diagnosis true values of the two sample mechanical devices in the sample data pair;
performing iterative training on the initial measurement embedding module after the last second training task is trained based on the loss function corresponding to the current second training task to obtain the initial measurement embedding module after the current second training task is trained;
Sample data pairs in a training data set corresponding to a next second binary training task are input into an initial measurement embedding module after the current second binary training task is trained and updated, and the second binary training task is continuously executed until the second binary training tasks are executed;
and training the updated initial measurement embedding module according to the last second binary training task, and acquiring the measurement embedding module.
According to the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network, the feature extraction module is constructed based on the depth residual error shrinkage module;
the depth residual error contraction module comprises a first feature extraction unit, a second feature extraction unit, a third feature extraction unit, a fourth feature extraction unit, a feature noise reduction unit, a first fusion unit, a second fusion unit, a soft threshold unit and a pooling unit;
the output end of the first characteristic extraction unit is connected with the input end of the second characteristic extraction unit;
the output end of the second characteristic extraction unit is connected with the input end of the third characteristic extraction unit;
the output end of the third feature extraction unit is connected with the input end of the fourth feature extraction unit;
The output end of the fourth feature extraction unit is connected with the input end of the feature noise reduction unit;
the input end of the first fusion unit is connected with the output end of the fourth feature extraction unit and the output end of the feature noise reduction unit;
the input end of the soft threshold unit is connected with the output end of the third feature extraction unit and the output end of the first fusion unit;
the input end of the second fusion unit and the output end of the first feature extraction unit; the soft threshold unit is connected with the output end of the soft threshold unit;
the input end of the pooling unit is connected with the output end of the second fusion unit.
According to the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network, the characteristic noise reduction unit comprises a plurality of linear layers, a standardization layer and a nonlinear activation function layer.
According to the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network, the measurement embedding module is constructed based on the prototype network;
the prototype network comprises a plurality of convolution layers, a nonlinear activation function layer and a full connection layer.
The invention also provides a meta learning fault diagnosis device based on the depth residual error shrinkage prototype network, which comprises:
the construction module is used for constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
the feature processing module is used for inputting the target data pair into a feature extraction module of the depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set;
the measurement module is used for inputting the first characteristic vector and the second characteristic vector into the measurement embedding module of the depth residual error shrinkage prototype network to obtain a similarity measurement value between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set;
The diagnosis module is used for acquiring a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value;
the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a meta learning fault diagnosis method based on a depth residual shrinkage prototype network as described in any one of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a meta learning fault diagnosis method based on a depth residual shrinkage prototype network as described in any one of the above.
According to the meta-learning fault diagnosis method and device based on the depth residual error shrinkage prototype network, meta-learning pre-training is carried out through the sample data set in the source domain to obtain pre-training knowledge of various fault types in the sample data set in the source domain, then metric meta-training is carried out based on the pre-training knowledge and the second sample data set in the target domain to obtain the depth residual error shrinkage prototype network with higher generalization and accuracy, fault diagnosis is carried out on the target mechanical equipment in the target domain in real time on line according to the depth residual error shrinkage prototype network, on one hand, meta-learning pre-training is carried out based on the sample data set in the source domain, few labeling data can be fully utilized, so that the depth residual error shrinkage prototype network learns the pre-training knowledge, and the problems of difficult model construction, low recognition precision and high cost caused by insufficient sample quantity of the small sample data set are effectively solved; on the other hand, measurement learning is introduced, a similarity measurement value between test data and training data in a target domain is obtained, a fault diagnosis predicted value of the target mechanical equipment is identified according to the similarity measurement value, and the robustness of fault diagnosis of the target mechanical equipment with large individual variability is improved while the identification precision is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a meta learning fault diagnosis method based on a depth residual error shrinkage prototype network provided by the invention;
fig. 2 is a schematic structural diagram of a depth residual error shrinkage module in the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network provided by the invention;
FIG. 3 is a schematic diagram of the distribution of soft threshold functions in the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network provided by the invention;
FIG. 4 is a second schematic diagram of the distribution of soft threshold functions in the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network provided by the invention;
FIG. 5 is a schematic diagram of simulation results of a meta learning fault diagnosis method based on a depth residual error shrinkage prototype network provided by the invention;
FIG. 6 is a second schematic diagram of simulation results of a meta learning fault diagnosis method based on a depth residual error shrinkage prototype network provided by the invention;
FIG. 7 is a third schematic diagram of simulation results of the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network provided by the invention;
FIG. 8 is a schematic diagram of simulation results of a meta learning fault diagnosis method based on a depth residual error shrinkage prototype network provided by the invention;
FIG. 9 is a second flow chart of a meta learning fault diagnosis method based on a depth residual error shrinkage prototype network according to the present invention;
fig. 10 is a schematic structural diagram of a meta learning fault diagnosis device based on a depth residual error shrinkage prototype network provided by the invention;
fig. 11 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In engineering practice, the limited number of equipment failure samples limits the applicability of deep learning in failure diagnosis when unexpected catastrophic failures occur. Therefore, the method and the device have important significance for ensuring the safe and stable operation of the equipment by accurately diagnosing limited fault samples.
Existing signal processing methods, such as fast fourier transforms (Fast Fourier Transform, FFT), wavelet transforms, etc., require excessive manual intervention, and are difficult to meet the requirements of diagnostic accuracy and timeliness due to the large scale and automation of modern equipment.
The informatization of the industrial system gradually accumulates a large amount of data, and the unprecedented research and development of intelligent fault diagnosis methods in recent years are promoted. The intelligent fault diagnosis method based on machine learning of a large number of marked samples can be independent of the traditional expert knowledge and experience method, the need of manually extracting signal features is abandoned, and the intelligent fault diagnosis method has stronger feature extraction and fault recognition capability compared with the traditional machine learning. The machine learning method is used for equipment fault diagnosis, the artificial neural network is used for external bearing defects, and certain effects are achieved. Due to the complexity of real scenes, traditional machine learning and shallow networks have difficulty obtaining representative features of data for fault diagnosis. Deep learning methods such as deep self-encoders, convolutional neural networks, recurrent neural networks, and graphic neural networks have been widely used for mechanical fault diagnosis and have achieved good performance.
While deep neural networks have outstanding performance, they rely heavily on a large number of labeled samples and are weak in the test data of new tasks. In an actual industrial scenario, the equipment operates in a normal state, when some sudden and catastrophic failures occur, the system needs to be immediately shut down for maintenance, so that the data of the failures are relatively scarce, and it is difficult to ensure the accuracy of the mechanical equipment failure diagnosis result.
Aiming at the problems, the embodiment provides a meta-learning fault diagnosis method based on a depth residual error shrinkage prototype network, which combines supervised learning and meta-learning to train the depth residual error shrinkage prototype network, can fully utilize a few labels, learn knowledge of all label samples from the supervised learning by using a feature extraction model, and train prototype network meta-tasks, thereby obtaining the depth residual error shrinkage prototype network with higher generalization and accuracy, effectively solving the problems of difficult model construction, low recognition precision and high cost caused by insufficient sample number of a small sample data set, realizing the diagnosis performance of accurately diagnosing mechanical equipment faults by using a small amount of labeled data, ensuring equipment operation safety, improving operation efficiency and reducing safety risks.
The meta learning fault diagnosis method based on the depth residual error shrinkage prototype network of the present application is described below with reference to fig. 1.
As shown in fig. 1, one of the flow diagrams of the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network according to the present embodiment is provided, and the method includes the following steps:
step 101, constructing a target data pair according to the operation parameters of target mechanical equipment in a target domain and the operation parameters of each sample mechanical equipment in each preset fault class in a first sample data set in the target domain;
among them, the types of the target mechanical devices include, but are not limited to, bearings, gear boxes, and the like, which are not particularly limited in this embodiment.
The operation parameters are parameters representing the operation state of the mechanical equipment, and can be determined according to the actual operation scene of the equipment, for example, the operation parameters of the rolling bearing are vibration signal time sequences acquired at a preset frequency in the current time period.
The target domain is the scene domain under the model application; the source domain is the scene domain under model training. The target domain and the source domain may be the same working condition or the same working condition, which is not specifically limited in this embodiment.
The preset fault categories include, but are not limited to, normal and abnormal states, and the abnormal states may be subdivided into missing teeth, chip teeth, and the like, which are not specifically limited in this embodiment.
Alternatively, in the case where a fault diagnosis is required for the target device, a sample data set under the target domain may be acquired first.
Let T denote an FSL (Few-shot learning) fault diagnosis task from K-way and N-shot of the target domain. K-way represents K preset fault categories, and N-shot represents that N groups of samples are contained under each preset fault category; each set of samples is constructed based on the operating parameters of the sample machine and the fault diagnostic labels of the sample machine.
The task consists of a support set S with fault diagnosis tags and a query set Q without fault diagnosis tags. In the support set S, K marked preset fault categories are included, each category including N T Group sample data.
In the query set Q, each preset fault class includes M sets of sample data. N-way classification with K signature samples for each preset fault classThe total sample dataset under the task, target domain, can be represented as
Figure BDA0003976338850000071
Wherein->
Figure BDA0003976338850000072
And->
Figure BDA0003976338850000073
An operating parameter of the sample machine and a fault diagnosis label of the sample machine, respectively representing an nth sample of a kth class, and comprising two disjoint portions, which may be characterized as D T =D S ∪D Q
Wherein the support set
Figure BDA0003976338850000074
Is randomly slave to the target domain D T The number of samples selected is N S A data set consisting of samples of (a); query set
Figure BDA0003976338850000075
Is the data set of the remaining samples of the sample data set except the support set. Wherein N is S The value of (2) is less than a predetermined value, such as less than 20, N Q The value of (2) is not limited.
The support set in the sample data set may be used as the first sample data set, or one or more groups of samples may be extracted from the samples in each preset fault class in the support set to construct the first sample data set, for example, 5 or 1 samples, which is not specifically limited in this embodiment. Each set of sample data is constructed based on the operating parameters of the sample machine and the fault diagnostic tag of the sample machine.
Then, the operation parameters of the target mechanical equipment are combined with the operation parameters of each sample mechanical equipment in each preset fault category in the first sample data set in the target domain to form target data pairs, namely each target data pair comprises the operation parameters of one target mechanical equipment and one sample equipment.
For example, the first sample data set includes a type a preset cardiac rhythm category, and each preset cardiac rhythm category includes b sample data, that is, a×b sample data in total, and the operation parameters of the target mechanical device may be respectively formed by constructing the operation parameters of the sample mechanical device in the a×b sample data, and a×b sets of target data pairs.
102, inputting the target data pair to a feature extraction module of a depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set; the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
The depth residual error shrinkage prototype network at least comprises a feature extraction module and a measurement embedding module, and can be specifically set according to actual requirements, such as a classification module.
The depth residual shrinkage prototype network is a model for performing fault diagnosis on mechanical equipment, and the structure of the depth residual shrinkage prototype network can be constructed and generated based on various neural network models, including but not limited to a convolutional network, a residual network, a feature fusion network and the like, which is not particularly limited in this embodiment.
The feature extraction module is generated based on depth residual shrinkage network construction, and the measurement embedding module is generated based on prototype network construction.
The device comprises a feature extraction module, a measurement embedding module and a measurement embedding module, wherein the feature extraction module is used for extracting feature vectors, and the measurement embedding module is used for measuring the feature vectors of the operation parameters of two devices in the target data pair output by the feature extraction module so as to realize device fault diagnosis.
Optionally, before executing step 102, a limited sample data set needs to be trained in advance to obtain a depth residual error shrinkage prototype network capable of accurately and quickly identifying fault types of various mechanical devices, a specific training mode is meta-learning and metric meta-learning combined training, and specific training steps include:
firstly, creating a data set; specifically acquiring a sample data set under a source domain and a second sample data set under a target domain; wherein the second sample data set under the target domain may be the same as or different from the first sample data set. Each sample dataset includes a support set and a query set.
Then, the support set and the query set in the sample data set under the source domain are utilized to perform global supervised learning pre-training of meta learning, and a feature extraction module is obtained, so that the feature extraction module not only has pre-training knowledge under the source domain, but also can accurately extract the characteristics of the operation parameters of the mechanical equipment, and further improves the accuracy of the equipment fault diagnosis result.
And then, extracting a feature vector (namely pre-training knowledge) from the operation parameters of the sample mechanical equipment in the second sample data set under the target domain by utilizing the pre-trained feature extraction module, and performing metric element learning training on the initial metric embedding module based on the extracted feature vector and a fault diagnosis label of the sample mechanical equipment in the second sample data set.
And constructing a depth residual error shrinkage prototype network according to the trained feature extraction module and the trained measurement embedding module.
After the depth residual shrinkage prototype network is obtained, the target data pair may be input to a feature extraction module of the depth residual shrinkage prototype network, and the feature extraction module may perform depth feature extraction on the operation parameters of the target mechanical device and the operation parameters of the sample mechanical device in the target data pair to obtain a feature vector of the operation parameters of the target mechanical device, i.e. a first feature vector, and obtain a feature vector of the operation parameters of the sample mechanical device, i.e. a second feature vector.
Step 103, inputting the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network to obtain a similarity measurement value between the operation parameter of the target mechanical equipment and the operation parameter of each sample mechanical equipment in each preset fault class in the first sample data set;
Optionally, under the condition that the first feature vector and the second feature vector are obtained, the first feature vector and the second feature vector are input to a measurement embedding module of the depth residual error shrinkage prototype network, and the measurement embedding module performs similarity measurement according to the first feature vector and the second feature vector to obtain a similarity measurement value between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set.
104, obtaining a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value;
optionally, after obtaining the similarity measurement value between the operation parameter of the target mechanical device and the operation parameter of each sample mechanical device in each preset fault class in the first sample data set, the fault diagnosis predicted value corresponding to the target mechanical device may be obtained according to the fault diagnosis label of the sample mechanical device with the maximum similarity measurement value with the operation parameter of the target mechanical device.
Or fusing the operation parameters of the target mechanical equipment with the similarity measurement values between the operation parameters of each sample mechanical equipment in the same preset fault class in the first sample data set, so as to obtain a fault diagnosis predicted value corresponding to the target mechanical equipment according to the fusion result, which is not particularly limited in this embodiment.
After the fault diagnosis predicted value corresponding to the target mechanical equipment is obtained, the fault diagnosis predicted value corresponding to the target mechanical equipment may be visualized.
According to the meta-learning fault diagnosis method based on the depth residual error shrinkage prototype network, meta-learning pre-training is conducted through the sample data set under the source domain to obtain pre-training knowledge of various fault types in the sample data set under the source domain, then metric meta-training is conducted based on the pre-training knowledge and the second sample data set under the target domain to obtain the depth residual error shrinkage prototype network with higher generalization and accuracy, fault diagnosis is conducted on the target mechanical equipment under the target domain in real time on line according to the depth residual error shrinkage prototype network, on one hand, meta-learning pre-training is conducted based on the sample data set under the source domain, few labeling data can be fully utilized, the depth residual error shrinkage prototype network learns to the pre-training knowledge, and the problems that model construction is difficult, recognition accuracy is low and cost is high due to the fact that the sample number of the small sample data set is insufficient are effectively solved; on the other hand, measurement learning is introduced, a similarity measurement value between test data and training data in a target domain is obtained, a fault diagnosis predicted value of the target mechanical equipment is identified according to the similarity measurement value, and the robustness of fault diagnosis of the target mechanical equipment with large individual variability is improved while the identification precision is improved.
In some embodiments, the feature extraction module is trained based on the following steps:
constructing training data sets corresponding to a plurality of first meta-training tasks based on the sample data sets under the source domain; the training data set corresponding to each first meta-training task comprises operation parameters of a plurality of sample mechanical devices and fault diagnosis true values of the plurality of sample mechanical devices;
based on training data sets corresponding to the plurality of first meta training tasks and the classification module of the depth residual error shrinkage prototype network, performing global meta learning training to obtain the feature extraction module;
the global meta learning training aims at minimizing a loss function of the classification module; the loss function of the classification module is constructed according to the fault diagnosis true value of the sample mechanical equipment in the data set corresponding to each first meta-training task and the fault diagnosis predicted value of the sample mechanical equipment in the data set corresponding to each first meta-training task output by the classification module; the fault diagnosis predicted value is obtained by classifying the feature vectors of the operation parameters of the sample mechanical equipment in the data set corresponding to each unitary training task output by the feature extraction module by the classification module.
The first meta-tasks are training tasks under a source domain, and each training data set corresponding to each first meta-task contains operation parameters of a plurality of sample mechanical devices and fault diagnosis true values of the sample mechanical devices, and specific numbers can be set according to actual requirements.
The purpose of meta-learning is to minimize the loss of optimal parameters learned by the feature extraction module for different tasks. The final goal of meta-learning is to enable the feature extraction module to accurately learn feature vectors of the operating parameters of the mechanical device under various preset fault categories.
Optionally, in the training process of the feature extraction module, a template data set under a source domain needs to be used, a support set and a query set required by training each first meta-training task are used together to perform traditional global supervised learning on the classification model, after training is finished, the global classification module in the classification model is removed, and the pre-trained feature extraction module is fixed for subsequent training or practical application of the metric embedding model, and the specific steps are as follows:
optionally, in the training of the feature extraction module based on meta learning, multiple training task data set acquisitions from the sample data set under the source domain based on the meta learning strategy are required to sample training data sets corresponding to multiple first meta training tasks. The training data set corresponding to each first meta-training task comprises a support set and a query set.
For each first meta-training task the following is performed:
inputting the operation parameters of the sample mechanical equipment in the training data set corresponding to the current first meta-training task into a classification model after the last first meta-training task is trained and updated, extracting the characteristics of the operation parameters of the sample mechanical equipment by a characteristic extraction module in the classification model after the last first meta-training task is trained and updated, classifying the operation parameters by a classification module in the classification model after the last first meta-training task is trained and updated, classifying faults according to the characteristic vectors output by the characteristic extraction module after the last first meta-training task is trained and updated, and outputting fault diagnosis predicted values of the sample mechanical equipment; the classification model is constructed and generated based on a feature extraction module of the depth residual shrinkage prototype network and a classification module of the depth residual shrinkage prototype network.
And then, obtaining a loss function of the classification module according to the fault diagnosis predicted value and the fault diagnosis true value of the sample mechanical equipment in the training data set corresponding to the current first meta-training task.
Based on the loss function, performing iterative training on the classification model after the last first meta-training task training update to obtain the classification model after the current first meta-training task training update;
And continuously executing the next first meta-training task on the basis of the updated classification model trained by the current meta-training task until the plurality of first meta-training tasks are all executed.
And finally, according to the updated classification model trained by the last first meta-training task, acquiring a feature extraction module, wherein the feature extraction module of the classification model trained by the last first meta-training task is directly used as a feature extraction module of the depth residual error contraction prototype network.
In this embodiment, the meta learning and meta training part is implemented through a plurality of meta training tasks under the source domain, and a small amount of sample data is fully utilized in the meta task, so that pre-training feature knowledge under the source domain can be learned, and the pre-training feature knowledge under the source domain is migrated to the target domain, thereby improving the robustness and the recognition precision of the depth residual error shrinkage prototype network under the condition of small sample size, and further improving the fault diagnosis precision of the mechanical equipment.
In some examples, the metric embedding module is trained based on the following steps:
constructing training data sets corresponding to a plurality of second binary training tasks based on the second sample data set under the target domain; the training data set corresponding to each second binary training task comprises a plurality of groups of sample data pairs and fault diagnosis true values of two sample mechanical devices in the sample data pairs;
For each second training task, the following is performed:
sample data pairs in a training data set corresponding to a current second binary training task are input to the feature extraction module, and feature vectors of operation parameters of two sample mechanical devices in the sample data pairs output by the feature extraction module are obtained;
inputting the feature vectors of the operation parameters of the two sample mechanical devices in the sample data pair into an initial measurement embedding module after the training and updating of the last second binary training task to obtain similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair;
obtaining a loss function corresponding to the current second binary training task according to similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair and similarity between fault diagnosis true values of the two sample mechanical devices in the sample data pair;
performing iterative training on the initial measurement embedding module after the last second training task is trained based on the loss function corresponding to the current second training task to obtain the initial measurement embedding module after the current second training task is trained;
Sample data pairs in a training data set corresponding to a next second binary training task are input into an initial measurement embedding module after the current second binary training task is trained and updated, and the second binary training task is continuously executed until the second binary training tasks are executed;
and training the updated initial measurement embedding module according to the last second binary training task, and acquiring the measurement embedding module.
Wherein the metric embedding module is generated by constructing a prototype network (Prototypical Networks, proNet) based on Euclidean distance of Bregman (Bridgman) divergence.
Optionally, in the training process of the metric embedding module, the pre-training knowledge learned by the feature extraction module obtained in the pre-training process and the metric embedding module can be used for training the small sample of the metric element. Specifically will be passed throughParameter θ of feature extraction module trained from sample dataset under source domain PE Fixed, on the basis, aiming at the measurement embedding module f M Parameter θ of (-) M And performing metric element training.
Optionally, the following is performed for each second binary training task:
and inputting the sample data pair in the training data set corresponding to the current second binary training task into a pre-trained feature extraction module to extract pre-training knowledge (namely feature vector, marked as P) from the operation parameters of two sample mechanical devices in the sample data pair.
Then, inputting the feature vectors of the operation parameters of the two sample mechanical devices in the extracted sample data pair into an initial measurement embedding module after the training and updating of a second binary training task, and further processing to obtain measurement embedding features (marked as F) of the operation parameters of the two sample mechanical devices in the sample data pair; the metric embedded features of the two sample machines are then matched to obtain a similarity metric value between the operating parameters of the two sample machines.
And then, calculating a loss function corresponding to the current second binary training task by combining similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair and similarity between fault diagnosis true values of the two sample mechanical devices in the sample data pair.
Then, based on the loss function, carrying out iterative training on the initial measurement embedding module after the training update of the previous second binary training task so as to obtain the initial measurement embedding module after the training update of the current second binary training task;
and continuously executing the next second binary training task on the basis of the updated initial measurement embedding module of the current second binary training task until the execution of the plurality of second binary training tasks is completed.
And finally, training the updated initial measurement embedding module according to the last second binary training task to obtain a measurement embedding module.
In the embodiment, the sample data pairs of the meta-task are constructed by fully utilizing the difference between a small number of sample mechanical devices in the target domain in the meta-task, so that the trained measurement embedding module is insensitive to the sample size, and the robustness and the recognition precision of the measurement embedding module under the condition of small sample size are improved; and by acquiring the similarity measurement value between the test data and the training data, the fault category of the equipment is identified according to the similarity measurement value, so that the identification accuracy is improved, and the robustness of the depth residual error shrinkage prototype network to the fault diagnosis of the mechanical equipment with large individual variability is improved.
In some embodiments, the feature extraction module is constructed based on a depth residual contraction module;
the depth residual error contraction module comprises a first feature extraction unit, a second feature extraction unit, a third feature extraction unit, a fourth feature extraction unit, a feature noise reduction unit, a first fusion unit, a second fusion unit, a soft threshold unit and a pooling unit;
the output end of the first characteristic extraction unit is connected with the input end of the second characteristic extraction unit;
The output end of the second characteristic extraction unit is connected with the input end of the third characteristic extraction unit;
the output end of the third feature extraction unit is connected with the input end of the fourth feature extraction unit;
the output end of the fourth feature extraction unit is connected with the input end of the feature noise reduction unit;
the input end of the first fusion unit is connected with the output end of the fourth feature extraction unit and the output end of the feature noise reduction unit;
the input end of the soft threshold unit is connected with the output end of the third feature extraction unit and the output end of the first fusion unit;
the input end of the second fusion unit and the output end of the first feature extraction unit; the soft threshold unit is connected with the output end of the soft threshold unit;
the input end of the pooling unit is connected with the output end of the second fusion unit.
As shown in fig. 2, the depth residual contraction module (Deep Residual Shrinkage Network, RSN) includes a first feature extraction unit, a second feature extraction unit, a third feature extraction unit, a fourth feature extraction unit, a feature noise reduction unit, a first fusion unit, a second fusion unit, a soft threshold unit, and a pooling unit to implement depth feature extraction based on these units.
Wherein, for each of the first, second, third, and fourth feature extraction units, each feature extraction unit is configured to perform depth feature extraction of different scales; each feature extraction unit includes, but is not limited to, one or more combinations of a convolution layer, a normalization layer, a nonlinear activation layer, a pooling layer, a flattening layer. The structure of each feature extraction unit, the convolution kernel size and convolution step length of the convolution layer, the number of output channels, the filling decision, and the like may be the same or different, and this embodiment is not particularly limited.
Table 1 structural table of depth residual shrinkage prototype network
Figure BDA0003976338850000131
Taking as an example table 1, the first feature extraction unit includes a convolution layer 1, a normalization layer 1, and a nonlinear activation layer 1; the nonlinear activation layer 1 adopts a ReLU (Rectified Linear Unit, modified linear unit) activation function, the convolution kernel size of the convolution layer 1 is 64 multiplied by 1, the convolution step length is 1 multiplied by 1, the output channel number is 64, and the filling decision is filling; the second feature extraction unit comprises a convolution layer 2, a normalization layer 2 and a nonlinear activation layer 2; the nonlinear activation layer 2 also adopts a ReLU activation function, the convolution kernel size of the convolution layer 2 is 3 multiplied by 1, the convolution step length is 1 multiplied by 1, the output channel number is 64, and the filling decision is filling; the third feature extraction unit comprises a convolution layer 3 and a standardization layer 3, wherein the convolution kernel of the convolution layer 3 is 3 multiplied by 1, the convolution step length is 1 multiplied by 1, the output channel number is 64, and the filling decision is filling; the fourth feature extraction unit comprises a pooling layer 1 and a flattening layer 1, the pooling core size of the pooling layer 1 is 3×1, the pooling step length is 2×1, the output channel number is 64, the filling decision is not filling, and the pooling layer 1 can be average pooling.
The feature noise reduction unit can comprise a full connection layer, a nonlinear activation layer and the like, and the specific structure can be set according to actual requirements. The use of gradient descent algorithm for automatic learning in deep learning, like filters in signal processing, can transform useful information into very positive features. According to the embodiment, the noise information is converted into the characteristics close to zero through the characteristic noise reduction unit, so that the noise related information can be effectively eliminated, and the characteristics with high resolution can be constructed.
And the first fusion unit is used for performing matrix point multiplication on the feature vector output by the fourth feature extraction unit and the feature vector output by the feature noise reduction unit to realize feature fusion, and outputting a feature fusion result to the soft threshold unit.
The soft threshold unit is used for extracting target information related to the tag and rejecting irrelevant information, and is used for realizing a soft threshold function based on a soft threshold function, and a specific calculation formula is as follows:
Figure BDA0003976338850000141
where x is the input characteristic of the soft threshold unit, y is the output characteristic of the soft threshold unit, and ε is the threshold.
The soft threshold calculation process is shown in fig. 3. It can be observed that the derivative of the output of the soft threshold unit is 1 or 0, and gradient extinction and burst can be effectively prevented.
As shown in fig. 4, the derivative of the soft threshold function may be expressed as:
Figure BDA0003976338850000142
and the second fusion unit is used for performing matrix point addition on the feature vector output by the first feature extraction unit and the feature vector output by the soft threshold unit so as to realize feature fusion, so that the obtained fusion features only retain effective features related to fault diagnosis, and further the fault diagnosis precision is improved.
And the pooling unit is used for compressing the fusion characteristics output by the second fusion unit so as to simplify network complexity, reduce calculation amount, reduce memory consumption and the like. And taking the compression result as a final feature vector required to be output by the feature extraction module.
The size of the pooling core, the pooling step length, the number of output channels and the filling decision of the pooling unit can also be set according to actual requirements, for example, the pooling unit comprises a pooling layer 2, the size of the pooling core of the pooling layer 2 is 3×1, the pooling step length is 2×1, the number of output channels is 64, the filling decision is not filling, and the pooling layer 2 can be average pooling.
In the embodiment, by introducing the multi-layer feature extraction unit, the feature noise reduction unit, the soft threshold unit and the fusion unit into the feature extraction module, effective features related to fault diagnosis can be accurately captured, meanwhile, noise of the features is reduced, and fault diagnosis efficiency and accuracy are further improved.
In some embodiments, the feature noise reduction unit includes multiple linear layers, a normalization layer, and a nonlinear activation function layer.
As shown in table 1, the feature noise reduction unit may include a linear full connection layer 1, a normalization layer, a ReLU activation layer, a linear full connection layer 2, and a Sigmoid (i.e., S function) activation layer.
Since the distribution of features often varies continuously during training iterations, the normalization layer is a feature normalization technique that aims to reduce the intra-model covariant displacement during training iterations. The normalization layer may normalize the features to a fixed distribution, such as to a distribution with an average value of 0 and a standard deviation of 1; the features may then also be adjusted to a desired distribution that is learned during the training process.
Wherein the ReLU activation layer may act as a soft threshold, not to zero negative features, but to zero near zero features to preserve useful negative features.
Sigmoid activation layer scales features parameters
Figure BDA0003976338850000151
Extending to the range of (0, 1). The threshold value of the Sigmoid activation layer is the average value of the absolute values of the feature map multiplied by the feature scaling parameter coefficient +.>
Figure BDA0003976338850000152
The Sigmoid activation layer performs nonlinear transformation, so that the learned features are effective features for eliminating noise related information.
According to the embodiment, through the full connection layer, the standardization layer and the nonlinear activation function layer in the feature noise reduction unit, effective features related to fault diagnosis can be accurately captured, meanwhile, noise of the features is reduced, and the accuracy of fault diagnosis is further improved.
In some embodiments, the metric embedding module is built based on a prototype network; the prototype network comprises a plurality of convolution layers, a nonlinear activation function layer and a full connection layer.
The metric embedding module is constructed and generated by a prototype network (ProNet for short) based on Euclidean distance of Bregman divergence.
The calculation of ProNet adopts Euclidean distance of Bregman divergence, and is used for calculating Bregman divergence between the characteristic vector of the operation parameters of the target mechanical equipment in the query set and the characteristic vector of the operation parameters of the sample mechanical equipment in the support set under each preset fault category, and obtaining a similarity measurement value according to the Bregman divergence so as to realize fault diagnosis of the target mechanical equipment. Taking the mean value of the feature vectors of the operation parameters of all sample mechanical equipment in the support set under each preset fault category as a prototype feature P under the corresponding preset fault category K :
Figure BDA0003976338850000153
Wherein P is k Representing prototype features in the kth preset fault class in the prototype set,
Figure BDA0003976338850000154
representing support set F S The feature vector of the operating parameter of the ith sample machine in the kth preset fault class.
As shown in table 1, the ProNet was generated based on a distance module construction, including a divergence calculation layer and a softmax layer to calculate prototype similarity as a prediction output. The divergence calculation layers include, but are not limited to, convolution layer 4, nonlinear activation layer 3, convolution layer 5, nonlinear activation layer 4, unwrapping layer 3, and linear full-join layer 4; wherein the nonlinear activation layer 3 and the nonlinear activation layer 4 employ a ReLU activation function. The divergence calculation layer is used for calculating characteristic vectors of operation parameters of target mechanical equipment in query set
Figure BDA0003976338850000161
And prototype feature P under each preset fault class k The Bregman divergence between them, finally the divergence is converted into a probability vector by the softmax layer as a prediction output.
Figure BDA0003976338850000162
Wherein Dis represents a feature vector of an operating parameter of a target mechanical device in the query set
Figure BDA0003976338850000163
Prototype feature P with kth preset fault class k Euclidean distance between them; />
Figure BDA0003976338850000164
And the probability that the output target mechanical equipment belongs to the kth preset fault class after softmax operation.
When the probability that the target mechanical equipment belongs to each preset fault category is obtained, the preset fault category corresponding to the maximum probability can be used as a fault diagnosis predicted value of the target mechanical equipment, so that the fault diagnosis predicted value of the target mechanical equipment is obtained.
In this embodiment, the prototype network in the measurement embedding module is used to obtain the similarity measurement value between the query set and the support set, so as to accurately obtain the fault diagnosis result of the target mechanical device according to the similarity measurement value, thereby improving the fault diagnosis precision, reducing the influence of individual differences of different mechanical devices on the depth residual error shrinkage prototype network, and further improving the robustness of fault diagnosis.
The following describes a complete flow of the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network proposed in the present embodiment with a specific example.
The verification is performed below taking as an example a small sample fault diagnosis scenario of a gearbox dataset.
Table 2 small sample fault diagnosis scenario for gearbox data set
Figure BDA0003976338850000165
TABLE 3 introduction to different FSL fault diagnosis methods
Figure BDA0003976338850000171
/>
Figure BDA0003976338850000181
The method comprises the steps of performing fault diagnosis on mechanical equipment by adopting an N-shot and K-way element learning strategy, and specifically considering two small sample tasks: firstly, a 1-shot element learning strategy is adopted to establish an element learning task, and particularly under 2 conditions of different working conditions (namely different loads and rotating speeds) and different types of faults under the same working condition, a sample data set under a source domain and a sample data set under a target domain are extracted to perform 1-shot element learning fault diagnosis; secondly, a 5-shot element learning strategy is adopted to establish element learning tasks, and specifically, element learning fault diagnosis of the 5-shot is carried out aiming at the task difficult to diagnose and classify under the 1-shot element learning strategy.
As shown in table 2, different operating conditions (i.e., different loads and different speeds) and fault categories are included. Wherein 30L and 30H are a low load operating condition of 30Hz and a high load operating condition of 30Hz, respectively. Under different load and speed conditions, the source domain and the target domain have 3 preset fault categories, namely Missing teeth (hereinafter also called Missing Tooth) and Normal teeth (hereinafter also called Chip Tooth). Wherein, there are at least two kinds of diagnosis scenes of different fault types: a first scenario, constructing a sample data set under a target domain from the operation data of a normal and chip tooth sample gear box, and constructing a fault diagnosis task (hereinafter referred to as NCT) of the sample data set under a source domain from the operation data of the normal and tooth missing sample gear box; in a second scenario, a sample dataset under the target domain is constructed from the operational data of normal and missing tooth sample gearboxes, and a diagnostic task (NMT, hereinafter) of a sample dataset under the source domain is constructed from the operational data of normal and chip tooth sample gearboxes.
As shown in table 3, in order to better evaluate the effectiveness of the proposed deep residual shrinkage prototype network-based meta-learning fault diagnosis method (hereinafter abbreviated as PK-RSN) in the above-described small sample task, the proposed PK-RSN was compared with several existing FSL fault diagnosis methods. Wherein, RSN in table 3 represents a residual shrinkage network (fully called Residual Shrinkage Network in english), ME represents a Metric Embedding model (fully called Metric Embedding in english), rsn+me represents a fault diagnosis model in which the residual shrinkage network and the Metric Embedding model are fused, and CNN represents a convolutional neural network (fully called Convolutional Neural Networks in english).
To further verify the performance of the PK-RSN method proposed by this example, a transmission dataset was evaluated and analyzed.
TABLE 4 failure diagnosis accuracy (in%) corresponding to 1-shot and 5-shot training tasks under different working conditions
Figure BDA0003976338850000191
Table 4 shows the fault diagnosis accuracy corresponding to the 1-shot and 5-shot training tasks under different working conditions, and the 30L-30H in the table represents the diagnosis task from the working condition of 30Hz low load under the source domain to the working condition of 30Hz high load under the target domain. As shown in Table 4, the PK-RSN provided in this example performed best in most tasks, significantly better than the existing fault diagnosis methods. Specifically, the fault method provided by the embodiment is obviously superior to the fault diagnosis method of the FSM 3-MN; by comparing with FSM3-MN and FS-RSM, FSM3-PM and FS-RSP, it can be seen that the feature extraction module in this embodiment has better feature extraction capability than CNN; by comparing with PK-ResNet, the fault diagnosis accuracy of RSN in the fault diagnosis method provided in the embodiment is better; by comparison with the FS-RSM, it can be seen that the prototype network based on the euclidean distance metric in the present embodiment has higher diagnostic accuracy than the prototype matching based on the cosine similarity metric, and further characterizes that the metric function selected in the present embodiment has better embedding metric performance.
Further, according to the above experimental setup, different advanced methods including the fault diagnosis method PK-RSN of the present embodiment were tested by performing FSL tasks on gears of different fault types under the same conditions. There are two cases in this test task, NCT and NMT, respectively.
As shown in Table 5, the failure diagnosis accuracy results under the 1-shot task are shown. The PK-RSN of this example performed best in all cases compared to the other methods. In addition, the accuracy of NCT is slightly lower than NMT, mainly because the difficult task of the source domain will provide more pre-training knowledge for the small sample fault diagnosis task of the target domain.
Further, a 5-shot task experiment was performed on the NCT fault under the same conditions, and the results are shown in table 6.
TABLE 5 accuracy of 1-shot tasks for different types of gearbox faults under the same conditions (%)
Figure BDA0003976338850000201
As shown in Table 6, these tasks were perfectly resolved after the addition of the data samples, with a diagnostic accuracy of 98.78% at 30H and 100% at both 40H and 50H. Therefore, the PK-RSN proposed in this embodiment achieves the best fault diagnosis effect in most cases, and further verifies the effectiveness of the fault diagnosis method proposed in this embodiment.
Further, the Grad-CAM (Gradient-weighted Class Activation Mapping) is adopted to perform visual fault diagnosis of the depth residual error shrinkage prototype network learning on the pre-training knowledge learned by the depth residual error shrinkage prototype network, so that the fault diagnosis method provided by the embodiment can accurately capture the depth characteristics of various fault types, and further output an accurate fault diagnosis result.
The result of obtaining the embedded feature of the gear set dataset under the target domain based on the fault diagnosis method provided by the embodiment is visualized by using t-SNE (t-Distributed Stochastic Neighbor Embedding, t distribution random neighborhood embedding), and is specifically shown in fig. 5-8. Wherein different labels characterize the embedded features under different fault types. For the gearbox dataset, the fault diagnosis task using 30L-30H, based on the visualization results, it is known that embedded features from the same type are close to each other, while embedded features from different types are separate, further demonstrating the effectiveness of our method.
TABLE 6 accuracy of normal and tooth Cutting (CT) failure 5-shot task (%)
Figure BDA0003976338850000211
In the 30L→30H diagnostic task, there are some intersections between different types of features, which means that the task is more difficult to handle. FIG. 5 is a fault diagnosis result of the FS-RSM in a 1-shot scene; FIG. 6 is a fault diagnosis result of the FS-RSM in a 5-shot scene; fig. 7 is a fault diagnosis result of PK-RSN (this embodiment) in a 1-shot scenario; fig. 8 is a fault diagnosis result of PK-RSN (this embodiment) in a 5-shot scenario; as can be seen from fig. 5-8, the embedded features of the 5-task training are more diffuse than the embedded features of the 1-task training model. This is because, for a 5-shot scenario, the model is trained to match the query sample to one of 5 support samples and to match a different query sample to a different support sample, thereby bringing the embedding distribution to a multi-center pattern. However, for a 1-shot scenario, all query samples will be matched into the same supporting sample, which makes the distribution of feature embedding more concentrated. In addition, compared with the FS-RSM, the PK-RSN of the embodiment can better distinguish different types of embedded features, and further characterizes that the fault diagnosis method provided by the embodiment has better diagnosis performance.
As shown in fig. 9, a second flowchart of the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network according to the present embodiment is shown. According to fig. 9, a description is given of a complete flow of the meta learning fault diagnosis method provided in this embodiment, which specifically includes the following steps:
step 901, creating a data set comprising a source domain data set and a target domain data set; the source domain data set comprises a support set and a query set which are both used for meta-training tasks; the target domain data set includes a support set for meta-training tasks and a query set for meta-testing tasks.
Step 902, performing supervised meta learning training on the feature extraction module and the classification model constructed by the classification module based on the source domain data set to obtain a pre-trained feature extraction module;
step 903, fixing a pre-trained feature extraction module, and training a metric embedding module through a series of FSL tasks of target domain downsampling to perform fault diagnosis on target mechanical equipment in the target domain;
and step 904, analyzing and visually displaying the fault diagnosis prediction result of the target mechanical equipment.
In summary, the meta-learning fault diagnosis method based on the depth residual error shrinkage prototype network provided by the embodiment combines the traditional supervised training and the small sample learning (FSL, few-shot learning) meta-learning to fully utilize the marker data, and considers the influence of noise on the effective characteristics of the depth residual error shrinkage prototype network mining data, thereby reducing the need for the marker data, improving the noise immunity and further improving the fault diagnosis accuracy. The method comprises the steps of firstly, performing meta-learning and pre-training by using a sample data set under a source domain to obtain a feature extraction module, so that the feature extraction module can identify the fault type of source data in a global supervision mode to obtain pre-training knowledge. And then, the feature extraction module is used as a pre-training knowledge extractor to convert the original data into a feature space, and the prototype Euclidean distance measurement training is carried out by utilizing the features extracted by the pre-training knowledge extractor, so that the depth residual error shrinkage prototype network obtained by training can not only utilize pre-training knowledge among source domain data, but also utilize feature information from a single sample. On one hand, a depth residual error shrinkage prototype network is trained by using a small sample data set under various fault categories through a meta-learning strategy, so that network parameters of the depth residual error shrinkage prototype network can be converged in fewer iteration times, good generalization performance is obtained, and the problems of difficult model construction, low recognition precision and high cost caused by insufficient sample number of the small sample data set are effectively solved; on the other hand, by acquiring the similarity measurement value between the test data and the training data and identifying the fault category according to the similarity measurement value, the fault diagnosis precision is improved, and the robustness of the depth residual error shrinkage prototype network to the fault diagnosis of the mechanical equipment with individual differential answers is improved.
The description of the deep residual error shrinkage prototype network-based meta-learning fault diagnosis device provided by the invention is provided below, and the deep residual error shrinkage prototype network-based meta-learning fault diagnosis device described below and the deep residual error shrinkage prototype network-based meta-learning fault diagnosis method described above can be referred to correspondingly.
As shown in fig. 10, a schematic structural diagram of a meta learning fault diagnosis device based on a depth residual error shrinkage prototype network according to the present embodiment is provided, where the device includes:
the construction module 1001 is configured to construct a target data pair according to an operation parameter of a target mechanical device in a target domain and an operation parameter of each sample mechanical device in each preset fault class in a first sample data set in the target domain;
the feature processing module 1002 is configured to input the target data pair to a feature extraction module of the depth residual error shrinkage prototype network, to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set;
The measurement module 1003 is configured to input the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network, so as to obtain a similarity measurement value between an operation parameter of the target mechanical device and an operation parameter of each sample mechanical device in each preset fault class in the first sample data set;
the diagnosis module 1004 is configured to obtain a fault diagnosis predicted value of the target mechanical device according to the similarity measurement value;
the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
According to the meta-learning fault diagnosis device based on the depth residual error shrinkage prototype network, meta-learning pre-training is carried out through the sample data set under the source domain to obtain pre-training knowledge of various fault types in the sample data set under the source domain, then metric meta-training is carried out based on the pre-training knowledge and the second sample data set under the target domain to obtain the depth residual error shrinkage prototype network with higher generalization and accuracy, fault diagnosis is carried out on the target mechanical equipment under the target domain in real time on line according to the depth residual error shrinkage prototype network, on one hand, meta-learning pre-training is carried out based on the sample data set under the source domain, few labeling data can be fully utilized, so that the depth residual error shrinkage prototype network learns to the pre-training knowledge, and the problems of difficult model construction, low recognition precision and high cost caused by insufficient sample quantity of the small sample data set are effectively solved; on the other hand, measurement learning is introduced, a similarity measurement value between test data and training data in a target domain is obtained, a fault diagnosis predicted value of the target mechanical equipment is identified according to the similarity measurement value, and the robustness of fault diagnosis of the target mechanical equipment with large individual variability is improved while the identification precision is improved.
Fig. 11 illustrates a physical structure diagram of an electronic device, as shown in fig. 11, which may include: a processor 1101, a communication interface (Communications Interface) 1102, a memory 1103 and a communication bus 1104, wherein the processor 1101, the communication interface 1102 and the memory 1103 communicate with each other via the communication bus 1104. The processor 1101 may invoke logic instructions in the memory 1103 to perform a meta-learning fault diagnosis method based on depth residual shrinkage prototype networks, the method comprising: constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
inputting the target data pair to a feature extraction module of a depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set; inputting the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network to obtain similarity measurement values between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment under each preset fault category in the first sample data set; obtaining a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value; the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
Further, the logic instructions in the memory 1103 described above may be implemented in the form of software functional units and sold or used as a separate product, and may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the meta learning fault diagnosis method based on the depth residual error shrinkage prototype network provided by the above methods, and the method includes: constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
Inputting the target data pair to a feature extraction module of a depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set; inputting the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network to obtain similarity measurement values between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment under each preset fault category in the first sample data set; obtaining a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value; the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method for diagnosing a meta learning fault based on a depth residual shrinkage prototype network provided by the above methods, the method comprising: constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
inputting the target data pair to a feature extraction module of a depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set; inputting the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network to obtain similarity measurement values between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment under each preset fault category in the first sample data set; obtaining a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value; the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The meta learning fault diagnosis method based on the depth residual error shrinkage prototype network is characterized by comprising the following steps of:
constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
inputting the target data pair to a feature extraction module of a depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set;
Inputting the first feature vector and the second feature vector to a measurement embedding module of the depth residual error shrinkage prototype network to obtain similarity measurement values between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment under each preset fault category in the first sample data set;
obtaining a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value;
the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
2. The meta learning fault diagnosis method based on depth residual shrinkage prototype network according to claim 1, wherein the feature extraction module is trained based on the following steps:
constructing training data sets corresponding to a plurality of first meta-training tasks based on the sample data sets under the source domain; the training data set corresponding to each first meta-training task comprises operation parameters of a plurality of sample mechanical devices and fault diagnosis true values of the plurality of sample mechanical devices;
Based on training data sets corresponding to the plurality of first meta training tasks and the classification module of the depth residual error shrinkage prototype network, performing global meta learning training to obtain the feature extraction module;
the global meta learning training aims at minimizing a loss function of the classification module; the loss function of the classification module is constructed according to the fault diagnosis true value of the sample mechanical equipment in the data set corresponding to each first meta-training task and the fault diagnosis predicted value of the sample mechanical equipment in the data set corresponding to each first meta-training task output by the classification module; the fault diagnosis predicted value is obtained by classifying the feature vectors of the operation parameters of the sample mechanical equipment in the data set corresponding to each unitary training task output by the feature extraction module by the classification module.
3. The meta learning fault diagnosis method based on depth residual shrinkage prototype network according to claim 1, wherein the metric embedding module is trained based on the following steps:
constructing training data sets corresponding to a plurality of second binary training tasks based on the second sample data set under the target domain; the training data set corresponding to each second binary training task comprises a plurality of groups of sample data pairs and fault diagnosis true values of two sample mechanical devices in the sample data pairs;
For each second training task, the following is performed:
sample data pairs in a training data set corresponding to a current second binary training task are input to the feature extraction module, and feature vectors of operation parameters of two sample mechanical devices in the sample data pairs output by the feature extraction module are obtained;
inputting the feature vectors of the operation parameters of the two sample mechanical devices in the sample data pair into an initial measurement embedding module after the training and updating of the last second binary training task to obtain similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair;
obtaining a loss function corresponding to the current second binary training task according to similarity measurement values between the operation parameters of the two sample mechanical devices in the sample data pair and similarity between fault diagnosis true values of the two sample mechanical devices in the sample data pair;
performing iterative training on the initial measurement embedding module after the last second training task is trained based on the loss function corresponding to the current second training task to obtain the initial measurement embedding module after the current second training task is trained;
Sample data pairs in a training data set corresponding to a next second binary training task are input into an initial measurement embedding module after the current second binary training task is trained and updated, and the second binary training task is continuously executed until the second binary training tasks are executed;
and training the updated initial measurement embedding module according to the last second binary training task, and acquiring the measurement embedding module.
4. A meta learning fault diagnosis method based on depth residual shrinkage prototype network according to any one of claims 1-3, wherein the feature extraction module is constructed based on a depth residual shrinkage module;
the depth residual error contraction module comprises a first feature extraction unit, a second feature extraction unit, a third feature extraction unit, a fourth feature extraction unit, a feature noise reduction unit, a first fusion unit, a second fusion unit, a soft threshold unit and a pooling unit;
the output end of the first characteristic extraction unit is connected with the input end of the second characteristic extraction unit;
the output end of the second characteristic extraction unit is connected with the input end of the third characteristic extraction unit;
the output end of the third feature extraction unit is connected with the input end of the fourth feature extraction unit;
The output end of the fourth feature extraction unit is connected with the input end of the feature noise reduction unit;
the input end of the first fusion unit is connected with the output end of the fourth feature extraction unit and the output end of the feature noise reduction unit;
the input end of the soft threshold unit is connected with the output end of the third feature extraction unit and the output end of the first fusion unit;
the input end of the second fusion unit and the output end of the first feature extraction unit; the soft threshold unit is connected with the output end of the soft threshold unit;
the input end of the pooling unit is connected with the output end of the second fusion unit.
5. The meta-learning fault diagnosis method based on depth residual shrinkage prototype network according to claim 4, wherein the feature noise reduction unit comprises a plurality of linear layers, a normalization layer and a nonlinear activation function layer.
6. A method for meta learning fault diagnosis based on depth residual shrinkage prototype network according to any one of claims 1-3, wherein the metric embedding module is built based on prototype network;
the prototype network comprises a plurality of convolution layers, a nonlinear activation function layer and a full connection layer.
7. A meta learning fault diagnosis device based on a depth residual error shrinkage prototype network, comprising:
the construction module is used for constructing a target data pair according to the operation parameters of the target mechanical equipment in the target domain and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set in the target domain;
the feature processing module is used for inputting the target data pair into a feature extraction module of the depth residual error shrinkage prototype network to obtain a first feature vector and a second feature vector; the first feature vector is a feature vector of the operation parameter of the target mechanical equipment, and the second feature vector is a feature vector of the operation parameter of each sample mechanical equipment under each preset fault class in the first sample data set;
the measurement module is used for inputting the first characteristic vector and the second characteristic vector into the measurement embedding module of the depth residual error shrinkage prototype network to obtain a similarity measurement value between the operation parameters of the target mechanical equipment and the operation parameters of each sample mechanical equipment in each preset fault class in the first sample data set;
The diagnosis module is used for acquiring a fault diagnosis predicted value of the target mechanical equipment according to the similarity measurement value;
the feature extraction module is obtained by performing meta-learning pre-training based on a sample data set under a source domain; the measurement embedding module is obtained by performing measurement element learning training based on the feature vector of the operation parameters of the sample mechanical equipment in the second sample data set under the target domain output by the feature extraction module.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the deep residual shrinkage prototype network-based meta learning fault diagnosis method according to any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the meta learning fault diagnosis method based on a depth residual shrink prototype network according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements a meta learning fault diagnosis method based on a depth residual shrinkage prototype network according to any one of claims 1 to 6.
CN202211539067.3A 2022-12-01 2022-12-01 Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network Pending CN116227586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211539067.3A CN116227586A (en) 2022-12-01 2022-12-01 Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211539067.3A CN116227586A (en) 2022-12-01 2022-12-01 Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network

Publications (1)

Publication Number Publication Date
CN116227586A true CN116227586A (en) 2023-06-06

Family

ID=86571955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211539067.3A Pending CN116227586A (en) 2022-12-01 2022-12-01 Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network

Country Status (1)

Country Link
CN (1) CN116227586A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117074628A (en) * 2023-10-17 2023-11-17 山东鑫建检测技术有限公司 Multi-sensor air quality detection equipment fault positioning method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117074628A (en) * 2023-10-17 2023-11-17 山东鑫建检测技术有限公司 Multi-sensor air quality detection equipment fault positioning method
CN117074628B (en) * 2023-10-17 2024-01-09 山东鑫建检测技术有限公司 Multi-sensor air quality detection equipment fault positioning method

Similar Documents

Publication Publication Date Title
US20210020360A1 (en) Internal thermal fault diagnosis method of oil-immersed transformer based on deep convolutional neural network and image segmentation
CN111650453B (en) Power equipment diagnosis method and system based on windowing characteristic Hilbert imaging
Lu et al. A novel feature extraction method using deep neural network for rolling bearing fault diagnosis
CN108196143A (en) Power Transformer Faults depth diagnostic method and terminal device
CN113111820B (en) Rotary part fault diagnosis method and device based on improved CNN and relation module
CN113076834B (en) Rotating machine fault information processing method, processing system, processing terminal, and medium
Wang et al. Intelligent fault diagnosis for planetary gearbox using transferable deep q network under variable conditions with small training data
CN112257862B (en) Semi-supervised identification method based on relation network marking sample expansion
CN106997373A (en) A kind of link prediction method based on depth confidence network
CN115600150A (en) Multi-mode gearbox fault diagnosis method based on deep migration learning
CN114091504A (en) Rotary machine small sample fault diagnosis method based on generation countermeasure network
CN116702076A (en) Small sample migration learning fault diagnosis method, system, computer and storage medium based on CNN feature fusion
CN114048787B (en) Method and system for intelligently diagnosing bearing fault in real time based on Attention CNN model
CN116227586A (en) Meta learning fault diagnosis method and device based on depth residual error shrinkage prototype network
CN115358259A (en) Self-learning-based unsupervised cross-working-condition bearing fault diagnosis method
CN116186641A (en) Cross-equipment rolling bearing small sample fault diagnosis method based on feature fusion
CN115791174B (en) Rolling bearing abnormality diagnosis method, system, electronic equipment and storage medium
CN116910574A (en) Mechanical equipment diagnosis method and device based on meta-learning and time convolution network
CN111415326A (en) Method and system for detecting abnormal state of railway contact net bolt
Techane et al. Rotating machinery prognostics and application of machine learning algorithms: Use of deep learning with similarity index measure for health status prediction
CN116204781A (en) Rotary machine fault migration diagnosis method and system
CN115859077A (en) Multi-feature fusion motor small sample fault diagnosis method under variable working conditions
CN117634006B (en) BIM technology-based sleeve embedded engineering management system and method
CN116007937A (en) Intelligent fault diagnosis method and device for mechanical equipment transmission part
Qi et al. RUL Prediction of Turbofan Engine Based on WGAN-Trans Under Small Samples

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination