Variable batch multilayer domain adaptive mode recognition method based on small samples

By measuring and updating the feature distribution difference of the fault diagnosis model in rotating machinery fault diagnosis, the problem of the difference in data distribution between the source domain and the target domain affecting the diagnosis effect is solved, and the accuracy and precision of fault diagnosis are improved.

CN118535972AActive Publication Date: 2024-08-23NORTHEASTERN UNIV CHINA

Patent Information

Application Number
CN202410636434.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-23
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

In rotating machinery fault diagnosis, due to the distribution difference between source domain data and target domain data, direct deep transfer learning will affect the training effect of the fault diagnosis model, resulting in the accuracy of the diagnosis results cannot be guaranteed.

Method used

A variable-batch multi-layer domain adaptive pattern recognition method based on small samples is used to obtain source domain data and target domain data of rotating machinery, measure the feature distribution difference on the feature extraction layer and classification layer, and use it as the impact of the loss function factors, iteratively update the initial fault diagnosis model until the preset convergence conditions are met, and the trained fault diagnosis model is output.

Benefits of technology

This method can correct the cross-domain deviation of the training data, improve the training effect and accuracy of the fault diagnosis model, and ensure the accuracy of fault diagnosis in small sample conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535972A
    Figure CN118535972A
Patent Text Reader

Abstract

The invention discloses a variable-batch multi-layer domain adaptive mode recognition method and device based on small samples, and relates to the technical field of rotating machinery fault diagnosis. The method comprises the following steps: acquiring source domain data and target domain data of a rotary mechanical device, and an initial fault diagnosis model; based on the initial fault diagnosis model, measuring a first feature distribution difference of the source domain data and the target domain data on a feature extraction layer and a second feature distribution difference on a classification layer; based on the first feature distribution difference and the second feature distribution difference, performing iterative updating on the initial fault diagnosis model to obtain a fault diagnosis model after the current round of updating; on the basis of the fault diagnosis model updated in this round, the process of measuring the feature distribution difference and iteratively updating the model is repeated until a preset convergence condition is met, and a trained preset fault diagnosis model is output; and performing pattern recognition by using the preset fault diagnosis model. The training effect of the fault diagnosis model can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of rotating machinery fault diagnosis, and in particular to a variable batch multi-layer domain adaptive pattern recognition method and device based on small samples. Background Art

[0002] Industrial equipment is increasingly becoming large-scale, automated, and intelligent. Rotating machinery such as bearings and gears are widely used in aerospace, transportation, and other fields. Their operating conditions are directly related to the health of various mechanical equipment. Once a fault occurs, it will affect the normal operation of the equipment and cause economic losses, or even cause serious safety accidents. Therefore, real-time and efficient fault diagnosis of rotating machinery such as bearings has positive practical significance.

[0003] In recent years, deep transfer learning has received extensive attention and research in the field of intelligent fault diagnosis. In order to solve the problem of less sample data in rotating machinery fault diagnosis scenarios, deep transfer learning technology is usually used directly to train fault diagnosis models. However, due to the distribution difference between source domain data and target domain data, if deep transfer learning is directly performed, the training effect of the fault diagnosis model will be affected, and the accuracy of the fault diagnosis results cannot be guaranteed. Summary of the invention

[0004] In view of this, the present application provides a variable batch multi-layer domain adaptive pattern recognition method and device based on small samples, the main purpose of which is to ensure the training effect of the fault diagnosis model and improve the fault diagnosis accuracy.

[0005] According to a first aspect of the present application, a small sample-based variable batch multi-layer domain adaptive pattern recognition method is provided, the method comprising:

[0006] Acquire source domain data and target domain data of a rotating mechanical device, and an initial fault diagnosis model, wherein the initial fault diagnosis model includes a feature extraction layer and a classification layer;

[0007] Based on the initial fault diagnosis model, measuring a first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and a second feature distribution difference at the classification layer;

[0008] Iteratively updating the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain a fault diagnosis model after this round of update, wherein when iteratively updating the initial fault diagnosis model, the first feature distribution difference and the second feature distribution difference are used as partial influencing factors of the loss function;

[0009] Based on the fault diagnosis model updated in this round, the process of measuring feature distribution differences and iteratively updating the model is repeated until a preset convergence condition is met, and a trained preset fault diagnosis model is output;

[0010] The preset fault diagnosis model is used to perform pattern recognition.

[0011] According to a second aspect of the present application, a small sample-based variable batch multi-layer domain adaptive pattern recognition device is provided, the device comprising:

[0012] An acquisition unit, used to acquire source domain data and target domain data of the rotating mechanical device, and an initial fault diagnosis model, wherein the initial fault diagnosis model includes a feature extraction layer and a classification layer;

[0013] A measuring unit, configured to measure, based on the initial fault diagnosis model, a first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and a second feature distribution difference at the classification layer;

