A mechanical fault diagnosis method and system based on federal adaptive fine-tuning

CN121434624BActive Publication Date: 2026-08-11HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0006]针对现有技术的以上缺陷或改进需求,本发明提供了一种基于联邦自适应微调的机械故障诊断方法及系统,其旨在解决客户端间数据异质性和客户端内数据异质性而导致诊断精度下降的问题

Benefits of technology

1. 本发明在该全局预训练模型中引入一个可学习的特征缩放与移位(FSS)池,如此通过引入FSS池,实现参数级轻量化微调,有效缓解客户端间和客户端内的数据异质性问题,且本发明能够有效提升故障诊断精度,并保持较低的通信与计算成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121434624B_ABST
    Figure CN121434624B_ABST
Patent Text Reader

Abstract

This invention belongs to the technical field of mechanical fault diagnosis, and discloses a mechanical fault diagnosis method and system based on federated adaptive fine-tuning. The steps are as follows: S1, the central server performs weighted aggregation of local model parameters to obtain a global pre-trained model; an FSS pool is introduced into the global pre-trained model; S2, the central server distributes the global pre-trained model and the initialized FSS pool to each client, and updates the FSS pool and classification head using their local data; S3, the central server aggregates and distributes the FSS pools from multiple clients, thereby constructing a global FSS pool; S4, for the input sample, the FSS parameters corresponding to the selected feature keys are determined; S5, instance-adaptive FSS parameters are generated based on the FSS parameters; the instance-adaptive FSS parameters are combined with the parameters of the frozen global pre-trained model to construct an instance-level personalized fault diagnosis model, thereby achieving fault diagnosis. This invention improves the accuracy of fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of mechanical fault diagnosis, and more specifically, relates to a mechanical fault diagnosis method and system based on federated adaptive fine-tuning. Background Technology

[0002] In recent years, deep learning-based mechanical fault diagnosis methods have developed rapidly. These methods can automatically extract key features from equipment operation data, offering higher intelligence and diagnostic accuracy compared to traditional methods that rely on human experience and expertise. However, effective training of deep learning models typically depends on a large number of labeled data samples. In real-world industrial scenarios, individual users often struggle to obtain sufficient labeled data, especially fault data, which is costly and difficult to collect. To address this issue, a common approach is to aggregate monitoring data from multiple users into a shared database to build a large-scale dataset and train a high-performance diagnostic model. However, because industrial monitoring data, especially fault status data, often contains sensitive information related to equipment performance and manufacturing defects, companies are typically unwilling to share raw data due to considerations of trade secrets and competitiveness. Therefore, data centralization solutions are difficult to implement in engineering practice.

[0003] Federated Learning (FL) offers a novel solution to the aforementioned problems. Its basic idea is to perform collaborative training among multiple distributed clients, where each client only needs to upload model parameters without uploading the original data, thus achieving collaborative modeling while protecting data privacy. However, existing federated learning methods have some practical problems: (1) Data heterogeneity among clients: Different clients have different device types, operating environments, and usage conditions, resulting in significant differences in data distribution. Existing methods often overlook this point, which can easily cause drift in the local model update direction and reduce the convergence speed and diagnostic accuracy of the global model.

[0004] (2) Data heterogeneity within the client: In actual production, the same client may generate multiple subdomain data distributions due to changes in equipment status, differences in collection time, or switching of operating conditions, which further weakens the robustness of the global model.

[0005] (3) High communication and computing overhead: Existing federated methods usually require frequent transmission and updating of complete model parameters between the client and the server, which not only increases communication costs, but is also difficult to deploy in scenarios with limited computing and storage resources. Summary of the Invention

[0006] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a mechanical fault diagnosis method and system based on federated adaptive fine-tuning, which aims to solve the problem of decreased diagnostic accuracy caused by data heterogeneity between clients and data heterogeneity within clients.

