Federated knowledge distillation based bearing fault diagnosis method and system under category missing
By employing a federated knowledge distillation method and an attention-enhanced residual multilayer perceptron structure, the problems of missing categories and heterogeneous noise in cross-plant diagnosis were solved, achieving efficient bearing fault diagnosis and improving the robustness and accuracy of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-09
AI Technical Summary
In federated diagnostics scenarios across factories or devices, existing technologies face problems such as non-independent and identically distributed data and missing categories, which leads to a decline in model performance and poor generalization ability in heterogeneous noise environments, making it difficult to deploy at the edge.
A federated knowledge distillation-based approach is adopted, which collects vibration signals through an accelerometer to construct a multi-condition dataset. The dataset is trained using an attention-enhanced residual multilayer perceptron structure and a joint loss function, and the global diagnostic model is updated by combining a federated averaging algorithm, achieving lightweight and noise-resistant performance.
It significantly improves the diagnostic accuracy and generalization ability of the model in heterogeneous noise environments, reduces the computational load and communication bandwidth requirements at the edge, and solves the problem of missing categories.
Smart Images

Figure CN122173996A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial process monitoring and artificial intelligence technology, specifically relating to a bearing fault diagnosis method and system based on federated knowledge distillation under category missing conditions. Background Technology
[0002] Rolling bearings are core components of rotating machinery, and their health directly affects the safe operation of the equipment. With the development of the Industrial Internet of Things (IIoT), intelligent fault diagnosis methods based on deep learning have achieved significant results. However, in practical cross-factory or cross-equipment federated diagnostic scenarios, existing technical solutions face two major challenges: 1. The problem of non-independent and identically distributed data and missing categories: The operating conditions of equipment in different factories are different, and they often only contain some types of failures. For example, factory A may only have inner circle failure data, while factory B may only have outer circle failure data. When traditional federated learning algorithms (such as federated averaging algorithms) aggregate such heterogeneous models, the local optimization direction is inconsistent with the global objective, which can easily lead to a significant drop in model performance or even failure to converge. 2. Heterogeneous noise interference: The environmental noise levels vary greatly in different industrial sites. Although existing methods based on convolutional neural networks have the ability to extract features, they often misidentify noise as fault features when faced with strong or variable noise conditions, resulting in poor generalization ability. In addition, deep networks have a large number of parameters, making them difficult to deploy at the edge.
[0003] Therefore, there is an urgent need in this field to develop a lightweight, noise-resistant, and effective federal fault diagnosis solution that can address the problem of missing categories. Summary of the Invention
[0004] Based on the aforementioned shortcomings and deficiencies in the existing technology, one of the objectives of this invention is to at least solve one or more of the aforementioned problems in the existing technology. In other words, one of the objectives of this invention is to provide a bearing fault diagnosis method and system based on federated knowledge distillation under category missing conditions that meets one or more of the aforementioned requirements, aiming to solve the problems of low diagnostic accuracy and poor model robustness in the existing technology under multi-client data category missing and heterogeneous noise environments.
[0005] To achieve the above technical objectives, the present invention adopts the following technical solution: A bearing fault diagnosis method based on federated knowledge distillation under category-deficient conditions includes the following steps: S1. Collect raw vibration signals of the bearing under different health conditions through an accelerometer and construct a multi-condition vibration dataset; S2. Perform multi-domain feature extraction on the vibration signals in the multi-condition vibration dataset and construct a feature vector containing statistical features and energy features. S3. The server initializes the global diagnostic model and broadcasts it as the teacher model to each client. S4. Each client constructs a local diagnostic model as a student model. The local diagnostic model adopts an attention-enhanced residual multilayer perceptron structure. Using the feature vector as input, the local diagnostic model is iteratively trained based on the joint loss function. Each client uploads the trained local model parameters to the server. S5. The server performs average aggregation on the received model parameters from each client, updates the global diagnostic model, and broadcasts the updated global diagnostic model to the clients as the teacher model for the next round of training. S6. Repeat steps S4 and S5 until the maximum number of iterations is reached or the model converges, and each client obtains the final local diagnostic model. S7. Each client uses the final local diagnostic model to infer the data to be diagnosed and outputs the fault diagnosis results.
[0006] As a preferred embodiment, the feature vector construction process in step S2 includes: Extract 8 time-domain statistical features: calculate the signal's mean, standard deviation, variance, maximum value, minimum value, peak-to-peak value, root mean square value, and mean absolute value; Extract four higher-order and shape features: calculate the signal's skewness, kurtosis, waveform factor, and impulse factor; Seven frequency domain statistical features are extracted: Fast Fourier Transform (FFT) is performed on the signal, and the mean, standard deviation, maximum value, dominant frequency index, frequency centroid, root mean square frequency, and frequency standard deviation of the FFT amplitude spectrum are calculated. Five power spectral density features were extracted: the power spectral density PSD was calculated based on the Welch method, and the mean PSD, standard deviation PSD, maximum PSD, dominant frequency PSD value, and total power were extracted. Two envelope spectrum features were extracted: the Hilbert transform of the vibration signal was performed to obtain the envelope signal, and the mean and standard deviation of the envelope signal were extracted. Extract 6 energy distribution features: calculate the total energy of the signal, divide the FFT spectrum into 5 preset sub-bands, and calculate the band energy of each sub-band; All extracted features are concatenated and cleaned by removing NaN and Inf values to form a 32-dimensional feature vector.
[0007] As a preferred embodiment, in step S4, the local diagnostic model includes an input layer, a multi-head self-attention layer, a multilayer perceptron, and an output layer connected in sequence. The output of the multilayer perceptron is residually concatenated with the feature vector input to the input layer and the classification result is output through the output layer.
[0008] As a preferred embodiment, the multi-head self-attention layer is used to calculate the attention score matrix within the feature vector, and to reweight the features based on the score matrix. The calculation formula is as follows: ; in, These are the query vector, key vector, and value vector obtained by linearly mapping the input feature vector, respectively. This is the scaling factor.
[0009] As a preferred embodiment, the multilayer perceptron uses layer normalization instead of batch normalization; Layer normalization normalizes all feature dimensions of a single sample. The formula for layer normalization is: ; in, The input feature vector representing a single sample; and These represent the mean and standard deviation of the input feature vector across all feature dimensions, respectively. To prevent small constants with a denominator of zero; and These are the learnable scaling and translation parameters, respectively. This represents the output feature vector after normalization.
[0010] As a preferred embodiment, step S4, which involves iteratively training the local diagnostic model based on the joint loss function, includes: S41. Input the feature vector of the local sample data into the local diagnostic model to obtain the logits value output by the student model. ; The feature vectors of the same local sample data are input into the received teacher model, i.e., the previous round global model, to obtain the logits value output by the teacher model. ; Real labels based on local data Calculate cross-entropy loss ; S42, Output based on teacher model and student model output Introducing temperature parameters Calculate the probability distribution of soft tags and the knowledge distillation loss. ; S43. Construct the joint loss function The student model parameters are updated using the backpropagation algorithm based on this function.
[0011] As a preferred embodiment, the generation of the soft tag probability distribution incorporates a temperature parameter. The calculation formula is: ; in, The corresponding output for the teacher model or student model The logits value of the fault class. For the first The probability of soft-labeling of fault types; set up Smooth the probability distribution; The knowledge distillation loss The Kullback-Leibler divergence is used for calculation, and the formula is as follows: ; The joint loss function Defined as: ; in, This is the balance coefficient; Output for student model With real labels Cross-entropy loss between; The Kullback-Leibler divergence loss is the difference between the soft label probabilities of the teacher model and the soft label probabilities of the student model.
[0012] As a preferred embodiment, in step S5, the server uses a federated average algorithm for aggregation, with the following formula: ; in, For the first The updated global model parameters, The total number of clients participating in the training. For the first Local model parameters uploaded by each client.
[0013] This invention also provides a bearing fault diagnosis system based on federated knowledge distillation under category-deficient conditions, applying the bearing fault diagnosis method under category-deficient conditions as described in any of the preceding embodiments. The bearing fault diagnosis system under category-deficient conditions includes: The acquisition module is used to acquire raw vibration signals of the bearing under different health conditions through an accelerometer and construct a multi-condition vibration dataset. The feature extraction module is used to extract multi-domain features from vibration signals in multi-condition vibration datasets and construct feature vectors that include statistical features and energy features. The federated distillation training module is used to iteratively train the client's local diagnostic model using feature vectors as input and based on the joint loss function until the maximum number of iterations is reached or the model converges, and each client obtains the final local diagnostic model. The cloud aggregation module is used to collect model parameters uploaded by various clients, generate a teacher model with global knowledge, and distribute it to various clients. The inference module is used to infer the diagnostic data using the final local diagnostic model and output the fault diagnosis results.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) Strong resistance to heterogeneous noise interference: By extracting 32-dimensional features and combining the attention mechanism of the attention-enhanced residual multilayer perceptron structure, the model can adaptively select effective features. Experiments show that in mixed signal-to-noise ratio (SNR=5dB to 15dB) scenarios, this method has a higher diagnostic accuracy than traditional methods; (2) Solving the problem of missing categories in federated scenarios: By introducing federated knowledge distillation, global knowledge is transmitted using soft labels; even if the client is missing samples of certain fault categories locally, it can learn to identify these missing categories by imitating the output distribution of the teacher model, which significantly improves the generalization ability of the model. (3) Lightweight model and efficient communication: Compared with the transmission of gradients of deep networks, this invention only needs to process 32-dimensional feature vectors, and the number of parameters of the attention-enhanced residual multilayer perceptron structure is small, which greatly reduces the computational load and communication bandwidth requirements at the edge. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the overall process framework of the bearing fault diagnosis method based on federated knowledge distillation under category missing conditions, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the attention-enhanced residual multilayer perceptron structure according to an embodiment of the present invention; Figure 3 This is the confusion matrix of the bearing fault diagnosis method under category missing conditions of the present invention on client A; Figure 4 This is the confusion matrix of the bearing fault diagnosis method under category missing conditions of the present invention on client B; Figure 5 This is the confusion matrix of the bearing fault diagnosis method under category missing conditions of the present invention on client C. Figure 6 This is the confusion matrix of the bearing fault diagnosis method under category missing conditions of the present invention on client D; Figure 7This is the confusion matrix of the bearing fault diagnosis method under category missing conditions of the present invention, tested on client E. Detailed Implementation
[0016] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0017] like Figure 1 As shown, the bearing fault diagnosis method based on federated knowledge distillation under category missing conditions according to an embodiment of the present invention includes the following steps: Step 1: Collect raw vibration signals of the bearing under different health conditions using an accelerometer to construct a multi-condition vibration dataset; Step 2: Perform multi-domain feature extraction on the vibration signal obtained in Step 1 to construct a feature vector containing 32 statistical features and energy features; The specific construction process of the above 32-dimensional feature vector includes: Eight time-domain statistical features were extracted: including the mean, standard deviation, variance, maximum value, minimum value, peak-to-peak value, root mean square value, and mean absolute value of the vibration signal. Four higher-order and shape features are extracted: skewness, kurtosis, waveform factor, and impulse factor, which are used to characterize the impulse characteristics and distribution symmetry of the signal. Seven frequency domain statistical features were extracted: Fast Fourier Transform (FFT) was performed on the vibration signal, and the FFT mean, FFT standard deviation, FFT maximum value, dominant frequency index, frequency centroid, root mean square frequency, and frequency standard deviation were extracted based on the FFT amplitude spectrum. Five power spectral density (PSD) features were extracted: power spectral density was calculated based on the Welch method, and the PSD mean, PSD standard deviation, PSD maximum value, dominant frequency PSD value, and total power were extracted. Two envelope spectrum features were extracted: the Hilbert transform of the vibration signal was performed to obtain the envelope signal, and the mean and standard deviation of the envelope signal were extracted. Extract 6 energy distribution features: calculate the total energy of the signal, divide the FFT spectrum into 5 preset sub-bands, and calculate the band energy of each sub-band; The above features are concatenated and cleaned by removing NaN and Inf values to form a 32-dimensional feature vector. .
[0018] Step 3: The server initializes the global diagnostic model and broadcasts it as a teacher model to each client.
[0019] Step 4: Each client builds a local diagnostic model as a student model. The local diagnostic model adopts an attention-enhanced residual multilayer perceptron structure. Using feature vectors as input, the local diagnostic model is iteratively trained based on the joint loss function. Each client uploads the trained local diagnostic model parameters to the server. like Figure 2 As shown, the aforementioned local diagnostic model comprises an input layer, a multi-head self-attention layer, a multilayer perceptron, and an output layer connected in sequence. The output of the multilayer perceptron is residually concatenated with the feature vector input to the input layer, and the classification result is output through the output layer. The improvement in the local diagnostic model structure lies in introducing a multi-head self-attention layer as a feature encoder at the front end of the multilayer perceptron. The multi-head self-attention layer is represented as follows: ; in, These are the query vector, key vector, and value vector obtained by linearly mapping the input feature vector, respectively. The scaling factor is used. The multi-head self-attention layer adaptively reduces the weights of feature channels heavily contaminated by noise and enhances the weights of fault-sensitive feature channels by capturing the global dependencies between feature dimensions, thereby achieving robust feature extraction in heterogeneous noise environments. The noise-resistant feature representation output from the multi-head self-attention layer is then fed into a residual connect block containing layer normalization and Gaussian error linear unit activation functions to extract deep nonlinear fault features; wherein, the formula for layer normalization is: ; in, The input feature vector representing a single sample; and These represent the mean and standard deviation of the input feature vector across all feature dimensions, respectively. To prevent small constants with a denominator of zero; and These are the learnable scaling and translation parameters, respectively. This represents the output feature vector after normalization. Layer normalization normalizes all feature dimensions of a single sample to eliminate statistical instability caused by different batch sizes or data distribution differences between different clients.
[0020] In addition, in the federated knowledge distillation collaborative training, the generation of the soft-label probability distribution incorporates a temperature parameter. The calculation formula is: ; in, The corresponding output for the teacher model or student model The logits value of the fault class. For the first The probability of soft-labeling of fault types; By setting Smoothing the probability distribution enables the teacher model output to include similarity information of non-target categories, thereby guiding the student model to learn the feature distribution of missing categories in the local data; The above joint loss function Represented as: ; in, The balancing coefficient is used to adjust the weights of the supervised loss and the distillation loss, so that the student model can learn about the missing categories by mimicking the output distribution of the teacher model while learning local data features. Output for student model With real labels Cross-entropy loss between; The Kullback-Leibler divergence loss is the difference between the soft label probabilities of the teacher model and the soft label probabilities of the student model.
[0021] Step 5: The server performs average aggregation on the received model parameters from each client, updates the global diagnostic model, and broadcasts the updated global diagnostic model to the client as the teacher model for the next round of training. Specifically, in each federated iteration of the above federated aggregation and update process, the aggregation method for the server-side aggregation model parameters is the federated averaging algorithm, expressed as: ; in, For the first The updated global model parameters, The total number of clients participating in the training. For the first The parameters of the local diagnostic model uploaded by each client.
[0022] Step 6: Repeat steps 4 and 5 above until the maximum number of iterations is reached or the model converges, and each client obtains the final local diagnostic model.
[0023] Step 7: Each client uses the final local diagnostic model to infer the data to be diagnosed and outputs the fault diagnosis results.
[0024] The above-described bearing fault diagnosis method based on federated knowledge distillation under category-deficient conditions is applied to a specific application example, including the following steps: Step 1: Real-time acquisition of vibration signals from the bearing housing closest to the target bearing using an accelerometer; combined with different health conditions of the bearing and changes in equipment load, constructing a multi-condition vibration dataset. This example uses the Case Western Reserve University CWRU bearing dataset. Fault settings: The bearing status is divided into healthy NC, inner ring fault IF, outer ring fault OF, and rolling element fault RF. Each type of fault is divided into 0.007 inches, 0.014 inches, and 0.021 inches according to the damaged diameter, with a total of 10 health status labels Label0-9, as shown in Table 1.
[0025] Table 1. Definition of Bearing Fault Labels ; Heterogeneous scene simulation: Five client-side event processors (AEs) are set up, each client only has partial categories of fault data, simulating missing categories; at the same time, Gaussian white noise of different intensities is added to the data of different clients to simulate heterogeneous noise, and the specific configuration is shown in Table 2; Table 2 Client Heterogeneous Environment Configuration Table .
[0026] Step 2 involves multi-domain feature extraction of the vibration signal, constructing a feature vector containing 32 statistical and energy features. Specifically, for the acquired signal with a length of... For the vibration signal sequence, perform the following feature extraction steps to generate feature vectors. .
[0027] (1) Temporal characteristics: Mean: ; Standard deviation: ; variance: ; Maximum value: ; Minimum value: ; Peak-to-peak value: ; Root mean square value: ; Average absolute value: ; (2) Higher-order and shape features: Skewness: The symmetry of the reaction distribution; Kuroshi: It is extremely sensitive to early impact failure; Waveform factor: ; Pulse factor: ; (3) Frequency domain statistical characteristics: the spectrum is obtained by performing FFT transformation on the signal. The frequency axis is ; FFT mean, FFT standard deviation, FFT maximum value; Main frequency index: The frequency index at which the amplitude is maximum; Frequency centroid: ; Root mean square frequency: ; Frequency standard deviation: ; (4) Power spectral density (PSD) characteristics, and the power spectral density (PSD) is estimated and calculated using the Welch method; PSD mean, PSD standard deviation, PSD maximum value, and PSD value based on CPU frequency; Total power: ; (5) Envelope spectrum features: extract the envelope signal using Hilbert transform. ; Envelope mean, envelope standard deviation; (6) Energy distribution characteristics Total energy in the time domain: ; Sub-band energy: Divide the FFT spectrum into 5 equal sub-bands and calculate the frequency band energy of each sub-band.
[0028] Step 3, the structure of the attention-enhanced residual multilayer perceptron is as follows: Input layer: Receives 32-dimensional feature vectors; Multi-head self-attention layer: maps 32-dimensional features to The attention weights are calculated. Under strong noise, this layer automatically reduces the weights of noise-sensitive features such as variance and maximum value, and increases the weights of kurtosis and envelope features. Multilayer Perceptron (MLP): Layer normalization is used instead of batch normalization, and the GELU activation function is used; Residual connection: Adds the input to the MLP output to prevent degradation.
[0029] Step 4, Federated Knowledge Distillation Training Process, with the following data flow during the training process: (a) Model broadcast: The server will broadcast the model. Global model parameters after round aggregation Distribute to all clients; at this time, Acting as a "teacher model" ), containing knowledge of all clients; (b) Local feature input: Client Read local data After step 2 above, a 32-dimensional feature vector is obtained. ; (c) Teacher-student collaborative reasoning: First, the features Teacher model with input freeze parameters The output logits is ; Generate a soft-label probability distribution (including predicted probabilities for missing categories); At the same time, features Input the local diagnostic model to be updated The output logits is Similarly, calculate the distribution of soft tags. And hard prediction results; (d) Loss calculation and backpropagation: Calculate the hard loss: Ensure that existing local categories are correctly classified; Calculate soft loss: This forces the student model to mimic the teacher model's probability distribution across all 10 categories. For example, even if there is no data with a label of 1 locally, the teacher model will tell the student model "this sample has a low probability of being labeled 2," and this "negative knowledge" is crucial for constructing classification boundaries. Calculate the joint loss function And update parameter; Aggregated Update: The client uploads the updated data. The parameters are sent to the server, which performs federated average aggregation to generate a new global model.
[0030] The method described in this embodiment of the invention is compared with other federated learning methods: I. FedProx is a reparameterized version of the federated averaging algorithm, designed to handle system heterogeneity and statistical heterogeneity in federated learning; it allows each device to perform variable local workloads, thus providing greater stability; for details, see Li T, Sahu AK, Zaheer M, et al. Federated optimization in heterogeneous networks[J]. Proceedings of Machine learning and systems, 2020,2: 429-450; II. FedBN alleviates the problem of non-independent and identically distributed feature shifts in federated learning by applying local batch normalization before model aggregation; for details, please refer to Li X, Jiang M, Zhang X, et al. Fedbn: Federated learning on non-iid features via local batch normalization[J]. arXiv preprintarXiv:2102.07623, 2021.
[0031] Table 3 shows a comparison of the fault diagnosis accuracy of different methods in heterogeneous environments; Figures 3 to 7 The diagram shows the confusion matrix tested on a client-side AE using the method of the present invention.
[0032] Table 3 Comparison of Fault Diagnosis Accuracy of Different Algorithms ; The results show that, firstly, the average accuracy without federated learning is only 60.83%, confirming that independent models cannot effectively generalize when local data distributions are heterogeneous and incomplete. Secondly, the federated learning method significantly improves diagnostic performance; FedProx achieves an average accuracy of 93.07%, while FedBN performs slightly better with an average accuracy of 93.10%. Both methods exhibit strong performance under moderate noise conditions (SNR=15, 10 dB). However, under strong noise interference, the performance of FedProx and FedBN degrades significantly; for clients D and E (SNR=5 dB), the accuracy of FedProx drops to 84.67%, and FedBN drops to 85.00%. In contrast, the method of this invention demonstrates superior performance and excellent robustness under all conditions, achieving a highest overall average accuracy of 99.30%. Crucially, even in the most challenging high-noise environments, the method of this invention remains highly efficient, achieving precision of 99.50% and 99.00% in clients D and E (SNR=5 dB), respectively, representing a significant improvement. Under these demanding conditions, it outperforms FedBN and FedProx by an average of 14.33 and 14.00 percentage points, respectively. The consistently high precision and recall metrics validate that the method of this invention effectively mitigates the adverse effects of non-independent and identically distributed data.
[0033] Based on the above-mentioned bearing fault diagnosis method under category missing conditions, the bearing fault diagnosis system based on federated knowledge distillation in this embodiment of the invention includes the following functional modules: acquisition module, feature extraction module, federated distillation training module, cloud aggregation module, and inference module; The aforementioned acquisition module is used to acquire raw vibration signals of the bearing under different health conditions through an accelerometer, and to construct a multi-condition vibration dataset. The aforementioned feature extraction module is used to extract multi-domain features from vibration signals in multi-condition vibration datasets and construct feature vectors that include statistical and energy features. The aforementioned federated distillation training module is used to iteratively train the client's local diagnostic model using feature vectors as input and based on the joint loss function until the maximum number of iterations is reached or the model converges, and each client obtains the final local diagnostic model. The aforementioned cloud aggregation module is used to collect model parameters uploaded by each client, generate a teacher model with global knowledge, and distribute it to each client. The aforementioned inference module is used to infer the diagnostic data using the final local diagnostic model and output the fault diagnosis results. The specific processing procedures for the above functional modules can be found in the detailed description of the bearing fault diagnosis method under the above-mentioned category of missing components, and will not be repeated here.
[0034] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A bearing fault diagnosis method based on federated knowledge distillation under category-deficient conditions, characterized in that, Includes the following steps: S1. Collect raw vibration signals of the bearing under different health conditions through an accelerometer and construct a multi-condition vibration dataset; S2. Perform multi-domain feature extraction on the vibration signals in the multi-condition vibration dataset and construct a feature vector containing statistical features and energy features. S3. The server initializes the global diagnostic model and broadcasts it as the teacher model to each client. S4. Each client constructs a local diagnostic model as a student model. The local diagnostic model adopts an attention-enhanced residual multilayer perceptron structure. Using the feature vector as input, the local diagnostic model is iteratively trained based on the joint loss function. Each client uploads the trained local model parameters to the server. S5. The server performs average aggregation on the received model parameters from each client, updates the global diagnostic model, and broadcasts the updated global diagnostic model to the clients as the teacher model for the next round of training. S6. Repeat steps S4 and S5 until the maximum number of iterations is reached or the model converges, and each client obtains the final local diagnostic model. S7. Each client uses the final local diagnostic model to infer the data to be diagnosed and outputs the fault diagnosis results.
2. The bearing fault diagnosis method under category deficiency according to claim 1, characterized in that, In step S2, the process of constructing the feature vector includes: Extract 8 time-domain statistical features: calculate the signal's mean, standard deviation, variance, maximum value, minimum value, peak-to-peak value, root mean square value, and mean absolute value; Extract four higher-order and shape features: calculate the signal's skewness, kurtosis, waveform factor, and impulse factor; Seven frequency domain statistical features are extracted: Fast Fourier Transform (FFT) is performed on the signal, and the mean, standard deviation, maximum value, dominant frequency index, frequency centroid, root mean square frequency, and frequency standard deviation of the FFT amplitude spectrum are calculated. Five power spectral density features were extracted: the power spectral density PSD was calculated based on the Welch method, and the mean PSD, standard deviation PSD, maximum PSD, dominant frequency PSD value, and total power were extracted. Two envelope spectrum features were extracted: the Hilbert transform of the vibration signal was performed to obtain the envelope signal, and the mean and standard deviation of the envelope signal were extracted. Extract 6 energy distribution features: calculate the total energy of the signal, divide the FFT spectrum into 5 preset sub-bands, and calculate the band energy of each sub-band; All extracted features are concatenated and cleaned by removing NaN and Inf values to form a 32-dimensional feature vector.
3. The bearing fault diagnosis method under category deficiency according to claim 1, characterized in that, In step S4, the local diagnostic model includes an input layer, a multi-head self-attention layer, a multilayer perceptron, and an output layer connected in sequence. The output of the multilayer perceptron is residually concatenated with the feature vector input to the input layer and the classification result is output through the output layer.
4. The bearing fault diagnosis method under category deficiency according to claim 3, characterized in that, The multi-head self-attention layer is used to calculate the attention score matrix within the feature vector, and to reweight the features based on the score matrix. The calculation formula is as follows: ; in, These are the query vector, key vector, and value vector obtained by linearly mapping the input feature vector, respectively. This is the scaling factor.
5. The bearing fault diagnosis method under category deficiency according to claim 4, characterized in that, The multilayer perceptron uses layer normalization instead of batch normalization. Layer normalization normalizes all feature dimensions of a single sample. The formula for layer normalization is: ; in, The input feature vector representing a single sample; and These represent the mean and standard deviation of the input feature vector across all feature dimensions, respectively. To prevent small constants with a denominator of zero; and These are the learnable scaling and translation parameters, respectively. This represents the output feature vector after normalization.
6. The bearing fault diagnosis method under category deficiency according to claim 5, characterized in that, In step S4, the process of iteratively training the local diagnostic model based on the joint loss function includes: S41. Input the feature vector of the local sample data into the local diagnostic model to obtain the logits value output by the student model. ; The feature vectors of the same local sample data are input into the received teacher model, i.e., the previous round global model, to obtain the logits value output by the teacher model. ; Real labels based on local data Calculate cross-entropy loss ; S42, Output based on teacher model and student model output Introducing temperature parameters Calculate the probability distribution of soft tags and the knowledge distillation loss. ; S43. Construct the joint loss function The student model parameters are updated using the backpropagation algorithm based on this function.
7. The bearing fault diagnosis method under category deficiency according to claim 6, characterized in that, The generation of the soft tag probability distribution incorporates a temperature parameter. The calculation formula is: ; in, The corresponding output for the teacher model or student model The logits value of the fault class. For the first The probability of soft-labeling of fault types; set up Smooth the probability distribution; The knowledge distillation loss The Kullback-Leibler divergence is used for calculation, and the formula is as follows: ; The joint loss function Defined as: ; in, This is the balance coefficient; Output for student model With real labels Cross-entropy loss between; The Kullback-Leibler divergence loss is the difference between the soft label probabilities of the teacher model and the soft label probabilities of the student model.
8. The bearing fault diagnosis method under category deficiency according to claim 7, characterized in that, In step S5, the server uses a federated average algorithm for aggregation, with the following formula: ; in, For the first The updated global model parameters, The total number of clients participating in the training. For the first Local model parameters uploaded by each client.
9. A bearing fault diagnosis system based on federated knowledge distillation under category-deficient conditions, employing the bearing fault diagnosis method under category-deficient conditions as described in any one of claims 1-8, characterized in that, The bearing fault diagnosis system under the missing category includes: The acquisition module is used to acquire raw vibration signals of the bearing under different health conditions through an accelerometer and construct a multi-condition vibration dataset. The feature extraction module is used to extract multi-domain features from vibration signals in multi-condition vibration datasets and construct feature vectors that include statistical features and energy features. The federated distillation training module is used to iteratively train the client's local diagnostic model using feature vectors as input and based on the joint loss function until the maximum number of iterations is reached or the model converges, and each client obtains the final local diagnostic model. The cloud aggregation module is used to collect model parameters uploaded by various clients, generate a teacher model with global knowledge, and distribute it to various clients. The inference module is used to infer the diagnostic data using the final local diagnostic model and output the fault diagnosis results.