[0014] an updating unit, configured to iteratively update the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain a fault diagnosis model after this round of update, wherein when iteratively updating the initial fault diagnosis model, the first feature distribution difference and the second feature distribution difference are used as partial influencing factors of a loss function;

[0015] An iteration unit, used for repeating the process of measuring feature distribution differences and iteratively updating the model based on the fault diagnosis model updated in this round, until a preset convergence condition is met, and outputting a trained preset fault diagnosis model;

[0016] The recognition unit is used to perform pattern recognition using the preset fault diagnosis model.

[0017] According to a third aspect of the present application, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned variable batch multi-layer domain adaptive pattern recognition method based on small samples is implemented.

[0018] According to the fourth aspect of the present application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein when the processor executes the program, the above-mentioned variable batch multi-layer domain adaptive pattern recognition method based on small samples is implemented.

[0019] By means of the above technical scheme, the present application provides a variable batch multi-layer domain adaptive pattern recognition method and device based on small samples. During the model training process, by simultaneously measuring the feature distribution differences between the source domain data and the target domain data at the feature extraction layer and the classification layer, it is possible to correct the cross-domain bias of the training data and better apply the knowledge learned from the source domain data to the target domain, thereby ensuring the training effect of the fault diagnosis model in the case of small samples and improving the fault diagnosis accuracy.

[0020] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1 A schematic diagram of a process of a multi-layer domain adaptive pattern recognition method based on small samples and variable batch size provided in an embodiment of the present application is shown;

[0023] Figure 2 A schematic diagram of a process of another method for multi-layer domain adaptive pattern recognition based on small samples and variable batch size provided in an embodiment of the present application is shown;

[0024] Figure 3 A schematic diagram of the overall model training process provided by an embodiment of the present application is shown;

[0025] Figure 4 A schematic structural diagram of a small sample-based variable batch multi-layer domain adaptive pattern recognition device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0026] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0027] Due to the distribution differences between the source domain data and the target domain data, if deep transfer learning is performed directly, it will affect the training effect of the fault diagnosis model and thus cannot guarantee the accuracy of the fault diagnosis results.

[0028] In order to solve the above problems, the embodiment of the present invention provides a variable batch multi-layer domain adaptive pattern recognition method based on small samples, such as Figure 1 As shown, the method includes:

[0029] Step 101: Acquire source domain data and target domain data of a rotating mechanical device, as well as an initial fault diagnosis model.

[0030] The rotating mechanical device includes bearings, gears, etc., but the rotating mechanical device in the embodiment of the present invention is not limited to bearings and gears, and can also be other rotating mechanical devices. The fault type of the source domain data is known, and the fault type of the target domain data is unknown. The initial fault diagnosis model includes a feature extraction layer and a classification layer.

[0031] The embodiment of the present invention is mainly applicable to the scenario of training a fault diagnosis model based on a small sample. The execution subject of the embodiment of the present invention is a device or apparatus capable of training a fault diagnosis model based on a small sample, which can be specifically set on the server side.

[0032] In the fault diagnosis of rotating machinery, it is necessary to measure signals, specifically including one or more of vibration signals, temperature signals, sound wave signals, and current signals. Among the above signals, since vibration signals are easy to measure and can provide the most intrinsic information for mechanical fault diagnosis, the embodiment of the present invention prefers to use vibration signals to identify the health status of rotating machinery devices, that is, starting from vibration signals, explore the relationship between fault signals and fault types. Among them, fault types specifically include pitting, wear, etc.

[0033] It should be noted that, in the fault diagnosis of rotating machinery, the selected measurement signal is not limited to the vibration signal, and may also be other types of signals, which is not specifically limited in the embodiment of the present invention.

[0034] Furthermore, in order to successfully collect vibration signals, it is necessary to build a test bench and install vibration sensors and acquisition cards. Among them, the vibration simulation test bench or industrial field equipment is the basis for obtaining data, so it is necessary to fully understand the system composition and functions of each part of the test bench, and master the use of the test bench to conduct fault simulation experiments of rotating mechanical devices on the test bench; the vibration sensor needs to be installed in a suitable position to maximize the optimal representation of the current signal and provide a good foundation for subsequent analysis and processing; the installation of the acquisition card can obtain relatively stable data. During the specific installation, the vibration sensor needs to be connected to the acquisition card, and the measured data is uploaded to the computer client through the acquisition card.

[0035] After the hardware equipment is arranged, the original vibration signals under different working conditions are collected and divided into source domain data and target domain data. For this process, the method includes: obtaining the original vibration signal of the rotating mechanical device; based on the original vibration signal, determining the source domain data of the known fault type and the target domain data of the unknown fault type.