[0007] To achieve the above objectives, according to one aspect of the present invention, a mechanical fault diagnosis method based on federated adaptive fine-tuning is provided, comprising the following steps: (1) Collaborative model pre-training stage Includes the following steps: S1, each client uses its local private data to train a fault diagnosis model, and a label smoothing strategy is introduced during the training process; S2, the trained local model parameters are uploaded to the central server, the central server performs weighted aggregation on the local model parameters to obtain the global pre-trained model; the parameters of the global pre-trained model are frozen, and a learnable feature scaling and shifting (FSS) pool is introduced into the global pre-trained model. (2) Federal Adaptive Fine-tuning Phase Includes the following steps: S3, the central server distributes the global pre-trained model and the initialized FSS pool to each client. Each client uses its local data to update the FSS pool and classification head, and uploads the updated FSS pool to the central server. S4: The central server aggregates FSS pools from multiple clients and distributes the aggregated FSS pools to each client, repeating multiple rounds of update operations to build a global FSS pool. (3) Instance Adaptive Diagnosis Phase Includes the following steps: S5. For the input sample, use the global pre-trained model to generate query features, calculate the similarity between the query features and the global feature key set, select several feature keys based on the obtained similarity results, and determine the FSS parameters corresponding to the selected feature keys. S6. The obtained multiple FSS parameters are weighted and averaged to generate the instance-adaptive FSS parameters of the input sample; the instance-adaptive FSS parameters are combined with the parameters of the frozen global pre-trained model to dynamically construct an instance-level personalized fault diagnosis model, and then the obtained instance-level personalized fault diagnosis model is used to diagnose faults in mechanical assembly.

[0008] Furthermore, a weighted aggregation strategy is adopted in the collaborative pre-training stage, in which the model parameters uploaded by each client are weighted according to the proportion of their local data volume to the total data volume.

[0009] Furthermore, feature scaling and shift pooling are used to linearly modulate the input features, and the modulation method is as follows: ,in, As input features, The modulated features, As a scaling factor, As the offset factor, This represents the dot product operation.

[0010] Furthermore, during the federated adaptive fine-tuning phase, the pre-trained feature encoder is frozen, allowing only the FSS and classification head parameters of each client to be updated.

[0011] Furthermore, each client's FSS pool includes multiple sets of learnable FSS parameters and introduces a corresponding set of learnable feature keys to select FSS parameters based on sample features.

[0012] Furthermore, the fault diagnosis model adopts the Transformer classification model. In the Transformer architecture, the corresponding input samples are first divided into... Each non-overlapping patch is then mapped to a learnable linear projection. A 3D feature vector is generated, followed by a learnable class label [CLS]. This is then added to the front of the patch embedding sequence to produce the input tensor. Position encoding is added to the embedded sequence.

[0013] Furthermore, based on their respective datasets, each client trains its local model using standard supervised learning methods, with its optimization objective function expressed as:

[0014] in, Indicates the first Predicted probability of class For the classifier output The predicted probability of a class; Smoothed target label vector Defined as:

[0015] in, This is a one-hot encoded vector, where the component corresponding to the correct class is 1, and the other classes are 0. It is a smoothing factor; It is a uniform distribution of all labels.

[0016] Furthermore, once the federated training process is complete, the central server will learn the global FSS pool. and its corresponding global feature key set This will be redistributed to each isolated client, and a dynamically constructed set of data will be built for each test sample. and The instances are composed of an adaptive FSS pool; given a test sample from a client. First, the query features are extracted using a globally pre-trained model. Then, based on query characteristics and The cosine similarity between each feature key is used to select the T most similar feature keys. This process is represented as:

[0017] Based on the selected feature key set From the global FSS pool Searching for the corresponding The optimal matching FSS parameters Then, regarding this The FSS parameters are weighted and averaged to generate instance-adaptive FSS parameters for the input sample 𝑥. The calculation formula is as follows:

[0018] in, It is for each test sample Adaptively generated.

