A cloud manufacturing processing equipment anomaly diagnosis method and terminal based on federated learning
Patent Information
- Application Number
- CN202611078167.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]针对现有技术的不足,本发明提供了一种基于联邦学习的云制造加工设备异常诊断方法及终端,解决现有联邦学习故障诊断方法难以区分云制造加工任务异构性,容易将不同加工任务和不同加工阶段下的异常特征简单平均,导致加工设备终端异常诊断准确性下降的问题
1.本发明通过加工任务上下文码表征云制造加工任务的工艺状态,并基于加工任务上下文码将多源运行数据切分为多个加工阶段数据段,再通过阶段正常基线模型生成阶段残差特征,使不同材料、不同刀具、不同设备能力和不同加工阶段下的正常工况差异被先行削弱;同时,云制造平台依据任务相似度划分任务相似联邦簇,并在任务相似联邦簇内进行联邦聚合,避免不同异构工况下的异常特征被统一平均,从而提高终端侧异常诊断模型对早期异常、跨工况异常和不同加工阶段异常的识别准确性。
Smart Images

Figure CN122964634A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud manufacturing equipment status monitoring technology, specifically to a method and terminal for diagnosing anomalies in cloud manufacturing processing equipment based on federated learning. Background Technology
[0002] With the development of cloud manufacturing technology, CNC machining equipment distributed across different factories and regions can receive machining orders and execute machining tasks through cloud manufacturing platforms. To ensure the stability of the machining process, existing technologies typically collect operating data such as spindle current, servo load, vibration, and temperature at the machining equipment side and use machine learning or deep learning models for fault diagnosis. To avoid directly sharing raw machining data between different factories, some technologies also employ federated learning, allowing each machining equipment terminal to train its fault diagnosis model locally, and then a central server aggregates the models, thereby achieving a certain degree of cross-factory equipment anomaly knowledge sharing.
[0003] However, processing tasks in cloud manufacturing scenarios are highly heterogeneous. Different processing equipment often handles orders with varying process routes, material types, tool types, equipment capabilities, and processing stages. The same sensor fluctuation might be considered normal load variation in the roughing stage, but could correspond to abnormalities such as tool wear, chatter, or clamping looseness in the finishing stage. Existing federated learning fault diagnosis methods typically aggregate model parameters from different terminals, making it difficult to distinguish normal differences between different processing task contexts and processing stages. This leads to a tendency to simply average abnormal features under heterogeneous operating conditions, resulting in decreased accuracy of terminal-side anomaly diagnosis models in identifying early anomalies, cross-condition anomalies, and quality-related anomalies. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a cloud manufacturing processing equipment anomaly diagnosis method and terminal based on federated learning. This solves the problem that existing federated learning fault diagnosis methods are unable to distinguish the heterogeneity of cloud manufacturing processing tasks and tend to simply average the anomaly characteristics of different processing tasks and different processing stages, leading to a decrease in the accuracy of anomaly diagnosis at the processing equipment terminal.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a cloud manufacturing processing equipment anomaly diagnosis method based on federated learning, applied to a system consisting of a cloud manufacturing platform and multiple processing equipment terminals, comprising: S1. The processing equipment terminal receives processing task information from the cloud manufacturing platform, performs desensitization encoding on the processing task information, and generates a processing task context code. S2. The processing equipment terminal collects multi-source operation data of the corresponding processing equipment, and divides the multi-source operation data into multiple processing stage data segments based on the processing task context code; S3. The processing equipment terminal calls the normal baseline model of the stage corresponding to the processing stage data segment, calculates the deviation of the multi-source operating data from the normal state of the current processing stage, and generates stage residual features. S4. The processing equipment terminal trains a local anomaly diagnosis model based on the stage residual features, and generates a federated update package including a processing task context summary according to the training results, and uploads the federated update package to the cloud manufacturing platform. S5. The cloud manufacturing platform calculates the task similarity between each federated update package based on the processing task context summary in the federated update package, and divides multiple federated update packages into multiple task-similar federated clusters based on the task similarity. S6. The cloud manufacturing platform performs federated aggregation within each task-similar federated cluster to generate corresponding stage aggregation models and stage aggregation prototypes. S7. The cloud manufacturing platform determines whether there is a prototype conflict between the stage aggregation prototypes of similar federation clusters of different tasks. If there is a prototype conflict, it generates context branch adaptation parameters bound to the context code of the processing task. If there is no prototype conflict, it uses the preset general adaptation parameters as context branch adaptation parameters. S8. The processing equipment terminal receives the stage aggregation model, stage aggregation prototype and context branch adaptation parameters, and performs personalized fusion with the local anomaly diagnosis model to obtain the terminal-side anomaly diagnosis model. S9. The processing equipment terminal uses the terminal-side anomaly diagnosis model to perform online anomaly diagnosis on the current processing process and outputs anomaly diagnosis results, which include anomaly type, anomaly level, anomaly occurrence stage, and anomaly evidence vector.
[0006] Furthermore, the machining task information includes the order process route, process type, material category, tool type, equipment capability label, CNC program characteristics, and quality feedback requirements; the machining task context code is used to characterize the process status of the current machining task and to mask the original customer order data, drawing data, and complete CNC program.
[0007] Furthermore, the step of dividing the multi-source operation data into multiple processing stage data segments includes: extracting the process type, tool type, and CNC program features from the processing task context code; identifying the current processing stage based on the process type, tool type, and CNC program features; and segmenting and marking the continuously collected multi-source operation data according to the identified processing stage to obtain multiple processing stage data segments.
[0008] Furthermore, the step of generating stage residual features includes: obtaining the stage normal baseline model corresponding to the current processing stage; inputting the multi-source operating data in the current processing stage data segment into the stage normal baseline model to obtain the normal state estimate; calculating the deviation between the multi-source operating data and the normal state estimate, and generating stage residual features based on the deviation.
[0009] Furthermore, the local anomaly diagnosis model includes a shared feature encoder, a stage prototype library, and an anomaly discrimination head; the shared feature encoder is used to extract anomaly representations from the stage residual features; the stage prototype library is used to store normal prototypes and abnormal prototypes under different processing stages; the anomaly discrimination head is used to output local anomaly diagnosis results based on the distance relationship between the anomaly representations and the stage prototype library.
[0010] Furthermore, the federated update package includes model parameter increments, stage prototype increments, anomaly evidence statistics, and processing task context summaries; the model parameter increments are used to characterize parameter changes in the local anomaly diagnosis model; the stage prototype increments are used to characterize prototype changes under the corresponding processing stage; the anomaly evidence statistics are used to characterize the frequency and reliability of local anomaly types; and the processing task context summaries are used to characterize the processing stages and equipment capability range to which the federated update package is applicable.
[0011] Further, the step of calculating the task similarity between each federated update package includes: calculating the similarity of equipment capabilities, process stages, material load, tooling status, and anomalous evidence between each federated update package respectively; performing weighted fusion on the similarity of equipment capabilities, process stages, material load, tooling status, and anomalous evidence to obtain the task similarity; and classifying federated update packages whose task similarity meets the clustering conditions into the same task-similar federated cluster.
[0012] Furthermore, the step of determining whether there is a prototype conflict between stage aggregation prototypes of different task-similar federation clusters includes: obtaining stage aggregation prototypes of the same anomaly type in different task-similar federation clusters; calculating the directional difference and distance difference between stage aggregation prototypes of the same anomaly type; if the directional difference or distance difference exceeds the corresponding conflict threshold, it is determined that there is a prototype conflict; for stage aggregation prototypes with prototype conflicts, generating context branch adaptation parameters bound to the processing task context code.
[0013] Furthermore, the method also includes: receiving quality inspection feedback after the processing equipment terminal completes the processing task; associating the quality inspection feedback with the stage residual characteristics to determine the target processing stage that affects the processing quality; and correcting the abnormal prototypes related to quality anomalies in the stage prototype library according to the stage residual characteristics corresponding to the target processing stage.
[0014] This invention also provides a cloud manufacturing processing equipment anomaly diagnosis terminal based on federated learning, comprising: The task context generation module is used to receive processing task information issued by the cloud manufacturing platform, perform desensitization encoding on the processing task information, and generate a processing task context code. The data segmentation module is used to collect multi-source operating data of the corresponding processing equipment and divide the multi-source operating data into multiple processing stage data segments based on the processing task context code. The residual feature generation module is used to call the stage normal baseline model corresponding to the processing stage data segment, calculate the deviation of the multi-source operating data from the current processing stage normal state, and generate stage residual features. The local model training module is used to train a local anomaly diagnosis model based on the stage residual features and generate a federated update package based on the training results. The federated communication module is used to upload the federated update package to the cloud manufacturing platform and receive the stage aggregation model, stage aggregation prototype and context branch adaptation parameters issued by the cloud manufacturing platform. The personalized fusion module is used to personalize and fuse the stage aggregation model, stage aggregation prototype and context branch adaptation parameters with the local anomaly diagnosis model to obtain the terminal-side anomaly diagnosis model. The online diagnostic module is used to perform online anomaly diagnosis on the current processing process using the terminal-side anomaly diagnosis model and output the anomaly diagnosis results.
[0015] This invention provides a method and terminal for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning. It has the following beneficial effects: 1. This invention characterizes the technological state of cloud manufacturing processing tasks through processing task context codes, and divides multi-source operational data into multiple processing stage data segments based on the processing task context codes. Then, it generates stage residual features through a stage normal baseline model, thereby reducing the differences in normal operating conditions under different materials, different tools, different equipment capabilities, and different processing stages. At the same time, the cloud manufacturing platform divides task similarity federated clusters based on task similarity and performs federated aggregation within task similarity federated clusters to avoid the uniform averaging of abnormal features under different heterogeneous operating conditions, thereby improving the accuracy of the terminal-side anomaly diagnosis model in identifying early anomalies, cross-operating condition anomalies, and anomalies at different processing stages.
[0016] 2. This invention further determines whether there is a prototype conflict between stage aggregation prototypes in different task-similar federated clusters, and generates context branch adaptation parameters bound to the processing task context code when a prototype conflict exists. This enables the same processing equipment terminal to call matching anomaly discrimination logic under different processing tasks, avoiding normal fluctuations in the roughing heavy-load state from interfering with the weak anomaly identification in the finishing stage, and enhancing the personalized adaptation capability of the terminal-side anomaly diagnosis model in the complex task environment of cloud manufacturing.
[0017] 3. The invention uploads a federated update package to the cloud manufacturing platform. The federated update package includes model parameter increments, stage prototype increments, anomaly evidence statistics, and machining task context summaries. It does not require uploading original customer order data, drawing data, complete CNC programs, and original multi-source operation data. It can reduce the risk of leakage of machining data and order data while sharing anomaly diagnosis knowledge across factories.
[0018] 4. The local anomaly diagnosis model of the present invention includes a shared feature encoder, a stage prototype library, and an anomaly discrimination head. It can output anomaly diagnosis results based on the distance relationship between the anomaly representation and the normal prototype and the abnormal prototype at different processing stages. This makes the anomaly diagnosis results include not only the anomaly type and anomaly level, but also the anomaly occurrence stage and anomaly evidence vector, which improves the interpretability of the anomaly diagnosis results and facilitates the cloud manufacturing platform to perform processing task scheduling, maintenance notification, and quality traceability.
[0019] 5. After the processing task is completed, the present invention receives quality inspection feedback and associates the quality inspection feedback with the stage residual characteristics to determine the target processing stage that affects the processing quality. Then, it corrects the abnormal prototypes related to quality anomalies in the stage prototype library, so that the terminal-side anomaly diagnosis model can gradually learn early anomaly patterns that have not yet caused downtime failures but have already affected the processing quality, thereby improving the ability to identify processing quality anomalies in advance. Attached Figure Description
[0020] Figure 1 This is an architecture diagram of a cloud manufacturing and processing equipment anomaly diagnosis system provided in an embodiment of the present invention; Figure 2 This is a flowchart of a cloud manufacturing and processing equipment anomaly diagnosis method provided in an embodiment of the present invention; Figure 3 This is a block diagram of the terminal structure of the processing equipment provided in an embodiment of the present invention. Detailed Implementation
[0021] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] like Figure 1 As shown, this invention provides a cloud manufacturing processing equipment anomaly diagnosis method and terminal based on federated learning, applied to a cloud manufacturing processing environment consisting of a cloud manufacturing platform and multiple processing equipment terminals. The cloud manufacturing platform receives processing orders, splits processing tasks, issues processing task information, receives federated update packages uploaded by each processing equipment terminal, and issues stage aggregation models, stage aggregation prototypes, and context branch adaptation parameters to the processing equipment terminals. The processing equipment terminals are deployed on the corresponding processing equipment side to collect multi-source operational data of the corresponding processing equipment and complete local anomaly diagnosis model training and online anomaly diagnosis without uploading original processing data.
[0023] In this embodiment, the processing equipment can be a CNC lathe, CNC milling machine, machining center, grinding machine, composite machining equipment, or other processing equipment that can access a cloud manufacturing platform. Multi-source operating data can include at least one of the following: spindle current, servo load, vibration signal, temperature signal, acoustic emission signal, feed rate, spindle speed, axial following error, tool number, tool change signal, and alarm code. Machining task information includes the order process route, process type, material category, tool type, equipment capability label, CNC program features, and quality feedback requirements. The CNC program features are not the complete CNC program itself, but rather desensitized features extracted from the CNC program, such as motion segment type, cutting segment ratio, spindle speed range, feed rate range, tool change count, and key machining stage identifiers.
[0024] like Figure 2 As shown, in practical implementation, after receiving the processing task information from the cloud manufacturing platform, the processing equipment terminal first performs de-identification encoding on the processing task information to generate a processing task context code. The processing task context code is used to characterize the current processing task's technological status and masks the customer order's original data, drawing data, and complete CNC program. Specifically, the processing equipment terminal encodes the order process route as a process sequence identifier, the process type as a process category identifier, the material category as a material load level, the tool type as a tool processing capability identifier, the equipment capability label as an equipment capability vector, and the CNC program features as processing stage trigger features. The above encoding results are then concatenated to form the processing task context code.
[0025] To ensure that the machining task context code can be invoked by subsequent models, the machining equipment terminal configures fixed-length encoding bits for various encoded fields. For example, the operation sequence identifier indicates the position of the current machining task within the order's process route; the process category identifier indicates one of turning, milling, drilling, grinding, or composite machining; the material load level indicates the cutting load level corresponding to the machining material; the tool processing capability identifier indicates the tool type and its compatible machining method; the equipment capability vector indicates the machining equipment's spindle power, machining accuracy, stiffness level, control system type, and maximum feed capacity; and the machining stage trigger feature indicates the motion segments and cutting segments in the CNC program related to machining stage switching. The above encoding results do not include the customer order's original data, drawing data, or complete CNC program, thus avoiding the leakage of sensitive machining order content during terminal-side federated training and cloud aggregation.
[0026] To avoid misjudging normal operating condition differences caused by different orders, materials, cutting tools, and equipment capabilities as abnormalities, this embodiment does not directly input multi-source operating data into a unified fault classification model. Instead, it segments the continuously collected multi-source operating data into processing stages based on the processing task context code. Specifically, the processing equipment terminal extracts the process type, tool type, and CNC program characteristics from the processing task context code. Based on the process type, tool type, and CNC program characteristics, it identifies the current processing stage and segments the continuously collected multi-source operating data according to the identified processing stage, resulting in multiple processing stage data segments. The processing stage can include at least one of the following: idle operation stage, workpiece approach stage, roughing stage, semi-finishing stage, finishing stage, tool change stage, clamping and adjustment stage, and standby stage.
[0027] During the machining stage segmentation process, the machining equipment terminal uses the CNC program characteristics as the initial segmentation basis and the spindle current, servo load, feed rate, spindle speed, tool number, and tool change signal as the correction basis. When the CNC program characteristics are consistent with the sensor status, the machining equipment terminal segments according to the machining stage corresponding to the CNC program characteristics; when there is a short-term inconsistency between the CNC program characteristics and the sensor status, the machining equipment terminal determines the machining stage based on the CNC program characteristics and uses the sensor status change point to correct the start and end boundaries of the machining stage data segment; when a tool change signal or alarm code is triggered, the machining equipment terminal prioritizes marking the corresponding time period as the tool change stage or the abnormal confirmation stage.
[0028] For example, in CNC milling, when the CNC program indicates that the spindle has started and the axial feed rate is in the non-cutting rapid traverse range, the machining terminal marks the corresponding time period as the idle run stage; when the spindle current begins to increase and the feed rate enters the cutting range, the machining terminal marks the corresponding time period as the workpiece approach stage; when the spindle load remains in a high range for an extended period and the material load level is high, the machining terminal marks the corresponding time period as the roughing stage; when the depth of cut decreases and the surface quality requirements increase, the machining terminal marks the corresponding time period as the finishing stage. In this way, the same type of sensor signal can be assigned different diagnostic semantics at different machining stages. For example, higher vibration energy in the roughing stage does not necessarily indicate an abnormality, while the same vibration energy in the finishing stage may correspond to chatter or tool wear.
[0029] After obtaining the processing stage data segment, the processing equipment terminal calls the corresponding stage normal baseline model to calculate the deviation of multi-source operating data from the current normal state of the processing stage, generating stage residual characteristics. The stage normal baseline model is used to describe the normal variation range of multi-source operating data under the corresponding processing stage, corresponding material load level, and corresponding equipment capacity conditions. The stage normal baseline model can be established based on historical normal processing data, and can also be incrementally updated based on confirmed normal processing data after the processing equipment terminal is put into operation.
[0030] The process of establishing a stage-based normal baseline model includes: acquiring historical processing task data that has been confirmed to be normal; dividing the historical processing task data into corresponding processing stage samples according to the processing task context code; extracting the mean spindle current, spindle current fluctuation rate, mean servo load, servo load fluctuation rate, vibration frequency band energy, temperature rise slope, mean axial following error, acoustic emission envelope energy, and feed rate stability for each processing stage sample; establishing normal state sample sets according to processing stage, material load level, and equipment capability labels; and modeling the normal state sample sets using a time-series prediction model, a sliding statistical model, or an autoencoder reconstruction model to obtain the stage-based normal baseline model corresponding to that processing stage. The stage-based normal baseline model receives multi-source operating data from the current processing stage data segment and outputs the normal state estimate corresponding to that multi-source operating data.
[0031] In one embodiment, the stage-based normal baseline model is established using a sliding statistical model. The processing equipment terminal uses the mean, variance, quantile range, and rate of change range of each sensor channel in the historical normal samples of the processing stage, and adjusts the normal state estimate based on the material load level and equipment capability label. In another embodiment, the stage-based normal baseline model is established using an autoencoder reconstruction model. The processing equipment terminal inputs the normal state sample set into the autoencoder network for training, enabling the autoencoder network to learn the reconstruction rules of normal multi-source operating data under the current processing stage. During online diagnosis, the reconstruction result is used as the normal state estimate. Both methods can generate stage-based normal baseline models; the specific method used depends on the computing power and data scale of the processing equipment terminal.
[0032] In this embodiment, the stage residual features are generated as follows: ; in, This represents the stage residual characteristic of the i-th processing equipment terminal in the s-th processing stage. This represents the multi-source operational data collected by the i-th processing equipment terminal during the s-th processing stage. This represents the normal state estimate output by the phased normal baseline model. This indicates normalization processing. Normalization processing is used to eliminate the dimensional differences between different sensors, enabling the spindle current, servo load, vibration signal, temperature signal, acoustic emission signal, and axial following error to be compared in a unified feature space.
[0033] Stage residual characteristics can include at least one of the following: frequency band energy residual, servo load residual, thermal drift residual, axial following error residual, spindle power residual, and vibration envelope residual. Frequency band energy residual reflects the deviation of vibration energy within a specific frequency band from the normal frequency band energy of the current machining stage; servo load residual reflects the deviation of the load on each feed axis from the normal load of the current machining stage; thermal drift residual reflects the deviation of the equipment's temperature rise or thermal deformation trend from the normal thermal state of the current machining stage; axial following error residual reflects the degree of deviation of the execution trajectory; spindle power residual reflects abnormal cutting loads; and vibration envelope residual reflects early changes in abnormalities such as tool wear, clamping looseness, or chatter.
[0034] The processing equipment terminal trains a local anomaly diagnosis model based on stage residual features. The local anomaly diagnosis model includes a shared feature encoder, a stage prototype library, and an anomaly discrimination head. The shared feature encoder is used to extract anomaly representations from the stage residual features; the stage prototype library is used to store normal and abnormal prototypes under different processing stages; and the anomaly discrimination head is used to output local anomaly diagnosis results based on the distance relationship between the anomaly representations and the stage prototype library.
[0035] Specifically, the shared feature encoder can employ any of the following: a one-dimensional convolutional network, a temporal convolutional network, a gated recurrent network, or a lightweight Transformer encoder. The input to the shared feature encoder is the stage residual features, and the output is anomaly representations. The stage prototype library is organized according to machining stages and anomaly types. Each machining stage corresponds to at least one of the following prototypes: normal prototype, tool wear prototype, spindle anomaly prototype, clamping looseness prototype, chatter prototype, servo hysteresis prototype, and thermal drift prototype. The anomaly discrimination head calculates the matching relationship between the anomaly representation and each prototype in the stage prototype library, and outputs the anomaly type, anomaly level, and anomaly evidence vector based on the matching relationship.
[0036] The training process of the local anomaly diagnosis model includes: the processing equipment terminal uses the stage residual features with labeled anomaly types as supervised samples, and the unlabeled stage residual features that have been confirmed as normal by quality inspection feedback or manual review as normal samples; the shared feature encoder extracts the anomaly representations of the supervised samples and normal samples; the stage prototype library is initialized based on the average anomaly representation under the same processing stage and the same anomaly type, and updated according to the training iteration results; the anomaly discrimination head aims to reduce the distance between similar anomaly representations and corresponding anomaly prototypes, and increase the distance between prototypes of different anomaly types, and updates the local anomaly diagnosis model in conjunction with the anomaly type classification loss. For processing equipment terminals lacking anomaly labels, training can be performed first with normal prototypes and unknown anomaly prototypes, and then anomaly prototypes can be gradually supplemented based on subsequent quality inspection feedback.
[0037] To ensure that the stage prototype library can represent the differences between machining stages, in this embodiment, the same anomaly type is stored as different prototypes at different machining stages. For example, tool wear corresponds to the roughing tool wear prototype in the roughing stage and the finishing tool wear prototype in the finishing stage. During diagnosis, the anomaly detection head only calls the normal and anomaly prototypes corresponding to the current machining stage for distance calculation, avoiding interference from prototypes of other machining stages in the anomaly detection of the current machining stage.
[0038] Anomaly scores are determined based on the distance between the anomaly representation and the normal prototype, the degree of matching between the anomaly representation and the anomaly prototype, the duration of the stage residual characteristics, and the anomaly evidence statistics. When an anomaly representation is far from the normal prototype of the current processing stage but close to a certain anomaly prototype, the anomaly discrimination head uses the anomaly type corresponding to that anomaly prototype as a candidate anomaly type. When the anomaly score exceeds the warning threshold, a warning level is output; when the anomaly score exceeds the shutdown threshold, a severe anomaly level is output. Local anomaly diagnosis results are used to generate anomaly evidence statistics, and the results output by the terminal-side anomaly diagnosis model are used as the final anomaly diagnosis results.
[0039] In this embodiment, the anomaly evidence vector is used to explain the basis for the formation of the anomaly diagnosis result. It can include the processing stage that triggered the anomaly judgment, the sensor channel with the highest contribution, the residual feature with the largest deviation, the anomaly prototype with the highest matching degree, and the duration of the anomaly. By outputting the anomaly evidence vector, the cloud manufacturing platform can obtain interpretable diagnostic basis when performing equipment scheduling, maintenance dispatching, and quality traceability.
[0040] After the local anomaly diagnosis model is trained, the machining equipment terminal generates a federated update package based on the training results. The federated update package includes model parameter increments, stage prototype increments, anomaly evidence statistics, and a machining task context summary. Model parameter increments characterize parameter changes in the local anomaly diagnosis model; stage prototype increments characterize prototype changes under the corresponding machining stage; anomaly evidence statistics characterize the frequency and reliability of local anomaly types; and the machining task context summary characterizes the machining stages and equipment capability range to which the federated update package is applicable. The machining task context summary is obtained by further compression of the machining task context code and does not contain original customer order data, drawing data, or complete CNC programs.
[0041] The stage prototype increment is determined by the difference between the stage prototype after this round of training and the stage aggregate prototype received in the previous round. If a certain processing stage or a certain anomaly type does not have a valid sample locally, the processing equipment terminal will not generate the corresponding stage prototype increment. The model parameter increment is determined by the difference between the local anomaly diagnosis model parameters after this round of training and the local anomaly diagnosis model parameters before the previous round of training. Anomaly evidence statistics can include the number of times local anomaly types occur, the average confidence of anomaly types, the average duration of anomalies, the number of quality feedback associations, and the number of manual verifications. The processing task context summary can be obtained by hashing, bucketing, or low-dimensional embedding the processing task context code, and is used by the cloud manufacturing platform to calculate task similarity.
[0042] The processing equipment terminals upload federated update packages to the cloud manufacturing platform. After receiving federated update packages uploaded by multiple processing equipment terminals, the cloud manufacturing platform does not directly perform a uniform average aggregation of all federated update packages. Instead, it calculates the task similarity between federated update packages based on the processing task context summary in each federated update package, and divides multiple federated update packages into multiple task-similar federated clusters based on the task similarity.
[0043] In this embodiment, the calculation logic for task similarity is as follows: ; in, This represents the task similarity between the p-th federated update package and the q-th federated update package. Indicates the similarity of equipment capabilities. Indicates the similarity of process stages. Indicates the similarity of material loads. Indicates the similarity of tool states. Indicates the similarity of anomalous evidence. , , , and These represent the weights corresponding to the similarity scores. Each weight can be preset by the cloud manufacturing platform or adjusted based on historical diagnostic results and quality inspection feedback.
[0044] Equipment capability similarity characterizes the degree of similarity between different machining equipment in terms of spindle power, machining accuracy, stiffness level, control system type, and maximum feed capacity. Process stage similarity characterizes whether the machining stages corresponding to the federated update packages are consistent or similar. Material load similarity characterizes the degree of similarity between different material categories and cutting load levels. Tool condition similarity characterizes the degree of similarity between tool type, tool usage time, and tool wear level. Anomaly evidence similarity characterizes the degree of similarity between anomaly evidence vectors in different federated update packages.
[0045] When task similarity meets clustering criteria, the cloud manufacturing platform assigns the corresponding federated update packages to the same task-similar federated cluster. For example, the cloud manufacturing platform can construct a federated update package similarity graph using task similarity as edge weights and obtain multiple task-similar federated clusters through graph clustering methods; alternatively, it can use a task similarity threshold as a basis to group federated update packages with task similarity greater than the threshold into the same task-similar federated cluster. Through task-similar federated cluster division, scenarios with heavy-load roughing, light-load finishing, processing different materials, and different equipment capabilities can be differentiated and processed, avoiding the simple averaging of abnormal features under heterogeneous operating conditions.
[0046] The cloud manufacturing platform performs federated aggregation within each task-similar federated cluster, generating corresponding stage aggregation models and stage aggregation prototypes. The stage aggregation model represents the anomaly diagnosis model parameters shared by multiple processing equipment terminals within the task-similar federated cluster. The stage aggregation prototype represents the normal or anomaly prototype shared by multiple processing equipment terminals within the task-similar federated cluster under a given processing stage. During aggregation, the cloud manufacturing platform can determine the aggregation weight based on the anomaly evidence statistics, data volume, diagnostic credibility, and task similarity in the federated update package, ensuring that federated update packages with more credible anomaly evidence and higher task similarity contribute more to the aggregation result.
[0047] When generating stage aggregate prototypes within task-similar federated clusters, the cloud manufacturing platform first filters stage prototype increments with the same processing stage and the same anomaly type identifier. Then, it determines the aggregation weight based on anomaly evidence statistics, sample size, and task similarity, calculating the stage aggregate prototype. If only a few processing equipment terminals in a task-similar federated cluster upload stage prototype increments of a certain anomaly type, the cloud manufacturing platform can reduce the credibility of that stage aggregate prototype and mark it as a prototype to be verified during distribution. Upon receiving the prototype to be verified, the processing equipment terminal uses it as an auxiliary reference and does not directly replace the highly reliable prototypes in its local stage prototype library.
[0048] After generating the prototype, the cloud manufacturing platform further determines whether there are prototype conflicts between the stage-aggregated prototypes of different task-similar federated clusters. Prototype conflicts refer to stage-aggregated prototypes of the same anomaly type exhibiting significantly different directions or distances in different task-similar federated clusters. Forced merging could lead to normal features under some processing tasks being mistakenly identified as anomalies, or the anomalous features under some processing tasks being weakened.
[0049] In this embodiment, prototype conflicts are determined as follows: ; in, This represents the degree of conflict between the stage aggregation prototypes belonging to the h-th anomaly type in the u-th task-similar federated cluster and the v-th task-similar federated cluster. This represents the stage aggregation prototype belonging to the h-th anomaly type in the u-th task-similar federated cluster. Let represent the stage aggregation prototype belonging to the h-th anomaly type in the similar federated cluster of the v-th task, cos represents the cosine similarity calculation, λ represents the directional difference weight, and ε represents the stabilizing term to prevent the denominator from being zero. If the conflict degree exceeds the corresponding conflict threshold, a prototype conflict is determined to exist.
[0050] When prototype conflicts exist, the cloud manufacturing platform does not forcibly merge conflicting stage aggregate prototypes. Instead, it generates context branch adaptation parameters bound to the machining task context code. These parameters enable the same machining equipment terminal to invoke different exception handling branches under different machining tasks. Specifically, the cloud manufacturing platform determines the corresponding equipment capability range, process stage range, material load range, and tool state range based on the machining task context summary that caused the prototype conflict, and generates context branch adaptation parameters for these ranges. These parameters can be gating parameters, feature scaling parameters, prototype selection parameters, or lightweight adaptation layer parameters from the exception handling header.
[0051] When the terminal-side anomaly diagnosis model performs diagnosis, the processing equipment terminal queries the corresponding context branch adaptation parameters based on the current processing task context code. If the context branch adaptation parameter is a gating parameter, the corresponding anomaly discrimination branch is selected through gating weights; if the context branch adaptation parameter is a feature scaling parameter, channel scaling is applied to the anomaly representation output by the shared feature encoder; if the context branch adaptation parameter is a prototype selection parameter, a prototype matching the current processing task context code is selected from the stage aggregated prototypes to participate in distance calculation; if the context branch adaptation parameter is a lightweight adaptation layer parameter, a lightweight adaptation layer is inserted between the shared feature encoder and the anomaly discrimination head to perform task-related transformations on the anomaly representation. Through this method, the same processing equipment terminal can invoke different anomaly discrimination logic under different processing tasks.
[0052] The cloud manufacturing platform distributes the stage aggregation model, stage aggregation prototype, and context branch adaptation parameters to the corresponding processing equipment terminal. After receiving the data, the processing equipment terminal selects the matching stage aggregation model, stage aggregation prototype, and context branch adaptation parameters based on the current processing task context code, and performs personalized fusion with the local anomaly diagnosis model to obtain the terminal-side anomaly diagnosis model.
[0053] In this embodiment, personalized fusion can be performed in the following manner: ; in, This represents the parameters of the terminal-side anomaly diagnosis model for the i-th processing equipment terminal. This represents the parameters of the local anomaly diagnosis model for the i-th processing equipment terminal. This represents the parameters of the stage aggregation model that match the current processing task. Indicates the personalization fusion coefficient. Indicates the context code of the current processing task. Triggered context branch adaptation parameters. The personalized fusion coefficient can be determined based on the local data volume, local diagnostic stability, and task similarity of the processing equipment terminal. Before personalized fusion, the processing equipment terminal maps the local anomaly diagnosis model parameters, stage aggregation model parameters, and context branch adaptation parameters to the same parameter layer or the same adaptation layer, while the parameter layers that do not participate in the fusion retain their local parameters unchanged.
[0054] The machining equipment terminal utilizes a terminal-side anomaly diagnosis model to perform online anomaly diagnosis of the current machining process. During online anomaly diagnosis, the machining equipment terminal continuously collects multi-source operating data, identifies the current machining stage based on the current machining task context code, calls the corresponding stage normal baseline model to generate stage residual features, and then inputs the stage residual features into the terminal-side anomaly diagnosis model to output the anomaly diagnosis result. The anomaly diagnosis result includes anomaly type, anomaly level, anomaly occurrence stage, and anomaly evidence vector. Anomaly type can include at least one of tool wear, spindle anomaly, clamping looseness, chatter, servo lag, thermal drift, and unknown anomalies. Anomaly level can be classified into warning, minor anomaly, moderate anomaly, and severe anomaly according to the anomaly score. The anomaly occurrence stage indicates whether the anomaly occurs in the roughing stage, semi-finishing stage, finishing stage, tool change stage, or other machining stage. The anomaly evidence vector describes the key residual features and key sensor channels that led to the anomaly judgment.
[0055] When the anomaly level reaches the preset alarm level, the processing equipment terminal can send the anomaly diagnosis results to the cloud manufacturing platform. Based on the anomaly diagnosis results, the cloud manufacturing platform executes processing task scheduling, maintenance notifications, workpiece quality verification, or processing parameter adjustments. For example, when the anomaly type is tool wear and the anomaly occurs during the finishing stage, the cloud manufacturing platform can generate a tool change suggestion or a suggestion to reduce the feed rate; when the anomaly type is clamping looseness, the cloud manufacturing platform can pause the corresponding processing task and prompt for reclamping; when the anomaly type is thermal drift, the cloud manufacturing platform can prompt for thermal compensation or an extension of the stabilization time.
[0056] Furthermore, this embodiment can also introduce quality inspection feedback to correct the stage prototype library. After the processing task is completed, the processing equipment terminal receives quality inspection feedback, which includes dimensional deviations, surface roughness deviations, form and position errors, or workpiece rework results. The processing equipment terminal correlates the quality inspection feedback with stage residual characteristics to determine the target processing stage affecting the processing quality, and corrects the abnormal prototypes related to quality anomalies in the stage prototype library based on the stage residual characteristics corresponding to the target processing stage.
[0057] The process of associating quality inspection feedback with stage residual characteristics includes: establishing a correspondence between quality inspection feedback and processing stage data segments using workpiece number, processing task number, and processing stage timestamp; calculating the correlation between stage residual characteristics and quality deviation indicators for each processing stage data segment; identifying the processing stage with the highest correlation that exceeds the quality association threshold as the target processing stage; and using the corresponding stage residual characteristics in the target processing stage as quality anomaly samples to update the quality anomaly-related prototypes in the stage prototype library.
[0058] Specifically, when a workpiece exhibits excessive dimensional deviations after machining, but no serious anomaly is detected during online anomaly diagnosis, the machining equipment terminal traces back the data segments of each machining stage corresponding to that workpiece, identifies the stage residual feature most relevant to the trend of dimensional deviation changes, and determines this stage as the target machining stage. Subsequently, the machining equipment terminal uses the stage residual features corresponding to the target machining stage as quality anomaly samples to update the quality anomaly-related prototypes in the stage prototype library. In this way, the terminal-side anomaly diagnosis model can gradually learn early anomaly patterns that have not yet caused downtime but have already affected machining quality.
[0059] like Figure 3 As shown, the present invention also provides a cloud manufacturing processing equipment anomaly diagnosis terminal based on federated learning. The terminal includes a task context generation module, a data segmentation module, a residual feature generation module, a local model training module, a federated communication module, a personalized fusion module, and an online diagnosis module.
[0060] The task context generation module receives processing task information from the cloud manufacturing platform, de-identifies and encodes the information, and generates a processing task context code. The data segmentation module collects multi-source operational data from the corresponding processing equipment and segments this data into multiple processing stage data segments based on the processing task context code. The residual feature generation module calls the stage normal baseline model corresponding to each processing stage data segment, calculates the deviation of the multi-source operational data from the current processing stage's normal state, and generates stage residual features. The local model training module trains a local anomaly diagnosis model based on the stage residual features and generates a federated update package based on the training results. The federated communication module uploads the federated update package to the cloud manufacturing platform and receives the stage aggregation model, stage aggregation prototype, and context branch adaptation parameters from the platform. The personalized fusion module personalizes and fuses the stage aggregation model, stage aggregation prototype, and context branch adaptation parameters with the local anomaly diagnosis model to obtain a terminal-side anomaly diagnosis model. The online diagnosis module uses the terminal-side anomaly diagnosis model to perform online anomaly diagnosis of the current processing process and outputs the anomaly diagnosis results.
[0061] In a specific application example, a cloud manufacturing platform manages multiple CNC machining centers across three processing plants. Plant 1 primarily performs aluminum alloy finishing tasks, Plant 2 primarily performs steel roughing tasks, and Plant 3 performs semi-finishing tasks for both aluminum alloys and steel. Each processing equipment terminal locally collects spindle current, servo load, vibration signals, and temperature signals, and generates a processing task context code based on the processing task information issued by the cloud manufacturing platform. Because the processing materials, equipment capabilities, and process stages differ across plants, directly applying a unified federated average aggregation would cause large load fluctuations in the steel roughing stage to affect the identification of subtle chatter in the aluminum alloy finishing stage. This invention calculates task similarity through processing task context summaries, classifying steel roughing tasks and aluminum alloy finishing tasks into different task-similar federated clusters. When a prototype conflict is detected between the same chatter prototype in different task-similar federated clusters, context branch adaptation parameters are generated. Each processing equipment terminal selects the corresponding branch for diagnosis based on the current processing task context code, thus enabling both the sharing of cross-plant anomaly knowledge and the maintenance of personalized diagnostic capabilities under different operating conditions.
[0062] As can be seen from the above embodiments, this invention introduces cloud manufacturing task information into the anomaly diagnosis process through processing task context codes, weakens normal differences caused by different working conditions through stage residual features, avoids the simple averaging of model parameters from heterogeneous terminals through task-similar federated clusters, handles prototype conflicts under different working conditions through context branching and parameter adaptation, and corrects prototypes related to quality anomalies through quality detection feedback. Compared with conventional federated fault diagnosis methods that only perform local training and central aggregation, this invention is more adaptable to application scenarios where cloud manufacturing processing equipment is highly heterogeneous in terms of orders, materials, tools, equipment capabilities, and processing stages.
[0063] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for anomaly diagnosis of cloud manufacturing processing equipment based on federated learning, characterized in that, A system applied to a cloud manufacturing platform and multiple processing equipment terminals includes: S1. The processing equipment terminal receives processing task information from the cloud manufacturing platform, performs desensitization encoding on the processing task information, and generates a processing task context code. S2. The processing equipment terminal collects multi-source operation data of the corresponding processing equipment, and divides the multi-source operation data into multiple processing stage data segments based on the processing task context code; S3. The processing equipment terminal calls the normal baseline model of the stage corresponding to the processing stage data segment, calculates the deviation of the multi-source operating data from the normal state of the current processing stage, and generates stage residual features. S4. The processing equipment terminal trains a local anomaly diagnosis model based on the stage residual features, and generates a federated update package including a processing task context summary according to the training results, and uploads the federated update package to the cloud manufacturing platform. S5. The cloud manufacturing platform calculates the task similarity between each federated update package based on the processing task context summary in the federated update package, and divides multiple federated update packages into multiple task-similar federated clusters based on the task similarity. S6. The cloud manufacturing platform performs federated aggregation within each task-similar federated cluster to generate corresponding stage aggregation models and stage aggregation prototypes. S7. The cloud manufacturing platform determines whether there is a prototype conflict between the stage aggregation prototypes of similar federation clusters of different tasks. If there is a prototype conflict, it generates context branch adaptation parameters bound to the context code of the processing task. If there is no prototype conflict, it uses the preset general adaptation parameters as context branch adaptation parameters. S8. The processing equipment terminal receives the stage aggregation model, stage aggregation prototype and context branch adaptation parameters, and performs personalized fusion with the local anomaly diagnosis model to obtain the terminal-side anomaly diagnosis model. S9. The processing equipment terminal uses the terminal-side anomaly diagnosis model to perform online anomaly diagnosis on the current processing process and outputs anomaly diagnosis results, which include anomaly type, anomaly level, anomaly occurrence stage, and anomaly evidence vector.
2. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The machining task information includes the order process route, process type, material category, tool type, equipment capability label, CNC program characteristics, and quality feedback requirements; the machining task context code is used to characterize the process status of the current machining task and to mask the original customer order data, drawing data, and complete CNC program.
3. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The steps of dividing the multi-source operational data into multiple processing stage data segments include: Extract the process type, tool type, and CNC program characteristics from the machining task context code; Identify the current machining stage based on process type, tool type, and CNC program characteristics; Based on the identified processing stages, the continuously collected multi-source operation data is segmented and marked to obtain multiple processing stage data segments.
4. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The steps involved in generating residual features during the generation phase include: Obtain the normal baseline model for the current processing stage; Input the multi-source operational data from the current processing stage data segment into the stage normal baseline model to obtain the normal state estimate; Calculate the deviation between the multi-source operating data and the normal state estimate, and generate stage residual features based on the deviation.
5. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The local anomaly diagnosis model includes a shared feature encoder, a stage prototype library, and an anomaly discrimination head; The shared feature encoder is used to extract abnormal representations from the stage residual features; The stage prototype library is used to store normal and abnormal prototypes at different processing stages; The anomaly detection head is used to output local anomaly diagnosis results based on the distance relationship between the anomaly representation and the stage prototype library.
6. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The federated update package includes model parameter increments, stage prototype increments, anomaly evidence statistics, and processing task context summaries. The model parameter increment is used to characterize the parameter changes of the local anomaly diagnosis model; The stage prototype increment is used to characterize the prototype change under the corresponding processing stage; The anomaly evidence statistics are used to characterize the frequency and reliability of local anomaly types. The processing task context summary is used to characterize the processing stage and equipment capability range to which the federated update package applies.
7. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The steps for calculating task similarity between federated update packages include: Calculate the similarity of equipment capabilities, process stages, material loads, tooling status, and anomalous evidence among the various federal update packages. The similarity of equipment capabilities, process stages, material loads, tool states, and abnormal evidence is weighted and fused to obtain the task similarity. Federated update packages whose task similarity meets the clustering criteria are grouped into the same task-similar federated cluster.
8. The method for anomaly diagnosis of cloud manufacturing and processing equipment based on federated learning according to claim 1, characterized in that, The steps to determine whether there is a prototype conflict between stage aggregation prototypes of similar federated clusters of different tasks include: Obtain the stage aggregation prototype belonging to the same anomaly type in similar federated clusters of different tasks; Calculate the directional and distance differences between stage aggregate prototypes belonging to the same anomaly type; If the directional or distance difference exceeds the corresponding conflict threshold, a prototype conflict is determined to exist. For stage aggregation prototypes with prototype conflicts, generate context branch adaptation parameters that are bound to the processing task context code.
9. The method for anomaly diagnosis of cloud manufacturing processing equipment based on federated learning according to claim 5, characterized in that, The method further includes: The processing equipment terminal receives quality inspection feedback after the processing task is completed; The quality inspection feedback is correlated with the stage residual characteristics to determine the target processing stage that affects the processing quality; Based on the stage residual characteristics corresponding to the target processing stage, the abnormal prototypes related to quality anomalies in the stage prototype library are corrected.
10. A cloud manufacturing processing equipment anomaly diagnosis terminal based on federated learning, characterized in that, include: The task context generation module is used to receive processing task information issued by the cloud manufacturing platform, perform desensitization encoding on the processing task information, and generate a processing task context code. The data segmentation module is used to collect multi-source operating data of the corresponding processing equipment and divide the multi-source operating data into multiple processing stage data segments based on the processing task context code. The residual feature generation module is used to call the stage normal baseline model corresponding to the processing stage data segment, calculate the deviation of the multi-source operating data from the current processing stage normal state, and generate stage residual features. The local model training module is used to train a local anomaly diagnosis model based on the stage residual features and generate a federated update package based on the training results. The federated communication module is used to upload the federated update package to the cloud manufacturing platform and receive the stage aggregation model, stage aggregation prototype and context branch adaptation parameters issued by the cloud manufacturing platform. The personalized fusion module is used to personalize and fuse the stage aggregation model, stage aggregation prototype and context branch adaptation parameters with the local anomaly diagnosis model to obtain the terminal-side anomaly diagnosis model. The online diagnostic module is used to perform online anomaly diagnosis on the current processing process using the terminal-side anomaly diagnosis model and output the anomaly diagnosis results.