[0036] For example, multiple groups of original vibration signals of bearings at different speeds and different forces are collected and divided into source domain data and target domain data. The fault type of the source domain data is known and has a fault type label, while the fault type of the target domain data is unknown and does not have a fault type label. When sampling, it is preferred to set the sampling step size to 1024 with no overlap.

[0037] In some embodiments, all source domain data can be used as training data, and the target domain data can be randomly divided into two parts, one part as training data and the other part as test data. For example, 20% of the target domain data can be used as test data and 80% of the data can be used as training data.

[0038] In some embodiments, with respect to the process of constructing an initial fault diagnosis model, the method includes: using a preset neural network algorithm to construct an initial fault diagnosis model corresponding to the rotating mechanical device.

[0039] Specifically, the initial fault diagnosis model can be a neural network model, such as an ML-MM network model, or other neural network models, which is not specifically limited in the embodiment of the present invention. Before model training, it is necessary to set model parameters, learning rate, sample batches at different iteration stages, preset convergence conditions (such as the number of iterations), initialization bias and weight parameters, etc.

[0040] Step 102: Based on the initial fault diagnosis model, measure the first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer.

[0041] For the embodiment of the present invention, in order to ensure the training effect of the fault diagnosis model, it is necessary to simultaneously measure the first feature distribution difference of the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer. Specifically, the source domain data and the target domain data can be respectively input into the initial fault diagnosis model to obtain the multidimensional features output by the source domain data and the target domain data through the feature extraction layer, and then the feature distribution difference of the source domain data and the target domain data at the feature extraction layer can be determined. Similarly, the multidimensional features output by the source domain data and the target domain data through the classification layer can be obtained, and then the feature distribution difference of the source domain data and the target domain data at the classification layer can be determined.

[0042] In some embodiments, part of the target domain data is used for training, and the other part is used for testing. Based on this, step 102 specifically includes: dividing the target domain data into first target domain data for training and second target domain data for testing; based on the initial fault diagnosis model, measuring the first feature distribution difference between the source domain data and the first target domain data at the feature extraction layer and the second feature distribution difference at the classification layer.

[0043] The ratio between the first target domain data and the second target domain data can be set according to actual business needs, such as using 80% of the first target domain data in the target domain data for training and 20% of the second target domain data for testing.

[0044] Step 103: iteratively update the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain a fault diagnosis model after this round of update.

[0045] Wherein, when iteratively updating the initial fault diagnosis model, the first feature distribution difference and the second feature distribution difference are used as partial influencing factors of the loss function.

[0046] For the embodiments of the present invention, after determining the first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer, a loss function can be constructed based on the first feature distribution difference and the second feature distribution difference, that is, it is hoped that the overall feature distribution difference is minimized. Then, based on the loss function, the initial fault diagnosis model is iteratively updated to obtain the fault diagnosis model after this round of updates.

[0047] Step 104: Based on the fault diagnosis model updated in this round, the process of measuring feature distribution differences and iteratively updating the model is repeated until a preset convergence condition is met, and a trained preset fault diagnosis model is output.

[0048] The preset convergence condition may specifically be the number of iterations, that is, when a certain number of iterations is reached, the training is stopped.

[0049] For the embodiment of the present invention, based on the constructed loss function, the fault diagnosis model is continuously iteratively trained, and when a certain number of iterations is reached, the trained preset fault diagnosis model is output. Afterwards, the trained preset fault diagnosis model can be tested using the test data in the target domain data to ensure the accuracy of the diagnosis result of the fault diagnosis model.

[0050] Step 105: Perform pattern recognition using the preset fault diagnosis model.

[0051] In the embodiment of the present invention, pattern recognition is fault diagnosis, and the fault type of the rotating mechanical device, such as wear, pitting, etc., can be determined through pattern recognition.

[0052] An embodiment of the present invention provides a variable batch multi-layer domain adaptive pattern recognition method based on small samples. During the model training process, by simultaneously measuring the feature distribution differences between source domain data and target domain data at the feature extraction layer and the classification layer, it is possible to correct the cross-domain bias of the training data and better apply the knowledge learned from the source domain data to the target domain, thereby ensuring the training effect of the fault diagnosis model in the case of small samples and improving the fault diagnosis accuracy.

[0053] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the implementation of this embodiment, this embodiment also provides another variable batch multi-layer domain adaptive pattern recognition method based on small samples, such as Figure 2 As shown, the method includes:

[0054] Step 201: Acquire source domain data and target domain data of a rotating mechanical device, as well as an initial fault diagnosis model.

[0055] Wherein, the initial fault diagnosis model includes a feature extraction layer and a classification layer.

[0056] For the embodiment of the present invention, the process of acquiring source domain data, target domain data and the initial fault diagnosis model is exactly the same as step 101 and will not be repeated here.

[0057] Step 202: Based on the initial fault diagnosis model, measure the first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer.