[0019] The present invention also provides a mechanical fault diagnosis system based on federated adaptive fine-tuning. The mechanical fault diagnosis system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the mechanical fault diagnosis method based on federated adaptive fine-tuning as described above.

[0020] The present invention also provides a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the mechanical fault diagnosis method based on federated adaptive fine-tuning as described above.

[0021] In summary, compared with the prior art, the mechanical fault diagnosis method and system based on federated adaptive fine-tuning provided by the present invention have the following beneficial effects: 1. This invention introduces a learnable feature scaling and shifting (FSS) pool into the global pre-trained model. By introducing the FSS pool, lightweight fine-tuning at the parameter level can be achieved, effectively alleviating the problem of data heterogeneity between and within clients. Furthermore, this invention can effectively improve the accuracy of fault diagnosis while maintaining low communication and computing costs.

[0022] 2. This invention significantly reduces communication overhead by freezing the feature encoder and transmitting and updating only some parameters, making it suitable for resource-constrained industrial applications.

[0023] 3. This invention improves diagnostic accuracy under complex working conditions by implementing a sample-level personalized modeling during the inference stage through an instance-adaptive diagnostic mechanism.

[0024] 4. By adapting the parameters of this instance By incorporating parameters into the frozen global pre-trained model, instance-level personalized fault diagnosis models can be dynamically constructed during the inference phase. This mechanism eliminates the need for additional inference parameters, significantly improving diagnostic flexibility and generalization ability when data distributions differ between and within clients, while maintaining inference efficiency.

[0025] 5. Position encoding is added to the embedding sequence to integrate positional information into the input representation; at the same time, a label smoothing strategy is introduced during training to alleviate overfitting. Through label smoothing, the model can effectively reduce the tendency to overfit to a single class during training, thereby improving the generalization ability of the local model. Attached Figure Description

[0026] Figure 1 This is a flowchart of a mechanical fault diagnosis method based on federated adaptive fine-tuning provided by an embodiment of the present invention; Figure 2 This is a framework diagram of the federated adaptive fine-tuning method provided in this invention example; Figure 3 This is a diagram of the Transformer model architecture provided in this invention example; Figure 4 This is a schematic diagram of the feature scaling and shifting method provided in the example of the present invention, wherein (a) and (b) correspond to the FSS-based fine-tuning and FSS structure, respectively; Figure 5 This is a schematic diagram of the instance adaptive fault diagnosis mechanism provided by the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0028] Please see Figure 1 This invention provides a mechanical fault diagnosis method based on federated adaptive fine-tuning. The method includes a collaborative model pre-training stage, a federated adaptive fine-tuning stage, and an instance adaptive diagnosis stage, wherein: During the pre-training phase of the collaborative model, such as Figure 1 and Figure 2 As shown, it includes the following steps: S1, each client uses its local private data to train a fault diagnosis model, and introduces a label smoothing strategy during the training process to improve the generalization ability of the local model.

[0029] S2, the trained local model parameters are uploaded to the central server. The central server performs weighted aggregation on the local model parameters to obtain a global pre-trained model. The parameters of the global pre-trained model are frozen, and a learnable feature scaling and shifting (FSS) pool is introduced into the global pre-trained model.

[0030] In the federal adaptive fine-tuning phase, such as Figure 1 and Figure 2 As shown, it includes the following steps: S3, the central server distributes the global pre-trained model and the initialized FSS pool to each client. Each client uses its local data to update the FSS pool and classification head, and uploads the updated FSS pool to the central server.

[0031] In S4, the central server aggregates FSS pools from multiple clients and distributes the aggregated FSS pools to each client, repeating this process multiple times to build a global FSS pool.

[0032] The instance adaptive diagnostic phase, such as Figure 1 and Figure 4 As shown, it includes the following steps: S5. For the input sample, use the global pre-trained model to generate query features, calculate the similarity between the query features and the global feature key set, select several feature keys based on the obtained similarity results, and determine the FSS parameters corresponding to the selected feature keys.

