A harmonic reducer fault diagnosis method and system based on a blockchain personalized federated learning
Patent Information
- Application Number
- CN202611239092.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-16
- Publication Date
- 2026-10-16
AI Technical Summary
[0009]针对多客户端工况异构、数据非独立同分布及中心式架构单点故障等核心问题,本发明提出一种基于区块链个性化联邦学习的谐波减速器故障诊断方法及系统
[0067] This invention aims at collaborative fault diagnosis of multi-user harmonic reducers under different operating conditions. Addressing issues such as inconsistent client data distribution, difficulty in centralized data sharing, and the susceptibility of traditional centralized federated learning to single-point failures, it proposes a fault diagnosis method and system based on blockchain-based personalized federated learning. The main contributions and innovations of this invention are as follows:
Smart Images

Figure CN122926263A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of harmonic reducer fault diagnosis technology, specifically to a method and system for harmonic reducer fault diagnosis based on blockchain-based personalized federated learning. Background Technology
[0002] Industrial robots in modern manufacturing [1] Harmonic reducers have become crucial automated equipment for achieving efficient and precise production, widely used in assembly, welding, and other processes. Among them, harmonic reducers, with their advantages of high transmission ratio, compact structure, and high precision, have become a core component of industrial robot joint drive systems. Their operating status directly affects the end-effector positioning accuracy and the overall system reliability. [2] Due to the limitations of its precision structure, the flexible bearings, rigid wheels, and flexural wheels of harmonic reducers are prone to varying degrees of damage or missing teeth, leading to problems such as decreased transmission accuracy and production line downtime. Therefore, accurate fault diagnosis of harmonic reducers is crucial for ensuring the stable operation of industrial robots. [3] .
[0003] With the popularization of intelligent sensing technology and breakthroughs in deep learning algorithms, data-driven fault diagnosis methods have shown significant advantages in key components such as harmonic reducers, and have made significant progress in laboratories and some controlled industrial scenarios. [4] These methods can automatically extract deep features of equipment health status from massive amounts of equipment operating status data, significantly improving the automation level and accuracy of fault identification and providing key technical support for predictive maintenance. However, when these methods move from ideal research environments to complex and heterogeneous real industrial sites, they still face two major bottlenecks: First, due to commercial competition barriers, different companies are unwilling to share sensitive harmonic reducer operating data to protect their core interests. Second, due to differences in equipment configuration, operating conditions, and data acquisition conditions among different companies, clients generally exhibit significant data heterogeneity.
[0004] Federated learning (FL), as an innovative distributed machine learning paradigm, offers a promising approach to solving the challenges of data silos and privacy barriers in industrial scenarios. [5]Its core lies in adopting a collaborative mechanism of "data remains still, model moves": each participating client trains the model using local private data, only uploading encrypted model parameter updates, and the coordinator typically uses algorithms such as Federated Averaging (FedAvg) to aggregate parameters, generate a global model, and distribute it for iteration. This approach can aggregate dispersed knowledge without sharing original sensitive data, improve model generalization ability, and achieve cross-domain collaborative modeling under privacy protection. However, when mainstream federated learning frameworks are applied to industrial equipment fault diagnosis, they still face two major structural bottlenecks: reliance on a central server to aggregate models, which poses a single point of failure risk; and outputting a unified global model, lacking the ability to handle personalized modeling in non-independent and identically distributed (Non-IID) scenarios. [6] .
[0005] To alleviate the data heterogeneity and feature shift issues caused by Non-IID data in multi-client industrial fault diagnosis scenarios, researchers have proposed several improved federated learning methods, including FedHybrid. [7] By integrating multiple aggregation strategies, the impact of data heterogeneity on model convergence and diagnostic accuracy is reduced; FedEME [8] A personalized federated learning framework for heterogeneous environments is proposed to support adaptive aggregation in Non-IID scenarios. While the aforementioned methods improve the stability and generalization ability of the global model to some extent, they still tend to learn a single global model and struggle to fully adapt to the differences in operating conditions, workloads, data acquisition environments, sample sizes, and fault category distributions among different clients. These differences further exacerbate the heterogeneity of client data distribution, manifesting as class shift, class imbalance, and even missing classes. [9] This reduces the convergence speed and diagnostic performance of federated learning models.
[0006] To address the aforementioned issues, Personalized Federated Learning (PFL) has become an important research direction. Its core principle is to allow each client to retain a personalized model adapted to its local data characteristics within a federated collaborative framework, rather than forcing the sharing of a completely consistent global model. Existing PFL strategies mainly include four categories: knowledge distillation, regularization constraints, collaborative training, and parameter decoupling. Knowledge distillation methods extract knowledge from the global model or other client models (or their outputs) through distillation loss, achieving local model customization.
[10] Reference
[11] proposes a PFL method that combines knowledge distillation and weighted loss to address the generalization problem under Non-IID data distribution, and shows superior accuracy and convergence performance on multiple datasets. Regularization constraint methods establish a balance between fitting local data and maintaining global consistency by introducing L2 regularization or inter-model distance constraints into the local loss function.
[12] The attention-enhanced meta-learning network proposed in reference
[13] adaptively constructs personalized collaborative relationships by analyzing the similarity of client model parameters. Collaborative training methods refer to the client maintaining both the local model and the global model or proxy model simultaneously, and achieving collaborative optimization through interactive methods such as pseudo-labels.
[14] For example, the FedExProx algorithm improves the convergence and robustness of FedExProx under inaccurate near-end updates by using server-side extrapolation.
[15] The parameter decoupling method divides model parameters into a globally shared part and a locally private part, which are used for cross-client knowledge sharing and local personalized adaptation, respectively.
[16] such as FedOT
[17] By sharing a global classifier and introducing orthogonal transformations locally to achieve feature adaptation, we can improve personalized performance while taking into account global generalization ability.
[0007] Furthermore, most existing federated learning methods still rely on centralized servers for model aggregation, making them susceptible to single points of failure and insufficient reliability. To improve the decentralization and trusted collaborative capabilities of federated learning systems, blockchain technology has been introduced into the federated learning framework. The concept of blockchain emerged alongside the creation of Bitcoin in 2009.
[18] Essentially, it is a decentralized distributed ledger composed of technologies such as peer-to-peer networks, cryptography, consensus mechanisms, and smart contracts. It can ensure the immutability and tamper-proofness of data through cryptographic mechanisms, and rely on consensus algorithms to complete data generation and updates among distributed nodes.
[19] Based on participation permissions and management methods, blockchains can be divided into public blockchains, private blockchains, and consortium blockchains. Among them, consortium blockchains are jointly maintained by multiple organizations and have access control, data privacy protection, and multi-party collaboration capabilities, making them suitable for collaborative diagnostic scenarios involving sensitive industrial data.
[20] .
[0008] In the blockchain federated learning framework, the leader node is usually responsible for model aggregation coordination and block generation, and its selection strategy directly affects the system efficiency and robustness. Existing research mainly includes static leader selection methods based on reputation or performance indicators, as well as intelligent election methods that introduce machine learning ideas. For example, reference
[21] constructs an evaluation mechanism based on the historical contribution and participation of nodes to improve aggregation reliability and operating efficiency; reference
[22] explores the use of learning models to assist leader selection, providing ideas for intelligent consensus decision-making in complex network environments. Overall, although blockchain technology can realize decentralized collaboration in federated learning, existing blockchain federated learning frameworks still mostly adopt static consensus mechanisms, which are difficult to adapt to the dynamic changes in client communication overhead, computing resources, data distribution and model contribution, resulting in limited model aggregation efficiency and training stability.
[23] . Summary of the Invention
[0009] To address core issues such as heterogeneous operating conditions across multiple clients, non-independent and co-distributed data, and single-point failure in centralized architectures, this invention proposes a fault diagnosis method and system for harmonic reducers based on blockchain-based personalized federated learning.
[0010] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0011] This invention provides a method for diagnosing harmonic reducer faults based on blockchain-based personalized federated learning, the method comprising the following steps:
[0012] Step 1: Data Acquisition and Preprocessing
[0013] A vibration signal experimental platform for a harmonic reducer was built. One-dimensional vibration signal data under different working conditions and all states were collected using a vibration acceleration sensor. The one-dimensional vibration signal was then converted into a two-dimensional time-frequency spectrum that can characterize time-frequency features through wavelet transform. Based on the working conditions and fault categories, sample data were divided to construct local datasets for each client, providing a data foundation for the subsequent training of personalized federated fault diagnosis models.
[0014] Step 2: Model Building and Personalization Initialization
[0015] Each client constructs a local fault diagnosis model based on a residual network to extract deep fault features of the harmonic reducer from a two-dimensional time-spectrum graph; each client downloads the previous round of global feature extractor and global class prototype from the blockchain distributed node and performs personalized initialization based on the perceptual mask parameter decoupling strategy.
[0016] Step 3: Local model training with class prototype constraints
[0017] Each client uses local data and global class prototypes to train the personalized initial model locally; the sample features extracted by the personalized initial model are mapped to the Poincaré sphere space, and the hyperbolic features of similar samples are aggregated by Möbius average to generate local class prototypes; a total loss function including cross-entropy loss, prototype alignment loss and missing class rejection loss is constructed, and the model parameters are iteratively optimized based on the total loss to obtain the updated feature extractor parameters and local class prototypes;
[0018] Step 4: Dynamic Consensus Aggregation and Leader Determination
[0019] Each client uploads the updated feature extractor parameters and local class prototypes to the blockchain consensus node. Based on the reinforcement learning dynamic consensus mechanism, the consensus node constructs the state information of the reinforcement learning policy network according to each client's current round score, previous round historical score, and previous round aggregation weight, and generates the global aggregation weight allocation vector for the current round. The feature extractor parameters are then subjected to ordinary weighted aggregation based on the weight allocation vector, and the local class prototypes uploaded by each client are subjected to weighted Möbius average aggregation to obtain the updated global feature extractor and global class prototype. The client with the highest weight is determined as the consensus leader node to complete the aggregation result verification and network-wide confirmation, replacing the traditional centralized aggregation mode.
[0020] Step 5: On-chain evidence storage and iterative updates
[0021] The verified global feature extractor parameters, global class prototype and its hash verification information are uploaded to the blockchain for notarization, forming an immutable and traceable model update record, which serves as a trusted global update benchmark for the next round of training; after this round, the next iteration is carried out; each client returns to step two and repeats the personalized initialization, local training, dynamic consensus aggregation and on-chain update process until the fault diagnosis performance of the global model converges.
[0022] Step Six: Fault Diagnosis
[0023] The one-dimensional vibration signal of the harmonic reducer to be diagnosed is converted into a two-dimensional time spectrum using wavelet transform, and then input into the trained personalized federated fault diagnosis model to obtain the diagnosis results.
[0024] Furthermore, the initialization strategy based on perceptual mask parameter decoupling described in step two is specifically as follows:
[0025] Step 2.1: Generation of the initial position mask based on parameter changes
[0026] During the first round of training, the client downloads the global feature extractor and trains it using the local dataset. It calculates the changes in model parameters before and after training, sorts the model parameters based on these changes, and classifies them into critical and non-critical parameters based on a preset threshold. The location mask for critical parameters is represented as follows:
[0027]
[0028] The non-critical parameter location mask is represented as follows:
[0029]
[0030] in, This represents the mask for the location of key parameters in the first round; This represents the mask for the location of non-critical parameters in the first round; Indicates a preset threshold; This indicates the amount of change in the model parameters; Indicates the relationship with the first The unit mask value corresponding to each parameter position;
[0031] Step 22: Feature Extractor Fusion and Mask Update Based on Historical Location Masks
[0032] During non-first rounds of training, the client uses the position mask from the previous round as a guide to selectively fuse the global feature extractor parameters of the current round and the local feature extractor parameters from the previous round to obtain the personalized feature extractor for the current round. The fusion process is as follows:
[0033]
[0034] in, Indicates the first Personalized feature extractor parameters obtained from round fusion; Indicates the first Round global feature extractor parameters; Indicates the first Round local feature extractor parameters; and They represent the first Position masks for critical and non-critical parameters of the wheel; This represents the Hadamard operation;
[0035] The client trains the personalized feature extractor using a local dataset and updates the position mask based on the parameter changes before and after training for personalized initialization in subsequent training rounds.
[0036] Furthermore, the Poincaré sphere model described in step three is one of the commonly used representations of hyperbolic space, assuming the embedding space dimension is... ,but The hyperbolic space corresponding to the Viponcaré sphere model is Any two points in space The hyperbolic distance under the Poincaré sphere is expressed as:
[0037]
[0038] in, It is an inverse hyperbolic cosine function; and is the Poincaré sphere metric factor, which reflects the curvature characteristics of hyperbolic space as a function of position;
[0039] The sample features extracted by the personalized initial model are mapped to the Poincaré sphere space, and the projection function is:
[0040]
[0041] in, This represents the input feature vector. Let the radius of the Poincaré sphere be... Representing vectors norm, The set threshold is used to determine whether to perform a projection operation;
[0042] The Möbius average aggregation refers to calculating the hyperbolic geometric center of the feature prototype of the same type of sample in the Poincaré sphere based on Möbius geometric operations, so as to obtain the local class prototype of the corresponding fault category.
[0043] Furthermore, the total loss function described in step four is:
[0044]
[0045] in, Represents cross-entropy loss; Indicates the prototype alignment loss; This indicates the missing category exclusion loss; and For custom parameters;
[0046] The cross-entropy loss Represented as:
[0047]
[0048] in, For the sample size, Indicates the first The label of each sample, Indicates the first Features of each sample Predict samples for the model Category The probability of;
[0049] The prototype alignment loss To enhance the consistency of similar fault characteristics across clients, it is represented as:
[0050]
[0051] in, It is a client The The representation of a sample in the Poincaré sphere model, Indicates the first Each sample corresponds to a label. global prototype It is the first In each client, the tag is Total number of categories It is a client The total number of samples, It is a tiny constant to prevent the denominator from being zero. This represents the geodesic distance under the Poincaré sphere model;
[0052] The missing category rejection loss The hyperbolic distance used to increase the local sample features and the global hyperbolic class prototype of the missing category is expressed as:
[0053]
[0054] in, Indicates category The global prototype The rejection threshold, Indicates the client The set of categories that exist in the dataset; the loss function utilizes a hinged loss form, such that when... Gradients are generated at that time.
[0055] Furthermore, the reinforcement learning-based dynamic consensus mechanism includes client-side model performance scoring and dynamic aggregation weight allocation; wherein, each client uses its own local dataset as an evaluation benchmark to evaluate the performance of local models uploaded by other clients, and forms a client-side model score based on the evaluation results, the measurement method of which is as follows:
[0056]
[0057] in, Representing the The global model after round aggregation, Representing the Wheel client The trained local model. Representation Model In the client Cross-entropy loss on the dataset; Quantified the client The local model, compared to the previous global model, is more advanced on the client side. Improvements in data;
[0058] The model's overall score is obtained by averaging the scores from all its clients, and is expressed as follows:
[0059]
[0060] in, For the client The model number The round's score is used to characterize the model's performance and to construct the reinforcement learning state.
[0061] Furthermore, the state information of the reinforcement learning policy network It is composed of the current round's score from each client, the historical score from the previous round, and the global aggregate weight from the previous round, and the action output. Assign a vector to the aggregate weights for the current round, with the objective function being:
[0062]
[0063] in, This represents the total global model revenue for the current round; For the first Wheel client The aggregation weight, which also represents the first... The predicted probability of the leader in a round; Indicates the first Wheel client Model score; Indicates the client Weighted contribution in the current round; For the first Wheel client Aggregate weights; Indicates the first Wheel client Model score; Indicates the client Weighted contribution in the previous round; Used to measure clients The incremental contribution to the global model's return in the current round.
[0064] A harmonic reducer fault diagnosis system based on blockchain personalized federated learning is characterized in that the system has a program module corresponding to the steps of the method described in any one of claims 1 to 6, and executes the steps in the above-described blockchain personalized federated learning harmonic reducer fault diagnosis method when running.
[0065] A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program configured to implement, when invoked by a processor, the steps of the harmonic reducer fault diagnosis method for blockchain personalized federated learning as described in any one of claims 1 to 6.
[0066] Compared with the prior art, the beneficial effects of the present invention are:
[0067] This invention aims at collaborative fault diagnosis of multi-user harmonic reducers under different operating conditions. Addressing issues such as inconsistent client data distribution, difficulty in centralized data sharing, and the susceptibility of traditional centralized federated learning to single-point failures, it proposes a fault diagnosis method and system based on blockchain-based personalized federated learning. The main contributions and innovations of this invention are as follows:
[0068] 1) An initialization strategy based on perceptual masking for parameter decoupling is proposed. This strategy is based on client data distribution perception. It identifies and divides shared parameters and personalized parameters in the model through perceptual masking, generates a personalized initial model for each user that is suitable for their local fault data distribution, and dynamically adjusts the model structure according to the heterogeneous characteristics of the clients, thereby improving the adaptability of the model in heterogeneous operating conditions of multiple clients and Non-IID data scenarios.
[0069] 2) A dynamic consensus mechanism based on reinforcement learning is proposed. This mechanism uses client model scores, historical scores, and previous round aggregation weights as state information. Through reinforcement learning, it dynamically optimizes the selection of consensus leader nodes and the global aggregation strategy, enabling each client to adaptively participate in global model updates based on model performance scores and historical contributions, thereby improving the adaptability and stability of the cross-client collaborative training process.
[0070] 3) A class prototype alignment method based on the Poincaré mapping is proposed. This method maps client sample features to the Poincaré space, characterizes the hierarchical relationship and nonlinear distribution boundary between different fault categories through class prototype constraints, and introduces a missing class exclusion mechanism to reduce the impact of incomplete client categories on the model's discriminative ability, thereby enhancing the inter-class separability of fault features across clients and further improving the model's generalization performance in multi-client heterogeneous operating conditions and Non-IID data scenarios.
[0071] The proposed method was validated by building a harmonic reducer signal acquisition experimental platform. It can construct an effective fault diagnosis model for harmonic reducers under conditions of heterogeneous operating conditions of multiple clients, non-IID data scenarios, and single-point failure risks in centralized architecture. The average diagnostic accuracy rate reached 99.1%, and the overall performance was better than the compared methods. It effectively solved the fault diagnosis problem of harmonic reducers in scenarios with heterogeneous data. Attached Figure Description
[0072] The present invention can be better understood by referring to the description given below in conjunction with the accompanying drawings, which together with the following detailed description are included in and form part of this specification, and are used to further illustrate preferred embodiments of the invention and explain the principles and advantages of the invention.
[0073] Figure 1 This is a flowchart of a blockchain-based personalized federated learning method as described in this invention.
[0074] Figure 2 This is a flowchart of the position mask initialization process based on parameter changes in an embodiment of the present invention.
[0075] Figure 3 This is a flowchart of feature extractor fusion and mask update based on historical mask in an embodiment of the present invention.
[0076] Figure 4 This is the vibration signal acquisition experimental platform for the harmonic reducer in this embodiment of the invention.
[0077] Figure 5 This is a schematic diagram of a faulty component of the harmonic reducer in an embodiment of the present invention.
[0078] Figure 6 This is a distribution diagram of the number of samples in each client dataset in this embodiment of the invention.
[0079] Figure 7 This refers to the model accuracy under different Top-K settings in the embodiments of this invention.
[0080] Figure 8 This is a graph showing the comparison of diagnostic accuracy under different initialization strategies in this embodiment of the invention.
[0081] Figure 9 This is a radar chart comparing the diagnostic accuracy under different initialization strategies in this embodiment of the invention.
[0082] Figure 10 This is a log diagram of a single point of failure in the federated learning server in an embodiment of the present invention.
[0083] Figure 11This is a log diagram illustrating the anti-single point-of-failure operation of blockchain-enabled federated learning in this embodiment of the invention.
[0084] Figure 12 This is a weight distribution diagram of the traditional method under poisoning attack in an embodiment of the present invention.
[0085] Figure 13 This is an aggregated weight distribution diagram of the dynamic consensus mechanism under a poisoning attack in an embodiment of the present invention.
[0086] Figure 14 This describes the impact of the rejection distance threshold on the model's diagnostic accuracy in this embodiment of the invention.
[0087] Figure 15 This is a comparison chart of the average repulsion distance under different repulsion boundary settings in the embodiments of the present invention.
[0088] Figure 16 These are feature visualization results under different embedding spaces in the embodiments of the present invention; where (a) represents Euclidean space and (b) represents Poincaré space.
[0089] Figure 17 These are heatmaps of model performance under two different combinations of loss weights in embodiments of the present invention.
[0090] Figure 18 This is a graph showing the comparison of diagnostic accuracy between the method of this invention and other deep learning methods.
[0091] Figure 19 This is a comparison chart of the diagnostic accuracy of each client under different methods in the embodiments of the present invention; where (a) corresponds to client 1; (b) corresponds to client 2; (c) corresponds to client 3; and (d) corresponds to client 4.
[0092] Figure 20 This is a visualization analysis diagram of the diagnostic results of client 1 in this embodiment of the invention; where (a) represents the confusion matrix; and (b) represents the feature visualization results.
[0093] Figure 21 This is a visualization analysis diagram of the diagnostic results of client 2 in this embodiment of the invention; where (a) represents the confusion matrix; and (b) represents the feature visualization results.
[0094] Figure 22 This is a visualization analysis diagram of the diagnostic results of client 3 in this embodiment of the invention; where (a) represents the confusion matrix; and (b) represents the feature visualization results.
[0095] Figure 23 This is a visualization analysis diagram of the diagnostic results of client 4 in this embodiment of the invention; where (a) represents the confusion matrix; and (b) represents the feature visualization results. Detailed Implementation
[0096] To enable those skilled in the art to better understand the present invention, the accompanying drawings will be described below. Figure 1-23 Exemplary embodiments or examples of the present invention are described below. Obviously, the described embodiments or examples are only a part of the embodiments or examples of the present invention, and not all of them. All other embodiments or examples obtained by those skilled in the art based on the embodiments or examples of the present invention without inventive effort should fall within the scope of protection of the present invention.
[0097] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0098] In a typical implementation, such as Figure 1 As shown, this invention provides a method for diagnosing harmonic reducer faults based on blockchain-based personalized federated learning, comprising the following steps:
[0099] Step 1: Data Acquisition and Preprocessing
[0100] A vibration signal experimental platform for a harmonic reducer was built. One-dimensional vibration signal data under different working conditions and all states were collected using a vibration acceleration sensor. The one-dimensional vibration signal was then converted into a two-dimensional time-frequency spectrum that can characterize time-frequency features through wavelet transform. Based on the working conditions and fault categories, sample data were divided to construct local datasets for each client, providing a data foundation for the subsequent training of personalized federated fault diagnosis models.
[0101] Step 2: Model Building and Personalization Initialization
[0102] Each client constructs a local fault diagnosis model based on a residual network to extract deep fault features of the harmonic reducer from a two-dimensional time-spectrum graph; each client downloads the previous round of global feature extractor and global class prototype from the blockchain distributed node and performs personalized initialization based on the perceptual mask parameter decoupling strategy.
[0103] Step 3: Local model training with class prototype constraints
[0104] Each client uses local data and global class prototypes to train the personalized initial model locally; the sample features extracted by the personalized initial model are mapped to the Poincaré sphere space, and the hyperbolic features of similar samples are aggregated by Möbius average to generate local class prototypes; a total loss function including cross-entropy loss, prototype alignment loss and missing class rejection loss is constructed, and the model parameters are iteratively optimized based on the total loss to obtain the updated feature extractor parameters and local class prototypes;
[0105] Step 4: Dynamic Consensus Aggregation and Leader Determination
[0106] Each client uploads the updated feature extractor parameters and local class prototypes to the blockchain consensus node. Based on the reinforcement learning dynamic consensus mechanism, the consensus node constructs the state information of the reinforcement learning policy network according to each client's current round score, previous round historical score, and previous round aggregation weight, and generates the global aggregation weight allocation vector for the current round. The feature extractor parameters are then subjected to ordinary weighted aggregation based on the weight allocation vector, and the local class prototypes uploaded by each client are subjected to weighted Möbius average aggregation to obtain the updated global feature extractor and global class prototype. The client with the highest weight is determined as the consensus leader node to complete the aggregation result verification and network-wide confirmation, replacing the traditional centralized aggregation mode.
[0107] Step 5: On-chain evidence storage and iterative updates
[0108] The verified global feature extractor parameters, global class prototype and its hash verification information are uploaded to the blockchain for notarization, forming an immutable and traceable model update record, which serves as a trusted global update benchmark for the next round of training; after this round, the next iteration is carried out; each client returns to step two and repeats the personalized initialization, local training, dynamic consensus aggregation and on-chain update process until the fault diagnosis performance of the global model converges.
[0109] Step Six: Fault Diagnosis
[0110] The one-dimensional vibration signal of the harmonic reducer to be diagnosed is converted into a two-dimensional time spectrum using wavelet transform, and then input into the trained personalized federated fault diagnosis model to obtain the diagnosis results.
[0111] The embodiments of the present invention will be described in detail below.
[0112] 1) Initialization strategy based on perceptual mask parameter decoupling in step two
[0113] Step 2.1: Generation of the initial position mask based on parameter changes
[0114] During the first round of training, the client downloads the global feature extractor and trains it using the local dataset. It calculates the changes in model parameters before and after training, sorts the model parameters based on these changes, and classifies them into critical and non-critical parameters based on a preset threshold. The process is as follows: Figure 2 As shown, the expression for the key parameter position mask is given by equation (1):
[0115]
[0116] The expression for the non-critical parameter position mask is shown in equation (2):
[0117]
[0118] in, This represents the mask for the location of key parameters in the first round; This represents the mask for the location of non-critical parameters in the first round; Indicates a preset threshold; This indicates the amount of change in the model parameters; Indicates the relationship with the first The unit mask value corresponding to each parameter position;
[0119] Step 22: Feature Extractor Fusion and Mask Update Based on Historical Location Masks
[0120] In non-first rounds of training, the client uses the position mask from the previous round as a guide to selectively fuse the global feature extractor parameters of the current round and the local feature extractor parameters from the previous round to obtain the personalized feature extractor for the current round. The process is as follows: Figure 3 As shown, the fusion process is illustrated in equation (3):
[0121]
[0122] in, Indicates the first Personalized feature extractor parameters obtained from round fusion; Indicates the first Round global feature extractor parameters; Indicates the first Round local feature extractor parameters; and They represent the first Position masks for critical and non-critical parameters of the wheel; This represents the Hadamard operation;
[0123] The client trains the personalized feature extractor using a local dataset and updates the position mask based on the parameter changes before and after training for personalized initialization in subsequent training rounds.
[0124] 2) Feature embedding method based on the Poincaré sphere model in step three
[0125] The Poincaré sphere model is one of the commonly used representations of hyperbolic space. Let the embedding space dimension be . ,but The hyperbolic space corresponding to the Viponcaré sphere model is Any two points in space The hyperbolic distance under the Poincaré sphere is shown in equation (4):
[0126]
[0127] in, It is an inverse hyperbolic cosine function; and is the Poincaré sphere metric factor, which reflects the curvature characteristics of hyperbolic space as a function of position;
[0128] The sample features extracted by the personalized initial model are mapped to the Poincaré sphere space, and the projection function is shown in equation (5):
[0129]
[0130] in, This represents the input feature vector. Let the radius of the Poincaré sphere be... Representing vectors norm, The set threshold is used to determine whether to perform a projection operation;
[0131] The Möbius average aggregation refers to calculating the hyperbolic geometric center of the feature prototype of the same type of sample in the Poincaré sphere based on Möbius geometric operations, so as to obtain the local class prototype of the corresponding fault category.
[0132] 3) Total loss function in step three
[0133] The total loss function is expressed as shown in equation (6):
[0134]
[0135] in, Represents cross-entropy loss; Indicates the prototype alignment loss; This indicates the missing category exclusion loss; and For custom parameters;
[0136] The cross-entropy loss The expression is shown in equation (7):
[0137]
[0138] in, For the sample size, Indicates the first The label of each sample, Indicates the first Features of each sample Predict samples for the model Category The probability of;
[0139] The prototype alignment loss To enhance the consistency of similar fault characteristics across clients, the expression is shown in equation (8):
[0140]
[0141] in, It is a client The The representation of a sample in the Poincaré sphere model, Indicates the first Each sample corresponds to a label. The global prototype It is the first In each client, the tag is Total number of categories It is a client The total number of samples, It is a tiny constant to prevent the denominator from being zero. This represents the geodesic distance under the Poincaré sphere model;
[0142] The missing category rejection loss The hyperbolic distance used to increase the local sample features and the global hyperbolic class prototype of the missing category is expressed as shown in equation (9):
[0143]
[0144] in, Indicates category The global prototype The rejection threshold, Indicates the client The set of categories that exist in the dataset; the loss function utilizes a hinged loss form, such that when... Gradients are generated at that time.
[0145] 4) The client model scoring method for dynamic consensus mechanism in step four
[0146] The dynamic consensus mechanism based on reinforcement learning includes client model performance scoring and dynamic aggregation weight allocation; wherein, each client uses its own local dataset as the evaluation benchmark to evaluate the performance of local models uploaded by other clients, and forms a client model score based on the evaluation results, the measurement method of which is shown in Equation (10):
[0147]
[0148] in, Representing the The global model after round aggregation, Representing the Wheel client The trained local model. Representation Model In the client Cross-entropy loss on the dataset; Quantified the client The local model, compared to the previous global model, is more advanced on the client side. Improvements in data;
[0149] The model's overall score is obtained by averaging the scores from all its clients, as shown in Equation (11):
[0150]
[0151] in, For the client The model number The round's score is used to characterize the model's performance and to construct the reinforcement learning state.
[0152] 5) Step 4: Dynamic Aggregation Weight Allocation Method Based on Reinforcement Learning
[0153] The state information of the reinforcement learning policy network It is composed of the current round's score from each client, the historical score from the previous round, and the global aggregate weight from the previous round, and the action output. The aggregate weights are assigned a vector for the current round, and the objective function for this is shown in equation (12):
[0154]
[0155] in, This represents the total global model revenue for the current round; For the first Wheel client The aggregation weight, which also represents the first... The predicted probability of the leader in a round; Indicates the first Wheel client Model score; Indicates the client Weighted contribution in the current round; For the first Wheel client Aggregate weights; Indicates the first Wheel client Model score; Indicates the client Weighted contribution in the previous round; Used to measure clients The incremental contribution to the global model's return in the current round.
[0156] This invention proposes a fault diagnosis method for harmonic reducers based on blockchain-based personalized federated learning, such as... Figure 1 As shown. This method first constructs personalized local fault diagnosis models on each client by decoupling the initialization strategy through perceptual mask parameters to mitigate the impact of heterogeneous data across multiple clients on model training. However, relying solely on local personalized training cannot guarantee the consistency of fault feature spaces across different clients. Therefore, a Poincaré sphere prototype constraint is introduced during the local training phase to map sample features to a hyperbolic space, and class prototype alignment enhances the discriminative power and cross-client consistency of fault features. Furthermore, to avoid the problems of single-point failure and insufficient adaptability of fixed aggregation weights in traditional centralized federated aggregation, an adaptive allocation of aggregation weights is performed based on a reinforcement learning dynamic consensus mechanism to complete the global model and global class prototype update, and blockchain is used for trusted storage of aggregation results. After multiple iterations until the model converges, the samples to be diagnosed are input into the trained model to obtain the fault diagnosis results of the harmonic reducer. The specific process is as follows:
[0157] The fault diagnosis method (algorithm) for harmonic reducers based on blockchain personalized federated learning proposed in this invention is the underlying technical core of this invention, and various products can be derived based on the algorithm.
[0158] Based on the method proposed in this invention, a harmonic reducer fault diagnosis system based on blockchain personalized federated learning is developed using a programming language. This system has program modules corresponding to the steps of the above technical solution, and executes the steps in the above-mentioned blockchain personalized federated learning harmonic reducer fault diagnosis method when running.
[0159] The developed system (software) computer program is stored on a computer-readable storage medium. This computer program is configured to implement the steps of the aforementioned blockchain-based personalized federated learning method for harmonic reducer fault diagnosis when invoked by a processor. In other words, the invention is materialized on a carrier, becoming a computer program product.
[0160] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application-specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] The computational programs (also referred to as programs, software, software applications, or code) of this invention include machine instructions of a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device PLD) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0162] The beneficial effects of the present invention will be further explained in conjunction with specific embodiments and comparative examples.
[0163] The experimental data all came from the harmonic reducer vibration signal acquisition experimental platform built in the laboratory. A physical image of the platform is shown below. Figure 4 As shown, the harmonic reducer vibration signal acquisition experimental platform mainly consists of six parts: a drive motor, a load motor, a harmonic reducer, an acceleration sensor, a torque and speed sensor, and a coupling.
[0164] Taking the Green Harmonic LCSG-32-50-I type harmonic reducer with a reduction ratio of 50:1 as an example. The rotational speeds were set to 1000 r / min, 1200 r / min, 1400 r / min, and 1600 r / min. The vibration acceleration sensor was installed at the 12 o'clock position of the output end, and the acquisition frequency was 100 kHz. The data included normal operation, vibrations at different fault locations (inner race, rolling element, and outer race), and vibrations corresponding to different fault degrees. The data was categorized into different operating conditions based on the different rotational speeds. A schematic diagram of the harmonic reducer's faulty components is shown below. Figure 5 As shown in Table 1, the 10 states of the harmonic reducer are now defined.
[0165] Table 1. Data Representation Methods for Different State Types
[0166]
[0167] In this embodiment of the invention, four operating conditions for the harmonic reducer are set, and the specific operating parameters are shown in Table 2.
[0168] Table 2 Data for different operating conditions
[0169]
[0170] Each client's original dataset contains multiple fault samples from 10 types of harmonic reducers. To simulate an imbalanced data scenario, different missing categories were manually set for each client, meaning some categories were completely removed from the local dataset. The missing categories in each client's dataset are shown in Table 3. The sample size distribution of each client's dataset is as follows: Figure 6 As shown.
[0171] Table 3. Data Missing Categories for Different Clients
[0172]
[0173] Taking client 1 as an example, its data exhibits significant class imbalance and missing class characteristics: the number of samples for classes B10, RMT, IR5, IR10, N, OR5, and FMT are 30, 64, 48, 40, 80, 24, and 60, respectively, while the number of samples for classes IR1, OR1, and OR10 is 0, meaning client 1 completely lacks data for these three classes. This type of non-IID distribution is a typical heterogeneity challenge that federated learning needs to address in real-world scenarios.
[0174] The experiment was conducted on a high-performance computing server. The server hardware included an Intel Xeon E5-2620 v4 processor, 64GB of RAM, and dual NVIDIA GTX 1080 Ti graphics processors. The software environment was built on a Windows operating system, implemented in Python, with PyTorch as the model training framework, and CUDA acceleration was used to improve training efficiency. During model training, the global training epochs were set to 100, with a learning rate of 0.01. To reduce the impact of random factors on the experimental results, each experiment was independently repeated 5 times, and the average of the five runs was taken as the final result.
[0175] A. Comparative experiment on fault diagnosis under different Top-K settings
[0176] To determine the partitioning of critical and non-critical parameters in the perceptual mask parameter decoupling initialization strategy, the changes in each parameter during local training were first calculated, and the parameters were sorted from largest to smallest change. Then, the parameters representing the top 20%, 30%, 40%, 50%, 60%, and 70% of the changes were selected as critical parameters, and the remaining parameters as non-critical parameters, forming different Top-K parameter partitioning schemes. Taking client 3 as an example, the parameter partitioning effects under different Top-K settings were compared and verified to analyze the impact of the critical parameter selection ratio on model training performance. The experimental results are as follows: Figure 7 As shown.
[0177] Through observation Figure 7 It can be seen that the model training accuracy varies under different Top-K settings. When the Top-K value is 50%, the accuracy is significantly higher.
[0178] When selecting the top 50% of parameters with the largest changes as key parameters, the training accuracy is the best.
[0179] B. Comparison experiment before and after introducing personalized initialization strategy
[0180] To evaluate the effectiveness of the parameter decoupling initialization strategy based on perceptual masks, a comparative experiment was conducted using client 3 as an example. The baseline strategy directly downloaded the global model for initialization. The proposed strategy, however, uses historical location masks to fuse the key parameters of the new global model with the non-key parameters of the local model to construct a personalized initialization model. The changes in fault diagnosis accuracy with the number of global rounds under the two strategies are shown below. Figure 8 As shown.
[0181] Through observation Figure 8 It is evident that the personalized initialization strategy achieves higher diagnostic accuracy in most training rounds, with an average accuracy improvement of 13.2% compared to directly downloading the global model for initialization. This is because, under Non-IID data distribution conditions, directly using the global model for initialization can easily cause local training to start from a region deviating from the local optimum, resulting in slow model convergence and gradient fluctuations. The personalized initialization strategy achieves a balance between federated collaboration and local personalization by retaining key parameters to maintain local feature representation while updating non-key parameters to integrate globally shared information. This strategy can alleviate the catastrophic forgetting problem under Non-IID data conditions, enabling the model to optimize from a position closer to its own optimum in each training round.
[0182] To further visualize the difference in diagnostic accuracy between the two initialization methods across different training rounds, a radar chart was plotted using the accuracy results from rounds 20 to 50 of global training. The results are as follows: Figure 9 As shown.
[0183] Through observation Figure 9 It can be seen that during the federated training process from round 20 to round 50, compared with the method of directly using a unified global model for initialization, the personalized initialization strategy showed better results in terms of overall diagnostic accuracy, performance in key training rounds, and training stability, and achieved higher and more stable fault diagnosis accuracy in most training rounds.
[0184] C. Comparative Experiments Before and After Introducing the Blockchain Framework
[0185] In a traditional federated learning architecture that does not incorporate blockchain technology, the central server, acting as the central hub, faces the risk of a single point of failure, and its operational results are as follows: Figure 10 As shown.
[0186] according to Figure 10 As can be seen, during the fifth training round, the central server experienced a permanent failure and went down, preventing clients from uploading local model parameters or obtaining the updated global model, thus interrupting the training process. This result reflects the limitations of traditional federated learning, which relies on a central server as a hub for parameter aggregation and distribution; its failure directly disrupts global coordination and local updates. To further verify the operational capabilities of the blockchain-enabled federated learning system under single-point-of-failure scenarios, the system operation results are as follows: Figure 11 As shown.
[0187] according to Figure 11 It is evident that even if a permanent failure occurs in the central server during the fifth training phase, the system can still continuously upload local model parameters and update the global model. This is because, under the decentralized framework of blockchain, the consensus mechanism can automatically elect new aggregation nodes, thereby ensuring that the training process is uninterrupted and effectively solving the single point of failure problem in traditional federated learning.
[0188] D. Comparative experiments before and after introducing a dynamic consensus mechanism based on reinforcement learning.
[0189] To evaluate the stability of the proposed reinforcement learning-based dynamic consensus mechanism in response to poisoning attacks, a "parameter inversion poisoning" attack was applied to client 1 at global rounds 5, 10, and 15. The differences in weight distribution among clients under the dynamic consensus mechanism and the baseline method (weighted by score) were compared and analyzed. A violin diagram was used to visualize the weight distribution characteristics of clients 1 through 4, allowing for analysis from both distribution characteristics and poisoning response aspects. The results are as follows: Figure 12 and Figure 13 As shown.
[0190] Through observation Figure 12 and Figure 13It is evident that the traditional method exhibits a severe polarization in weight distribution (the median difference between client 2 and client 1 is 0.26), and client 1's weight remains almost unchanged after the poisoning, making it unable to detect attacks. In contrast, the dynamic consensus mechanism results in more balanced weights across clients (the maximum median difference is only 0.06). After client 1's poisoning, while other clients show a few outliers, the overall weights remain stable within a reasonable range, effectively capturing attacks and controlling their impact. This is because the dynamic consensus mechanism, through a reinforcement learning policy network, comprehensively considers historical scores, current round scores, and global weights, achieving adaptive weight optimization. This effectively suppresses the poisoning effect and improves aggregation stability.
[0191] E. Comparative Experiment of Fault Diagnosis under Different Repulsion Boundaries
[0192] To optimize the rejection boundary of the missing class rejection loss, this study uses the median distance between the local prototype and the global prototype of the missing class as a benchmark, and sets thresholds of 1.0, 0.9, 0.7, and 0.5 times the benchmark for comparative experiments. The results are as follows: Figure 14 and Figure 15 As shown.
[0193] Through observation Figure 14 and Figure 15 It can be seen that when the repulsion distance threshold is 1.0 times the baseline distance, the model has the best convergence speed, overall accuracy and stability. The repulsion distance can be quickly adjusted and stabilized in a suitable range, and the control of prototype separation is better. Therefore, this threshold is selected as the optimal parameter.
[0194] F. Comparison experiment before and after introducing the Poincaré map
[0195] To verify the advantages of the Poincaré mapping in characterizing the hierarchical structure of fault features under different operating conditions, a comparative experiment was designed using Euclidean space and Poincaré space. Each client constructed a local class prototype for the fault category and then mapped it to both Euclidean and Poincaré spaces for modeling. The Euclidean space prototype served as the baseline method, while the Poincaré space prototype used hyperbolic geometry to characterize the relationships between classes. Taking client 2 as an example, its feature visualization results are as follows: Figure 16 As shown.
[0196] Through observation Figure 16It can be seen that sample misclassification exists both before and after the introduction of the Poincaré mapping, but the feature distributions differ significantly. In the Euclidean space (a), misclassification exists in regions L1, L2, L3, L5, L6, and L7, while feature aliasing occurs at L4, L5, and L6. In the Poincaré space (b), only a small amount of misclassification exists in regions L1 and L2, the sample boundaries are clearer, and misclassification and feature aliasing are significantly reduced. This is because the Poincaré mapping amplifies the feature distance near the boundary through hyperbolic geometry, resulting in a more compact and separable representation of the hierarchical structure between categories and the nonlinear discriminative boundary, thereby improving the discriminability and robustness of the class prototype.
[0197] G. Comparative experiment on fault diagnosis performance under different combinations of loss term weights
[0198] To determine the optimal weight allocation for each component in the total loss function, the prototype alignment loss weights are adjusted accordingly. With repulsion loss weight Conduct parameter combination experiments to... and We designed multiple comparative experiments using the values {0.1, 0.3, 0.5, 0.7, 0.9} to analyze the impact of different weight combinations on model performance. The results are as follows: Figure 17 As shown.
[0199] Through observation Figure 17 It can be seen that when the alignment loss weight is 0.7 and the rejection loss weight is 0.3, the model diagnostic accuracy of all four clients shows better performance, indicating that the weight combination can effectively balance the class alignment and missing class rejection constraints in cross-client scenarios, thereby improving the overall model performance.
[0200] H. Comparison experiment of the proposed method with other deep learning methods
[0201] To verify the classification performance of the proposed method, it was compared with FeaAvg.
[24] CNN, FedProto
[25] FedMR
[26] FedPer
[27] The results of the comparison between the FedORGP method and other methods are as follows: Figure 18 As shown.
[0202] according to Figure 18As can be seen, the diagnostic accuracy of the proposed method in this invention is consistently above 95% in four heterogeneous client scenarios (Client 1: 96.7%, Client 2: 99.9%, Client 3: 99.9%, Client 4: 99.9%), which is superior to the baseline methods. This performance advantage is the result of the core mechanism of the proposed method being specifically optimized for heterogeneous federated scenarios. The reason lies in the fact that the proposed method achieves fine-grained parameter updates through dynamic position masks. Masks are generated based on the magnitude of parameter changes, allowing "personalized parameters" adapted to local data to retain local updates while general "shared parameters" are updated globally in sync. This avoids both the "over-averaging" of full sharing and the "rigidity" of static partitioning. Therefore, it consistently outperforms coarse-grained update methods such as FedAvg and CNN in clients with heterogeneous data (1-4). Simultaneously, reinforcement learning is used to optimize the aggregation strategy. Contribution is perceived through "client ratings and historical weights," and aggregation weights are dynamically allocated and a leader is selected. This adapts to the dynamic performance differences of clients, enabling the proposed method to maintain a 1%-3% accuracy improvement compared to personalized methods such as FedMR, FedPer, and FedORGP. Furthermore, the design of hyperbolic space prototype alignment and missing class rejection utilizes the negative curvature of hyperbolic space to adapt to the hierarchical representation of heterogeneous features and geodesic distance to amplify class boundaries. Combined with missing class rejection, it avoids misclassification, ultimately achieving a performance lead of over 20% over FedProto in clients (3-4).
[0203] To further demonstrate the performance of the method proposed in this invention on different clients, the comparison results of the diagnostic accuracy of clients 1-4 under each method are as follows: Figure 19 As shown.
[0204] Through observation Figure 19 As can be seen, the accuracy curve of the proposed method is mostly at the top of all the compared methods in most rounds. With the increase in global rounds, its accuracy rapidly climbs and then stabilizes above 95%, reaching a peak of nearly 99.7%. FedAvg, FedPer, FedMR, and FedORGP perform next, with their accuracy eventually stabilizing in the 85%-95% range, but still lagging behind the proposed method. FedProto shows some improvement in the early stages, then plateaus and stabilizes at around 70%. CNN's accuracy increases the slowest, ultimately maintaining only between 65% and 75%. In summary, among these four methods, the proposed method outperforms FedAvg, CNN, and FedProto in both the speed of accuracy improvement and the final stable value, and is also slightly better than FedPer, FedMR, and FedORGP, fully demonstrating the excellent performance of the proposed method in federated learning tasks.
[0205] To further verify the fault diagnosis and feature representation capabilities of the proposed method on different clients, the diagnosis results for each client were visualized and analyzed. The confusion matrix and feature visualization results for each client are shown below. Figures 20 to 23 As shown.
[0206] Through observation Figure 20 As can be seen, the method proposed in this invention can achieve relatively accurate identification of most categories on client 1, and the feature space as a whole exhibits good intra-class compactness and inter-class separability. However, some confusion still exists between IR1, OR5, and OR10, with misclassification of OR10 to OR5, and OR5 to N and RMT, consistent with the local overlap phenomenon in the L1, L2, L3, and L4 regions. This indicates that under high-similarity fault modes, the discrimination boundaries between different categories still have a certain degree of ambiguity.
[0207] according to Figure 21 As can be seen, the proposed method exhibits stable overall classification performance on client 2, achieving almost completely correct classification for categories such as RMT, IR1, and IR5, with only OR1 showing a 3% misclassification. This misclassification mainly stems from the adjacent distribution relationship between OR1 and RMT and OR5 in the feature space, and the local overlap between the L1 and L2 regions further indicates that OR1 has obvious transitional characteristics.
[0208] Depend on Figure 22 As can be seen, the proposed method exhibits optimal classification stability on client 3, with most categories showing a full-value distribution along the main diagonal in the confusion matrix. The sample clusters of each category are compactly distributed in the feature space, with only local contact between RMT and N in the L1 region, corresponding to a slight misclassification of approximately 1% for the FMT category, verifying the high consistency between the feature structure and the classification results.
[0209] pass Figure 23 It can be observed that the method proposed in this invention maintains a high recognition accuracy on client 4. Only a small number of misclassifications occur among B10, RMT, and FMT (approximately 1% for B10 and RMT, and approximately 3% for FMT). Feature visualization results show that FMT and N are locally in contact in the L1 region, FMT and RMT are intertwined in the L2 region, and IR1 and B10 overlap, revealing the fundamental reason for the blurred feature boundaries under multi-class interference conditions.
[0210] The functions of the harmonic reducer fault diagnosis system based on blockchain personalized federated learning described in this embodiment can be explained by the aforementioned harmonic reducer fault diagnosis method based on blockchain personalized federated learning. Therefore, for the parts not described in detail in this embodiment, please refer to the above method embodiments, and they will not be repeated here.
[0211] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. The disclosure of the invention is illustrative and not restrictive, and the scope of the invention is defined by the appended claims.
[0212] The following documents are cited in this invention:
[0213] [1] Yao Xifan, Ma Nanfeng, Zhang Cunji, et al. Human-centered intelligent manufacturing: evolution and prospect [J]. Journal of Mechanical Engineering, 2022, 58(18): 2-15.
[0214] [2]Zhang YP, Wu J, Gao B, et al. Fault Types and Diagnostic Methods of Manipulator Robots: A Review [J]. Sensors, 2025, 25(6): 1716.
[0215] [3] Kang Shouqiang, Zhang Weidong, Wang Yujing, et al. Fault diagnosis method for harmonic reducers under different working conditions based on information fusion subdomain adaptation [J]. Journal of Instrumentation, 2024, 45(03): 60-71.
[0216] [4]KangS Q, QianL L, WangY J, et al. Fault Diagnosis Method for AHarmonic Reducer Under Variable Speed Based on SAH-SSET[J]. Vibration andShock, 2025, 44(22): 235-246.
[0217] [5]Tom AK, Khraisat A, Jan T, et al. Survey of Federated Learning for Cyber Threat Intelligence in Industrial IoT: Techniques, Applications andDeployment Models[J]. Future Internet, 2025, 17(9): 409.
[0218] [6]Xiao Y M, Shao H D, Lin J, et al. BCE-FL: A Secure and Privacy-Preserving Federated Learning System for Device Fault Diagnosis Under Non-IIDCondition in IIoT[J]. IEEE Internet of Things Journal, 2024, 11: 14241-14252.
[0219] [7]Moneesh N, Madhan S, Nair D, et al. FedHybrid: UnifyingAggregation Strategies to Optimize Federated Learning on Non-IID Dataset[J].Procedia Computer Science, 2025, 258: 3126-3134.
[0220] [8]Chen X M, He X L, Cheng D, et al. FedMEM: Adaptive PersonalizedFederated Learning Framework for Heterogeneous Mobile Edge Environments[J].International Journal of Computational Intelligence Systems. 2025, 18: 84.
[0221] [9]Cha N, Chang L. Addressing Non-IID with Data Quantity Skew inFederated Learning, Information, 2025, 16(10): 861.
[0222]
[10] Tang ZW, Xu SW, Jin HZ, et al. Personalized Federated Learningvia Decoupling Self-Knowledge Distillation and Global Adaptive Aggregation[J]. Multimedia Systems, 2025, 131: 31.
[0223]
[11] Hu HR, Kothari AN, Banerjee A. A Novel Algorithm for Personalized Federated Learning: Knowledge Distillation with WeightedCombination Loss[J]. Algorithms, 2025, 18(5): 274.
[0224]
[12] Han Y, Li X, Lin S, et al. A Random Projection Approach toPersonalized Federated Learning: Enhancing Communication Efficiency, Robustness, and Fairness[J]. Journal of Machine Learning Research, 2024, 25(380): 1–88.
[0225]
[13] Gao Yujia, Wang Pengfei, Liu Liang, et al. Personalized federated learning method based on attention-enhanced meta-learning network [J]. Computer Research and Development, 2024, 61(1): 196-208.
[0226]
[14] Sun YL, Kang SQ, Wang YJ, et al. Fault Diagnosis Method forHarmonic Reducer Based on Personalized Federated Aggregation Strategy withSkip Cycle Weight[J]. Measurement, 2025, 242: 116275.
[0227]
[15] Li H, Acharya K, Richtárik P. The Power of Extrapolation in Federated Learning[C]. Proceedings of NeurIPS, 2024.
[0228]
[16] Du Tian, Chen Xingyan, Kou Gang, et al. Clustering federated learning method for decoupling cloud-edge personalized models [J]. Chinese Journal of Computers, 2025, 48(2): 407-432.
[0229]
[17] Lee G, Jeong M, Kim S, et al. Fedsol: Federated StabilizedOrthogonal Learning with Proximal Restrictions in Federated Learning[C]. Proceedings of the IEEE / CVF Conference on Computer Vision and PatternRecognition, 2024: 12512-12522.
[0230]
[18] Abrar I, Sheikh J A. Current Trends of Blockchain Technology:Architecture, Applications, Challenges, and Opportunities[J]. DiscoverInternet of Things, 2024, 4: 7.
[0231]
[19] Liu JJ, Wu J H. A Comprehensive Survey on Blockchain Technology and Its Applications[J]. Highlights in Science Engineering and Technology, 2024, 85: 128-138.
[0232]
[20] Chen XT, He SL, Sun LF, et al. A Survey of ConsortiumBlockchain and Its Applications[J]. Cryptography, 2024, 8(2): 12.
[0233]
[21] Shao Haidong, Xiao Yiming, Min Zhishan, et al. Fault diagnosis framework of federated learning empowered by blockchain and edge computing [J]. Journal of Mechanical Engineering, 2023, 59(21): 283-292.
[0234]
[22] Xu MH, Zou ZR, Cheng Y, et al. SPDL: A Blockchain EnabledSecure and Privacy Preserving Decentralized Learning System[J]. IEEETransactions on Computers, 2023, 72: 548-558.
[0235]
[23] Li J, Liu CL, Lin MW, et al. Comprehensive Survey of BlockchainConsensus Mechanisms: Analysis, Applications, and Future Trends[J]. ComputerNetworks, 2025, 272: 111661.
[0236]
[24] McMahan B, Moore E, Ramage D, et al. Communication-EfficientLearning of Deep Networks from Decentralized Data[C]. Proceedings of the 20thInternational Conference on Artificial Intelligence and Statistics, 2017, 54:1273-1282.
[0237]
[25] Tan Y, Long G D, Liu L, et al. FedProto: Federated PrototypeLearning across Heterogeneous Clients[C]. Proceedings of the AAAI Conferenceon Artificial Intelligence[C], 2022, 36(8): 8432-8440.
[0238]
[26] Fan Z Q, Yao J C, Zhang R P, et al. Federated Learning underPartially Class-Disjoint Data via Manifold Reshaping[C]. arXiv preprintarXiv, 2024: 2405.18983.
[0239]
[27] Arivazhagan M G, Aggarwal V, Singh A K, et al. Federated Learningwith Personalization Layers[C]. arXiv preprint arXiv, 2019: 1912.00818.
Claims
1. A method for fault diagnosis of harmonic reducers based on blockchain-based personalized federated learning, characterized in that, include: Step 1: Data Acquisition and Preprocessing A vibration signal experimental platform for a harmonic reducer was built. One-dimensional vibration signal data under different working conditions and all states were collected using a vibration acceleration sensor. The one-dimensional vibration signal was then converted into a two-dimensional time-frequency spectrum that can characterize time-frequency features through wavelet transform. Based on the working conditions and fault categories, sample data were divided to construct local datasets for each client, providing a data foundation for the subsequent training of personalized federated fault diagnosis models. Step 2: Model Building and Personalization Initialization Each client constructs a local fault diagnosis model based on residual networks to extract deep fault features of the harmonic reducer from the two-dimensional time-spectrum graph; Each client downloads the previous round of global feature extractor and global class prototype from the blockchain distributed nodes, and performs personalized initialization based on the perceptual mask parameter decoupling strategy; Step 3: Local model training with class prototype constraints Each client uses local data and global class prototypes to train the personalized initial model locally; the sample features extracted by the personalized initial model are mapped to the Poincaré sphere space, and the hyperbolic features of similar samples are aggregated by Möbius average to generate local class prototypes; a total loss function including cross-entropy loss, prototype alignment loss and missing class rejection loss is constructed, and the model parameters are iteratively optimized based on the total loss to obtain the updated feature extractor parameters and local class prototypes; Step 4: Dynamic Consensus Aggregation and Leader Determination Each client uploads the updated feature extractor parameters and local class prototypes to the blockchain consensus node. Based on the reinforcement learning dynamic consensus mechanism, the consensus node constructs the state information of the reinforcement learning policy network according to each client's current round score, previous round historical score, and previous round aggregation weight, and generates the global aggregation weight allocation vector for the current round. The feature extractor parameters are then subjected to ordinary weighted aggregation based on the weight allocation vector, and the local class prototypes uploaded by each client are subjected to weighted Möbius average aggregation to obtain the updated global feature extractor and global class prototype. The client with the highest weight is determined as the consensus leader node to complete the aggregation result verification and network-wide confirmation, thus replacing the traditional centralized aggregation model. Step 5: On-chain evidence storage and iterative updates The verified global feature extractor parameters, global class prototypes, and their hash verification information are uploaded to the blockchain for notarization, forming an immutable and traceable model update record, which serves as a trusted global update benchmark for the next round of training; after this round, the next round of iteration begins. Each client returns to step two and repeats the personalized initialization, local training, dynamic consensus aggregation and on-chain update process until the fault diagnosis performance of the global model converges. Step Six: Fault Diagnosis The one-dimensional vibration signal of the harmonic reducer to be diagnosed is converted into a two-dimensional time spectrum using wavelet transform, and then input into the trained personalized federated fault diagnosis model to obtain the diagnosis results.
2. The method for fault diagnosis of harmonic reducers based on blockchain personalized federated learning according to claim 1, characterized in that, The initialization strategy based on perceptual mask parameter decoupling described in step two is as follows: Step 2.1: Generation of the initial position mask based on parameter changes During the first round of training, the client downloads the global feature extractor and trains it using the local dataset. It calculates the changes in model parameters before and after training, sorts the model parameters based on these changes, and classifies them into critical and non-critical parameters based on a preset threshold. The location mask for critical parameters is represented as follows: The non-critical parameter location mask is represented as follows: in, This represents the mask for the location of key parameters in the first round; This represents the mask for the location of non-critical parameters in the first round; Indicates a preset threshold; This indicates the amount of change in the model parameters; Indicates the relationship with the first The unit mask value corresponding to each parameter position; Step 22: Feature Extractor Fusion and Mask Update Based on Historical Location Masks During non-first rounds of training, the client uses the position mask from the previous round as a guide to selectively fuse the global feature extractor parameters of the current round and the local feature extractor parameters from the previous round to obtain the personalized feature extractor for the current round. The fusion process is as follows: in, Indicates the first Personalized feature extractor parameters obtained from round fusion; Indicates the first Round global feature extractor parameters; Indicates the first Round local feature extractor parameters; and They represent the first Position masks for critical and non-critical parameters of the wheel; This represents the Hadamard operation; The client trains the personalized feature extractor using a local dataset and updates the position mask based on the parameter changes before and after training for personalized initialization in subsequent training rounds.
3. The method for fault diagnosis of harmonic reducers based on blockchain personalized federated learning according to claim 1, characterized in that, The Poincaré sphere model described in step three is one of the commonly used representations of hyperbolic space. Let the embedding space dimension be . ,but The hyperbolic space corresponding to the Viponcaré sphere model is Any two points in space The hyperbolic distance under the Poincaré sphere is expressed as: in, It is an inverse hyperbolic cosine function; and is the Poincaré sphere metric factor, which reflects the curvature characteristics of hyperbolic space as a function of position; The sample features extracted by the personalized initial model are mapped to the Poincaré sphere space, and the projection function is: in, This represents the input feature vector. Let the radius of the Poincaré sphere be... Representing vectors norm, The set threshold is used to determine whether to perform a projection operation; The Möbius average aggregation refers to calculating the hyperbolic geometric center of the feature prototype of the same type of sample in the Poincaré sphere based on Möbius geometric operations, so as to obtain the local class prototype of the corresponding fault category.
4. The method for fault diagnosis of harmonic reducers based on blockchain personalized federated learning according to claim 1, characterized in that, The total loss function mentioned in step three is: in, Represents cross-entropy loss; Indicates the prototype alignment loss; This indicates the missing category exclusion loss; and For custom parameters; The cross-entropy loss Represented as: in, For the sample size, Indicates the first The label of each sample, Indicates the first Features of each sample Predict samples for the model Category The probability of; The prototype alignment loss To enhance the consistency of similar fault characteristics across clients, it is represented as: in, It is a client The The representation of a sample in the Poincaré sphere model, Indicates the first Each sample corresponds to a label. The global prototype It is the first In each client, the tag is Total number of categories It is a client The total number of samples, It is a tiny constant to prevent the denominator from being zero. This represents the geodesic distance under the Poincaré sphere model; The missing category rejection loss The hyperbolic distance used to increase the local sample features and the global hyperbolic class prototype of the missing category is expressed as: in, Indicates category The global prototype The rejection threshold, Indicates the client The set of categories that exist in the dataset; the loss function utilizes a hinged loss form, such that when Gradients are generated at that time.
5. The method for fault diagnosis of harmonic reducers based on blockchain personalized federated learning according to claim 1, characterized in that, The reinforcement learning-based dynamic consensus mechanism described in step four includes client-side model performance scoring and dynamic aggregation weight allocation. Each client uses its own local dataset as an evaluation benchmark to assess the performance of local models uploaded by other clients, and forms a client-side model score based on the evaluation results. The metric is as follows: in, Representing the The global model after round aggregation, Representing the Wheel client The trained local model; Representation Model In the client Cross-entropy loss on the dataset; Quantified the client The local model, compared to the previous global model, is more advanced on the client side. Improvements in data; The model's overall score is obtained by averaging the scores from all its clients, and is expressed as follows: in, For the client The model number The round's score is used to characterize the model's performance and to construct the reinforcement learning state.
6. A method for diagnosing harmonic reducer faults based on blockchain-based personalized federated learning, as described in claim 1 or 5, characterized in that, The state information of the reinforcement learning policy network The action output is composed of the current score from each client, the historical score from the previous round, and the global aggregate weight from the previous round. Assign a vector to the aggregate weights for the current round, with the objective function being: in, This represents the total global model revenue for the current round; For the first Wheel client The aggregation weight, which also represents the first... The predicted probability of the leader in a round; Indicates the first Wheel client Model score; Indicates the client Weighted contribution in the current round; For the first Wheel client Aggregate weights; Indicates the first Wheel client Model score; Indicates the client Weighted contribution in the previous round; Used to measure clients The incremental contribution to the global model's return in the current round.
7. A harmonic reducer fault diagnosis system based on blockchain-based personalized federated learning, characterized in that, The system has a program module corresponding to the steps of the method described in any one of claims 1 to 6, and executes the steps in the above-described blockchain personalized federated learning harmonic reducer fault diagnosis method when running.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program configured to, when invoked by a processor, implement the steps of the harmonic reducer fault diagnosis method for blockchain personalized federated learning as described in any one of claims 1 to 6.