A method and system for diagnosing client internal fault class imbalance under data privacy constraints
By employing a distributed architecture that decouples the feature extractor and classifier in federated learning, and combining linear combination of multi-classifiers and consistency optimization mechanisms, the model bias problem of long-tail distribution under data privacy protection is solved, achieving high-precision and strong-generalization fault diagnosis, and improving the accuracy of tail fault identification and model adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-31
AI Technical Summary
Existing federated learning methods lack effective feature alignment and fine-grained knowledge transfer mechanisms in industrial scenarios, which makes the models prone to bias towards the head category and have insufficient generalization ability under different working conditions. In particular, under the conditions of data privacy protection and long-tailed category distribution, the accuracy of tail fault identification is low.
We adopt a distributed architecture that decouples the feature extractor and classifier, and combine a multi-classifier linear combination strategy, a regularized feature alignment strategy, and a consistency optimization mechanism. We enhance feature space alignment through Gram angle field transformation and build an end-to-end diagnostic model based on federated decoupling and consistency optimization to achieve fine-grained knowledge transfer and feature space alignment.
While ensuring data privacy, the model's adaptability to long-tail distribution and tail fault identification accuracy have been significantly improved, achieving high-precision fault diagnosis with strong generalization ability. Experimental results show that the average accuracy in gearbox and bearing tasks under extreme imbalance scenarios reaches over 92%.
Smart Images