[0033] S6. The obtained multiple FSS parameters are weighted and averaged to generate the instance-adaptive FSS parameters of the input sample; the instance-adaptive FSS parameters are combined with the parameters of the frozen global pre-trained model to dynamically construct an instance-level personalized fault diagnosis model, and then the obtained instance-level personalized fault diagnosis model is used to diagnose faults in mechanical assembly.

[0034] In step S1, the fault diagnosis model in this invention adopts the Transformer classification model, such as... Figure 3 As shown, in the Transformer architecture, the input samples are first divided into... Each patch is then divided into non-overlapping patches. Each patch is then mapped to a learnable linear projection. A 3D feature vector is generated, followed by a learnable class label [CLS]. This is then added to the front of the patch embedding sequence to produce the input tensor. .

[0035] To incorporate positional information into the input representation, positional encoding is added to the embedding sequence. The tensor is then fed into a Transformer encoder, which consists of several identically structured modules, each including layer normalization (LN), multi-head self-attention (MSA), a multilayer perceptron (MLP), and residual connections. Given an input... Self-attention mechanism for query calculation ,key Sum As shown below:

[0036] in, , , It is a learnable weight matrix.

[0037] The output of a single-head self-attention module can be represented as:

[0038] Throughout the network, the final output corresponding to the class embedding [CLS] is used as a global representation of the input samples, and class prediction is performed through a linear classifier and a softmax function, thereby achieving fault diagnosis.

[0039] Furthermore, in step S1, assume that there is Each client holds its own private dataset. In the federated learning paradigm, the central server does not need to directly obtain the raw data from each client, but instead obtains it from distributed datasets. Collaborative training is then used to build a globally pre-trained model. Each client trains its local model using standard supervised learning methods, based on its respective dataset. The optimization objective function can be expressed as:

[0040] in, Indicates the first Predicted probability of class For the classifier output The predicted probability of the class. During training, a label smoothing strategy is introduced to alleviate overfitting. The smoothed target label vector. It is defined as:

[0041] in, This is a one-hot encoded vector, where the component corresponding to the correct class is 1, and the other classes are 0. This is a smoothing factor. It represents a uniform distribution of all labels. By smoothing the labels, the model can effectively reduce its tendency to overfit to a single class during training, thereby improving the generalization ability of the local model.

[0042] In step S2, after each client completes local model training, it uploads the trained model parameters to the central server. The central server aggregates the model parameters from all clients to obtain the globally pre-trained model. The aggregation method uses a weighted average, calculated using the following formula:

[0043] in Indicates the first Local model parameters for each client. This represents the total amount of data from all clients.

[0044] Furthermore, in step S2, after completing parameter aggregation, the central server freezes the parameters of the global pre-trained model and introduces a Feature Scaling and Shifting (FSS) pool into this global pre-trained model. FSS is a parameter-efficient model fine-tuning method; its basic principle is to modulate intermediate features through linear transformation, thereby enabling the pre-trained model to better adapt to the target data distribution. Figure 4As shown, given a pre-trained Transformer model, an FSS module is inserted after each operation unit (OP) in the Transformer architecture to adjust the feature distribution. The operation units include multi-head self-attention (MSA), multilayer perceptron (MLP), and layer normalization (LN). During fine-tuning, the pre-trained weights of these operation units remain frozen, allowing only the FSS parameters to be updated.

[0045] like Figure 4 As shown in (b), the structure of the FSS module is as follows: after each operation unit outputs features, a scaling factor is first applied to the feature vector. The element-wise dot product is then added to the offset factor. This achieves linear modulation of the features. Specifically, given an input feature... Features modulated by the FSS module It can be calculated in the following ways:

[0046] in, This indicates element-wise dot product operation.