[0058] For the embodiment of the present invention, in order to measure the first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer, step 202 specifically includes: inputting the source domain data into the initial fault diagnosis model for fault diagnosis, and obtaining the first multidimensional features output by the feature extraction layer and the first multidimensional features output by the classification layer; inputting the target domain data into the initial fault diagnosis model for fault diagnosis, and obtaining the second multidimensional features output by the feature extraction layer and the second multidimensional features output by the classification layer; based on the first multidimensional features and the second multidimensional features output by the feature extraction layer, and the first multidimensional features and the second multidimensional features output by the classification layer, respectively measuring the first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer.

[0059] Furthermore, the first and second multidimensional features output by the feature extraction layer and the first and second multidimensional features output by the classification layer are used to measure the first feature distribution difference of the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer, respectively, including: calculating the multidimensional feature distance corresponding to the feature extraction layer based on the first and second multidimensional features output by the feature extraction layer; calculating the multidimensional feature distance corresponding to the classification layer based on the first and second multidimensional features output by the classification layer; and measuring the first feature distribution difference and the second feature distribution difference respectively according to the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer. The specific calculation process of the multidimensional feature distance corresponding to the feature extraction layer and the classification layer is as follows:

[0060]

[0061] Among them, L MMD Indicates the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer. The multidimensional feature distance is used to reflect the difference in feature distribution between the source domain data and the target domain data at the feature extraction layer and the classification layer. The larger the multidimensional feature distance, the greater the difference in feature distribution. s Represents the first multidimensional feature of the source domain data at the feature extraction layer or classification layer, X t Represents the second multidimensional feature of the target domain data on the feature extraction layer or classification layer. Based on the first and second multidimensional features corresponding to the feature extraction layer, the multidimensional feature distance corresponding to the feature extraction layer is calculated. Similarly, based on the first and second multidimensional features corresponding to the classification layer, the multidimensional feature distance corresponding to the classification layer is calculated. Then, the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer are added together to obtain L MMD .

[0062] Step 203: Acquire the actual fault type corresponding to the rotating mechanical device in the source domain data, and input the source domain data into the initial fault diagnosis model for fault diagnosis to obtain the predicted fault type corresponding to the source domain data.

[0063] According to the embodiment of the present invention, the source domain data has a fault type label, and the actual fault type corresponding to the rotating mechanical device can be determined through the fault type label.

[0064] Step 204: iteratively update the initial fault diagnosis model according to the actual fault type and the predicted fault type corresponding to the source domain data, as well as the first feature distribution difference and the second feature distribution difference, to obtain a fault diagnosis model after this round of update.

[0065] In order to ensure the training accuracy of the fault diagnosis model under the condition of small samples, the embodiment of the present invention divides the training process of the fault diagnosis model into two stages. In the first training stage, only the fault diagnosis error corresponding to the source domain data, the feature distribution difference on the feature extraction layer and the classification layer are considered when constructing the loss function. Based on the constructed loss function, the target fault diagnosis model is trained to obtain. In the second training stage, the pseudo-fault type (pseudo-label) corresponding to the target domain data is determined using the target fault diagnosis model obtained in the first training stage. When constructing the loss function, not only the fault diagnosis error corresponding to the source domain data, the feature distribution difference on the feature extraction layer and the classification layer are considered, but also the fault diagnosis error corresponding to the target domain data. The overall algorithm flow is as follows: Figure 3 shown.

[0066] For the update iterative process of the first training stage, step 204 specifically includes: calculating the fault type difference corresponding to the source domain data according to the actual fault type and the predicted fault type corresponding to the source domain data; calculating the total feature distribution difference between the fully connected layer and the classification layer according to the first feature distribution difference and the second feature distribution difference; constructing a first loss function based on the fault type difference corresponding to the source domain data and the total feature distribution difference; iteratively updating the initial fault diagnosis model based on the first loss function to obtain the fault diagnosis model after this round of update. Among them, the specific formula of the first loss function is as follows:

[0067] L1=L s +λL MMD

[0068]

[0069] Where L1 represents the first loss function. MMD Represents the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer, that is, the total feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the classification layer. s Represents the fault type difference corresponding to the source domain data, Represents the actual fault type corresponding to the source domain data, represents the predicted fault type corresponding to the source domain data, j represents the dimension, and the total dimension of the predicted fault type or the actual fault type is k, n s Represents the amount of data in the source domain.

[0070] After the first loss function L1 is constructed, the initial fault diagnosis model is updated and iterated for the first round based on the first loss function L1 to obtain the fault diagnosis model after this round of update.

[0071] Step 205: Based on the fault diagnosis model updated in this round, the process of measuring feature distribution differences and iteratively updating the model is repeated until a preset convergence condition is met, and a trained preset fault diagnosis model is output.

[0072] The preset convergence condition includes a first preset number of iterations corresponding to the first training stage and a second preset number of iterations corresponding to the second training stage.

