A method and device for processing small sample data in bearing fault diagnosis
The controlled diffusion model generates synthetic data consistent with the actual fault data, which solves the problem of inaccurate diagnosis of new or rare fault types in the existing technology, realizes high-quality fault diagnosis in small samples, and improves the model's Adaptability and stability.
Patent Information
- Application Number
- CN202411025618.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing bearing fault diagnosis methods require a large amount of labeled data, resulting in inaccurate diagnosis results for new or rare fault types.
The controlled diffusion model (zcDDPM) is used to generate synthetic data consistent with the statistical characteristics of the actual fault data, and guide the data recovery process by embedding vectors, reducing dependence on real data, and effectively training and optimization in small samples.
It significantly reduces the demand for real fault data, improves the accuracy and adaptability of the fault diagnosis model, reduces the dependence on large-scale annotation data, and enhances the generalization ability and stability of the model.
Smart Images

Figure CN118568570B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to data processing, and in particular to a method and device for processing small sample data in bearing fault diagnosis. Background Art
[0002] With the development of industrial automation and intelligent manufacturing, the performance of bearings, as core components in mechanical equipment, directly affects the operating efficiency and reliability of the entire mechanical system. Therefore, early diagnosis and prevention of bearing failures have become key technologies to improve equipment stability and reduce maintenance costs.
[0003] At present, bearing fault diagnosis mainly relies on methods such as vibration signal analysis and acoustic emission detection, supplemented by data analysis and machine learning technology to extract and classify fault features. However, these bearing diagnosis methods require a large amount of labeled data for model training, which will lead to inaccurate bearing fault diagnosis results for bearings with new or rare fault types. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a method and device for processing small sample data in bearing fault diagnosis.
[0005] The present invention is achieved through the following technical solutions:
[0006] The present invention provides a method for processing small sample data in bearing fault diagnosis, comprising:
[0007] Obtain the data to be diagnosed of the bearing fault diagnosis system, pre-process the data to be diagnosed in sequence, and obtain a training data set, wherein the training data set includes a standard feature array and an array of fault labels , the preprocessing includes at least one or more of the following: denoising filtering, data segmentation, feature extraction, data standardization, label processing, and data integration;
[0008] The standard feature array in the training data set is converted into noise data, and the embedding vector The noise data is trained for data recovery to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types. The embedding vector Used to provide guidance information on bearing diagnosis defect types;
[0009] The random noise data is combined with the embedding vector splicing, and input the splicing result into the zcDDPM generation module to obtain the embedding vector Corresponding defect feature data with consistent statistical characteristics ;
[0010] Obtaining the data to be diagnosed and the characteristic data Perform data processing to determine the bearing fault diagnosis results.
[0011] Furthermore, the preprocessing of the data to be diagnosed is performed in sequence to obtain a training data set, including:
[0012] The data to be diagnosed is processed to remove noise and frequency components irrelevant to the fault, and a denoising filtered data sequence to be diagnosed is obtained. ;
[0013] Through the sliding window method, the data sequence to be diagnosed is Perform data segmentation to obtain fragments, the fragments , , Indicates The first segment of the data consecutive data points;
[0014] The fragment is analyzed by the time domain characteristic function. Perform calculations and extract frequency domain features using fast Fourier transform to obtain feature extraction fragments , the feature extraction segment At least including frequency information and energy spectrum density information, It is The first eigenvalues;
[0015] Extract the feature fragment Perform standardization to obtain standard fragments , No. Standard fragments , It refers to the first The first eigenvalues;
[0016] Fault tag data Through one-hot encoding, each fault type is assigned a unique fault category one-hot encoding vector , the fault category one-hot encoding vector is a binary vector where , Indicates The first one-hot encoding vector of the fault category eigenvalues;
[0017] Standard fragment and an array of fault labels Store them side by side to obtain a training data set , standard feature array , an array of fault labels .
[0018] Furthermore, the standard feature array in the training data set is converted into noise data, and the embedding vector The noise data is trained for data recovery to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types, including:
[0019] The fault label array Convert to embedding vector ;
[0020] The standard feature array and the embedding vector The DDPM training model is trained to obtain the zcDDPM training model.
[0021] Furthermore, the converting the standard feature array in the training data set into noise data includes:
[0022] Step by step to the standard feature array Injecting Gaussian noise to obtain the noise data that loses the original structure;
[0023] After converting the standard feature array in the training data set into noise data, the method further includes:
[0024] Extract a noise data from the same distribution as the last generated noise data, according to the embedding vector The noise data is restored.
[0025] Furthermore, the DDPM training model includes: a recovery error loss function for measuring the degree of difference between the result generated by the DDPM training model and the real data ,in, is the total number of samples in a batch, It is The real data of samples, It is The model output of samples, wherein the real data is the actual bearing fault characteristic signal obtained from the bearing fault data;
[0026] The DDPM training model also includes: a conditional embedding consistency loss function , Used to strengthen the guidance of the DDPM training model on fault types, wherein: is the total number of samples in the batch, The conditional encoder is based on the actual data The generated conditional embedding vector contains information such as the fault type; is the conditional encoder for generating data The resulting conditional embedding vector;
[0027] The DDPM training model also includes: a combined loss function , ,in, is the conditional embedding consistency loss function The weight factor of .
[0028] Another embodiment of the present invention provides a small sample data processing device for bearing fault diagnosis, comprising:
[0029] A preprocessing module is used to obtain the data to be diagnosed of the bearing fault diagnosis system, preprocess the data to be diagnosed in turn, and obtain the training data set, which includes a standard feature array and an array of fault labels , the preprocessing includes at least one or more of the following: denoising filtering, data segmentation, feature extraction, data standardization, label processing, and data integration;
[0030] A controlled DDPM structure design module is used to convert the standard feature array in the training data set into noise data, and according to the embedding vector The noise data is trained for data recovery to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types. The embedding vector Used to provide guidance information on bearing diagnosis defect types;
[0031] The zcDDPM module is used to integrate random noise data with the embedding vector splicing, and input the splicing result into the zcDDPM generation module to obtain the embedding vector Corresponding defect feature data with consistent statistical characteristics ;
[0032] A processing module, used to obtain the data to be diagnosed and the characteristic data Perform data processing to determine the bearing fault diagnosis results.
[0033] Furthermore, the preprocessing module includes: a denoising filter module, a data segmentation module, a feature extraction module, a data standardization module, a label processing module, and a data integration module; wherein,
[0034] The denoising and filtering module is specifically used to remove the noise and frequency components irrelevant to the fault from the data to be diagnosed, and obtain the denoising and filtering data sequence to be diagnosed. ;
[0035] The data segmentation module uses a sliding window method to segment the data sequence to be diagnosed. Perform data segmentation to obtain fragments, the fragments , , Indicates The first segment of the data consecutive data points;
[0036] The feature extraction module is used to extract the fragments through the time domain feature function. Perform calculations and extract frequency domain features using fast Fourier transform to obtain feature extraction fragments , the feature extraction segment At least including frequency information and energy spectrum density information, It is The first eigenvalues;
[0037] The data standardization module is used to extract the feature fragment Perform standardization to obtain standard fragments , No. Standard fragments , It refers to the first The first eigenvalues;
[0038] The label processing module is used to convert the fault label data Through one-hot encoding, each fault type is assigned a unique fault category one-hot encoding vector , the fault category one-hot encoding vector is a binary vector where , Indicates The first one-hot encoding vector of the fault category eigenvalues;
[0039] The data integration module is used to convert the standard feature array and an array of fault labels Store them side by side to obtain a training data set , standard feature array , an array of fault labels .
[0040] Further, the controlled DDPM structure design module includes: a conditional encoder module and a controlled DDPM training module;
[0041] The conditional encoder module is used to convert the fault label array Convert to embedding vector ;
[0042] The controlled DDPM training module is used to transform the standard feature array and the embedding vector The DDPM training model is trained to obtain the zcDDPM training model.
[0043] Furthermore, the controlled DDPM training module is specifically used to gradually move the standard feature array Inject Gaussian noise to obtain the noise data that loses the original structure; extract the noise data from the same distribution as the noise data finally generated, and according to the embedding vector The noise data is restored.
[0044] Furthermore, the DDPM training model includes: recovering the error loss function , the recovery error loss function ,in, is the total number of samples in the batch, It is The real data of samples, It is The model output of samples, wherein the real data is the actual bearing fault characteristic signal obtained from the bearing fault data;
[0045] The DDPM training model also includes: a conditional embedding consistency loss function , Used to strengthen the guidance of the DDPM training model on fault types, wherein: is the total number of samples in a batch, The conditional encoder is based on the actual data The generated conditional embedding vector contains information such as the fault type; is the conditional encoder for generating data The resulting conditional embedding vector;
[0046] The DDPM training model also includes: a combined loss function , ,in, is the conditional embedding consistency loss function The weight factor of .
[0047] Compared with the prior art, the present invention has the following beneficial technical effects:
[0048] The present invention can generate high-quality synthetic data with similar statistical characteristics to real data based on limited samples, significantly reducing the demand for real fault data, so that the fault diagnosis model can be effectively trained and optimized even with fewer samples. By using zcDDPM to generate synthetic data with consistent statistical characteristics of actual fault data, the reliance on large-scale annotated data is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a flow chart of a method for processing small sample data in bearing fault diagnosis according to an embodiment of the present invention;
[0050] Figure 2 This is the structural intention of a small sample data processing device for bearing fault diagnosis in one embodiment of the present invention;
[0051] Figure 3 It is a structural schematic diagram of a controlled DDPM training module of a small sample data processing device for bearing fault diagnosis according to an embodiment of the present invention;
[0052] Figure 4 This is the structural intention of a small sample data processing device for bearing fault diagnosis in another embodiment of the present invention. DETAILED DESCRIPTION
[0053] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.
[0054] A small sample data processing device for bearing fault diagnosis provided by an embodiment of the present invention is suitable for bearing fault diagnosis, especially when the number of samples is small during bearing fault diagnosis. Furthermore, the small sample data processing device for bearing fault diagnosis provided by an embodiment of the present invention can be arranged inside a bearing fault diagnoser or outside a bearing fault diagnoser. When arranged outside a bearing fault diagnoser, it can be an independently arranged device or a device arranged together with a bearing fault diagnoser, and there is no limitation here. It is preferably arranged inside a bearing fault diagnoser.
[0055] Figure 1 It is a flow chart of a method for processing small sample data in bearing fault diagnosis according to an embodiment of the present invention; Figure 2 This is the structural intention of a small sample data processing device for bearing fault diagnosis in one embodiment of the present invention; Figure 3It is a structural schematic diagram of a controlled DDPM training module of a small sample data processing device for bearing fault diagnosis according to an embodiment of the present invention;
[0056] like Figure 1 As shown, the small sample data processing method for bearing fault diagnosis includes the following steps:
[0057] Step 101: Obtain the data to be diagnosed of the bearing fault diagnosis system, and pre-process the data to be diagnosed in sequence to obtain a training data set.
[0058] The training data set in this embodiment includes a standard feature array and an array of fault labels The preprocessing includes at least one or more of the following: denoising filtering, data segmentation, feature extraction, data standardization, label processing, and data integration.
[0059] For example, preprocessing the data to be diagnosed in sequence to obtain a training data set may include the following steps:
[0060] First, the denoising and filtering module 101 removes the noise and frequency components irrelevant to the fault from the data to be diagnosed, and obtains the denoising and filtering data sequence to be diagnosed. ; That is to say, the data to be diagnosed received from the bearing fault diagnosis system As input, a denoising filter operation is performed to remove noise and frequency components irrelevant to the fault, and the denoising filtered data to be diagnosed is obtained, which is collectively referred to as For example, a Butterworth bandpass filter can be used with a passband set to 500 Hz to 2000 Hz. This frequency range can effectively capture vibration signals caused by bearing faults while filtering out interfering noise that may be caused by other machine components or environmental factors.
[0061] Next, the data segmentation module 102 uses a sliding window method to segment the data sequence to be diagnosed. Perform data segmentation to obtain fragments, the fragments , , Indicates The first segment of the data That is to say, select an appropriate window size and use the sliding window method to filter the long-term continuous data sequence to be diagnosed after denoising. After data segmentation, the original long time series is divided into multiple shorter time window segments, each of which contains a certain number of continuous data points, that is, continuous data sequence Split into , where , indicating that it is divided into fragments, , indicating that each fragment contains Continuous data points, Is a continuous data sequence The segmented data is collectively referred to as the segmented data. A continuous data segment, Indicates The first of the consecutive data segments consecutive data points.
[0062] For example, the embodiment of the present invention sets 1024 as the data point segmentation window size and sets the overlap rate to 50%, which increases the number of samples while ensuring the continuity and coverage of the data. This makes the information in each data segment more concentrated and easier to manage. In the bearing defect analysis, the segmented data can more accurately analyze and identify the specific time period when the fault occurs, reduce redundancy in the data, and improve processing efficiency.
[0063] Next, the feature extraction module 103 extracts the fragments using a time domain feature function. Perform calculations and extract frequency domain features using fast Fourier transform to obtain feature extraction fragments , the feature extraction segment At least including frequency information and energy spectrum density information, Is a continuous data sequence The segmented data is collectively referred to as the segmented data. A continuous data segment, It is The first The eigenvalue, i.e. The first of the consecutive data segments consecutive data points; that is, receiving , and is calculated directly from the time series through the time domain feature function, including the mean, standard deviation, peak, skewness and kurtosis, etc., which reflect the basic statistical properties of the signal. The frequency domain features are extracted by fast Fourier transform, mainly including the main frequency and energy spectral density. These features can reveal the periodicity and frequency distribution in the signal, which is particularly valuable for identifying mechanical component failures. That is, feature extraction converts the raw data into In an information-rich form that can be used in deep learning models ,in, , After feature extraction, The fragments are collectively referred to as It is The first feature values.
[0064] In this embodiment, the present invention extracts characteristic values that can reflect the basic statistical properties of the signal, including mean, standard deviation, peak, skewness and kurtosis, through statistical features and time series time domain feature calculation methods; and extracts characteristic information that can reveal the periodicity and frequency distribution in the signal, including main frequency and energy spectrum density, through the fast Fourier transform method.
[0065] Next, the data standardization module 104 extracts the feature fragments Perform standardization to obtain standard fragments , No. Standard fragments , that is to say, Standardization is performed to make the feature data within the same scale range, making the model training more stable and converging faster, that is, obtaining ,in After standardization, The fragments are collectively referred to as It refers to the first The first feature values.
[0066] In this embodiment, the present invention performs standardization processing by using the Z-score method so that different features have the same scale, wherein the mean value of each feature is 0 and the standard deviation is 1.
[0067] Furthermore, the tag processing module 105 converts the fault tag data Through one-hot encoding, each fault type is assigned a unique fault category one-hot encoding vector , the fault category one-hot encoding vector is a binary vector where , Indicates The first one-hot encoding vector of the fault category feature values, because of the one-hot encoding, middle , the rest are 0;
[0068] In this embodiment, the present invention uses a one-hot encoding method to assign a unique binary vector to each fault type, which helps the model learn to distinguish different types of bearing conditions and ensures that the model can identify and generate all specific fault types.
[0069] Then, the data integration module 106 converts the standard fragments and an array of fault labels Store them side by side to obtain a training data set , standard feature array , an array of fault labels , It is a collective name for the feature data in all training data. It is the collective name for the label array of all training data.
[0070] In this embodiment, the present invention uses the np.hstack() function to connect the standardized features with the one-hot encoded labels horizontally, and uses the assertion function assert to verify whether the data is aligned to prevent crashes caused by data shape errors during the training process.
[0071] It can be understood that the preprocessing module can execute step 101, that is, process various aspects of the bearing fault data. Bearing fault data usually contains noise from multiple sources such as environmental noise, sensor noise and mechanical vibration. These noises will mask the fault characteristics and affect the learning effect of the model. The denoising filter module 101 removes noise and frequency components that are not related to the fault, which can help enhance the signal part directly related to the bearing defect. Doing so can make the fault signal more obvious, help improve the accuracy of data analysis, and facilitate subsequent analysis and fault diagnosis. The vibration data of the bearing has a strong time dependence. The specific moment of the fault may only appear in a small segment of the data, so the data segmentation module 102 can help locate these key moments; by dividing the long time series into shorter segments, the complexity of single sample processing can be reduced, making feature extraction more centralized and effective, that is, segmenting the data allows multiple data segments to be processed in parallel, thereby improving the overall data processing efficiency; the segmented data segments enable the features extracted from each segment to have stronger locality; and by setting different window overlap methods, more training samples can be generated from the original continuous data. This data enhancement technology is particularly important for improving the learning effect and generalization ability of the model. The original bearing fault data is a sensor signal, which is difficult to be used directly for the training of the deep learning model. The feature extraction module 103 can convert the original data into information-rich feature data that can be used for the deep learning model. Statistical features refer to features obtained by statistical calculation of the original data, such as mean, variance, kurtosis, skewness, etc. Statistical features can reflect the overall trend of the data. Time domain features refer to features extracted directly from the original data, such as waveform, peak value, valley value, zero crossing rate, etc. Time domain features can reflect local changes in the data. Frequency domain features refer to features obtained by Fourier transforming the original data, such as spectral density, peak frequency, center frequency, etc. Frequency domain features can reflect the frequency components of the data. The scales of different features may vary greatly, which will cause the model to be overly sensitive to certain features during the training process and ignore other features. The data standardization module 104 can make the feature data within the same scale range. The labels of the bearing fault data are usually classification labels, such as normal, inner ring fault, outer ring fault, rolling element fault, etc. The label processing module 105 can use methods such as unique hot encoding to convert the label data into a format that can be used for the deep learning model. The feature data and label data are usually stored in two separate arrays, each array has the same number of rows, and each row of elements corresponds to a data sample. The data integration module 106 will splice each row of the feature data and label data together to form a new array. The preprocessing module is an important part of bearing fault detection. It can process various aspects of bearing fault data, improve data quality, make it more suitable for the training of deep learning models, and thus improve the performance of the model.
[0072] By precisely controlling the noise reduction and conditional guidance in the generation process as described above, it is ensured that the data generated at each step is not only close to the real data in appearance, but also its statistical characteristics are strictly consistent with the target fault type, thus improving the consistency and authenticity of the data.
[0073] Step 102: convert the standard feature array in the training data set into noise data, and Data recovery training is performed on the noise data to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types.
[0074] The embedding vector in this embodiment Used to provide guidance information on bearing diagnosis defect types;
[0075] Specifically, gradually add the standard feature array Inject Gaussian noise to obtain the noise data that loses the original structure; then extract a noise data from the same distribution as the noise data finally generated, and according to the embedding vector The noise data is restored, and then the fault label array is Convert to embedding vector ; The standard feature array and the embedding vector The DDPM training model is trained to obtain the zcDDPM training model. By gradually adding noise during training and simulating the process of recovering from high-noise data to clean data, the adaptability and diagnostic performance of the model under unknown or variant faults are improved. The training process is controllable, reducing the risk of mode collapse, thereby improving the generalization ability and stability of the model.
[0076] In this embodiment, the standard feature array in the training data set is converted into noise data, and the embedding vector The noise data is trained for data recovery to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types. This can be understood as generating various specific eigenvalue controlled diffusion models zcDDPM corresponding to the fault type according to the input specific conditional Gaussian distribution initialization noise data. The specific steps include:
[0077] (1) Using the conditional encoder module 201 to label the fault type Transformed into an embedding vector that provides guidance about the type of failure during generation and conforms to the training batch format ;
[0078] The present invention uses the predefined PyTorch layer nn.Embedding() to convert integer labels into fixed-size vectors. The returned embedding vectors will be used in subsequent diffusion models to control the process of data generation.
[0079] It can be understood that the main function of the conditional encoder module 201 is to convert the labels of the fault types of the classified data into continuous embedding vectors that can be more effectively processed by the machine learning model. These embedding vectors have high dimensions and can capture and represent the complex relationship between fault types.
[0080] The controlled DDPM training module 202 is the core module of the small sample processing method for bearing fault detection based on the controlled diffusion model. It uses the conditional embedding vector random noise splicing module to embed the feature data vector and the fault type into the vector input, and combines the forward diffusion and reverse diffusion processes to enhance and generate the bearing fault data, thereby improving the performance of the model. The controlled DDPM training module 202 can effectively enhance the small sample data set of bearing faults and improve the performance of the model; it can support multiple fault types and can control the degree of data enhancement by adjusting the model parameters; the operating mechanism is relatively clear and easy to understand and explain.
[0081] (2) Using the conditional embedding vector random noise concatenation module, the feature data vector and the fault type embedding vector The input is used as the training data input model. In the forward process, Gaussian noise is gradually injected into the data. After multiple steps, the data is completely converted into noise and all the original structural information is lost. In the reverse process, a random noise sample is extracted from the same distribution as the noise data generated at the end of the forward diffusion process, and the conditional embedding vector of the bearing defect is used to guide the recovery process of the noise data. The conditional embedding vector is integrated into each step of the diffusion model to ensure that the generated data gradually shows the characteristics related to the conditional embedding vector of the bearing fault damage during the step-by-step recovery process. In each step, the model uses the current data and the conditional embedding vector to predict the amount of noise that should be reduced in the next step, and gradually restores the structure of the data. Finally, a zcDDPM model is obtained that can generate characteristic data that follows a specific defect based on the input data that combines the input bearing diagnosis defect type and random Gaussian noise data.
[0082] In this embodiment, the controlled DDPM training module 202 of the present invention is created using multiple residual blocks, which constitute the core of the controlled DDPM. The residual block includes four parts: multiple fully connected layers, batch normalization layers, activation functions, and forward propagation functions. The fully connected layer is used to transform and further process the data after the input features and conditional embedding are merged; the batch normalization layer maintains a stable state for model training and improves the convergence speed; the activation function is used to introduce nonlinearity and improve the expression ability of the model; the forward propagation function part, in each step of the diffusion process, adds the output of this layer to the original input to form a residual connection. This helps to prevent the gradient vanishing problem in deep networks. Among them, the output of each residual block becomes the input of the next residual block, and the final output is the result after processing by all residual blocks.
[0083] It can be understood that the controlled DDPM training module 202 can effectively enhance the small sample data set of bearing faults and make up for the problem of insufficient data. By injecting random noise into and restoring the original data, a large number of new training samples can be generated. These samples have the same distribution as the original data, but contain richer feature information. The fault type embedding vector input into the diffusion model can be used to make the generated enhanced data have specific fault characteristics. This can help the model better learn the characteristics of different fault types and improve the model's ability to identify different fault types. Through data enhancement and fault type guidance, the controlled DDPM training module 202 can enable the model to learn richer feature information, improve the generalization ability of the model, and enable it to achieve better performance on small sample data sets.
[0084] Preferably, the specific implementation of step 102 may include multiple residual blocks, which constitute the core of the controlled DDPM. The residual block includes four parts: multiple fully connected layers, batch normalization layers, activation functions, and forward propagation functions. The fully connected layer is used to transform and further process the data after the input features and conditional embedding are merged; the batch normalization layer maintains a stable state for model training and improves the convergence speed; the activation function is used to introduce nonlinearity and improve the expression ability of the model; the forward propagation function part, in each diffusion process, adds the output of this layer to the original input to form a residual connection. This helps to prevent the gradient vanishing problem in deep networks. Among them, the output of each residual block becomes the input of the next residual block, and the final output is the result after processing by all residual blocks.
[0085] The residual block consists of multiple fully connected layers, batch normalization layers, activation functions, and forward propagation functions. In a deep network, the gradient may gradually disappear during the propagation process, making the model difficult to train. The residual connection in the residual block can add the output of each layer to the original input, making the gradient signal easier to propagate and preventing the gradient vanishing problem. In addition, the residual block can improve the expressiveness and generalization ability of the model, thereby improving the performance of the model. The fully connected layer performs a weighted summation of the output of the previous layer and the weight matrix of this layer, and adds a bias term to obtain the output of this layer. The fully connected layer can perform nonlinear transformation on the input data, extract feature information from the data, and fuse data from different sources to form a new feature representation. The batch normalization layer makes the model training process more stable and improves the convergence speed through regularization. The batch normalization layer can keep the input distribution of each batch of data consistent, prevent drastic fluctuations in the model training process, and enable the model to find the optimal solution faster. The activation function is used to introduce nonlinearity and improve the expressiveness of the model. The activation function enables the model to learn more complex nonlinear relationships, thereby enabling the model to better fit the data and improve the performance of the model. The forward propagation function is used to perform a weighted summation of the output of the previous residual block and the output of the residual block of this layer, and add a bias term to obtain the output of the residual block of this layer. The forward propagation function is the basic operation of the neural network and is also a key step in realizing data generation and feature control.
[0086] It can be understood that the residual block can prevent the gradient vanishing problem and improve the model performance; the fully connected layer can perform nonlinear transformation on the input data and extract feature information from the data; the batch normalization layer can make the model training process more stable and improve the convergence speed; the activation function can introduce nonlinearity and improve the expressiveness of the model; the forward propagation function is the key step to achieve data generation and feature control.
[0087] Set the loss function of the present invention:
[0088] By setting the recovery error loss function, the generated data is ensured to be as statistically consistent as possible with the actual data, which is crucial for simulating real-world bearing fault data and helps improve the accuracy and reliability of subsequent fault diagnosis models. For bearing fault detection, this means that the generated data needs to be similar to the real fault data in terms of vibration mode, frequency response, etc., so that it can be used to train the diagnosis algorithm, and by reducing the mean square error between the real data and the recovered data, the signal-to-noise ratio of the generated data is improved, making the data more suitable for subsequent analysis and fault diagnosis.
[0089] By setting the conditional embedding consistency loss function, it is used to ensure that the generated data is consistent with the original data in the conditional embedding vector space, ensuring that the generated data is not only similar to the original data in statistical characteristics, but also meets specific operating conditions or fault types. This is crucial for bearing fault detection because different types of faults may exhibit different vibration characteristics. In addition, it enables the model to adapt to and learn data characteristics under various conditions, especially when data samples are scarce. This helps the model accurately simulate and predict the characteristics of unseen or rare fault types.
[0090] By setting the combined loss function, the balance between pursuing reconstruction accuracy and satisfying specific conditions can be controlled by modifying the weight factor of the loss function. This balance is necessary for the generated data to both truly reflect the bearing status and conform to the characteristics of the fault type. The trained model can generate high-quality data, which can provide a better basis for training and verifying bearing fault detection algorithms, thereby improving the accuracy of diagnosis.
[0091] The recovery error loss function of the present invention The MSE loss function is used to ensure that the generated data is as statistically consistent as possible with the real data.
[0092] Recovery error loss function ,in, is the total number of samples in a batch, It is The real data of samples, that is, the actual bearing fault characteristic signal obtained from the bearing fault data, It is The model output for samples, i.e. the generated data, should be The statistical characteristics are as close as possible, and the real data is the actual bearing fault characteristic signal obtained from the bearing fault data; Represents the square of the prediction error. The squaring operation ensures that the error is always positive and amplifies the impact of larger errors, which helps the model focus more on reducing large prediction errors during training. This means that the squared errors of all samples in a batch are accumulated to get the total error of the entire batch of data. Divide the accumulated sum of squared errors by the number of samples , we get the mean squared error, which is a measure of the average performance of the model over the entire batch.
[0093] It can be understood that the recovery error loss function The difference between the enhanced data generated by the model and the real data can be measured, thus reflecting the accuracy of data recovery. The smaller the value, the closer the enhanced data generated by the model is to the real data, and the more accurate the data recovery is. The model is encouraged to generate augmented data that is as close to the real data as possible, which can enable the model to learn the common features in the data, thereby improving the model's ability to recognize and predict new data. At the same time, the error loss function is restored. It is a convex function with good mathematical properties and is easy to calculate and optimize. This is conducive to the training and convergence of the model, enabling the model to find the optimal solution faster.
[0094] In this embodiment, the conditional embedding consistency loss function of the present invention is Ensure that the generated data is not only statistically similar to real data, but also consistent with actual conditions in reflecting specific types of bearing failures.
[0095] ,
[0096] in, is the total number of samples in the batch, The conditional encoder is based on the actual data The generated conditional embedding vector contains information such as the fault type; is the conditional encoder for generating data The resulting conditional embedding vector.
[0097] It can be understood that the conditional embedding consistency loss function It can strengthen the model's guidance on fault types and ensure that the generated data has fault types consistent with the input conditional embedding vector. This can help the model better learn the characteristics of different fault types and improve the model's ability to identify different fault types. Conditional Embedding Consistency Loss Function The quality of data augmentation methods can be improved, making the generated data more realistic and reliable. By constraining the consistency of the conditional embedding vector and the fault type of the generated data, it is possible to avoid generating noisy data that is inconsistent with the input conditional embedding vector, thereby improving the effectiveness of data augmentation. Conditional embedding consistency loss function It can improve the generalization ability of the model and enable the model to better identify the fault type in new data. Since the generated data has the same fault type as the input conditional embedding vector, the model can learn richer fault type features during training, thereby improving the model's ability to identify and predict new data. In addition, the conditional embedding consistency loss function Mathematically, the error loss function is restored It is consistent, so it is also a convex function with good mathematical properties and is easy to calculate and optimize. This is conducive to the training and convergence of the model, enabling the model to find the optimal solution faster.
[0098] In this embodiment, the combined loss function of the present invention is The control model strikes a balance between pursuing reconstruction accuracy and satisfying specific conditions.
[0099] ,
[0100] in, is the conditional embedding consistency loss function The weight factor of , by adjusting the weight factor , the balance between pursuing reconstruction accuracy and satisfying specific conditions can be controlled. This balance is necessary for the generated data to truly reflect the bearing status and conform to the characteristics of the fault type.
[0101] It can be understood that the combined loss function A balance is struck between data recovery accuracy and feature guidance. Recovery error loss function The difference between the generated data and the original data is measured to ensure that the generated data is closely similar to the real data. On the other hand, the conditional embedding consistency loss function The fault type of the generated data is forced to be consistent with the input condition embedding vector. This ensures that the generated data is consistent with the specified fault type and guides the model to learn the characteristics of different fault categories. It effectively prevents the generation of irrelevant or misleading data and improves the overall quality of the augmented dataset. Recovery error loss function The model is encouraged to learn generalizable features from the data, while the conditional embedding consistency loss function Guide the model to learn fault-specific features. This combination enables the model to effectively capture the commonalities and unique properties of different fault types, enhance its generalization ability to new data and accurately identify faults. Both loss functions are convex functions with good mathematical properties. This allows for efficient calculation and optimization during model training. The convexity of the loss function promotes smooth convergence of the training process, allowing the model to effectively reach its optimal state. Combined loss function The weight factor in This allows fine-tuning the balance between data recovery and feature guidance, allowing the researcher to prioritize data recovery accuracy or feature guidance based on the specific requirements of the application during research. This flexibility allows the data augmentation approach to be tailored to different scenarios and bearing failure problems.
[0102] Step 103: Combine random noise data with the embedding vector splicing, and input the splicing result into the zcDDPM generation module to obtain the embedding vector Corresponding defect feature data with consistent statistical characteristics ;
[0103] Specifically, random noise data is combined with the embedding vector The stitching process includes the following steps:
[0104] Concatenate the expected bearing defect condition embedding vector and random noise to create input data that combines the input bearing diagnosis defect type and random Gaussian noise data ,in, represents the general term for random noise data, The label condition embedding vectors of the bearing defect type are collectively referred to as;
[0105] In this embodiment, the conditional embedding vector random noise splicing module 301 of the present invention includes two parts: initialization noise and reference condition embedding. The initialization noise part uses the randn() function to generate random numbers that obey the standard normal distribution, so that the noise vector is used as the starting point of the generation process to provide the necessary randomness to simulate the uncertain initial state; the reference condition embedding part calls the condition encoder module 201 to convert the fault type label expected to be generated into a conditional embedding vector for guiding the direction of the generation process, ensuring that the generated data is not only close to the real data in terms of characteristics, but also meets specific fault conditions, such as the specific damage type of the bearing.
[0106] It can be understood that the output data conditional embedding vector of the conditional embedding vector random noise splicing module 301 ensures that the generated data is not only close to the real data in terms of characteristics, but also meets specific fault conditions, such as a specific damage type of the bearing.
[0107] The zcDDPM generation module 302 uses a diffusion model to gradually reduce noise. In each step, a residual block is used to process the current noise vector and conditional embedding. By repeatedly iterating to reduce noise, the model can refine the features of the data and gradually generate outputs that are statistically consistent with the target data. After completing the specified iterative steps, the final generated data is output, which can be used as training data to enhance the existing data set.
[0108] Further, the splicing result is input into the zcDDPM generation module to obtain the embedding vector Corresponding defect feature data with consistent statistical characteristics ,include:
[0109] Will Input to the zcDDPM generation module to obtain the embedding vector conditional on the bearing defect type label Statistically consistent feature data , that is, using , obtain the embedding vector conditioned on the bearing defect type label Small sample enhancement feature data with consistent statistical characteristics corresponding to feature data .
[0110] In this embodiment, the specific architecture of the zcDDPM generation module 302 of the present invention is derived from the reverse diffusion process of the controlled DDPM training module 202, and the parameter settings and network structure weight values of the zcDDPM generation module 302 are derived from multiple iterations of the optimization training process. In each reverse diffusion step, the zcDDPM generation module 302 inputs the current noise data into the diffusion model and processes it in combination with the current conditional embedding vector. The conditional embedding vector is used to guide the transformation process of the noise data at each step to ensure that the generated data is not only visually and statistically similar to the real data, but also meets the preset conditional defect type.
[0111] It can be understood that the zcDDPM generation module 302 can effectively generate new bearing fault feature data, make up for the problem of insufficient data, and alleviate the current situation of small sample data. The conditional embedding vector can be input into the generation model so that the generated fault feature data has a specific fault type, which can help the model better learn the characteristics of different fault types and improve the model's ability to identify different fault types. Through data generation and fault type control, the zcDDPM generation module 302 can enable the model to learn richer feature information and fault type characteristics, improve the generalization ability of the model, enable it to achieve better performance on small sample data sets, and have strong flexibility and interpretability.
[0112] Step 104: Obtain the data to be diagnosed and the characteristic data Perform data processing to determine the bearing fault diagnosis results.
[0113] To further illustrate the effects of the embodiments of the present invention, the following experiment is conducted: The present invention selects the common bearing fault detection dataset CWRU for training and verification. It is provided by Case Western Reserve University in the United States and contains different types of bearing fault data, such as inner ring fault, outer ring fault and rolling element fault, as well as bearing data under normal working conditions. The CWRU dataset contains the following sub-datasets:
[0114] Bearing1: This sub-dataset contains the inner race fault data with fault diameters of 0.007 inches, 0.014 inches, and 0.021 inches.
[0115] Bearing2: This sub-dataset contains the outer race fault data with fault diameters of 0.007 inches, 0.014 inches, and 0.021 inches.
[0116] Bearing3: This sub-dataset contains rolling element fault data with fault diameters of 0.007 inches, 0.014 inches, and 0.021 inches.
[0117] Normal: This subdataset contains the bearing data under normal operating conditions.
[0118] In order to fully verify the effectiveness of this method and the actual effect on the bearing fault detection system, the CNN network is used as the fault diagnosis network to verify the bearing fault diagnosis network detection effect after using this invention. Using accuracy as the evaluation index, in the specific setting of hyperparameters, , the learning rate is set to 0.00001, the batch size is set to 5, the epoch is set to 500, the number of generated samples is set to 10, and the optimizer uses Adam. On the CNN fault diagnosis network, the epoch is set to 350, the batch size is set to 10, the learning rate is set to 0.001, and the optimizer uses Adam.
[0119] The accuracy index comparison results are shown in Table 1. It can be concluded from the table results that compared with other experimental comparison methods, the present invention has better accuracy performance, indicating that the model can more accurately identify and judge whether the bearing is faulty. It shows that the small sample processing method for bearing fault diagnosis proposed by the present invention combines the deep learning residual network and the controlled diffusion theory, which reduces the excessive dependence of the existing bearing fault diagnosis system on small sample data while ensuring that the generated data conforms to the statistical characteristics of the real bearing data; and compared with the results of the CNN experimental method, the significantly improved accuracy index of the present invention shows that the consistency and authenticity of the generated data are improved through the simulated forward and reverse diffusion process; compared with the experimental method results of GAN+CNN using similar ideas, it can be seen that the generalization ability of the model is enhanced through the learning and recovery simulation of a variety of small sample data, and the present invention uses an analyzable forward and backward training process to ensure the stability of the model; and the present invention uses controllable controlled embedding vectors to significantly improve the flexibility of the model and the adaptability of the existing bearing fault diagnosis system to new types of bearing faults.
[0120] Table 1 Comparison results of accuracy indicators of different algorithms
[0121]
[0122] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the protection scope of the present invention.
[0123] In this embodiment, the controlled diffusion model can generate high-quality synthetic data with similar statistical characteristics to real data based on limited samples, significantly reducing the demand for real fault data, so that the fault diagnosis model can be effectively trained and optimized even with fewer samples. By using zcDDPM to generate synthetic data with consistent statistical characteristics of actual fault data, the reliance on large-scale labeled data is reduced.
[0124] Furthermore, the controlled diffusion model ensures that the data generated at each step is not only close to the real data in appearance, but also its statistical characteristics are strictly consistent with the target fault type by precisely controlling the noise reduction and conditional guidance in the generation process, thus improving the consistency and authenticity of the data.
[0125] Furthermore, the controlled diffusion model improves the adaptability and diagnostic performance of the model under unknown or variant faults by gradually adding noise during training and simulating the process of recovering from high-noise data to clean data. Its training process is controllable, reducing the risk of mode collapse, thereby improving the generalization ability and stability of the model.
[0126] Furthermore, the parameter adjustability of the controlled diffusion model allows it to quickly adapt to new or changing operating conditions and fault types, enabling the diagnostic system to more accurately identify and predict bearing faults under different conditions, thereby improving the versatility and practicality of the method.
[0127] In summary, the present invention solves multiple problems of the prior art in small sample data processing, data consistency, model stability and flexibility by integrating innovative controlled diffusion technology with bearing fault diagnosis, and provides a new method for bearing fault diagnosis that is effective, reliable and widely applicable. In the case of various types of bearing faults and scarcity of samples of certain types, the ability to generate data that meets specific fault characteristics greatly helps the training and optimization of the fault detection system and fills the gap of insufficient data; the ability to generate synthetic data reduces the reliance on expensive experiments and data collection, especially when testing and verifying new fault detection technologies. This not only saves costs, but also speeds up the development and testing process; by training the model under diverse conditions, the model's generalization ability for new and unseen bearing fault conditions is enhanced, making the system more robust and adaptable. This not only enhances the efficiency and accuracy of fault diagnosis, but also provides a new technical path for the early diagnosis and prevention of bearing faults.
[0128] Figure 4 This is the structural intention of a small sample data processing device for bearing fault diagnosis in another embodiment of the present invention; Figure 4 As shown, an embodiment of the present invention provides a small sample data processing device for bearing fault diagnosis, comprising:
[0129] The preprocessing module 401 is used to obtain the data to be diagnosed of the bearing fault diagnosis system, preprocess the data to be diagnosed in sequence, and obtain the training data set, which includes a standard feature array and an array of fault labels , the preprocessing includes at least one or more of the following: denoising filtering, data segmentation, feature extraction, data standardization, label processing, and data integration;
[0130] The controlled DDPM structure design module 402 is used to convert the standard feature array in the training data set into noise data, and according to the embedding vector The noise data is trained for data recovery to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types. The embedding vector Used to provide guidance information on bearing diagnosis defect types;
[0131] The zcDDPM module 403 is used to combine the random noise data with the embedding vector splicing, and input the splicing result into the zcDDPM generation module to obtain the embedding vector Corresponding defect feature data with consistent statistical characteristics ;
[0132] Processing module 404, used to obtain the data to be diagnosed and the characteristic data Perform data processing to determine the bearing fault diagnosis results.
[0133] In the embodiment of the present invention Figure 4 The pre-processing module 401 shown is equivalent to Figure 2 The functions and implementation effects of the preprocessing module 1 are similar, and will not be described in detail here; Figure 4 The controlled DDPM structure design module 402 shown is equivalent to Figure 2 The functions and implementation effects of the controlled DDPM structure design module 2 are similar, and will not be described in detail here; Figure 4 The zcDDPM module 403 shown is equivalent to Figure 2 The functions and implementation effects of the controlled zcDDPM module 3 are similar, and will not be described in detail here. Figure 2 Also includes Figure 4 The processing module 404 is shown, but in Figure 2 Not shown in FIG.
[0134] The embodiment of the present invention generates high-quality synthetic data with similar statistical characteristics to real data based on limited samples, which significantly reduces the demand for real fault data, so that the fault diagnosis model can be effectively trained and optimized even with fewer samples. Synthetic data consistent with the statistical characteristics of actual fault data is generated by using the zcDDPM generation module, reducing the dependence on large-scale annotated data.
[0135] Based on the above embodiment, the preprocessing module 401 includes: a denoising filter module, a data segmentation module, a feature extraction module, a data standardization module, a label processing module, and a data integration module; wherein,
[0136] The denoising and filtering module is specifically used to remove the noise and frequency components irrelevant to the fault from the data to be diagnosed, and obtain the denoising and filtering data sequence to be diagnosed. ;
[0137] The data segmentation module uses a sliding window method to segment the data sequence to be diagnosed. Perform data segmentation to obtain fragments, the fragments , , Indicates The first segment of the data consecutive data points;
[0138] The feature extraction module is used to extract the fragments through the time domain feature function. Perform calculations and extract frequency domain features using fast Fourier transform to obtain feature extraction fragments , the feature extraction segment At least including frequency information and energy spectrum density information, It is The first eigenvalues;
[0139] The data standardization module is used to extract the feature fragment Perform standardization to obtain standard fragments , No. Standard fragments , It refers to the first The first eigenvalues;
[0140] The label processing module is used to convert the fault label data Through one-hot encoding, each fault type is assigned a unique fault category one-hot encoding vector , the fault category one-hot encoding vector is a binary vector where , Indicates The first one-hot encoding vector of the fault category eigenvalues;
[0141] The data integration module is used to convert the standard feature array and an array of fault labels Store them side by side to obtain a training data set , standard feature array , an array of fault labels .
[0142] On the basis of the above-mentioned embodiment, the controlled DDPM structure design module 402 comprises: a conditional encoder module and a controlled DDPM training module;
[0143] The conditional encoder module is used to convert the fault label array Convert to embedding vector ;
[0144] The controlled DDPM training module is used to transform the standard feature array and the embedding vector The DDPM training model is trained to obtain the zcDDPM training model.
[0145] Based on the above embodiment, the controlled DDPM training module is specifically used to gradually move the standard feature array Inject Gaussian noise to obtain the noise data that loses the original structure; extract the noise data from the same distribution as the noise data finally generated, and according to the embedding vector The noise data is restored.
[0146] Based on the above embodiment, the DDPM training model includes: restoring the error loss function , the recovery error loss function ,in, is the total number of samples in the batch, It is The real data of samples, It is The model output of samples, wherein the real data is the actual bearing fault characteristic signal obtained from the bearing fault data;
[0147] The DDPM training model also includes: restoring the error loss function , the recovery error loss function Used to measure the difference between the enhanced data generated by the DDPM training model and the real data;
[0148] The DDPM training model also includes: a conditional embedding consistency loss function , Used to strengthen the guidance of the DDPM training model on fault types, wherein: is the total number of samples in a batch, The conditional encoder is based on the actual data The generated conditional embedding vector contains information such as the fault type; is the conditional encoder for generating data The resulting conditional embedding vector;
[0149] The DDPM training model also includes: a combined loss function , ,in, is the conditional embedding consistency loss function The weight factor of .
[0150] The above embodiment can be used Figure 1 The method shown in the figure is implemented, and its technical effect is the same as Figure 1 The embodiments shown are similar and will not be described again here.
Claims
1. A method for processing small sample data in bearing fault diagnosis, characterized in that: include: Acquire the data to be diagnosed of the bearing fault diagnosis system, pre-process the data to be diagnosed in sequence to obtain a training data set, wherein the training data set includes a standard feature array ψ and a fault label array γ, and the pre-processing includes at least one or more of the following: denoising filtering, data segmentation, feature extraction, data standardization, label processing, and data integration; The standard feature array in the training data set is converted into noise data, and the noise data is trained for data recovery according to the embedding vector β, so as to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types, wherein the embedding vector β is used to provide guidance information on the bearing diagnosis defect types, and the zcDDPM generation module comprises: converting the fault label array γ into the embedding vector β; training the DDPM training model with the standard feature array ψ and the embedding vector β to obtain the zcDDPM training model; The random noise data is concatenated with the embedding vector β, and the concatenation result is input into the zcDDPM generation module to obtain feature data ψ that is consistent with the statistical characteristics of the defect feature data corresponding to the embedding vector β. G ; The obtained data to be diagnosed and the characteristic data ψ G Perform data processing to determine the bearing fault diagnosis results.
2. The method for processing small sample data in bearing fault diagnosis according to claim 1, characterized in that: The preprocessing of the data to be diagnosed is performed in sequence to obtain a training data set, including: The data to be diagnosed is processed to remove noise and frequency components irrelevant to the fault, and a denoising filtered data sequence Φ to be diagnosed is obtained. Π ; Through the sliding window method, the to-be-diagnosed data sequence Φ Π Perform data segmentation to obtain k segments, segment Φ k Θ ={φ k 1,φ k 2,...,φ k r ,...φ k R }, 1≤r≤R, φ k r Represents the rth continuous data point of the kth fragment data; The segment Φ is transformed into k Θ Calculate and extract the frequency domain features through fast Fourier transform to obtain the feature extraction segment ψ k Λ , the feature extraction segment At least including frequency information and energy spectrum density information, is the i-th eigenvalue of the k-th segment; Extract the feature segment ψ k Λ Perform standardization to obtain the standard fragment ψ Ν , the kth standard fragment It refers to the i-th eigenvalue of the k-th segment after normalization; Fault tag data Through one-hot encoding, each fault type is assigned a unique fault category one-hot encoding vector γ j , the fault category one-hot encoding vector γ j ={τ1,τ2,...,τ j ,...τ J } is a binary vector, where 1≤j≤J, τ j The j-th eigenvalue of the one-hot encoded vector representing the j-th fault category; The standard fragment ψ Ν and the fault label array γ are stored side by side to obtain the training data set (ψ , γ), standard feature array ψ={ψ 1 Ν ,ψ 2 Ν ,...,ψ k Ν ,...ψ K Ν }, fault label array γ={γ1,γ2,...,γ j ,...γ J }.
3. The method for processing small sample data in bearing fault diagnosis according to claim 2, characterized in that: The converting the standard feature array in the training data set into noise data includes: Step by step, injecting Gaussian noise into the standard feature array ψ to obtain the noise data that loses the original structure; After converting the standard feature array in the training data set into noise data, the method further includes: The noise data is extracted from the same distribution as the last generated noise data, and the noise data is restored according to the embedding vector β.
4. The method for processing small sample data in bearing fault diagnosis according to claim 3 is characterized in that: The DDPM training model includes: a recovery error loss function for measuring the degree of difference between the result generated by the DDPM training model and the real data Where n is the total number of samples in a batch, y i is the real data of the i-th sample, is the model output of the i-th sample, and the real data is the actual bearing fault characteristic signal obtained from the bearing fault data; The DDPM training model also includes: a conditional embedding consistency loss function L c Used to strengthen the guidance of the DDPM training model on the fault type, where n is the total number of samples in the batch, encode(y i ) is the conditional encoder for the actual data y i The generated conditional embedding vector contains information such as the fault type; is the conditional encoder for generating data The resulting conditional embedding vector; The DDPM training model also includes: a combined loss function L combination , L combination =L r +λ×L c , where λ is the conditional embedding consistency loss function L c The weight factor is λ∈[0,1].
5. A small sample data processing device for bearing fault diagnosis, characterized in that: include: A preprocessing module is used to obtain the data to be diagnosed of the bearing fault diagnosis system, and preprocess the data to be diagnosed in sequence to obtain a training data set, wherein the training data set includes a standard feature array ψ and a fault label array γ, and the preprocessing includes at least one or more of the following: denoising filtering, data segmentation, feature extraction, data standardization, label processing, and data integration; A controlled DDPM structure design module is used to convert the standard feature array in the training data set into noise data, and to perform data recovery training on the noise data according to the embedding vector β, to obtain various eigenvalue controlled diffusion models zcDDPM generation modules corresponding to the bearing diagnosis defect types, wherein the embedding vector β is used to provide guidance information on the bearing diagnosis defect types; The zcDDPM module is used to splice the random noise data with the embedding vector β, and input the splicing result into the zcDDPM generation module to obtain feature data ψ that is consistent with the statistical characteristics of the defect feature data corresponding to the embedding vector β G ; A processing module is used to obtain the data to be diagnosed and the characteristic data ψ G Perform data processing to determine the bearing fault diagnosis results; The controlled DDPM structure design module includes: a conditional encoder module and a controlled DDPM training module; The conditional encoder module is used to convert the fault label array γ into an embedding vector β; the controlled DDPM training module is used to train the DDPM training model with the standard feature array ψ and the embedding vector β to obtain the zcDDPM training model.
6. The small sample data processing device for bearing fault diagnosis according to claim 5 is characterized in that: The preprocessing module includes: a denoising and filtering module, a data segmentation module, a feature extraction module, a data standardization module, a label processing module, and a data integration module; wherein, The denoising and filtering module is specifically used to remove the noise and frequency components irrelevant to the fault from the data to be diagnosed, and obtain the denoising and filtering data sequence Φ to be diagnosed. Π ; The data segmentation module uses a sliding window method to segment the data sequence Φ to be diagnosed. Π Perform data segmentation to obtain k segments, where Φ k Θ ={φ k 1,φ k 2,...,φ k r ,...φ k R }, 1≤r≤R, φ k r Represents the rth continuous data point of the kth fragment data; The feature extraction module is used to extract the segment Φ by using a time domain feature function. k Θ Calculate and extract the frequency domain features through fast Fourier transform to obtain the feature extraction segment ψ k Λ , the feature extraction segment At least including frequency information and energy spectrum density information, is the i-th eigenvalue of the k-th segment; The data standardization module is used to extract the feature segment ψ k Λ Perform standardization to obtain the standard fragment ψ Ν , the kth standard fragment It refers to the i-th eigenvalue of the k-th segment after normalization; The label processing module is used to convert the fault label data Through one-hot encoding, each fault type is assigned a unique fault category one-hot encoding vector γ j , the fault category one-hot encoding vector γ j ={τ1,τ2,...,τ j ,...τ J } is a binary vector, where 1≤j≤J, τ j The j-th eigenvalue of the one-hot encoded vector representing the j-th fault category; The data integration module is used to transform the standard feature array ψ Ν and the fault label array γ are stored side by side to obtain the training data set (ψ,γ), and the standard feature array ψ={ψ 1 Ν ,ψ 2 Ν ,...,ψ k Ν ,...ψ K Ν }, fault label array γ={γ1,γ2,...,γ j ,...γ J }.
7. The small sample data processing device for bearing fault diagnosis according to claim 6 is characterized in that: The controlled DDPM training module is specifically used to gradually inject Gaussian noise into the standard feature array ψ to obtain the noise data that loses the original structure; extract a noise data from the same distribution as the last generated noise data, and restore the noise data according to the embedding vector β.
8. The small sample data processing device for bearing fault diagnosis according to claim 7 is characterized in that: The DDPM training model includes: recovering the error loss function L r , the recovery error loss function Where n is the total number of samples in the batch, y i is the real data of the i-th sample, is the model output of the i-th sample, and the real data is the actual bearing fault characteristic signal obtained from the bearing fault data; The DDPM training model also includes: a conditional embedding consistency loss function L c It is used to strengthen the guidance of the DDPM training model on the fault type, where n is the total number of samples in a batch, encode(y i ) is the conditional encoder for the actual data y i The generated conditional embedding vector contains information such as the fault type; is the conditional encoder for generating data The resulting conditional embedding vector; The DDPM training model also includes: a combined loss function L combination , L combination =L r +λ×L c , where λ is the conditional embedding consistency loss function L c The weight factor is λ∈[0,1].