[0047] In step S3, an FSS module with scaling factor λ and offset factor φ is inserted after the multi-head self-attention (MSA), multilayer perceptron (MLP), and layer normalization (LN) operations to modulate the features. Therefore, the overall model parameters after incorporating the FSS module can be expressed as follows: ,in, and These are the parameters of the classification head and the feature encoder, respectively. During the federated fine-tuning phase, the pre-trained feature encoder is frozen, allowing only each client to update its specific FSS parameters and classification head parameters. .

[0048] To address the issues of data heterogeneity between clients and within clients, each client expands a single FSS module into an FSS pool, denoted as . ,in This represents the size of the FSS pool. In addition, a corresponding set of learnable keys is introduced. This is used to select the most suitable FSS parameters based on the features of the input samples. Therefore, the overall learnable parameters for each client are represented as:

[0049] Assuming the federated learning process involves a total of Each communication round contains [number] communication rounds. The local training steps (epochs). The first communication round In each local training step, the update rule for the learnable parameters on the client is as follows:

[0050] in, Indicates the client In its local data loss function on, It is the learning rate.

[0051] In step S4, when the local client completes... After the first local training iteration, each client uploads the updated FSS pool to the central server. In each communication round, the central server performs a weighted aggregation of the FSS pools from all participating clients to obtain a new global FSS pool. Specifically, in the first... After round-robin communication, the aggregation method of the global FSS pool is as follows:

[0052] After completing all After several communication rounds, the server finally obtains the global FSS pool. and its corresponding global key set This allows for the construction of a global instance adaptive fault diagnosis model.

[0053] In step S5, after the federated training process is completed, the central server will learn the global FSS pool. and its corresponding global feature key set This will be redistributed to each isolated client. To achieve instance-adaptive fault diagnosis during the inference phase, a dynamically constructed fault diagnosis system needs to be built for each test sample. and The instances are composed of an adaptive FSS pool.

[0054] like Figure 5 As shown, given a test sample from a certain client First, the query features are extracted using a globally pre-trained model. Then, based on the query characteristics and The cosine similarity between each feature key in the dataset is used to select the T most similar feature keys. This process can be represented as:

[0055] In step S6, based on the feature key set selected in step S5... From the global FSS pool Searching for the corresponding The optimal matching FSS parameters Then, regarding this The FSS parameters are weighted and averaged to provide a weighted average for the input samples. The FSS parameters for the generated instance are adapted and calculated using the following formula:

[0056] It should be pointed out that, It is for each test sample Adaptively generated. This instance is adapted to its parameters. By incorporating parameters into the frozen global pre-trained model, instance-level personalized fault diagnosis models can be dynamically constructed during the inference phase. This mechanism eliminates the need for additional inference parameters, significantly improving diagnostic flexibility and generalization ability when data distributions differ between and within clients, while maintaining inference efficiency.

[0057] To further illustrate this invention in detail, experimental data from a ship's propulsion shafting system were used to validate the method. This dataset, sourced from a ship's transmission system test bench, simulated four operating states: normal, misalignment, imbalance, and a combined misalignment and imbalance fault. During the experiment, each healthy state was operated at four different speeds (approximately 250 r / min, 300 r / min, 350 r / min, and 400 r / min), with loads ranging from 0 to 2 N·m. Based on different operating conditions, the experimental data was divided into four domains (A, B, C, and D) and distributed to different clients to simulate data heterogeneity between and within clients. Data acquisition was performed using an accelerometer mounted on top of the bearing housing, with a sampling frequency of 2000 Hz. For each state within each structural domain, 100 samples were collected, each sample containing 2048 data points. The dataset for each client was divided into training and testing sets in a 7:3 ratio to ensure that the data was not seen by the model during the testing phase.

[0058] Based on the above experimental data, the specific verification process is as follows: S1, each client-side AD independently trains a Transformer classification model using its local monitoring data. During training, a label smoothing strategy is introduced to alleviate overfitting, thereby improving the model's generalization ability across different operating conditions.