[0073] For an embodiment of the present invention, after the first round of update iterations is completed in the first training phase, the fault diagnosis model continues to be updated and iterated based on the constructed first preset loss function, and the above-mentioned process of measuring the first feature distribution difference between the source domain data and the target domain data on the feature extraction layer and the second feature distribution difference on the hierarchical class, as well as the process of iteratively updating the model are repeated until the first preset number of iterations is reached, the iterative update is stopped, and the target fault diagnosis model is output, thereby completing the first phase of training.

[0074] For the second stage of the training process, the method includes: determining the pseudo-fault type (pseudo-label) corresponding to the target domain data based on the target fault diagnosis model; inputting the target domain data into the initial fault diagnosis model for fault diagnosis to obtain the predicted fault type corresponding to the target domain data; based on the fault type difference corresponding to the source domain data, the pseudo-fault type and predicted fault type corresponding to the target domain data, and the total feature distribution difference, iteratively updating the initial fault diagnosis model until a second preset number of iterations is reached, and then outputting the trained preset fault diagnosis model.

[0075] Further, based on the fault type difference corresponding to the source domain data, the pseudo-fault type and predicted fault type corresponding to the target domain data, and the total feature distribution difference, the initial fault diagnosis model is iteratively updated until a second preset number of iterations is reached, and a trained preset fault diagnosis model is output, including: calculating the fault type difference corresponding to the target domain data according to the pseudo-fault type and predicted fault type corresponding to the target domain data; constructing a second loss function based on the fault type difference corresponding to the source domain data, the fault type difference corresponding to the target domain data, and the total feature distribution difference; based on the second loss function, iteratively updating the initial fault diagnosis model until a second preset number of iterations is reached, and a trained preset fault diagnosis model is output. Among them, the specific calculation formula of the second loss function is as follows:

[0076] L2=L s +λL MMD +L t

[0077]

[0078] Where L2 represents the second loss function. MMD Represents the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer, that is, the total feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the classification layer. s represents the fault type difference corresponding to the source domain data, L t Represents the fault type difference corresponding to the target domain data, Represents the pseudo fault type corresponding to the target domain data, represents the predicted fault type corresponding to the target domain data, j represents the dimension, and the total dimension of the predicted fault type or the actual fault type is k, n t Represents the amount of data in the target domain.

[0079] After the second loss function L2 is constructed, the initial fault diagnosis model is subjected to the second stage of iterative training based on the second loss function L2 until the second preset number of iterations is reached, the iterative update is stopped, and the trained preset fault diagnosis model is output. In order to test the diagnostic accuracy of the preset fault diagnosis model, the model can be tested using the test data in the target domain data.

[0080] In specific application scenarios, although small batch samples can speed up training, the fault diagnosis types in small batch samples are unbalanced. For example, pitting samples have 7 sets of data, while wear samples have only 1 set of data. This may cause each iteration to only update the results of small batch samples, resulting in unstable diagnostic results of the model. To address the above problems, the embodiment of the present invention adopts a variable batch training strategy to iterate the initial fault diagnosis model, in which different batches of samples correspond to different iteration stages.

[0081] For example, the sum of the first preset number of iterations and the second preset number of iterations is 500 times, the first 100 times use 20 sets of training data, the second 100 times use 100 sets of training data, the third 100 times use 150 sets of training data, the fourth 100 times use 200 sets of training data, and the fifth 100 times use 250 sets of training data.

[0082] It can be seen that the embodiment of the present invention adopts a variable batch training strategy, uses small batch training samples at the beginning of training, accelerates the model convergence speed, and gradually increases the sample batch in the later stage, which can ensure that the sample data of each fault type is more balanced, thereby making the diagnosis result of the fault diagnosis model more stable and the accuracy will not fluctuate up and down.

[0083] Step 206: Perform pattern recognition using the preset fault diagnosis model.

[0084] In the embodiment of the present invention, pattern recognition is fault diagnosis, and the fault type of the rotating mechanical device, such as wear, pitting, etc., can be determined through pattern recognition.

[0085] Another variable batch multi-layer domain adaptive pattern recognition method based on small samples provided by an embodiment of the present invention can correct the cross-domain bias of training data by simultaneously measuring the feature distribution differences between source domain data and target domain data at the feature extraction layer and the classification layer during model training, and better apply the knowledge learned from the source domain data to the target domain, thereby ensuring the training effect of the fault diagnosis model in the case of small samples and improving the fault diagnosis accuracy.

[0086] Further, as Figure 1 and Figure 2 The specific implementation of the method shown in the embodiment provides a variable batch multi-layer domain adaptive pattern recognition device based on small samples, such as Figure 4 As shown, the device includes: an acquisition unit 31, a measurement unit 32, an update unit 33, an iteration unit 34 and an identification unit 35.