Figure CN122490338A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mechanical fault diagnosis and artificial intelligence technology, specifically relating to a diagnostic method and system for imbalance of fault categories within the client under data privacy constraints, applicable to intelligent detection and fault identification of the health status of gearboxes and bearings in industrial equipment. Background Technology
[0002] To address the performance limitations of diagnostic models in industrial scenarios caused by data privacy protection and long-tailed category distribution, existing federated learning methods suffer from a lack of effective feature alignment and fine-grained knowledge transfer mechanisms. This leads to models tending to favor head categories and exhibiting insufficient generalization ability under different operating conditions. Therefore, how to eliminate feature distribution differences and improve the identification accuracy of tail faults by optimizing model architecture and consistency constraints while ensuring privacy is a critical challenge that urgently needs to be solved. Summary of the Invention
[0003] The purpose of this invention is to provide a fault diagnosis method and system that can still achieve high accuracy, strong generalization ability and good robustness even when the data categories are distributed in a long tail, so as to make up for the shortcomings of existing federated learning technology, such as low recognition accuracy, serious feature drift and poor discrimination performance of minority class samples under class imbalance conditions.
[0004] To address the privacy and security requirements and long-tail distribution identification needs in cross-client collaborative diagnostics of industrial rotating machinery, this invention proposes an end-to-end diagnostic model based on federated decoupling and consistency optimization. By constructing a distributed architecture that decouples the feature extractor and classifier, and integrating a multi-classifier linear combination strategy, a regularized feature alignment strategy, and a consistency optimization mechanism, fine-grained knowledge transfer and feature space alignment are achieved without exchanging original data. This effectively overcomes the model bias and minority class fault classification difficulties caused by long-tail distribution.
[0005] The main contents of this invention include:
[0006] A diagnostic method and system for imbalance of internal fault categories within the client under data privacy constraints, comprising the following steps:
[0007] (1) Data acquisition and preprocessing: The original vibration signal of the rotating machinery was acquired, and it was converted into a two-dimensional image dataset using the Gram angle field. The dataset was then divided into local training and testing sets for each client.
[0008] (2) Global parameter initialization: The server initializes the global feature extractor parameters, the global soft label (SL) matrix and the global feature center, and distributes them to each client;
[0009] (3) Local decoupled optimization training: The client adopts a decoupled design between the feature extractor and the classifier, fixing the feature extractor to update the classifier, or fixing the classifier to update the feature extractor, so as to achieve independent iterative optimization of the two.
[0010] (4) Double consistency constraint regularization: Semantic consistency: Construct a consistency regularization loss to constrain the local inter-class relation matrix (CR) and the global soft label (SL) matrix issued by the server to be aligned in the topology and to calibrate the class bias under the long tail distribution;
[0011] Feature consistency: Construct a feature regularization loss, using the global feature center as the anchor point, to constrain the local feature distribution to move closer to the global semantic space and suppress local feature drift;
[0012] (5) Server parameter aggregation and updating:
[0013] Feature aggregation: The server performs weighted aggregation of the feature extractor parameters uploaded by each client to generate an updated global model;
[0014] Semantic aggregation: The server aggregates local soft tags uploaded by each client in a weighted manner according to the sample size of each category, and updates the global soft tag matrix;
[0015] Weight Calculation: Based on the feature statistics uploaded by the client, the optimal combination weights of each client classifier are calculated by minimizing the expected chi-square distance.
[0016] (6) Collaborative classification and fault diagnosis: The client uses the obtained optimal combination weights to weight and integrate the parameters of multiple client classifiers to construct a collaborative classifier and output the final fault diagnosis result.
[0017] In step (1), the Gram angle field transform is used to map a one-dimensional time series to a two-dimensional feature space, thereby enhancing the model's ability to represent non-stationary vibration signals.
[0018] In step (4), the local inter-class relation matrix (CR) is defined as the inner product of the classifier weight matrices:
[0019]
[0020] in This is the classifier weight matrix, which characterizes the semantic association logic of the entire class space.
[0021] In step (6), the linear combination formula for the collaborative classifier is:
[0022]
[0023] in Let be the weighting coefficient of client j with respect to client n, representing the contribution of discriminative knowledge transfer.
[0024] The total loss function for local training is defined as:
[0025]
[0026] A rotating machinery fault diagnosis system includes: a distributed data acquisition and preprocessing module for parallel acquisition of equipment monitoring data from different clients and operating conditions, and conversion of vibration signals into two-dimensional time-frequency images through Gram angle field transformation to construct a local training dataset with long-tail distribution characteristics; a client decoupling training module for constructing a local model decoupled from the feature extractor and classifier, updating the other while fixing the parameters of one, and performing regularized feature alignment and consistency optimization training based on global parameters issued by the server; a local statistics extraction module for calculating and extracting local feature mean, intra-class covariance, local soft label matrix, and inter-class relation matrix without original data during local training; a central server aggregation and solution module for weighted aggregation of feature extractor parameters uploaded by each client, and generating a global soft label matrix by category sample size dimension, while solving for the optimal combination weights of each client classifier based on minimizing the chi-square distance expectation; and a collaborative diagnosis decision module for linearly integrating multiple client classifiers using the optimal combination weights, outputting the predicted probability of the fault category through a collaborative classifier that integrates cross-client discriminative knowledge, and determining the final diagnosis result.
[0027] The main innovative points of this invention include:
[0028] 1. Decoupled Modeling Approach for Privacy Protection and Long-Tail Distribution: Breaking away from the dependence of traditional federated learning on full-model aggregation, this approach innovatively employs a decoupled design between the feature extractor and classifier. By independently optimizing feature representation and discriminative knowledge, it solves the global model bias problem caused by the non-independent and identically distributed nature of cross-client data, improving the model's adaptability to long-tailed distributed data while ensuring data privacy.
[0029] 2. Federated Decoupling and Consistency Optimization Architecture Design: This architecture integrates three major mechanisms: linear combination of multi-classifiers, regularized feature alignment, and consistency optimization, achieving fine-grained knowledge transfer without leaking the original data. The table below shows the main structural parameters of ResNet50, which serves as the feature extractor in the FDCO model:
[0030] Network layer Key parameters effect Conv1 7×7 convolution (stride 2), 3×3 max pooling Initial feature downsampling and encoding Conv2_x It contains 1×1 and 3×3 convolutions, repeated 3 times. Extracting primary texture features Conv3_x It contains 1×1 and 3×3 convolutions, repeated 4 times. Extracting intermediate semantic features Conv4_x It contains 1×1 and 3×3 convolutions, repeated 6 times. Extracting high-level abstract features Conv5_x It contains 1×1 and 3×3 convolutions, repeated 3 times. Deep integration of features Avg Pool Output dimension compressed to 256 Feature Dimension Reduction and Smoothing Linear classifier Output dimension matches the number of fault categories Accurate fault status identification
[0031] 3. Privacy-preserving consistency discrimination mechanism: By introducing implicit representation data (IRD) collaboration and utilizing the consistency regularization of global soft labels and local inter-class relationship matrices, cross-node semantic alignment is achieved without exchanging original data. This mechanism avoids the long anomaly of weights in few-sample faults of traditional classifiers and significantly improves the diagnostic accuracy of tail faults.
[0032] 4. Cross-condition feature alignment and fusion mechanism: Gram angle field processing is introduced to transform vibration signals into two-dimensional images, enhancing the spatial representation capability of features. By constructing a global feature center anchor point, the alignment of local and global feature distributions is explicitly constrained, improving the model's ability to capture the essential characteristics of faults under different equipment and operating conditions.
[0033] Through the aforementioned innovative design, this invention achieves high-precision fault identification in long-tailed distribution scenarios while ensuring data privacy. Experimental results show that even in extremely imbalanced scenarios (β=0.1), the average accuracy of this invention in gearbox and bearing tasks can still reach over 92%, significantly outperforming traditional mainstream federated learning algorithms.
[0034] The diagnostic method based on federated decoupling and consistency optimization provided by this invention achieves strong generalization and high accuracy in identification without sharing original data, significantly improving the practicality of the diagnostic model. By constructing a decoupled architecture between the feature extractor and classifier and introducing a double consistency constraint mechanism, it effectively overcomes the problems of overfitting and low tail fault identification rate of traditional models under conditions of extreme class imbalance. This method has significant advantages in breaking down industrial "data silos" and adapting to multi-condition monitoring, and has broad prospects for industrial application and promotion value. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the diagnostic process of the fault diagnosis model of the present invention.
[0036] Figure 2 This is a distribution map of tags across different clients.
[0037] Figure 3 This is the overall structure of the model of the present invention.
[0038] Figure 4 This is a visualization of the t-SNE clustering results after feature dimensionality reduction. Detailed Implementation
[0039] This invention provides a diagnostic method and system for imbalance of fault categories within the client under data privacy constraints, and its specific implementation includes the following technical details:
[0040] A rotating machinery fault simulation system, such as a gearbox or bearing fault simulation platform, is built on an experimental platform. Accelerometers installed on key parts of the equipment collect raw vibration signals under various operating conditions. The sensors, in conjunction with a high-precision data acquisition card, perform synchronous sampling to ensure the capture of high-frequency impact characteristics during bearing or gear operation. In the signal processing stage, the collected raw signals are windowed and then converted into 224×224 resolution two-dimensional image samples using Gram angle field transformation. To simulate a real industrial environment, this embodiment utilizes a Dirichlet distribution to distribute data to multiple local clients, constructing a distributed dataset with non-independent identically distributed and long-tailed distribution characteristics.
[0041] In terms of network architecture, this invention employs a distributed model design that decouples the feature extractor from the classifier. The feature extractor uniformly adopts the ResNet50 structure, using convolutional layers, residual modules, and average pooling layers to achieve hierarchical feature extraction, compressing the output features to 256 dimensions. The classifier is connected after the feature extractor, and its output dimension matches the number of fault categories. This decoupled architecture allows the client to independently iterate and optimize the feature representation and discriminative knowledge during local training, overcoming the limitations of single model updates in traditional federated learning.
[0042] During local training, this invention introduces a double consistency constraint mechanism to address the class imbalance problem. The client calculates a soft label matrix reflecting local class semantic relationships and extracts classification layer weights to construct an inter-class relationship matrix. By constructing a consistency regularization loss function, the local inter-class relationship matrix is forced to align with the global soft label matrix sent to the server, thereby correcting the weight bias caused by the long-tail distribution. Simultaneously, a regularized feature alignment strategy is implemented, using the global feature center aggregated by the server as a benchmark to constrain the local feature distribution, effectively suppressing feature learning direction drift caused by local long-tail data bias.
[0043] The central server, acting as the hub for global semantic reference and parameter aggregation, is responsible for performing weighted aggregation of feature extractor parameters and generating a global soft label matrix based on category-level sample size. Furthermore, based on the feature statistics uploaded by clients, the server calculates the optimal combination weights for each client's classifier by minimizing the expected chi-square distance. This weighting coefficient characterizes the contribution of cross-client discriminative knowledge, providing a quantitative basis for constructing a robust collaborative classifier.
[0044] In the model application and validation phase, the client utilizes the optimal combined weights to weightedly fuse the parameters of multiple client classifiers to generate a collaborative classifier, outputting the predicted probability of the final fault category. Experimental verification shows that, in long-tailed distribution scenarios, the average accuracy of this invention reaches over 92% across multiple tasks, demonstrating excellent performance in both training efficiency and communication cost. This embodiment achieves efficient knowledge transfer without disclosing the original data through decoupling optimization and double consistency constraints, accurately identifying fault data that is outnumbered, and possesses significant engineering application value.
Claims
1. A method and system for diagnosing client internal fault class imbalance under data privacy constraints, characterized by Includes the following steps: (1) Initialize the global feature extractor, global classifier, and global soft label, and distribute them to each client; (2) Each client uses local fault data to train the local feature extractor, extracts the feature representation of the sample, and calculates the local category feature center; (3) Each client adopts the Linear Combination of Multiple Classifiers (LCMC) strategy, and updates the local classifier by weighting based on the distribution similarity between the global classifier and the local training state; (4) Each client executes a regularized feature alignment (RFA) strategy to optimize the local feature distribution by constraining the consistency between the local category feature center and the global category feature center; (5) Each client constructs a consistency optimization mechanism (COM) to use the inherent correlation between the local classification layer matrix and the global soft label for regularization constraints, thereby achieving precise optimization of the parameters of minority class samples; (6) The central server aggregates the parameters uploaded by each client, updates the global feature extractor, global classifier and global soft label, and enters the next iteration until the model converges.
2. The fault diagnosis method based on federated decoupled consensus optimization according to claim 1, characterized in that, The multi-classifier linear combination strategy in step (3) specifically includes: calculating the chi-square divergence between the predicted distributions of the local classifier and the global classifier; solving for the optimal weighting coefficient with the goal of minimizing the expected chi-square distance; and integrating the knowledge of the global classifier into the local classifier based on the optimal weighting coefficient to alleviate data fragmentation between clients.
3. The fault diagnosis method based on federated decoupled consensus optimization according to claim 1, characterized in that, The regularization feature alignment strategy in step (4) specifically includes: calculating the average value of the same category features output by the local feature extractors of each client to form a local category feature center; the server performs weighted aggregation on each local category feature center to generate a global category feature center and feeds it back to the client; and introducing a feature regularization term into the local training loss function to force the local features to align with the global category feature center.
4. The fault diagnosis method based on federated decoupled consensus optimization according to claim 1, characterized in that, The consistency optimization mechanism in step (5) specifically includes: extracting the weight matrix of each client classification layer as the inter-class relation matrix (CR); collecting the global soft label (SL) issued by the server, which represents the category association knowledge of the global dimension; constructing a consistency regular loss function to constrain the distribution of the local CR matrix to approach the distribution of the global SL matrix, thereby achieving an improvement in the accuracy of minority class samples under the constraint of implicit representation data (IRD).
5. The fault diagnosis method based on federated decoupled consensus optimization according to claim 1, characterized in that, In step (6), the specific content of server aggregation includes: The model parameters of each client feature extractor are aggregated by mean. The local classification layer matrix uploaded by each client is weighted and averaged to update the global soft tags. 6.A computer device, comprising a memory and a processor, and characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.