[0059] S2. After local training is complete, each client uploads its model parameters to the central server. The central server performs weighted aggregation according to the proportion of data volume from each client to obtain a global pre-trained model. Subsequently, the parameters of the global pre-trained model are frozen and inserted into the FSS pool after the Transformer encoder's multi-head self-attention (MSA), multilayer perceptron (MLP), and layer normalization (LN) modules to scale and shift the features during subsequent fine-tuning.

[0060] In S3, the central server distributes the globally pre-trained model and the initialized FSS pool to the client AD. Each client uses its local data to update only the FSS parameters and classification header, and uploads the updated FSS pool to the central server. The central server aggregates the uploaded FSS pools and then sends the updated results back to the clients. This process is repeated multiple times to form a global FSS pool that takes into account both global and local features.

[0061] S4, after completing multiple rounds of communication, the global FSS pool and corresponding feature keys finally formed by the central server provide the parameter basis for the subsequent instance adaptive diagnosis stage.

[0062] S5. For an input sample from a client, the global pre-trained model first extracts query features, then calculates the cosine similarity between the query features and the global feature key set, and selects the sample that is closest to the query feature. T Each feature key. Therefore, the corresponding key can be retrieved from the global FSS pool. T A subset of FSS parameters.

[0063] S6. The selected FSS parameters are weighted and averaged to generate the instance-adaptive FSS parameters for the sample. The instance-adaptive FSS parameters are then combined with the frozen global model parameters to dynamically form a personalized diagnostic model for the sample, thereby obtaining the diagnostic result.

[0064] To highlight the advantages of the method in fault diagnosis, this invention was compared with existing methods such as LocalOnly (each client trains its model independently on its private data without participating in federated learning), FedAvg (aggregates parameters of locally trained models from all clients through a weighted averaging mechanism to construct a global model), FedProx (addresses data heterogeneity by adding a proximal term to the local objective function), MOON (aligns local model updates with the global model through feature similarity comparison), FedDC (reduces the difference between the local and global models using an auxiliary drift variable), FedUV (prevents bias in the local model by introducing encoder hyperspherical uniformity and classifier variance regularization terms), and FedHEAL (designs a fair joint aggregation objective to prevent the global model from being biased towards certain domains) on a set of datasets with the same parameters to four clients. Table 1 shows the diagnostic accuracy among them.

[0065] As shown in Table 1, the method proposed in this invention significantly outperforms the comparative methods across all clients and on average accuracy. Compared to the current best-performing FedHEAL, the average diagnostic accuracy of this invention is improved by approximately 3.47%, and the diagnostic accuracy on individual clients generally exceeds 98.9%. This indicates that this method can effectively alleviate the data heterogeneity problem between and within clients and significantly improve the model's fault diagnosis capability.

[0066] Table 1. Diagnostic accuracy (%) on various clients

[0067] Table 2 shows the communication overhead of each method during the training process. It can be seen that the method proposed in this invention has a communication overhead of only 4.58 M, far lower than other comparative methods (all above 60 M), effectively reducing the communication overhead in the federated learning process and further verifying its feasibility and efficiency in practical distributed fault diagnosis.

[0068] The present invention also provides a mechanical fault diagnosis system based on federated adaptive fine-tuning. The mechanical fault diagnosis system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the mechanical fault diagnosis method based on federated adaptive fine-tuning as described above.

[0069] The present invention also provides a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the mechanical fault diagnosis method based on federated adaptive fine-tuning as described above.

[0070] Table 2 Communication consumption