[0087] The acquisition unit 31 may be used to acquire source domain data and target domain data of the rotating mechanical device, as well as an initial fault diagnosis model, wherein the initial fault diagnosis model includes a feature extraction layer and a classification layer.

[0088] The measuring unit 32 may be used to measure the first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and the second feature distribution difference at the classification layer based on the initial fault diagnosis model.

[0089] The updating unit 33 can be used to iteratively update the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain the fault diagnosis model after this round of update, wherein, when iteratively updating the initial fault diagnosis model, the first feature distribution difference and the second feature distribution difference are used as partial influencing factors of the loss function.

[0090] The iteration unit 34 may be used to repeat the process of measuring feature distribution differences and iteratively updating the model based on the fault diagnosis model updated in this round, until a preset convergence condition is met, and then output a trained preset fault diagnosis model.

[0091] The identification unit 35 may be used to perform pattern recognition using the preset fault diagnosis model.

[0092] In some embodiments, the acquisition unit 31 can be specifically used to acquire the original vibration signal of the rotating mechanical device; based on the original vibration signal, determine the source domain data of the known fault type and the target domain data of the unknown fault type.

[0093] In some embodiments, the acquisition unit 31 may also be specifically used to construct an initial fault diagnosis model corresponding to the rotating mechanical device using a preset neural network algorithm.

[0094] In some embodiments, the measurement unit 32 can be specifically used to divide the target domain data into first target domain data for training and second target domain data for testing; based on the initial fault diagnosis model, measure the first feature distribution difference between the source domain data and the first target domain data at the feature extraction layer and the second feature distribution difference at the classification layer.

[0095] In some embodiments, the measurement unit 32 includes: a first determination module and a measurement module.

[0096] The first determination module may be used to input the source domain data into the initial fault diagnosis model for fault diagnosis, and obtain the first multidimensional features output by the feature extraction layer and the first multidimensional features output by the classification layer.

[0097] The first determination module can also be used to input the target domain data into the initial fault diagnosis model for fault diagnosis to obtain the second multidimensional features output by the feature extraction layer and the second multidimensional features output by the classification layer.

[0098] The measurement module can be used to measure the first feature distribution difference between the source domain data and the target domain data on the feature extraction layer and the second feature distribution difference on the classification layer based on the first multidimensional features and the second multidimensional features output by the feature extraction layer and the first multidimensional features and the second multidimensional features output by the classification layer.

[0099] In some embodiments, the measurement module can be specifically used to calculate the multidimensional feature distance corresponding to the feature extraction layer based on the first multidimensional features and the second multidimensional features output by the feature extraction layer; calculate the multidimensional feature distance corresponding to the classification layer based on the first multidimensional features and the second multidimensional features output by the classification layer; and measure the first feature distribution difference and the second feature distribution difference respectively according to the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer.

[0100] In some embodiments, the iteration unit 34 may also be used to iterate the initial fault diagnosis model using a variable batch training strategy, wherein different iteration stages correspond to different sample batches.

[0101] In some embodiments, the updating unit 33 includes: an acquisition module, a second determination module and an updating module.

[0102] The acquisition module may be used to acquire the actual fault type corresponding to the rotating mechanical device in the source domain data.

[0103] The second determination module may be used to input the source domain data into the initial fault diagnosis model to perform fault diagnosis and obtain a predicted fault type corresponding to the source domain data.

[0104] The updating module can be used to iteratively update the initial fault diagnosis model according to the actual fault type and predicted fault type corresponding to the source domain data, as well as the first feature distribution difference and the second feature distribution difference, to obtain the fault diagnosis model after this round of update.

[0105] In some embodiments, the update module can be specifically used to calculate the fault type difference corresponding to the source domain data based on the actual fault type and the predicted fault type corresponding to the source domain data; calculate the total feature distribution difference between the fully connected layer and the classification layer based on the first feature distribution difference and the second feature distribution difference; construct a first loss function based on the fault type difference corresponding to the source domain data and the total feature distribution difference; based on the first loss function, iteratively update the initial fault diagnosis model to obtain the fault diagnosis model after this round of update.

[0106] In some embodiments, the preset convergence condition includes a first preset number of iterations and a second preset number of iterations, and the iteration unit 34 includes: an iteration module and a third determination module.

[0107] The iteration module can be used to repeat the process of measuring feature distribution differences and iteratively updating the model based on the fault diagnosis model updated in this round, until the first preset number of iterations is reached, and then the target fault diagnosis model is output.

[0108] The third determination module may be configured to determine the pseudo-fault type corresponding to the target domain data based on the target fault diagnosis model.

[0109] The third determination module may also be used to input the target domain data into the initial fault diagnosis model to perform fault diagnosis and obtain a predicted fault type corresponding to the target domain data.

