Mechanical transmission equipment fault diagnosis method based on intelligent agent and block chain
By publishing the initial diagnostic model in the blockchain network and combining it with a fixed classifier synthesized from an isoangular tight frame and a local adaptive optimization strategy, the problems of data privacy protection and inconsistent label distribution in federated learning are solved, thereby improving the accuracy and robustness of fault diagnosis for mechanical transmission equipment.
Patent Information
- Application Number
- CN202511290614.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-12-09
AI Technical Summary
Existing federated learning methods for fault diagnosis of mechanical transmission equipment suffer from issues such as data privacy protection, classifier bias due to inconsistent data label distribution, and insufficient model robustness, especially in scenarios with imbalanced fault categories, making it difficult to achieve high-precision diagnosis.
A fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain is adopted. By publishing the initial diagnostic model in the blockchain network and performing local training and secure aggregation, combined with a fixed classifier synthesized by isoangular tight frame and a local adaptive optimization strategy, the stability and accuracy of the diagnostic model are improved.
It alleviates classifier bias caused by inconsistent data label distribution, improves the identification accuracy and robustness of fault diagnosis for mechanical transmission equipment, adapts to the local data environment of different enterprises, and achieves efficient fault diagnosis.
Smart Images

Figure CN121093786A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet big data and information security, and particularly relates to a mechanical transmission equipment fault diagnosis method based on an intelligent agent and a block chain. BACKGROUND
[0002] Gearbox is an important part of mechanical transmission system, with the functions of speed change, torque adjustment, transmission direction change, etc., and is widely used in various mechanical equipment such as machine tools, wind turbines, mining machinery, etc. However, with the high dependence of industrial production on the stable operation of the gearbox, once the gearbox fails, it will have a serious impact on the performance of the related mechanical equipment and the production efficiency of the enterprise. Therefore, the fault diagnosis of the gearbox and other mechanical transmission equipment as a key technical means has attracted widespread attention from the industry and academia. Traditionally, the fault diagnosis of mechanical transmission equipment mainly relies on the knowledge and experience of equipment maintenance personnel, and this diagnosis method has low accuracy and is difficult to realize real-time fault diagnosis. The development of industrial Internet of Things and big data technology provides data support for data-driven mechanical transmission equipment fault diagnosis methods. Industrial Internet of Things realizes real-time monitoring and data collection of production equipment state by connecting sensors and production equipment to the network. With the rapid increase in the amount of data collected by industrial Internet of Things, it has become popular for enterprises to use deep learning technology for mechanical transmission equipment fault diagnosis.
[0003] However, the deep learning-based mechanical transmission equipment fault diagnosis method needs to collect a large amount of vibration signals, power data, temperature data, etc. and label these data according to the health status of the mechanical transmission equipment for training of the diagnosis model, which is usually unrealistic for small and medium-sized enterprises with a small number of production equipment. On the other hand, enterprises in the same industry usually use similar production equipment to complete similar production tasks, resulting in similar mechanical transmission equipment health status operation data collected by these enterprises. Therefore, a potential solution to the problem of insufficient data quantity for small and medium-sized enterprises is to aggregate the mechanical transmission equipment health status diagnosis signal data collected by different enterprises into a larger data set, and the fault diagnosis model developed and trained based on this data set can usually achieve high diagnosis accuracy. However, due to potential conflicts of interest between different enterprises or concerns about data privacy leakage, enterprises are often reluctant to share the collected mechanical transmission equipment operation data.
[0004] As a new distributed machine learning method, federated learning provides an effective solution to the above problems. Federated learning avoids the sharing of raw data by training and updating the model on distributed devices, thereby solving the problems of data privacy leakage and conflicts of interest. However, as Figure 1As shown, the traditional federated learning architecture usually relies on a central server for the aggregation of the global diagnostic model, which is often the root of failure and security problems. First, the failure of the central server will cause the collapse of the entire federated learning system, thereby directly affecting the progress of distributed training. Second, the traditional federated learning architecture usually assumes that the intelligent agents participating in federated learning are honest and reliable. However, in reality, malicious intelligent agents may send harmful model updates to the central server to disrupt the distributed training process. In addition, the model aggregation program in the central server may be maliciously tampered with, causing the global diagnostic model to be unable to be correctly aggregated, which greatly hinders the large-scale application of federated learning.
[0005] In addition, the same type of production equipment may work in different working conditions in different enterprises. Therefore, the data collected by different intelligent agents often have the problem of imbalance of fault categories, that is, the label distribution is skewed. The label distribution skew phenomenon will cause the decision boundary of the low-frequency class to be fuzzy, affecting the recognition accuracy of the model for low-frequency class faults. The classic class imbalance fault diagnosis method needs to design a reweighting strategy based on the global data distribution, but in the federated learning scenario, the data of intelligent agents cannot be directly shared and is difficult to be directly applied.
[0006] Therefore, it is necessary to study a mechanical transmission equipment fault diagnosis method without directly sharing raw data to cope with the label distribution skew challenge of wide-area data. SUMMARY
[0007] In view of the deficiencies of the prior art, the present application provides a mechanical transmission equipment fault diagnosis method based on intelligent agents and blockchains, which solves the problem that the existing federated learning method causes the decision boundary to be fuzzy in the fault class imbalance scenario, and improves the diagnosis and recognition accuracy of intelligent agents based on local private local data for mechanical transmission equipment faults.
[0008] In order to solve the above technical problems, the present application adopts the following technical solutions:
[0009] A mechanical transmission equipment fault diagnosis method based on intelligent agents and blockchains, comprising the following steps:
[0010] S1: a task publisher publishes an initial diagnostic model for mechanical transmission equipment fault diagnosis to a blockchain network as an initialized global diagnostic model in the blockchain network, and stores it in an interplanetary file system (IPFS); the global diagnostic model comprises a feature extractor, a projection layer and a classifier connected in turn; the classifier adopts a fixed classifier based on an isometric tight frame synthesis;
[0011] S2: Each wide-area intelligent agent participating in the task linking in the blockchain network obtains the storage address of the current global diagnostic model in the InterPlanetary File System (IPFS) and downloads the current global diagnostic model from IPFS.
[0012] S3: Each wide-area intelligent agent trains the feature extractor and projection layer in the global diagnostic model locally based on its own local private mechanical transmission equipment fault operation dataset, and then uploads the trained local update diagnostic model to the blockchain network.
[0013] S4: The blockchain network aggregates the local update diagnostic models uploaded by different wide-area intelligent agents in a federated manner based on a secure aggregation strategy to generate candidate global diagnostic models. The consensus mechanism is used to verify the candidate global diagnostic models. The candidate global diagnostic models that pass the consensus verification are used as the final global diagnostic models for this round of updates and are updated and stored in the InterPlanetary File System (IPFS).
[0014] S5: The blockchain network determines whether the iterative training termination condition has been met; if not, steps S2 to S4 are repeated to perform the next round of global diagnostic model iterative training and update; if the condition is met, the iterative training terminates and the final global diagnostic model is obtained.
[0015] S6: The wide-area intelligent agent obtains the storage address of the finally updated global diagnostic model in the InterPlanetary File System (IPFS) from the blockchain network, downloads the finally updated global diagnostic model from IPFS, and optimizes and adjusts the global diagnostic model using a local adaptive optimization strategy to obtain a personalized fault diagnosis model adapted to the local mechanical transmission equipment operation data, which is used for real-time fault diagnosis of mechanical transmission equipment.
[0016] As a preferred embodiment, in step S1, the feature extractor in the global diagnostic model... Used to extract features from the input mechanical transmission equipment operation data x, obtaining the original features r; projection layer This is used to map the original feature r to an isoangular compact frame feature space, and to generate a normalized feature ν through normalization; a fixed classifier U is used. ETF Used to classify and identify fault types of mechanical transmission equipment based on the standardized feature v, and to obtain fault identification and diagnosis results of mechanical transmission equipment.
[0017] The parameter ω of the global diagnostic model is represented as ω={ω feat ,ω p ,U};where, ω feat Fω represents the feature extractor feat The parameter, ω p Indicates projection layer The parameters are both learnable parameters; U represents the fixed classifier U based on the isoangular tight frame. ETF The parameter matrix; the original feature r and the standardized feature v are respectively represented as:
[0018] r=F(ω feat ;x);
[0019]
[0020] Where, F(ω) feat ;x) represents the feature extractor Used for feature extraction processing of input mechanical transmission equipment operation data x; G(ω) p ;r) Representing projection layers The processing and results used to map the original feature r to the isoangular compact frame feature space; ||·||2 represents the L2 norm operation.
[0021] As a preferred embodiment, the fixed classifier U ETF The parameter matrix U is randomly synthesized by the task issuer using a simplex isoangular compact frame, and has the following properties:
[0022]
[0023] Wherein, parameter matrix d represents the dimension of the equiangular tight frame, and A represents the number of fault types in the mechanical transmission equipment. A represents the classifier weight vector in parameter matrix U corresponding to the fault type of the i-th mechanical transmission equipment, where i = 1, 2, ..., A; Let W be a random rotation matrix, and satisfy W T W = I A ;T is the transpose symbol;I A It is an A×A identity matrix; 1 A Let A be a column vector of all 1s.
[0024] As a preferred embodiment, in step S3, for any wide-area agent k, k∈{1,2,…,M}, where M represents the total number of wide-area agents participating in the task linking, the wide-area agent k, in any t-th round of training, trains the current global diagnostic model to obtain a locally updated diagnostic model through the following steps:
[0025] S301: The wide-area intelligent agent k pre-collects local mechanical transmission equipment operation sample data, and uses prior knowledge to label the mechanical transmission equipment fault types corresponding to the local mechanical transmission equipment operation sample data with real fault category labels, thus forming a local private mechanical transmission equipment fault operation dataset.
[0026] S302: The wide-area agent k obtains the current global diagnostic model. The global diagnostic model uses the mechanical transmission equipment operation sample data from the local private mechanical transmission equipment fault operation dataset. The input is used to optimize the global diagnostic model using the point regression loss function as the objective. The feature extractor and projection layer parameters are trained locally to obtain the trained locally updated diagnostic model.
[0027] S303: The wide-area agent k will locally update the diagnostic model obtained from the training. Sign and package to generate a local model update transaction Uploaded to the blockchain network.
[0028] As a preferred embodiment, in step S302, the point regression loss function is expressed as:
[0029]
[0030] Among them, L dr (v y U) is the point regression loss function; v y This represents the standardized features of the mechanical transmission equipment operation sample data (labeled y) after inputting into the global diagnostic model, processing through the projection layer, and then inputting into the classifier; U represents the parameter matrix of the classifier in the global diagnostic model; u y T represents the classifier weight vector in parameter matrix U corresponding to the fault type y of mechanical transmission equipment; T is the transpose symbol.
[0031] Point regression loss function L dr (v y U) for standardized feature v y gradient Represented as:
[0032]
[0033] Wherein, cos∠(v y ,u y ) represents the standardized feature v y and classifier weight vector u y The cosine similarity.
[0034] As a preferred embodiment, in step S6, the local adaptive optimization strategy includes two stages: local feature extractor adaptive optimization and local classifier adaptive optimization.
[0035] The parameter ω of the global diagnostic model is represented as ω={ωfeat ,ω p ,U};where, ω feat Feature extractor The parameter, ω p Indicates projection layer The parameter U represents the fixed classifier U based on the isoangular tight frame. ETF The parameter matrix; in each stage of the local adaptive optimization strategy, the fixed parameters are defined as... The parameters for optimization and adjustment are defined as follows:
[0036] In the adaptive optimization stage of the local feature extractor, let
[0037] In the local classifier adaptive optimization phase, this includes fixing the classifier U... ETF and projection layer Alternating adaptive optimization; for a fixed classifier U ETF When performing adaptive optimization, let On the projection layer When performing adaptive optimization, let
[0038] For any wide-area agent k, in each stage of the local adaptive optimization strategy, the objective function of each adaptive optimization stage is... for:
[0039]
[0040] in, Normalized loss function:
[0041]
[0042] in, Represents the cross-entropy loss function; n s,k This represents the number of data samples representing the local mechanical transmission equipment operation data of the wide-area intelligent agent k. These represent the operating data of the i-th local mechanical transmission device of the wide-area intelligent agent k and the corresponding real fault category label of the mechanical transmission device fault type. This represents the operating data of the i-th local mechanical transmission device of the wide-area intelligent agent k. The standardized features input to the global diagnostic model are processed by the projection layer and then fed into the classifier; y This indicates the fault type of the corresponding mechanical transmission equipment in the parameter matrix U. The classifier weight vector; u aLet T represent the classifier weight vector in parameter matrix U corresponding to the a-th mechanical transmission equipment fault type, where a = 1, 2, ..., A, and A represents the number of mechanical transmission equipment fault types; T is the transpose symbol.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] 1. This invention designs an interactive framework and method for fault diagnosis of mechanical transmission equipment by combining the interaction capabilities of wide-area data and intelligent agents. This enables fault diagnosis of mechanical transmission equipment. A fixed classifier based on isoangular tight frame synthesis is used as the classifier of the global diagnosis model to alleviate classifier bias caused by inconsistent data label distribution. The parameters of the feature extractor and projection layer in the global diagnosis model are trained to improve the stability of the decision boundary of the global diagnosis model in scenarios with imbalanced fault categories. Furthermore, an adaptive optimization strategy is designed for local mechanical transmission equipment operating data to improve the diagnostic accuracy of the intelligent agent in identifying mechanical transmission equipment faults based on local private local operating data using the global diagnosis model.
[0045] 2. In constructing the global diagnostic model, the method of this invention, based on the neural collapse theory, clarifies that under balanced and sufficient data conditions, the optimal structure of the classifier and feature prototype is Simplex ETF, which must satisfy properties such as equal L2 norm of vectors, the same angle between any two vectors, and reaching the maximum equiangular separation value. The federated learning task publisher randomly synthesizes this fixed classifier based on Simplex ETF when initializing model parameters. The classifier dimension must meet specific conditions, and the classifier vector of each fault category must meet the norm and angle requirements. A projection layer is introduced into the model architecture to map the original features output by the feature extractor to a lower-dimensional space and perform normalization processing to generate standardized features. At the same time, a point regression loss function is designed to guide the standardized features to align with the fixed classifier vector of the corresponding category ETF to adapt to the fixed classifier, thereby alleviating the classifier bias problem caused by inconsistent data label distribution.
[0046] 3. In the fault diagnosis stage of mechanical transmission equipment implemented by the intelligent agent, the method of the present invention also optimizes the global diagnostic model in two stages through a local adaptive optimization strategy. The first stage is local feature extractor adaptive optimization, which fixes the ETF classifier and projection layer parameters and optimizes only the feature extractor parameters. The second stage is local classifier adaptive optimization, which alternately optimizes the ETF classifier and projection layer parameters. That is, first fix the feature extractor and projection layer parameters to optimize the ETF classifier, and then fix the feature extractor and ETF classifier parameters to optimize the projection layer. In each stage, the cross-entropy loss function is used to calculate the loss and update the parameters. Through the two-stage collaborative optimization, the adaptability of the global diagnostic model to local data and the accuracy of personalized diagnosis are improved. Attached Figure Description
[0047] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0048] Figure 1 For traditional federated learning architecture;
[0049] Figure 2 This is a schematic diagram of the intelligent agent interaction framework structure used in the mechanical transmission equipment fault diagnosis method based on wide-area data and federated learning of this invention.
[0050] Figure 3 This refers to the classifier bias caused by skewed label distribution in federated learning.
[0051] Figure 4 This is FedFix's local adaptive optimization strategy;
[0052] Figure 5 Fault modes of the HUST dataset experimental platform and damaged gears;
[0053] Figure 6 Failure modes of the internal structure and gears of the WT planetary gearbox;
[0054] Figure 7 For feature alignment and neural collapse errors between FedFix and FedAvg;
[0055] Figure 8 Ablation experiments were conducted to analyze the effects of projection layer and point regression loss.
[0056] Figure 9 The impact of feature dimensions on the performance of the FedFix global diagnostic model;
[0057] Figure 10 This study analyzes the impact of local adaptive optimization strategies on the performance of FedFix personalized diagnostics. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0059] To address the challenges of existing technologies in federated modeling for mechanical transmission equipment fault diagnosis based on wide-area data, such as limitations in data privacy protection, applicability to scenarios with non-independent and identically distributed data, robustness of federated learning, and the decreased accuracy of diagnostic models in identifying fault categories with scarce samples due to the imbalance of fault categories in wide-area data, this invention provides a fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain. By employing a fixed classifier synthesized based on an equiangular tight frame as the classifier for the global diagnostic model, this invention aims to solve the aforementioned problems and improve the diagnostic accuracy of intelligent agents in identifying mechanical transmission equipment faults based on local private domain data.
[0060] The present invention will now be described in further detail.
[0061] This invention provides a fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain, comprising the following steps:
[0062] S1: The task publisher publishes an initial diagnostic model for fault diagnosis of mechanical transmission equipment to the blockchain network, which serves as the initialized global diagnostic model in the blockchain network and is stored in the InterPlanetary File System (IPFS). The global diagnostic model includes a feature extractor, a projection layer, and a classifier connected in sequence. The classifier adopts a fixed classifier based on isoangular tight frame synthesis.
[0063] S2: Each wide-area intelligent agent participating in the task linking in the blockchain network obtains the storage address of the current global diagnostic model in the InterPlanetary File System (IPFS) and downloads the current global diagnostic model from IPFS.
[0064] S3: Each wide-area intelligent agent trains the feature extractor and projection layer in the global diagnostic model locally based on its own local private mechanical transmission equipment fault operation dataset, and then uploads the trained local update diagnostic model to the blockchain network.
[0065] S4: The blockchain network aggregates the local update diagnostic models uploaded by different wide-area intelligent agents in a federated manner based on a secure aggregation strategy to generate candidate global diagnostic models. The consensus mechanism is used to verify the candidate global diagnostic models. The candidate global diagnostic models that pass the consensus verification are used as the final global diagnostic models for this round of updates and are updated and stored in the InterPlanetary File System (IPFS).
[0066] S5: The blockchain network determines whether the iterative training termination condition has been met; if not, steps S2 to S4 are repeated to perform the next round of global diagnostic model iterative training and update; if the condition is met, the iterative training terminates and the final global diagnostic model is obtained.
[0067] S6: The wide-area intelligent agent obtains the storage address of the finally updated global diagnostic model in the InterPlanetary File System (IPFS) from the blockchain network, downloads the finally updated global diagnostic model from IPFS, and optimizes and adjusts the global diagnostic model using a local adaptive optimization strategy to obtain a personalized fault diagnosis model adapted to the local mechanical transmission equipment operation data, which is used for real-time fault diagnosis of mechanical transmission equipment.
[0068] This invention designs an interactive framework and method for fault diagnosis of mechanical transmission equipment by combining the interaction capabilities of wide-area data and intelligent agents. It employs a fixed classifier based on isoangular tight frame synthesis as the classifier for the global diagnostic model, mitigating classifier bias caused by inconsistent data label distribution. Furthermore, it trains the parameters of the feature extractor and projection layer in the global diagnostic model to improve the stability of the decision boundary in scenarios with imbalanced fault categories. Finally, it designs an adaptive optimization strategy for local mechanical transmission equipment operating data to enhance the diagnostic accuracy of the agent based on local private operating data using the global diagnostic model.
[0069] In specific application scenarios, this invention also addresses the key needs of SMEs, such as data privacy protection, non-independent and co-distributed data processing capabilities, and the robustness of federated learning. By leveraging decentralized blockchain technology and a federated learning framework, it solves the problems of single point of failure and illegal aggregation of global diagnostic models. At the same time, it introduces IPFS technology to reduce the storage pressure on the blockchain and uses VRF technology to ensure that all nodes in the decentralized network reach consensus on the blockchain state and transaction data without trust.
[0070] In practical applications, the wide-area data intelligent agent interaction framework used in the mechanical transmission equipment fault diagnosis method based on intelligent agents and blockchain proposed in this invention is as follows: Figure 2 As shown, it mainly consists of a wide-area intelligent agent layer, a blockchain network layer, and an application layer. The wide-area intelligent agent layer includes an execution unit, a mechanical transmission equipment operation data perception and processing module, and a model training module. It is responsible for collecting and processing local mechanical transmission equipment operation data such as vibration signals, power data, and temperature data, as well as using local data to train a locally updated diagnostic model and uploading it to the blockchain. The blockchain network layer can resist poisoning attacks through a diagnostic model aggregation strategy based on credibility scoring, verify the legitimacy of the global diagnostic model through a committee consensus mechanism based on VRF, and combine IPFS to realize on-chain and off-chain storage of the model. The application layer is used to develop a fault diagnosis system that includes modules such as equipment management and model management, and realizes model deployment and fault diagnosis applications.
[0071] To better illustrate the technical solution of this invention, the following sections will provide a detailed description.
[0072] I. Definition of Traditional Federated Learning
[0073] The core idea of federated learning is to gradually optimize the global diagnostic model by having each agent train a model locally and share the local model without sharing the original data. In a federated learning task for fault diagnosis of mechanical transmission equipment, assume there are M distributed agents participating in the federated learning over a wide area, and each agent k (1≤k≤M) holds a private dataset. in This represents the operational data sample of the i-th mechanical transmission device in agent k. This represents the true fault category label for the mechanical transmission equipment fault type corresponding to the sample, n. s,k This indicates that dataset D s,k The number of samples in the middle. The goal of the federated mechanical transmission equipment fault diagnosis method is to enable the various source agents to collaboratively train a parameter ω={ω feat ,ω cls A deep neural network} where ω feat ω represents the parameters of the feature extractor. cls Then, this represents the parameters of the classifier. Its global objective function is:
[0074]
[0075] Where f k (ω) is the local objective function of agent k, which can be expressed as:
[0076]
[0077] in, Representing data points The loss value.
[0078] This invention assumes that each agent contributes equally to the global diagnostic model. The core objective of the federated learning method, which does not consider differences in data distribution, is to train the model on the local data of multiple agents to minimize the loss of the global diagnostic model across these source agent data distributions. However, this approach has significant limitations in real-world industrial scenarios. This is because, in federated fault diagnosis scenarios based on wide-area data, the data distribution of distributed agents may exhibit significant heterogeneity due to factors such as environment and equipment operating conditions. Specifically, this manifests as a skewed data label distribution, i.e., p i (y)≠p j (y). This distribution skewness causes the assumption of independent and identically distributed data in classical federated learning algorithms to fail, making the local objective function f... kThe generalization bias between f(ω) and the global objective function f(ω) is significant, which makes it difficult to guarantee the performance of the classic federated learning algorithm.
[0079] II. The Theory of Neural Collapse and the Construction of a Global Diagnostic Model
[0080] When the data labels of distributed agents are inconsistent, the performance degradation of classical federated learning methods mainly stems from the bias in the parameters of the classifiers in the local models of the agents. Therefore, the choice of classifier is particularly important in the construction of a global diagnostic model.
[0081] Compared to feature extractors, classifiers are more sensitive to inconsistent data label distribution. Furthermore, this classifier parameter bias can create a vicious cycle with misaligned feature representations across agents. To more intuitively demonstrate how skewed data label distribution leads to classifier bias, experiments were conducted on the HUST dataset based on the classic federated learning method FedAvg, controlling the degree of agent label distribution skew using the Dirichlet distribution parameter β. Experimental results are as follows: Figure 3 As shown in the figure, it can be intuitively seen that as the degree of label distribution skew increases, the cosine similarity between different agent classifiers decreases significantly. Further visualization of the classifiers using t-SNE technology, with different colors distinguishing classifier vectors for different fault categories, reveals that the increased label distribution skew causes the classifier vectors of the distributed agents to become more divergent in the embedding space, leading to a significant decrease in the model's generalization ability. Inspired by neural collapse theory, this invention proposes a new global diagnostic model architecture to alleviate the classifier bias problem and thus improve fault diagnosis performance in scenarios with inconsistent data label distribution.
[0082] To address the issue of spatial heterogeneity in the frequency of fault types in geographically dispersed mechanical transmission equipment due to variations in environmental temperature and humidity, leading to an imbalance in fault categories within a wide-area mechanical transmission equipment dataset, and consequently, decreased accuracy of diagnostic models in identifying fault categories with scarce samples, this invention introduces neural collapse theory into federated learning. It clarifies the characteristics of a well-trained ideal classifier and designs a fixed classifier structure based on ETF to mitigate the negative impact of agent classifier bias on feature learning. Furthermore, by introducing modules such as projection layers and point regression loss functions, the generalization performance of the model under skewed label distribution data is effectively improved. Finally, after global training, local model fine-tuning is performed to effectively improve the personalized fault diagnosis performance of the local model while maintaining its generalization advantages.
[0083] Neural collapse is a feature space structuring phenomenon exhibited by deep neural networks in the late training stage on balanced datasets. Its core characteristic is that the feature prototypes and classifier vectors converge to a simplex equiangular tight frame (Simplex ETF). Within this frame, both feature vectors and classifier weights satisfy the unit norm constraint, and the angle between any two vectors is maximized, forming a highly symmetrical geometric structure. This configuration achieves maximum inter-class separability and minimum intra-class variability in the feature space, revealing the implicit regularization mechanism of overparameterized models.
[0084] A well-trained classifier on a balanced and sufficient dataset will eventually converge to the Simplex ETF, which is defined as:
[0085] Suppose a set of vectors Let i = 1, 2, ..., A, where A represents the number of fault types in mechanical transmission equipment, and the dimension d satisfies d ≥ A - 1. If these vectors satisfy the following relationship, then they are said to constitute a SimplexETF:
[0086]
[0087] in, This represents the classifier weight vector in the parameter matrix U corresponding to the fault type of the i-th mechanical transmission device; while Let W represent a random rotation matrix that satisfies W. T W = I A T is the transpose symbol, I A It is an A×A identity matrix; 1 A Let A be a column vector consisting of only 1 elements. In the Simplex ETF, all vectors have the same L2 norm, and the angle between any two vectors satisfies the following equation:
[0088]
[0089] Wherein, parameter δ i,j Satisfy: When i = j, δ i,j =1, when i≠j, δ i,j =0. For A units located at In space, the angle between any two vectors is equal, and the angle value is... This is the maximum equiangular separation value that these vectors can achieve in space.
[0090] Neural collapse theory reveals that under ideal training conditions, the optimal structure for feature prototypes and classifiers is a Simplex ETF. Inspired by this theory, this invention addresses the fault diagnosis scenario of mechanical transmission equipment. Considering the performance optimization of both global and local fault diagnosis models, it proposes an imbalanced federated learning method (FedFix) based on a fixed classifier, aiming to effectively alleviate the diagnostic bias problem caused by fault class imbalance. Specifically, to improve the diagnostic performance of the global diagnostic model, the model architecture is restructured: on the one hand, a fixed ETF classifier is used to replace the traditional learnable classifier, fundamentally solving the classifier bias problem caused by inconsistent data label distribution; simultaneously, compared to the classifier retraining strategy in the post-training stage, introducing a fixed classifier during distributed training effectively avoids the interference of classifier bias on the feature learning process. On the other hand, a specific loss function is designed to ensure more stable model convergence during federated learning training. To improve the personalized diagnostic performance of the local model, a dual fine-tuning mechanism is designed. This mechanism not only optimizes the parameters of the feature extractor but also adjusts the initially fixed ETF classifier, thereby improving the model's adaptability to local data and diagnostic accuracy.
[0091] The task of training a fault diagnosis model for mechanical transmission equipment is published by the task publisher. When initializing the model parameters, the task publisher needs to base it on the formula... A simplex ETF is randomly synthesized as the classifier module of the model, where d represents the dimension of the ETF and A represents the number of fault categories in the mechanical transmission equipment. According to the definition of a simplex ETF, the dimension d of the ETF must satisfy d ≥ A⁻¹. In U… ETF In the diagram, the classifier vector for each fault category... Its L2 norm needs to satisfy ||u i ||2=1; Furthermore, for any two distinct classifier vectors (u i ,u j i≠j, The cosine value of the included angle needs to satisfy
[0092] Input a sample of operating data x from a mechanical transmission device into the feature extractor. The original feature r can then be obtained if the feature extractor... The final layer is a linear activation function. The original features *r* often exhibit sparsity, meaning they contain a large number of zero or near-zero elements. This sparsity makes it difficult for the original features to align with the densely distributed ETF classifier vectors, thus affecting the model's fault identification accuracy. Secondly, the original features typically have high dimensionality, and high-dimensional vectors are more likely to exhibit orthogonality in the feature space. This characteristic hinders the feature collapse into an ETF structure with the maximum angle, thereby reducing the generalization ability of the fault diagnosis model. To address these issues, this invention designs a projection layer in the global diagnostic model. Its core function is to map the original feature r to the ETF feature space and generate standardized features v through normalization.
[0093] Combining the aforementioned fixed classifier U ETF In the global diagnostic model constructed in this invention, the feature extractor Used to extract features from the input mechanical transmission equipment operation data x, obtaining the original features r; projection layer The original feature r is mapped to the equiangular compact frame (ETF) feature space and normalized to generate a standardized feature v; the classifier U is fixed. ETF This is used to classify and identify fault types in mechanical transmission equipment based on the standardized feature v, thereby obtaining fault identification and diagnosis results for the mechanical transmission equipment. The parameter ω of the global diagnostic model can be expressed as ω={ feat ,ω p ,U};where, ω feat Feature extractor The parameter, ω p Indicates projection layer The parameters are both learnable parameters; U represents the fixed classifier U based on the isoangular tight frame. ETF The parameter matrix. The process of obtaining the original features r and standardized features v in the global diagnostic model can be formally represented as:
[0094] r=F(ω feat ;x);
[0095]
[0096] Where, F(ω) feat ;x) represents the feature extractor Fω feat Used for feature extraction processing of input mechanical transmission equipment operation data x; G(ω) p ;r) Representing projection layers The processing and results used to map the original feature r to the isoangular compact frame feature space; ||·||2 represents the L2 norm operation.
[0097] Through the mapping of the projection layer, the original features are transformed into a lower-dimensional space. The lower-dimensional features can not only effectively alleviate the sparsity and orthogonality problems, but also promote the formation of neural collapse phenomena.
[0098] For a learnable classifier Its cross-entropy loss L CE The negative gradient can be decomposed into a "pull term" and a "pull term":
[0099]
[0100] Where p a (v) represents the probability that the standardized feature v is predicted as category a. The role of the "pull term" is to make the classification vector of category a more accurate. Aligning with similar features enhances intra-class cohesion; the role of "inference" is to make the classification vector of category a... By moving away from features of different classes, the distance between different categories can be increased. When the number of samples in each class is equal in the agent, the classifier U can be learned through the combined effect of "pull" and "push" factors. * Ultimately, it will converge to an ETF structure. However, when the data label distribution of the agent is unbalanced, the proportion of "inference terms" of a minority sample category is too high, causing the classifier to deviate too far from features of different categories. This may cause the classifier vectors of the minority categories to converge or even merge, thereby reducing the accuracy of the classifier.
[0101] Similarly, for feature v, the negative gradient of its cross-entropy loss can also be decomposed into "pull term" and "push term", expressed as:
[0102]
[0103] Where y is the true label of the standardized feature v. The "pull term" and "push term" in the above formula also force u and v of the same category to converge in the same direction, separating u and v of different categories. In the fault diagnosis model architecture, the classifier... Since the ETF has already been fixed, the "pull term" will guide the features to align with the classifier vectors of similar ETFs, which corresponds to the optimization objective. However, the "pull term" becomes redundant due to the symmetry of the ETF classifier, and its direction may not necessarily point to the optimal direction.
[0104] Therefore, in order to adapt to the ETF fixed classifier, this invention designs a point regression loss function:
[0105]
[0106] Among them, L dr (v y U) is the point regression loss function; v yThis represents the standardized features of the mechanical transmission equipment operation sample data (labeled y) after inputting into the global diagnostic model, processing through the projection layer, and then inputting into the classifier; U represents the parameter matrix of the classifier in the global diagnostic model; u y T represents the classifier weight vector in parameter matrix U corresponding to the fault type y of mechanical transmission equipment; T is the transpose symbol.
[0107] Point regression loss function L dr (c y U) for standardized feature c y gradient Represented as:
[0108]
[0109] Wherein, cos∠(c y ,u y ) represents the standardized feature v y and classifier weight vector u y The cosine similarity.
[0110] In constructing the global diagnostic model, this invention, based on neural collapse theory, clarifies that under balanced and sufficient data conditions, the optimal structure for classifiers and feature prototypes is a Simplex ETF, which must satisfy properties such as equal L2 norm of vectors, identical angles between any two vectors, and maximum equiangular separation. The federated learning task publisher randomly synthesizes this fixed classifier based on the Simplex ETF during model parameter initialization. The classifier dimension must meet specific conditions, and the classifier vector for each fault category must conform to norm and angle requirements. A projection layer is introduced into the model architecture to map the original features output by the feature extractor to a lower-dimensional space and perform normalization processing to generate standardized features. Simultaneously, a point regression loss function is designed to guide the standardized features to align with the corresponding category's ETF fixed classifier vector, thus adapting to the fixed classifier and mitigating classifier bias caused by inconsistent data label distribution.
[0111] III. Wide-area intelligent agent layer
[0112] The wide-area intelligent agent layer consists of enterprises participating in the construction of federated learning fault diagnosis models. These enterprises typically possess similar types of production equipment and have collected similar health status data for mechanical transmission equipment. However, limited by the scale of the dataset, the performance of fault diagnosis models built by these enterprises based on local data is often less than ideal. Therefore, it is crucial to address the issue of collaboratively training more powerful fault diagnosis models for mechanical transmission equipment without directly sharing raw data. To achieve this goal, each intelligent agent consists of an execution unit, a data perception and processing module, and a model training module.
[0113] (1) Execution unit
[0114] An execution unit (AMU) is a physical asset deployed by an enterprise to ensure the normal operation of the production line. It typically consists of equipment capable of performing specific production tasks. These devices are usually connected via IoT technology. In a smart manufacturing environment, they typically have the following three functions: 1) Generating and collecting real-time data representing the production status, facilitating real-time monitoring of equipment production status by production managers. For the mechanical transmission equipment fault diagnosis problem studied in this invention, the main focus is on collecting real-time operating data during the operation of the production equipment's mechanical transmission system. 2) Receiving information from higher levels and adjusting its own operating parameters promptly. 3) Communicating with other equipment in the industrial environment to address disturbances that occur during the production process.
[0115] (2) Mechanical transmission equipment operation data sensing and processing module
[0116] This module first needs to establish a physical connection with the production equipment of the execution unit or the sensors installed on the equipment through various types of physical interfaces (such as COM, USB, LAN) to collect real-time operating data of the mechanical transmission equipment. Furthermore, this module further segments the collected operating data into training samples and, based on prior knowledge of the health and fault conditions of the mechanical transmission equipment, labels the fault types of the mechanical transmission equipment corresponding to the sample data with true fault category labels, thus providing a usable training dataset for the model training module. Due to the differences in the working environments of production equipment located in multiple locations, the wide-area data is not independently and identically distributed; specifically, the distribution of fault categories in the vibration data collected by different execution units may be uneven. In addition to collecting data from the production equipment of the execution unit for training the local diagnostic model, this module also uploads the collected data to the application layer to identify the health and fault conditions of the mechanical transmission equipment in real time, and converts the fault diagnosis results returned by the application layer into control decision commands to be issued to the production equipment of the execution unit.
[0117] (3) Fault diagnosis model training module for mechanical transmission equipment
[0118] This module, building upon the mechanical transmission equipment operation data sensing and processing module, independently trains a locally updated diagnostic model using a local dataset. First, the task publisher of the federated learning module publishes the initialized diagnostic model to the blockchain network, serving as the initialized global diagnostic model within the blockchain. To alleviate storage pressure on the blockchain network, only the IPFS address of the global diagnostic model is stored on the blockchain network, while its original file is stored in IPFS.
[0119] Then, the module retrieves detailed information about the mechanical transmission equipment fault diagnosis task from the nearest blockchain node, including the IPFS address of the initial global diagnostic model. Based on IPFS's content-addressed storage model, the module can quickly retrieve and download the initial diagnostic model. Subsequently, the agent uses this initial global diagnostic model as the starting point for training, utilizing its own local mechanical transmission equipment operation data to train the global diagnostic model, obtaining a trained locally updated diagnostic model, which is then uploaded to the blockchain network. During this training process, for any wide-area agent k, k∈{1,2,…,M}, where M represents the total number of wide-area agents participating in the task linking, in any t-th round of training, this wide-area agent k obtains a locally updated diagnostic model by training the current global diagnostic model through the following steps:
[0120] S301: The wide-area intelligent agent k pre-collects local mechanical transmission equipment operation sample data, and uses prior knowledge to label the mechanical transmission equipment fault types corresponding to the local mechanical transmission equipment operation sample data with real fault category labels, thus forming a local private mechanical transmission equipment fault operation dataset.
[0121] S302: The wide-area agent k obtains the current global diagnostic model. The global diagnostic model uses the mechanical transmission equipment operation sample data from the local private mechanical transmission equipment fault operation dataset. The input is used to optimize the global diagnostic model using the point regression loss function as the objective. The feature extractor and projection layer parameters are trained locally to obtain the trained locally updated diagnostic model.
[0122] S303: The wide-area agent k will locally update the diagnostic model obtained from the training. Sign and package to generate a local model update transaction Uploaded to the blockchain network.
[0123] Due to the limited amount of local data, the diagnostic capabilities of local models are relatively poor. Therefore, this module uploads the trained locally updated diagnostic model to the blockchain network layer for aggregation. After obtaining a new round of global diagnostic model returned by the blockchain network layer, the module continues to train the model using the local private dataset. After a specified number of rounds of training of the locally updated diagnostic model and aggregation of the global diagnostic model, the module finally obtains a global diagnostic model with stronger fault diagnosis capabilities based on wide-area data training. Finally, the module can further utilize local mechanical transmission equipment operating data to adaptively optimize the global diagnostic model, obtaining a personalized fault diagnosis model with better personalized diagnostic performance that adapts to local mechanical transmission equipment operating data. In addition, the model training module deploys the obtained global diagnostic model and personalized fault diagnosis model to the application layer to realize fault diagnosis of mechanical transmission equipment in enterprise production equipment.
[0124] IV. Blockchain Network Layer
[0125] In traditional federated learning architectures, a central server is typically used for global diagnostic model aggregation. To achieve a more robust federated learning architecture, a blockchain network layer is introduced to replace the central server in performing model aggregation. The robustness of a blockchain-based federated learning system is mainly reflected in three aspects: First, compared to a central server, a blockchain is a distributed network composed of multiple nodes, eliminating single points of failure; second, executing a redesigned diagnostic model aggregation strategy through the blockchain network can effectively mitigate the negative impact of model poisoning attacks launched by malicious agents on the performance of the global diagnostic model; and finally, the consensus mechanism of the blockchain network can effectively prevent the global diagnostic model from being incorrectly aggregated by malicious nodes. With the blockchain network acting as the aggregator of the global diagnostic model, the global diagnostic model generated in each round of global training needs to reach consensus among all nodes through the blockchain network's consensus mechanism to ensure the legitimacy of the generated global diagnostic model. Simultaneously, the final global diagnostic model generated in each round needs to be stored in the blockchain network for the mechanical transmission equipment fault diagnosis model training module of the wide-area intelligent agent layer to access and use.
[0126] The following is a detailed introduction to the diagnostic model aggregation strategy, consensus mechanism, and diagnostic model storage mechanism of the blockchain network layer.
[0127] (1) Diagnostic model aggregation strategy
[0128] When the blockchain network receives a sufficient number of transactions containing local model updates, the nodes concurrently aggregate the local models to generate a global diagnostic model. In the classic federated learning averaging algorithm FedAvg, the model aggregation operation can be formalized as follows:
[0129]
[0130] in and These represent the global diagnostic model obtained from aggregation in round t and the locally updated diagnostic model obtained by the wide-area agent k from training in round t, respectively; n s,k Let be the number of data samples contained in the local private dataset of the wide-area intelligent agent k.
[0131] When the blockchain network collects a sufficient number of legitimate partial update diagnostic models, the aggregation nodes use an aggregation strategy to aggregate the various partial update diagnostic models, resulting in a global diagnostic model. The data will be stored in IPFS. The address returned by IPFS and all pending transactions used to aggregate the global diagnostic model will be packaged into candidate blocks and distributed to the committee for verification.
[0132] (2) Consensus Verification Mechanism
[0133] In blockchain systems, the consensus mechanism is an agreement that ensures nodes in a decentralized network can reach a consensus on the state and transaction data of the blockchain even in the absence of a trust foundation. This invention employs a VRF-based committee consensus mechanism to achieve efficient consensus among blockchain network nodes.
[0134] A Virtual Random Function (VRF) is a random function generator that combines cryptographic techniques such as hash functions and asymmetric encryption. Its operation relies on a public-private key pair, where the private key and a random seed serve as inputs to the VRF, and its output is a random number and a corresponding proof. Anyone can verify the validity of the random number using the public key corresponding to the private key and the generated proof. These characteristics of VRF provide a non-interactive committee election scheme for blockchain systems. Specifically, any blockchain node can determine whether it has been selected as a consensus committee member based on the random number generated by the VRF, and other blockchain nodes can also verify the legitimacy of consensus committee members based on the VRF output. Before distributed training begins, a VRF key pair (ψ) needs to be allocated to each blockchain node for committee member selection. sk ,ψ pk A public-private key pair (I) used for signing and verification. sk ,I pk (and default rights).
[0135] Secondly, before conducting distributed training, a consensus committee needs to be built based on VRF for global diagnostic model legitimacy verification. VRF is an important tool in cryptography for generating verifiable random numbers. This algorithm runs on each node, and its output determines whether the node can become a candidate member of the committee.
[0136] Specifically, in the application of the present invention, before step S4 is executed, the blockchain network pre-selects several nodes from the blockchain nodes as consensus committee member nodes based on the committee consensus mechanism to construct the consensus committee. Then, in step S4, the consensus verification mechanism is executed through the following process:
[0137] S401: The blockchain network receives a local model update transaction generated by a k-signature from any wide-area intelligent agent and packages it. Then, first determine the local model update transaction. Whether it is compliant; if compliant, then broadcast it on the blockchain network;
[0138] S402: Compliant partial model update transactions received by the blockchain network Once the number reaches the preset aggregation target, candidate global diagnostic models are generated through federated aggregation and broadcast to consensus committee member nodes;
[0139] S403: After obtaining the candidate global diagnostic model, the consensus committee member nodes verify whether the candidate global diagnostic model is generated through federated aggregation, and send the verification result to the blockchain network.
[0140] S404: The blockchain network counts the verification results of the candidate global diagnostic model. If the verification results of the consensus committee member nodes exceed the preset verification ratio, the candidate global diagnostic model is generated by federated aggregation. Then, the candidate global diagnostic model is used as the final global diagnostic model for this round of updates and is updated and stored in the InterPlanetary File System (IPFS).
[0141] As can be seen in this invention, after the consensus committee is constructed, the model training module of the wide-area intelligent agent layer trains the model using local private data and uploads it to the blockchain network. After receiving a transaction containing a local model, the blockchain node verifies the model's origin through digital signature and compares the model structure with the global diagnostic model structure to determine its legality; transactions with legal models are broadcast by the node in the network. When enough legal local models are collected, the blockchain node aggregates them into a global diagnostic model based on the proposed secure aggregation strategy, packages it into a candidate block, and sends it to the consensus committee built on VRF. After receiving the candidate block, committee members verify whether the global diagnostic model uses the proposed secure aggregation algorithm, and then vote "yes" or "no" accordingly; for example, if a candidate block receives more than two-thirds of the members' "yes" votes, it becomes a verified block and is broadcast to the network. Finally, the verified block is added to the end of the blockchain by miner nodes, and the relevant consensus committee members and aggregation nodes receive rewards.
[0142] (3) Diagnostic model storage mechanism
[0143] In a blockchain, each node needs to store the complete ledger. Directly storing distributed training model parameters would increase storage pressure. IPFS can generate a unique hash value for each file as an identifier, ensuring file integrity and preventing tampering. This invention combines the two to construct an on-chain and off-chain storage mechanism for a global fault diagnosis model: the blockchain stores the model file hash value, and IPFS stores the file itself.
[0144] Specifically, in the application of the present invention, in step S1, after the blockchain network stores the global diagnostic model to the InterPlanetary File System (IPFS), IPFS returns the hash address of the stored global diagnostic model to the blockchain network, and the blockchain network then packages the hash address into a block for publication.
[0145] In step S2, when the wide-area intelligent agent obtains the current global diagnostic model, it obtains the hash address of the global diagnostic model stored in IPFS from the block published by the blockchain network, and then retrieves and downloads the stored global diagnostic model from IPFS based on the hash address.
[0146] Meanwhile, in step S402 of the above step S4, when the blockchain network broadcasts and distributes the generated candidate global diagnostic model, it stores the candidate global diagnostic model in IPFS. After IPFS returns the hash address of the candidate global diagnostic model to the blockchain network, the blockchain network then packages the hash address and all local model update transactions used to aggregate the candidate global diagnostic model into a candidate block and distributes it to the consensus committee member nodes.
[0147] In step S403, which involves step S4, when the consensus committee member nodes obtain the candidate global diagnostic model, they obtain the hash address of the candidate global diagnostic model stored in IPFS from the candidate block in the blockchain network, and then retrieve and download the stored candidate global diagnostic model from IPFS based on the hash address.
[0148] In step S404, which involves step S4, after the blockchain network stores the global diagnostic model update of the final update of this round to the InterPlanetary File System (IPFS), it marks the candidate block that records the hash address of the global diagnostic model of the final update of this round stored in IPFS as a verified block, and removes all local model update transaction data stored in the verified block, retaining only the hash address stored in the verified block, so as to release block storage space.
[0149] By employing the aforementioned on-chain and off-chain storage mechanism, we can leverage the blockchain to achieve data immutability and decentralized verification, while also utilizing IPFS to provide efficient large file storage. This ensures data integrity while avoiding the high storage pressure and inefficiency issues that model files can impose on the blockchain. With the introduction of IPFS, the agent layer model training module obtains the IPFS address of the global diagnostic model from the blockchain and can quickly retrieve and download it through content addressing. Since the local models in each training round are only used during aggregation and verification and are no longer accessed after verification, the agent interaction framework removes the local models from candidate blocks after verification, forming smaller verified blocks and further reducing storage pressure.
[0150] V. Application Layer
[0151] The application layer, based on the monitoring data of mechanical transmission equipment from the wide-area intelligent agent layer and the fault diagnosis model obtained from the model training layer, develops a fault diagnosis system for mechanical transmission equipment based on wide-area data and federated learning, applicable to enterprises. This system includes an equipment management module, a model management module, a fault diagnosis task management module, and a fault diagnosis result management module. The following is a detailed description of each module.
[0152] (1) Equipment Management Module: This module first defines the structure of the equipment that needs to be diagnosed on the production line to manage the equipment objects. Second, this module defines the dataset and data access method of the equipment objects to enable the access of equipment data. Finally, this module is responsible for preprocessing the accessed data and storing it in the database for use by the fault diagnosis task management module.
[0153] (2) Model Management Module: This module is responsible for defining the attributes of the fault diagnosis model for mechanical transmission equipment. Specifically, the model attributes include the applicable scenarios, model version, model input data mode, and model output data mode.
[0154] (3) Fault Diagnosis Task Management Module: This module selects applicable fault diagnosis models from the model management module and establishes fault diagnosis tasks based on the data accessed by the equipment management model. Secondly, this module provides the runtime environment for the fault diagnosis models and controls the start and stop of the fault diagnosis tasks. Furthermore, this module sends the execution results of the fault diagnosis tasks to the fault diagnosis result management module for analysis and processing.
[0155] (4) Fault Diagnosis Result Management Module: This module formulates reasonable equipment maintenance plans or issues early warning information based on the fault diagnosis results of mechanical transmission equipment, thereby ensuring the normal operation of production equipment. In addition, this module can interact with other information systems in the enterprise through defined interaction methods. For example, it can send equipment maintenance plans to the Enterprise Resource Planning (ERP) system to automatically trigger spare parts procurement and work order dispatch, reducing production equipment downtime; and push fault warnings to the Manufacturing Execution System (MES) in real time to dynamically adjust production scheduling and avoid product delivery delays.
[0156] VI. Local Adaptive Optimization of Intelligent Agents
[0157] After federated learning training is completed, a more generalizable global mechanical transmission equipment fault diagnosis model W can be obtained. g The distributed intelligent agent is responsible for the global diagnostic model W. g Local adaptive optimization can improve the personalized diagnostic performance of the model. Therefore, this invention designs a local adaptive optimization strategy, which consists of two stages: local feature extractor adaptive optimization and local classifier adaptive optimization. The local classifier adaptive optimization stage further includes alternating adaptive optimization of the ETF classifier and the projection layer, such as... Figure 4 As shown.
[0158] In the local adaptive optimization strategy, the parameter ω of the global diagnostic model is defined as ω = {ω feat ,ω p U ETF}, ω feat Feature extractor The parameter, ω p Indicates projection layer The parameter U represents the fixed classifier U based on the isoangular tight frame. ETF The parameter matrix; in each stage of the local adaptive optimization strategy, the fixed parameters are defined as... The parameters for optimization and adjustment are defined as follows:
[0159] In the adaptive optimization phase of the local feature extractor, let
[0160] During the local classifier adaptive optimization phase, the fixed classifier U will be adjusted. ETF and projection layer Perform alternating adaptive optimization; with a fixed classifier U ETF When performing adaptive optimization, let On the projection layer When performing adaptive optimization, let
[0161] For any wide-area agent k, in each stage of the local adaptive optimization strategy, the objective function of each adaptive optimization stage is... for:
[0162]
[0163] in, Normalized loss function:
[0164]
[0165] in, Represents the cross-entropy loss function; n s,k This represents the number of data samples representing the local mechanical transmission equipment operation data of the wide-area intelligent agent k. These represent the operating data of the i-th local mechanical transmission device of the wide-area intelligent agent k and the corresponding real fault category label of the mechanical transmission device fault type. This represents the operating data of the i-th local mechanical transmission device of the wide-area intelligent agent k. The standardized features input to the global diagnostic model are processed by the projection layer and then fed into the classifier; y This indicates the fault type of the corresponding mechanical transmission equipment in the parameter matrix U. The classifier weight vector; u a Let T represent the classifier weight vector in parameter matrix U corresponding to the a-th mechanical transmission equipment fault type, where a = 1, 2, ..., A, and A represents the number of mechanical transmission equipment fault types; T is the transpose symbol.
[0166] In the fault diagnosis stage of the intelligent agent implementing mechanical transmission equipment, the global diagnostic model is optimized in two stages using the aforementioned local adaptive optimization strategy. The first stage is local feature extractor adaptive optimization, which fixes the ETF classifier and projection layer parameters and optimizes only the feature extractor parameters. The second stage is local classifier adaptive optimization, which alternately optimizes the ETF classifier and projection layer parameters. That is, first fix the feature extractor and projection layer parameters and optimize the ETF classifier, then fix the feature extractor and ETF classifier parameters and optimize the projection layer. In each stage, the cross-entropy loss function is used to calculate the loss and update the parameters. Through the two-stage collaborative optimization, the adaptability of the global diagnostic model to local data and the accuracy of personalized diagnosis are improved.
[0167] VII. Verification of Examples
[0168] To better illustrate the advantages of the technical solution of the present invention, the following experiments are disclosed in this embodiment.
[0169] This experiment uses two cases to verify the fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain proposed in this invention (hereinafter also referred to as the FedFix model), including the diagnostic cases of the Huazhong University of Science and Technology gearbox dataset (HUST dataset) and the planetary gearbox dataset (WT dataset) of the wind turbine transmission system test bench.
[0170] 1. Dataset Description
[0171] (1) HUST dataset
[0172] The first gearbox dataset used in this experiment to evaluate model performance was released by researchers at Huazhong University of Science and Technology (HUST). This dataset was collected from [source name missing]. Figure 5 The experimental platform shown in (a) mainly consists of a magnetic brake, a brake controller, a torque sensor, a single-stage reducer, and a servo motor. Four radial cracks of varying severity were artificially induced in the drive gear of the single-stage reducer, with crack lengths of 0 mm, 5 mm, 10 mm, and 15 mm, respectively. Figure 5 As shown in (b), this dataset covers four gear failure modes. Furthermore, it contains gearbox vibration data simulated under five different loads (0 Nm, 2 Nm, 4 Nm, 6 Nm, and 8 Nm). This experiment utilizes vibration data from the four load conditions other than 0 Nm to simulate agents with inconsistent data feature distributions in federated learning. The sampling frequency of the raw gearbox operating data is 5 kHz.
[0173] (2) WT dataset
[0174] This dataset, jointly released by researchers from Beijing University of Technology and Beijing Jiaotong University, was collected from the planetary gearbox of a wind turbine (WT) transmission system test bench. The test bench mainly consists of a motor, tachometer, sensors, planetary gearbox, fixed-shaft gearbox, and load device. The dataset includes vibration data from both normal gearboxes and gearboxes subjected to artificial disruption under different operating conditions. Specifically, the gear failure modes include tooth breakage, tooth root wear, gear cracking, and missing teeth. Figure 6 As shown in the figure, different operating conditions are achieved by controlling different rotational speeds. This dataset considers a total of eight rotational speeds: 20Hz, 25Hz, 30Hz, 35Hz, 40Hz, 45Hz, 50Hz, and 55Hz. Therefore, this dataset covers vibration data for eight operating conditions across five gearbox health conditions. The sampling frequency of the original operating data for this planetary gearbox is 64kHz.
[0175] The detailed information for the two datasets mentioned above is shown in Table 1.
[0176] Table 1. Detailed information on the HUST and WT datasets.
[0177]
[0178] To evaluate the effectiveness of the FedFix fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain proposed in this invention, this experiment selected data collected under a 0 Nm load from the HUST dataset and data collected under a 30 Hz rotation speed from the WT dataset, respectively. For both the HUST and WT datasets, the sliding window size was set to 1024, and 1000 samples were selected for each type of fault. The ratio of training set to test set for both datasets was 8:2. To simulate the scenario of skewed data label distribution among different intelligent agents in federated learning, a Dirichlet distribution was used to allocate the number of samples of each type of fault to each intelligent agent, and the degree of label distribution skew between intelligent agents was controlled by the parameter β. The smaller the parameter β, the more severe the label distribution skew.
[0179] 2. Comparison Algorithm
[0180] To address the issue of inconsistent data label distribution among distributed agents in federated learning, which leads to unsatisfactory diagnostic performance of the constructed fault diagnosis model, this invention proposes FedFix, a fault diagnosis method for mechanical transmission equipment based on ETF fixed classifier federated learning. To evaluate FedFix's ability to handle data with inconsistent label distribution, this experiment first assumes that all distributed agents and blockchain nodes are benign; that is, the blockchain network aggregation nodes generate a global diagnostic model through a federated averaging algorithm and send it to the consensus committee for verification. This experiment compares and analyzes FedFix with the following benchmark methods:
[0181] ①FedAvg: A classic federated learning method that was first proposed. It focuses on the aggregation process of models, that is, it performs weighted average aggregation of local models from multiple distributed agents according to the size of the dataset to obtain a global diagnostic model.
[0182] ②FedProx: A distributed optimization framework for federated learning. This framework addresses the problem of non-independent and identically distributed agent data by introducing a proximal regularization term to reconstruct the local objective function, effectively coordinating the differentiated computing power and data distribution characteristics among devices, while improving the convergence stability of federated learning.
[0183] ③FedROD: This method proposes a federated learning dual-task decoupling mechanism. By sharing a feature extraction layer and combining a dual prediction head architecture, it optimizes the general and personalized models using a class balance objective function and customer experience risk, respectively. Furthermore, this method introduces a hypernetwork to dynamically generate an adaptive classifier, achieving collaborative optimization of global feature alignment and local distribution adaptation, and enhances the model's generalization ability through a parameter re-initialization strategy.
[0184] ④FedNH: A personalized training framework for federated learning, which proposes a dual optimization strategy based on class prototypes to address the problems of data heterogeneity and class imbalance. This method prevents feature collapse by uniformly initializing the prototype distribution of the latent space, dynamically fuses semantic information using a non-parametric prototype update mechanism, and balances global consistency and local feature representation with smooth parameters to improve the model's generalization ability.
[0185] To ensure the fairness of the experiment, the proposed method and all comparative methods used the CNN network shown in Table 2 as the base network of the model. FedFix used a linear layer as the projection layer, and its classifier was randomly synthesized by the task publisher when initializing the network parameters.
[0186] Table 2 shows the basic network structures of the proposed method and all comparative methods.
[0187]
[0188] To evaluate the generalization performance of the global diagnostic model and the personalized diagnostic performance of the local models of the proposed method and the comparative methods mentioned above, this invention constructs a balanced test set for the HUST and WT datasets, respectively, with 200 samples for each fault category in each balanced test set. The evaluation metric for the generalization performance of the global diagnostic model is as follows:
[0189]
[0190] Where n test To balance the number of samples in the dataset, y (i) With a (i) These represent the true label of the test sample and the predicted label of the test sample by the global diagnostic model, respectively. The evaluation metric for the personalized diagnostic performance of the local model is:
[0191]
[0192] Where p k (y) represents the category distribution probability of agent k.
[0193] This experiment simulated two different degrees of data label distribution skew, corresponding to Dirichlet distribution parameters of 1.0 and 0.3, respectively. Furthermore, the hyperparameters of all comparative methods were set according to best practices reported in the original literature. The key hyperparameter configurations of the proposed method are given in Table 3.
[0194] Table 3 Key hyperparameters of the FedFix method
[0195]
[0196] 3. Comparative analysis of experimental results
[0197] The test results of the federated learning fault diagnosis method for mechanical transmission equipment based on a fixed classifier and all comparison methods on the HUST and WT datasets are given in Tables 4 and 5, respectively. The observations and analysis of these results can be summarized in the following three points:
[0198] ① The proposed method, FedFix, outperforms all comparable methods in both the generalization performance of the global diagnostic model and the personalization performance of the local model under different levels of data label distribution skew (β=1.0 and β=0.3). On one hand, the improved generalization performance of the global diagnostic model is mainly due to FedFix's use of the ETF fixed classifier during model initialization, which alleviates the feature misalignment problem caused by classifier bias. On the other hand, the local adaptive optimization strategy allows the local model to better adapt to the local data distribution characteristics after fine-tuning, thereby improving its personalized diagnostic capabilities. In summary, FedFix's advantage lies in improving the personalized diagnostic performance of the local model while maintaining the leading generalization performance of the global diagnostic model.
[0199] Table 4. Diagnostic results of FedFix and contrast methods on the HUST dataset.
[0200]
[0201] Table 5. Diagnostic results of FedFix and contrast methods on the WT dataset.
[0202]
[0203] ② The FedROD method addresses the classifier problem caused by skewed data label distribution in agents through a redesigned balanced loss. Compared to the classic federated learning method FedAvg, it achieves significant improvements in both the generalization performance of the global diagnostic model and the personalization performance of the local model. This result demonstrates that classifier bias is a crucial factor affecting the performance of federated learning models in scenarios with skewed data label distribution. The proposed method, FedFix, further addresses the classifier bias problem by replacing the learnable classifier with a synthetic ETF fixed classifier and aligning features and classifier vectors of the same class through a redesigned point regression function, achieving further performance improvements compared to FedROD.
[0204] ③ The classic federated learning algorithm FedAvg generally outperforms FedProx in both generalization and personalization performance, indicating that regularization techniques used in the agent's local model cannot effectively address the performance degradation caused by skewed data label distribution. The personalized federated learning algorithm FedROD's personalization performance advantage over FedAvg is limited, suggesting that the local model trained in the classic and simple FedAvg process is itself a high-performance personalized model. Furthermore, all methods demonstrate higher personalized diagnostic performance than the generalization performance of the global diagnostic model, reflecting the significance of considering how to obtain a more suitable personalized local model for the local data distribution while training a globally generalizable diagnostic model.
[0205] 4. Performance Analysis
[0206] ①Feature alignment and neural collapse analysis by FedFix
[0207] Neural collapse indicates that, under balanced and sufficient data conditions, the features of the last layer of a deep neural network collapse to class feature prototypes. Therefore, to illustrate the benefits of using an ETF-fixed classifier from the model initialization phase of federated learning, this experiment compares the feature learning processes of the proposed FedFix method and the classic federated learning method FedAvg on the WT dataset with β = 0.3. The specific experimental design is as follows: After each round of training, the class prototypes of each distributed agent are first calculated, followed by the cosine similarity of the class prototypes between different agents. The average cosine similarity is used as a measure of the global feature alignment. A higher value indicates a more significant feature alignment effect between agents. Figure 7(a) shows the changes in the mean cosine similarity of FedFix and FedAvg across agent class prototypes during training. It can be seen that after several rounds of training, the mean cosine similarity of FedFix across agent class prototypes is significantly improved compared to FedAvg. This experimental result indicates that the ETF fixed classifier can effectively improve the feature alignment effect between different agents in federated learning.
[0208] Combining neural collapse theory and the definition of Simplex ETF, for a global diagnostic model that achieves optimal neural collapse, the cosine similarity between its class prototypes is: Therefore, to further illustrate the role of the ETF fixed classifier in promoting neural collapse in the federated learning global diagnostic model, this experiment calculates the class prototypes of the global diagnostic model after each training round and calculates the cosine similarity between these prototypes. Finally, the cosine similarity is compared with... The mean squared error between the two values characterizes the neural collapse error. A smaller neural collapse error indicates that the global diagnostic model is closer to the optimal state of neural collapse. The changes in neural collapse error of the global diagnostic models of FedFix and FedAvg during training are shown in the figure. Figure 7 As shown in (b), the neural collapse error of FedAvg decreases slowly with increasing training epochs, while the neural collapse error of FedFix decreases rapidly and then remains at a relatively low level, indicating that its global diagnostic model can better approximate neural collapse optimality. This result verifies the effectiveness of the ETF fixed classifier in promoting the neural collapse optimality of the federated learning global diagnostic model.
[0209] ② Ablation Experiment Analysis
[0210] The projection layer and point regression loss function are two important modules in FedFix besides the ETF classifier. They work in conjunction with the ETF classifier to achieve a better-performing fault diagnosis model. To illustrate the impact of these two modules on the performance of the FedFix global diagnostic model, this invention conducted ablation experiments on these two modules on the HUST and WT datasets. The experimental results are as follows: Figure 8 As shown.
[0211] from Figure 8As can be seen, removing the projection layer or the point regression loss function module leads to varying degrees of performance degradation in the global diagnostic model. From a mechanistic perspective, the projection layer maps higher-dimensional features to a lower-dimensional space, and these lower-dimensional features are more conducive to achieving optimal neural collapse. Furthermore, the figure shows that the point regression loss function becomes more important in scenarios with more severe data label distribution skew. This phenomenon verifies the effectiveness of the point regression loss function in guiding the alignment of standardized features with similar ETF classifier vectors by eliminating redundant gradient interference.
[0212] ③ Analysis of the impact of feature dimensions on FedFix diagnostic performance
[0213] In the FedFix method proposed in this invention, the core function of the projection layer is to map the original features to a lower-dimensional feature space and generate standardized features through normalization to promote feature alignment with similar ETF classifier vectors. Therefore, to explore the impact of feature dimension d on the performance of the FedFix global diagnostic model, this experiment conducted parameter analysis experiments on the HUST dataset with β = 0.3, focusing on dimension d. The experimental results are as follows: Figure 9 As shown in the figure, the neural collapse error increases exponentially with the feature dimension, while the fault diagnosis performance of the global diagnostic model slightly decreases. This experimental result indicates that a lower feature dimension promotes the optimality of neural collapse. Furthermore, the generalization performance of the global diagnostic model decreases with increasing neural collapse error, suggesting that addressing the suboptimal generalization performance of federated learning global diagnostic models in scenarios with inconsistent data label distributions from the perspective of neural collapse is meaningful. Based on these experimental results, this invention recommends selecting the lowest possible feature dimension while ensuring that the features can represent the complex information in the data.
[0214] ④ Analysis of the impact of local adaptive optimization strategy on FedFix personalized diagnostic performance
[0215] Compared to classical federated learning methods and personalized federated learning methods, FedFix's core advantage lies in its ability to fine-tune a globally diagnostic model with good generalization performance using the local adaptive optimization strategy proposed in this invention, thereby obtaining a personalized diagnostic model with similarly good performance. To further explore the impact of each stage of the local adaptive optimization strategy on the personalized diagnostic performance of FedFix, this invention studies and analyzes the personalized performance of FedFix and FedAvg based on the HUST dataset. The experimental results are as follows: Figure 10As shown in the figure, after the feature extractor optimization stage, FedFix's personalization performance is comparable to FedAvg. However, with the increase in the number of alternating local optimization iterations of the ETF fixed classifier and the projection layer, FedFix's personalization diagnostic accuracy is 3.49% higher than FedAvg. These experimental results further demonstrate that each stage of the local adaptive optimization strategy is necessary and effective, and the synergistic effect of each stage jointly promotes the improvement of FedFix's personalization diagnostic capabilities.
[0216] The conclusions of this experiment are as follows:
[0217] 1) The proposed method (FedFix) outperforms classical federated learning methods (FedAvg, FedProx) and personalized federated learning methods (FedROD, FedNH) in both generalization performance (GACC) of the global diagnostic model and personalized diagnostic performance (PACC) of the local model under different label distribution skewness (Dirichlet distribution parameters β=1 and β=0.3). This advantage stems from two aspects: First, the ETF fixed classifier fundamentally alleviates the classifier bias caused by label distribution skewness and improves the cross-agent feature alignment effect; second, the local adaptive optimization strategy enhances the adaptability of the local model to local data through alternating optimization of the feature extractor, ETF classifier and projection layer.
[0218] 2) Regarding feature alignment and neural collapse, FedFix's cross-agent class prototype mean cosine similarity is significantly higher than FedAvg's, and its neural collapse error is lower. This indicates that the ETF fixed classifier is more likely to guide the model to the optimal state of neural collapse, improving global feature consistency. Ablation experiments show that removing the projection layer or point regression loss leads to a decrease in model performance. Among these, the point regression loss plays a more critical role in scenarios with more severe label distribution skew, effectively guiding features to align with the vectors of similar ETF classifiers by eliminating redundant gradient interference. In addition, lower feature dimensionality is more conducive to promoting optimal neural collapse. The performance of the global diagnostic model decreases slightly with increasing feature dimensionality, so a balance needs to be struck between feature expressiveness and dimensionality. In terms of local adaptive strategies, alternating optimization of the ETF classifier and projection layer can improve FedFix's personalized diagnostic accuracy by 3.49% compared to FedAvg, verifying the gain of the staged optimization strategy on personalized performance.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain, characterized in that, Includes the following steps: S1: The task publisher publishes an initial diagnostic model for fault diagnosis of mechanical transmission equipment to the blockchain network, which serves as the initialized global diagnostic model in the blockchain network and is stored in the InterPlanetary File System (IPFS). The global diagnostic model includes a feature extractor, a projection layer, and a classifier connected in sequence. The classifier adopts a fixed classifier based on isoangular tight frame synthesis. S2: Each wide-area intelligent agent participating in the task linking in the blockchain network obtains the storage address of the current global diagnostic model in the InterPlanetary File System (IPFS) and downloads the current global diagnostic model from IPFS. S3: Each wide-area intelligent agent trains the feature extractor and projection layer in the global diagnostic model locally based on its own local private mechanical transmission equipment fault operation dataset, and then uploads the trained local update diagnostic model to the blockchain network. S4: The blockchain network aggregates the local update diagnostic models uploaded by different wide-area intelligent agents in a federated manner based on a secure aggregation strategy to generate candidate global diagnostic models. The consensus mechanism is used to verify the candidate global diagnostic models. The candidate global diagnostic models that pass the consensus verification are used as the final global diagnostic models for this round of updates and are updated and stored in the InterPlanetary File System (IPFS). S5: The blockchain network determines whether the iterative training termination condition has been met; if not, steps S2 to S4 are repeated to perform the next round of global diagnostic model iterative training and update; if the condition is met, the iterative training terminates and the final global diagnostic model is obtained. S6: The wide-area intelligent agent obtains the storage address of the finally updated global diagnostic model in the InterPlanetary File System (IPFS) from the blockchain network, downloads the finally updated global diagnostic model from IPFS, and optimizes and adjusts the global diagnostic model using a local adaptive optimization strategy to obtain a personalized fault diagnosis model adapted to the local mechanical transmission equipment operation data, which is used for real-time fault diagnosis of mechanical transmission equipment.
2. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 1, characterized in that, In step S1, in the global diagnostic model, the feature extractor Fω feat This is used to extract features from the input mechanical transmission equipment operation data x, obtaining the original features r; projection layer Gω p This is used to map the original feature r to an isoangular compact frame feature space, and to generate a normalized feature v through normalization; a fixed classifier U is used. ETF Used to classify and identify fault types of mechanical transmission equipment based on the standardized feature v, and to obtain fault identification and diagnosis results of mechanical transmission equipment. The parameter ω of the global diagnostic model is represented as ω={ω feat ,ω p ,U};where, ω feat Feature extractor The parameter, v p Represents the projection layer Gω p The parameters are both learnable parameters; U represents the fixed classifier U based on the isoangular tight frame. ETF The parameter matrix; the original feature r and the standardized feature v are respectively represented as: r=F(ω feat ;x); Where, F(ω) feat ;x) represents the feature extractor Used for feature extraction processing of input mechanical transmission equipment operation data x; G(ω) p ;r) Representing projection layers The processing and results used to map the original feature r to the isoangular compact frame feature space; ||·||2 represents the L2 norm operation.
3. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 2, characterized in that, The fixed classifier U ETF The parameter matrix U is randomly synthesized by the task issuer using a simplex isoangular compact frame, and has the following properties: Wherein, parameter matrix d represents the dimension of the equiangular tight frame, and A represents the number of fault types in the mechanical transmission equipment. A represents the classifier weight vector in parameter matrix U corresponding to the fault type of the i-th mechanical transmission equipment, where i = 1, 2, ..., A; Let W be a random rotation matrix, and satisfy W T W = I A ;T is the transpose symbol;I A It is an A×A identity matrix; 1 A Let A be a column vector of all 1s.
4. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 1, characterized in that, In step S1, after the blockchain network stores the global diagnostic model to the InterPlanetary File System (IPFS), IPFS returns the hash address of the stored global diagnostic model to the blockchain network, and the blockchain network then packages the hash address into a block for publication.
5. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 4, characterized in that, In step S2, when the wide-area intelligent agent obtains the current global diagnostic model, it obtains the hash address of the global diagnostic model stored in IPFS from the block published by the blockchain network, and then retrieves and downloads the stored global diagnostic model from IPFS based on the hash address.
6. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 1, characterized in that, In step S3, for any wide-area agent k, k∈{1,2,…,M}, where M represents the total number of wide-area agents participating in task linking, this wide-area agent k, in any t-th round of training, trains the current global diagnostic model to obtain a locally updated diagnostic model through the following steps: S301: The wide-area intelligent agent k pre-collects local mechanical transmission equipment operation sample data, and uses prior knowledge to label the mechanical transmission equipment fault types corresponding to the local mechanical transmission equipment operation sample data with real fault category labels, thus forming a local private mechanical transmission equipment fault operation dataset. S302: The wide-area agent k obtains the current global diagnostic model. The global diagnostic model uses the mechanical transmission equipment operation sample data from the local private mechanical transmission equipment fault operation dataset. The input is used to optimize the global diagnostic model using the point regression loss function as the objective. The feature extractor and projection layer parameters are trained locally to obtain the trained locally updated diagnostic model. S303: The wide-area agent k will locally update the diagnostic model obtained from the training. Sign and package to generate a local model update transaction Uploaded to the blockchain network.
7. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 6, characterized in that, In step S302, the point regression loss function is expressed as: Among them, L dr (v y U) is the point regression loss function; v y This represents the standardized features of the mechanical transmission equipment operation sample data (labeled y) after inputting into the global diagnostic model, processing through the projection layer, and then inputting into the classifier; U represents the parameter matrix of the classifier in the global diagnostic model; u y T represents the classifier weight vector in parameter matrix U corresponding to the fault type y of mechanical transmission equipment; T is the transpose symbol. Point regression loss function L dr (v y U) for standardized feature v y gradient Represented as: Wherein, cos∠(v y ,u y ) represents the standardized feature v y and classifier weight vector u y The cosine similarity.
8. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 6, characterized in that, Before step S4 is executed, the blockchain network pre-selects several nodes from the blockchain nodes as consensus committee member nodes based on the committee consensus mechanism to build a consensus committee. Step S4 specifically involves: S401: The blockchain network receives a local model update transaction generated by a local intelligent agent k-signature and packaged. Then, first determine the local model update transaction. Whether it is compliant; if compliant, then broadcast it on the blockchain network; S402: Compliant partial model update transactions received by the blockchain network Once the number reaches the preset aggregation target, candidate global diagnostic models are generated through federated aggregation and broadcast to consensus committee member nodes; S403: After obtaining the candidate global diagnostic model, the consensus committee member nodes verify whether the candidate global diagnostic model is generated through federated aggregation, and send the verification result to the blockchain network. S404: The blockchain network counts the verification results of the candidate global diagnostic model. If the verification results of the consensus committee member nodes exceed the preset verification ratio, the candidate global diagnostic model is generated by federated aggregation. Then, the candidate global diagnostic model is used as the final global diagnostic model for this round of updates and is updated and stored in the InterPlanetary File System (IPFS).
9. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 8, characterized in that, In step S402, when the blockchain network broadcasts and distributes the generated candidate global diagnostic model, it stores the candidate global diagnostic model in IPFS. After IPFS returns the hash address of the candidate global diagnostic model to the blockchain network, the blockchain network then packages the hash address and all local model update transactions used to aggregate the candidate global diagnostic model into a candidate block and distributes it to the consensus committee member nodes. In step S403, when the consensus committee member nodes obtain the candidate global diagnostic model, they obtain the hash address of the candidate global diagnostic model stored in IPFS from the candidate blocks in the blockchain network, and then retrieve and download the stored candidate global diagnostic model from IPFS based on the hash address. In step S404, after the blockchain network stores the global diagnostic model update of the final update of this round to the InterPlanetary File System (IPFS), it marks the candidate block that records the hash address of the global diagnostic model of the final update of this round stored in IPFS as a verified block, and removes all local model update transaction data stored in the verified block, retaining only the hash address stored in the verified block, so as to release block storage space.
10. The fault diagnosis method for mechanical transmission equipment based on intelligent agents and blockchain according to claim 1, characterized in that, In step S6, the local adaptive optimization strategy includes two stages: local feature extractor adaptive optimization and local classifier adaptive optimization. The parameter ω of the global diagnostic model is represented as ω={ω feat ,ω p ,U};where, ω feat Feature extractor The parameter, ω p Indicates projection layer The parameter U represents the fixed classifier U based on the isoangular tight frame. ETF The parameter matrix; in each stage of the local adaptive optimization strategy, the fixed parameters are defined as... The parameters to be optimized and adjusted are defined as follows: In the adaptive optimization stage of the local feature extractor, let In the local classifier adaptive optimization phase, this includes fixing the classifier U... ETF and projection layer Alternating adaptive optimization; for a fixed classifier U ETF When performing adaptive optimization, let On the projection layer When performing adaptive optimization, let For any wide-area agent k, in each stage of the local adaptive optimization strategy, the objective function of each adaptive optimization stage is... for: in, Normalized loss function: in, Represents the cross-entropy loss function; n s,k This represents the number of data samples representing the local mechanical transmission equipment operation data of the wide-area intelligent agent k. These respectively represent the wide-area intelligent agent The i-th local mechanical transmission equipment operation data and its corresponding mechanical transmission equipment fault type real fault category label; This represents the operating data of the i-th local mechanical transmission device of the wide-area intelligent agent k. The standardized features input to the global diagnostic model are processed by the projection layer and then fed into the classifier; y This indicates the fault type of the corresponding mechanical transmission equipment in the parameter matrix U. The classifier weight vector; u a Let T represent the classifier weight vector in parameter matrix U corresponding to the a-th mechanical transmission equipment fault type, where a = 1, 2, ..., A, and A represents the number of mechanical transmission equipment fault types; T is the transpose symbol.