[0071] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A mechanical fault diagnosis method based on federated adaptive fine-tuning, characterized in that, The steps are as follows: (1) Collaborative model pre-training stage Includes the following steps: S1, each client uses its local private data to train a fault diagnosis model, and a label smoothing strategy is introduced during the training process; S2, the trained local model parameters are uploaded to the central server, the central server performs weighted aggregation on the local model parameters to obtain the global pre-trained model; the parameters of the global pre-trained model are frozen, and a learnable feature scaling and shifting (FSS) pool is introduced into the global pre-trained model. (2) Federal Adaptive Fine-tuning Phase Includes the following steps: S3, the central server distributes the global pre-trained model and the initialized FSS pool to each client. Each client uses its local data to update the FSS pool and classification head, and uploads the updated FSS pool to the central server. S4: The central server aggregates FSS pools from multiple clients and distributes the aggregated FSS pools to each client, repeating multiple rounds of update operations to build a global FSS pool. (3) Instance Adaptive Diagnosis Phase Includes the following steps: S5. For the input sample, use the global pre-trained model to generate query features, calculate the similarity between the query features and the global feature key set, select several feature keys based on the obtained similarity results, and determine the FSS parameters corresponding to the selected feature keys. S6. The obtained multiple FSS parameters are weighted and averaged to generate the instance-adaptive FSS parameters of the input sample; the instance-adaptive FSS parameters are combined with the parameters of the frozen global pre-trained model to dynamically construct an instance-level personalized fault diagnosis model, and then the obtained instance-level personalized fault diagnosis model is used to diagnose faults in mechanical assembly.

2. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in claim 1, characterized in that: The collaborative pre-training phase employs a weighted aggregation strategy, where the model parameters uploaded by each client are weighted according to the proportion of their local data to the total data volume.

3. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in claim 1, characterized in that: Linear modulation of the input features is performed using feature scaling and shift pooling, and the modulation method is as follows: ,in, As input features, The modulated features, As a scaling factor, As the offset factor, This represents the dot product operation.

4. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in claim 1, characterized in that: During the federated adaptive fine-tuning phase, the pre-trained feature encoder is frozen, allowing only the FSS and classification head parameters of each client to be updated.

5. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in claim 1, characterized in that: Each client's FSS pool includes multiple sets of learnable FSS parameters and introduces a corresponding set of learnable feature keys, which are used to select FSS parameters based on sample features.

6. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in any one of claims 1-5, characterized in that: The fault diagnosis model uses the Transformer classification model. In the Transformer architecture, the corresponding input samples are first divided into... Each non-overlapping patch is then mapped to a learnable linear projection. A 3D feature vector is generated, followed by a learnable class label [CLS]. This is then added to the front of the patch embedding sequence to produce the input tensor. ; Position encoding is added to the embedded sequence.

7. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in claim 6, characterized in that: Based on their respective datasets, each client trains its local model using standard supervised learning methods, with the optimization objective function expressed as: in, Indicates the first Predicted probability of class For the classifier output The predicted probability of a class; Smoothed target label vector Defined as: in, This is a one-hot encoded vector, where the component corresponding to the correct class is 1, and the other classes are 0. It is a smoothing factor; It is a uniform distribution of all labels.

8. The mechanical fault diagnosis method based on federated adaptive fine-tuning as described in any one of claims 1-5, characterized in that: Once the federated training process is complete, the central server will learn the global FSS pool. and its corresponding global feature key set This will be redistributed to each isolated client, and a dynamically constructed set of data will be built for each test sample. and The instances are composed of an adaptive FSS pool; Given a test sample from a client First, the query features are extracted using a globally pre-trained model. Then, based on the query characteristics and The cosine similarity between each feature key is used to select the T most similar feature keys. This process is represented as: Based on the selected feature key set From the global FSS pool Searching for the corresponding The optimal matching FSS parameters Then, regarding this The FSS parameters are weighted and averaged to generate instance-adaptive FSS parameters for the input sample 𝑥. The calculation formula is as follows: in, It is for each test sample Adaptively generated.

9. A mechanical fault diagnosis system based on federated adaptive fine-tuning, characterized in that: The mechanical fault diagnosis system includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it performs the mechanical fault diagnosis method based on federated adaptive fine-tuning as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the mechanical fault diagnosis method based on federated adaptive fine-tuning as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Defect detection method based on federal learning and related equipment

    CN116502950A

  • Equipment fault diagnosis method based on improved federal element learning

    CN117172312A