[0110] The iteration module can also be used to iteratively update the initial fault diagnosis model based on the fault type difference corresponding to the source domain data, the pseudo-fault type and predicted fault type corresponding to the target domain data, and the total feature distribution difference, until a second preset number of iterations is reached, and the trained preset fault diagnosis model is output.

[0111] In some embodiments, the iteration module can be specifically used to calculate the fault type difference corresponding to the target domain data based on the pseudo-fault type and the predicted fault type corresponding to the target domain data; construct a second loss function based on the fault type difference corresponding to the source domain data, the fault type difference corresponding to the target domain data and the total feature distribution difference; based on the second loss function, iteratively update the initial fault diagnosis model until a second preset number of iterations is reached, and then output a trained preset fault diagnosis model.

[0112] It should be noted that for other corresponding descriptions of the functional units involved in the variable batch multi-layer domain adaptive pattern recognition device based on small samples provided by the embodiment of the present invention, reference can be made to Figure 1 and Figure 3 The corresponding description in will not be repeated here.

[0113] Based on the above Figure 1 and Figure 2 The method shown in the embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figure 1 and Figure 2 The shown method is a small sample based variable batch multi-layer domain adaptation pattern recognition method.

[0114] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0115] Based on the above Figure 1 and Figure 2 The method shown, and Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, which can be a personal computer, a tablet computer, a server, or other network equipment, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The shown method is a small sample based variable batch multi-layer domain adaptation pattern recognition method.

[0116] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0117] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0118] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware.

[0120] The embodiments of the present invention can correct the cross-domain bias of training data by simultaneously measuring the feature distribution differences between source domain data and target domain data at the feature extraction layer and the classification layer, and better apply the knowledge learned from the source domain data to the target domain, thereby ensuring the training effect of the fault diagnosis model in the case of small samples and improving the fault diagnosis accuracy.

[0121] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0122] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A small sample-based variable batch multi-layer domain adaptive pattern recognition method, characterized in that: include: Acquire source domain data and target domain data of a rotating mechanical device, and an initial fault diagnosis model, wherein the initial fault diagnosis model includes a feature extraction layer and a classification layer; Based on the initial fault diagnosis model, measuring a first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and a second feature distribution difference at the classification layer; Iteratively updating the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain a fault diagnosis model after this round of update, wherein when iteratively updating the initial fault diagnosis model, the first feature distribution difference and the second feature distribution difference are used as partial influencing factors of the loss function; Based on the fault diagnosis model updated in this round, the process of measuring feature distribution differences and iteratively updating the model is repeated until a preset convergence condition is met, and a trained preset fault diagnosis model is output; The preset fault diagnosis model is used to perform pattern recognition.

2. The method according to claim 1, characterized in that: Acquire source and target domain data for rotating machinery, including: Acquiring an original vibration signal of the rotating mechanical device; Based on the original vibration signal, determining source domain data of known fault types and target domain data of unknown fault types; and / or Obtain an initial fault diagnosis model, including: Using a preset neural network algorithm to construct an initial fault diagnosis model corresponding to the rotating mechanical device; and / or The measuring, based on the initial fault diagnosis model, a first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and a second feature distribution difference at the classification layer, comprises: Dividing the target domain data into first target domain data for training and second target domain data for testing; Based on the initial fault diagnosis model, measuring a first feature distribution difference between the source domain data and the first target domain data at the feature extraction layer and a second feature distribution difference at the classification layer; and / or The measuring, based on the initial fault diagnosis model, a first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and a second feature distribution difference at the classification layer, comprises: Inputting the source domain data into the initial fault diagnosis model to perform fault diagnosis, and obtaining the first multidimensional features output by the feature extraction layer and the first multidimensional features output by the classification layer; Inputting the target domain data into the initial fault diagnosis model to perform fault diagnosis, and obtaining the second multidimensional features output by the feature extraction layer and the second multidimensional features output by the classification layer; Based on the first multidimensional features and the second multidimensional features output by the feature extraction layer, and the first multidimensional features and the second multidimensional features output by the classification layer, respectively measuring the first feature distribution difference of the source domain data and the second feature distribution difference of the target domain data on the feature extraction layer and on the classification layer; and / or The method further comprises: The initial fault diagnosis model is updated and iterated using a variable batch training strategy, wherein different iteration stages correspond to different sample batches.

3. The method according to claim 2, characterized in that The first multidimensional features and the second multidimensional features output by the feature extraction layer and the first multidimensional features and the second multidimensional features output by the classification layer are respectively measured to measure the first feature distribution difference of the source domain data and the second feature distribution difference of the target domain data on the feature extraction layer and the second feature distribution difference on the classification layer, including: Calculating the multidimensional feature distance corresponding to the feature extraction layer based on the first multidimensional feature and the second multidimensional feature output by the feature extraction layer; Calculate the multidimensional feature distance corresponding to the classification layer based on the first multidimensional feature and the second multidimensional feature output by the classification layer; The first feature distribution difference and the second feature distribution difference are measured respectively according to the multidimensional feature distance corresponding to the feature extraction layer and the multidimensional feature distance corresponding to the classification layer.

4. The method according to claim 1, characterized in that: The iterative updating of the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain the fault diagnosis model after this round of update includes: Acquire the actual fault type corresponding to the rotating mechanical device in the source domain data; Inputting the source domain data into the initial fault diagnosis model to perform fault diagnosis, and obtaining a predicted fault type corresponding to the source domain data; The initial fault diagnosis model is iteratively updated according to the actual fault type and the predicted fault type corresponding to the source domain data, as well as the first feature distribution difference and the second feature distribution difference, to obtain a fault diagnosis model after this round of update.

5. The method according to claim 4, characterized in that According to the actual fault type and the predicted fault type corresponding to the source domain data, as well as the first feature distribution difference and the second feature distribution difference, the initial fault diagnosis model is iteratively updated to obtain a fault diagnosis model after this round of update, including: Calculating a fault type difference corresponding to the source domain data according to an actual fault type and a predicted fault type corresponding to the source domain data; Calculating a total feature distribution difference between the fully connected layer and the classification layer according to the first feature distribution difference and the second feature distribution difference; Constructing a first loss function based on the fault type difference corresponding to the source domain data and the total feature distribution difference; Based on the first loss function, the initial fault diagnosis model is iteratively updated to obtain a fault diagnosis model after this round of update.

6. The method according to claim 5, characterized in that The preset convergence condition includes a first preset number of iterations and a second preset number of iterations. The process of repeatedly measuring the feature distribution difference and iteratively updating the model based on the fault diagnosis model after the current round of update until the preset convergence condition is met, outputting the trained preset fault diagnosis model, including: Based on the fault diagnosis model updated in this round, repeating the process of measuring feature distribution differences and iteratively updating the model until the first preset number of iterations is reached, outputting a target fault diagnosis model; Based on the target fault diagnosis model, determining the pseudo fault type corresponding to the target domain data; Inputting the target domain data into the initial fault diagnosis model to perform fault diagnosis, and obtaining a predicted fault type corresponding to the target domain data; Based on the fault type difference corresponding to the source domain data, the pseudo-fault type and predicted fault type corresponding to the target domain data, and the total feature distribution difference, the initial fault diagnosis model is iteratively updated until a second preset number of iterations is reached, and a trained preset fault diagnosis model is output.

7. The method according to claim 6, characterized in that Based on the fault type difference corresponding to the source domain data, the pseudo fault type and the predicted fault type corresponding to the target domain data, and the total feature distribution difference, the initial fault diagnosis model is iteratively updated until a second preset number of iterations is reached, and a trained preset fault diagnosis model is output, including: Calculating a fault type difference corresponding to the target domain data according to the pseudo fault type and the predicted fault type corresponding to the target domain data; constructing a second loss function based on the fault type difference corresponding to the source domain data, the fault type difference corresponding to the target domain data, and the total feature distribution difference; Based on the second loss function, the initial fault diagnosis model is iteratively updated until a second preset number of iterations is reached, and a trained preset fault diagnosis model is output.

8. A variable batch multi-layer domain adaptive pattern recognition device based on small samples, characterized in that: include: An acquisition unit, used to acquire source domain data and target domain data of the rotating mechanical device, and an initial fault diagnosis model, wherein the initial fault diagnosis model includes a feature extraction layer and a classification layer; A measuring unit, configured to measure, based on the initial fault diagnosis model, a first feature distribution difference between the source domain data and the target domain data at the feature extraction layer and a second feature distribution difference at the classification layer; an updating unit, configured to iteratively update the initial fault diagnosis model based on the first feature distribution difference and the second feature distribution difference to obtain a fault diagnosis model after this round of update, wherein when iteratively updating the initial fault diagnosis model, the first feature distribution difference and the second feature distribution difference are used as partial influencing factors of a loss function; The iteration unit is used to repeat the process of measuring feature distribution differences and iteratively updating the model based on the fault diagnosis model updated in this round, until a preset convergence condition is met, and then output a trained preset fault diagnosis model. The recognition unit is used to perform pattern recognition using the preset fault diagnosis model.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Network attack detection method and device for various types of unbalanced abnormal traffic

    CN110572362A

  • Robot grabbing pose detection method based on domain migration under single-view-angle point cloud

    CN112489117A

  • Abnormality detection method and device, equipment and storage medium

    CN114429441A

  • Abnormity classification model training method, anomaly monitoring method, equipment and medium

    CN115410038A

  • Metalearning-based small sample data processing system

    CN116561614A

Cited By

  • Migration adaptation method based on similarity interpretable weight allocation for small samples

    CN119378697A