Intelligent factory lean manufacturing fault detection method based on federal incremental learning

By adopting the federated incremental learning method in smart factory lean manufacturing, combined with contrast learning and knowledge distillation technology, the convergence problem of the federated training algorithm on the local data set and the problems in the local pre-training process are solved, and efficient fault detection and model performance improvement are achieved.

CN119723157APending Publication Date: 2025-03-28HANGZHOU DIANZI UNIV
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411699542.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In smart factory lean manufacturing, the convergence problems of federated training algorithms on local datasets and problems in local pre-training processes lead to inefficient fault detection and unstable model performance.

Method used

Using a method based on federated incremental learning, the model convergence is accelerated through the comparative learning pre-training of the local encoder model, and the knowledge learning features of the encoder model are extracted through knowledge distillation, and local training and aggregation training are combined with the local decoder model to realize personalized model training and global aggregation.

Benefits of technology

Accelerate the high-precision convergence of local complete models in incremental learning, realize personalized training, and alleviate model drift problems through knowledge distillation, improving detection accuracy and model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723157A_ABST
    Figure CN119723157A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent factory lean manufacturing fault detection method based on federal incremental learning. The method comprises the following steps: S10, pre-training a local encoder model of a local participant by using a comparative learning mode; s20, performing knowledge distillation on the global encoder model training weight and the local encoder model training weight of the local participant to obtain a local complete model, and performing local training; s30, splitting the local complete model after local training into a local encoder model of a local participant and a local decoder model of the local participant, and completing aggregation training to obtain a current round of global encoder training weight; s40, downloading the global encoder training weight to a local encoder model of the local participant, and combining the global encoder training weight with a local decoder model of the local participant to form a local complete model; and S50, performing fault detection on the lean manufacturing task by using the local complete model, and judging whether a fault occurs or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of lean manufacturing fault detection, and in particular relates to a smart factory lean manufacturing fault detection method based on federated incremental learning. Background Art

[0002] In the field of lean manufacturing, federated learning has seen a significant increase in actual application demand in real-time detection and intelligent decision-making in industrial production due to its outstanding performance in data privacy protection and improving model versatility. Fault detection is one of the important research topics in the field of lean manufacturing. At the same time, in the application requirements of lean manufacturing in smart factories, the amount, characteristics, and categories of fault data that need to be detected are showing extremely rapid growth, and the correlation between faults has also produced more and more diverse new characteristics. How to quickly extract and learn the changing characteristics of fault data, and effectively achieve federated aggregation while preventing the malicious collection of information of participants as much as possible has become a major challenge in fault detection in the Industrial Internet of Things. Summary of the invention

[0003] In view of the above problems, the present invention provides a smart factory lean manufacturing fault detection method based on federated incremental learning. Focusing on the fault detection task in lean manufacturing, the present invention focuses on solving the convergence problem of the federated training algorithm on the local data set and the problems in the local pre-training process.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0005] A smart factory lean manufacturing fault detection method based on federated incremental learning includes the following steps:

[0006] S10, the local encoder model of the local participant is pre-trained using contrastive learning to accelerate model convergence;

[0007] S20, performing knowledge distillation on the global encoder model training weights and the local encoder model training weights of the local participant, extracting the knowledge learning features of the encoder model, combining the distilled local encoder model training weights of the local participant with the local decoder model of the local participant to obtain a local complete model, and performing local training;

[0008] S30, splitting the local complete model after local training into the local encoder model of the local participant and the local decoder model of the local participant, retaining the training weight of the local decoder model of the local participant locally, uploading the training weight of the local encoder model of the local participant to the central server to calculate the current round of aggregation weight, completing the aggregation training to obtain the current round of global encoder training weight;

[0009] S40, downloading the global encoder training weights to the local encoder model of the local participant, and combining them with the local decoder model of the local participant to form a local complete model;

[0010] S50, uses the local complete model to perform fault detection on the lean manufacturing task to determine whether a fault occurs.

[0011] In a possible implementation, S10 specifically includes: using N pairs of contrast loss functions to pre-train the local encoder model of the local participant, where the N pairs of samples include positive sample pairs and negative sample pairs, and maximizing the similarity of the positive sample pairs and minimizing the similarity of the negative sample pairs through contrast learning. The local decoder model of the local participant is pre-trained using the N pairs of contrast loss functions, and the calculation formula is shown in (1):

[0012]

[0013] Among them l N-paris represents N pairs of contrast loss functions. i represents the fault feature vector obtained by the local encoder model of the local participant for the i-th sample, where sample i is a two-dimensional image sample in lean manufacturing, including RGB image, grayscale image, coded image and infrared image; y i Represents sample f i The label represents the specific fault type, sim(f i ,f j )=f i T f j is to calculate the fault feature vector f i and f j The phase velocity between , τ is the temperature coefficient used to scale the similarity.

[0014] In a possible implementation manner, the performing of knowledge distillation on the global encoder model training weights and the local encoder model training weights of the local participant in S20 specifically includes:

[0015] S201, input data x i Perform forward propagation through the global encoder model to obtain the global encoder model output y g ; Input data x i Through the local encoder model of the local participant, forward propagation is performed to obtain the local encoder model output y of the local participant k ;

[0016] S202, the global encoder model is used as the teacher model, and the local encoder model of the local participant is used as the student model. The knowledge distillation method is used to extract the learning features of the encoder model. The calculation formulas are shown in formula (2) and formula (3):

[0017]

[0018] Where L kl represents the calculation of the KL divergence loss function; T is used as a temperature parameter to smooth the output distribution; σ represents the softmax function; y g (i) represents the output probability of the teacher model on the i-th category; y k (i) represents the output probability of the student model on the i-th category; Represents the loss function L KL About the student model weight w k gradient.

[0019] S203, update the local encoder model training weight of the local participant, the calculation formula is shown in formula (4):

[0020]

[0021] where w′ k represents the updated local encoder model training weights of the local participant; η represents the learning rate, which controls the step size of each update;

[0022] S204, performing distillation calculation.

[0023] In a possible implementation, the distillation calculation in S204 specifically includes: initializing the student model weight w k , and define the knowledge distillation loss function L kl To measure the difference between the output of the teacher model and the student model; in each round of training, the algorithm traverses each class of samples in the data set and processes each sample; for each sample x i , first use the teacher model to calculate the sample x i Corresponding output y k , using the Student model to calculate the sample x i Corresponding output y′ k ; Next, for each output dimension D, the KL divergence between the teacher model and the student model is calculated and the distillation loss L is accumulated. kl ; After each round of training, the algorithm updates the weight w′ of the student model through back propagation and gradient descent algorithm according to the calculated KL divergence loss k , so that the output of the student model gradually approaches the output of the teacher model; this update process depends on the learning rate η and the gradient of the KL loss function on the student model weight; after multiple training rounds, the student model is continuously optimized, gradually absorbing the knowledge of the teacher model, and finally obtaining a more accurate prediction ability; after the training is completed, the updated student model weight w′ is returned k, which is the student model optimized after knowledge distillation training.

[0024] In a possible implementation, in S20, the training weights of the local encoder model of the local participant after distillation are combined with the local decoder model of the local participant to obtain a local complete model, and the local training includes: the calculation formula of the local complete model M is shown in formula (5):

[0025] M(x;w′ k ,w d )=f d (f k (x i ; w′ k );w d ) (5)

[0026] where w d Represents the local decoder model training weights of the local participant; f k A local encoder model representing the local participants; f d A local decoder model representing the local party.

[0027] In a possible implementation manner, the S30 specifically includes: splitting the trained local complete model M into a local encoder model of the local participant and a local decoder model of the local participant, wherein the training weight w of the local decoder model of the local participant is d Keep it locally and upload the local encoder model weights w′ of the local participant k Go to the central server for aggregation training, calculate the aggregation weight of this round, and obtain the training weight of the global encoder of this round; the calculation formula is shown in formula (6):

[0028]

[0029] Where N represents the number of clients participating in the aggregation; Upload the local encoder model training weights of the local party on behalf of different clients.

[0030] In a possible implementation, S40 includes: downloading the global encoder training weights to the local encoder model of the local participant, and combining them with the local decoder model of the local participant to form a local complete model, and the calculation formula is shown in formula (7):

[0031] M′(x; w g ,w d )=f d (f k (x i ;w g );w d ) (7)

[0032] where w g The weights of the global encoder model trained from the central server and the weights of the local decoder model of the local participant w d Combined with the final local complete model M′, the final local complete model M′ has the ability to accurately identify and classify defects in the production line. Each factory first downloads the global encoder weights w after multiple rounds of training from the central server. g , this weight includes common fault features from different production environments. By integrating these diverse fault features, the model can adapt to various production environments and ensure that it can detect and identify multiple types of defects. After downloading to the local computer, the global encoder model weight w g Will be combined with the local decoder model weight w d Combined, w d Strengthen the factory's specific testing requirements and generate personalized testing models that meet the needs of this factory.

[0033] The present invention has the following beneficial effects: It can accelerate the effective high-precision convergence of the local complete model in incremental learning, realize the personalized training of the local complete model, and effectively alleviate the model drift problem caused by non-independent and identically distributed data between local complete models through the knowledge distillation method. Based on the idea of ​​mutual coordination between local personalized learning and global aggregation, it provides technical support for the security and performance improvement of lean manufacturing artificial intelligence models. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 The present invention is a framework flow chart of a method for intelligent factory lean manufacturing fault detection based on federated incremental learning according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] Reference Figure 1 , a smart factory lean manufacturing fault detection method based on federated incremental learning in an embodiment of the present invention comprises the following steps:

[0037] S10, the local encoder model of the local participant is pre-trained using contrastive learning to accelerate model convergence;

[0038] S20, performing knowledge distillation on the global encoder model training weights and the local encoder model training weights of the local participant, extracting the knowledge learning features of the encoder model, combining the distilled local encoder model training weights of the local participant with the local decoder model of the local participant to obtain a local complete model, and performing local training;

[0039] S30, splitting the local complete model after local training into the local encoder model of the local participant and the local decoder model of the local participant, retaining the training weight of the local decoder model of the local participant locally, uploading the training weight of the local encoder model of the local participant to the central server to calculate the current round of aggregation weight, completing the aggregation training to obtain the current round of global encoder training weight;

[0040] S40, downloading the global encoder training weights to the local encoder model of the local participant, and combining them with the local decoder model of the local participant to form a local complete model;

[0041] S50, uses the local complete model to perform fault detection on the lean manufacturing task to determine whether a fault occurs.

[0042] The above method is used to accelerate the effective and high-precision convergence of the local complete model in incremental learning, realize the personalized training of the local complete model, and effectively alleviate the model drift problem caused by non-independent and identically distributed data between local complete models through the knowledge distillation method.

[0043] In a specific application example, S10 specifically includes: using N pairs of contrast loss functions to pre-train the local encoder model of the local participant, where the N pairs of samples include positive sample pairs and negative sample pairs, and maximizing the similarity of the positive sample pairs through contrast learning while minimizing the similarity of the negative sample pairs. The local decoder model of the local participant is pre-trained using the N pairs of contrast loss functions, and the calculation formula is shown in (1):

[0044]

[0045] Among them l N-paris represents N pairs of contrast loss functions. i represents the fault feature vector obtained by the local encoder model of the local participant for the i-th sample, where sample i is a two-dimensional image sample in lean manufacturing, including RGB image, grayscale image, coded image and infrared image; y i Represents sample f i The label represents the specific fault type, sim(f i ,f)2=f i T f j is to calculate the fault feature vector f i and fj The phase velocity between , τ is the temperature coefficient used to scale the similarity.

[0046] Specifically, for two-dimensional image samples, for example, in the field of wafer fault detection in lean manufacturing, the image samples are wafer coded images, where code 0 represents the background area, code 1 represents the normal area, and code 2 represents the fault area; in the field of stainless steel surface fault detection in lean manufacturing, the image samples are grayscale images, where areas with high grayscale values ​​represent fault areas and areas with low grayscale values ​​represent normal areas; in the field of ceramic surface fault detection in lean manufacturing, the image samples are RGB images; in battery pole detection in lean manufacturing, the image samples are infrared images.

[0047] In a specific application example, the knowledge distillation of the global encoder model training weights and the local encoder model training weights of the local participant in S20 specifically includes:

[0048] S201, input data x i Perform forward propagation through the global encoder model to obtain the global encoder model output y g ; Input data x i Through the local encoder model of the local participant, forward propagation is performed to obtain the local encoder model output y of the local participant k ;

[0049] S202, the global encoder model is used as the teacher model, and the local encoder model of the local participant is used as the student model. The knowledge distillation method is used to extract the learning features of the encoder model. The calculation formulas are shown in formula (2) and formula (3):

[0050]

[0051] Where L kl represents the calculation of the KL divergence loss function; T is used as a temperature parameter to smooth the output distribution; σ represents the softmax function; y g (i) represents the output probability of the teacher model on the i-th category; y k (i) represents the output probability of the student model on the i-th category; Represents the loss function L KL About the student model weight w k gradient.

[0052] S203, update the local encoder model training weight of the local participant, the calculation formula is shown in formula (4):

[0053]

[0054] where w′ krepresents the updated local encoder model training weights of the local participant; η represents the learning rate, which controls the step size of each update;

[0055] S204, performing distillation calculation.

[0056] Furthermore, the distillation calculation in S204 specifically includes: initializing the student model weight w k , and define the knowledge distillation loss function L kl To measure the difference between the output of the teacher model and the student model; in each round of training, the algorithm traverses each class of samples in the data set and processes each sample; for each sample x i , first use the teacher model to calculate the sample x i Corresponding output y k , using the Student model to calculate the sample x i Corresponding output y′ k ; Next, for each output dimension D, the KL divergence between the teacher model and the student model is calculated and the distillation loss L is accumulated. kl ; After each round of training, the algorithm updates the weight w′ of the student model through back propagation and gradient descent algorithm according to the calculated KL divergence loss k , so that the output of the student model gradually approaches the output of the teacher model; this update process depends on the learning rate η and the gradient of the KL loss function on the student model weight; after multiple training rounds, the student model is continuously optimized, gradually absorbing the knowledge of the teacher model, and finally obtaining a more accurate prediction ability; after the training is completed, the updated student model weight w′ is returned k , which is the student model optimized after knowledge distillation training.

[0057] In a specific application example, in S20, the training weights of the local encoder model of the local participant after distillation are combined with the local decoder model of the local participant to obtain a local complete model. The local training includes: the calculation formula of the local complete model M is shown in formula (5):

[0058] M(x;w′ k ,w d )=f d (f k (x i ; w′ k );w d ) (5)

[0059] where w d Represents the local decoder model training weights of the local participant; f k A local encoder model representing the local participants; f d A local decoder model representing the local party.

[0060] In a specific application example, S30 specifically includes: splitting the trained local complete model M into a local encoder model of the local participant and a local decoder model of the local participant, wherein the training weight w of the local decoder model of the local participant is d Keep it locally and upload the local encoder model weights w′ of the local participant k Go to the central server for aggregation training, calculate the aggregation weight of this round, and obtain the training weight of the global encoder of this round; the calculation formula is shown in formula (6):

[0061]

[0062] Where N represents the number of clients participating in the aggregation; Upload the local encoder model training weights of the local party on behalf of different clients.

[0063] In a specific application example, S40 includes: downloading the global encoder training weights to the local encoder model of the local participant, and combining them with the local decoder model of the local participant to form a local complete model, and the calculation formula is shown in formula (7):

[0064] M′(x; w g ,w d )=f d (f k (x i ;w g );w d ) (7)

[0065] where w g The weights of the global encoder model trained from the central server and the weights of the local decoder model of the local participant w d Combined with the final local complete model M′, the final local complete model M′ has the ability to accurately identify and classify defects in the production line. Each factory first downloads the global encoder weights w after multiple rounds of training from the central server. g , this weight includes common fault features from different production environments, such as wafer failure, stainless steel surface defects, ceramic surface flaws, battery pole abnormalities, etc. By integrating these diverse fault features, the model can adapt to various production environments and ensure that it can detect and identify multiple types of defects; after downloading to the local computer, the global encoder model weight w g Will be combined with the local decoder model weight w d Combined, w dStrengthen the specific inspection requirements of the factory and generate a personalized inspection model that adapts to the needs of the factory, so that the model can not only draw on the general inspection capabilities of multiple factories, but also meet the localized refined inspection needs. This combined model can effectively identify and classify defects in production line applications, thereby improving inspection accuracy.

[0066] The above method is used to accelerate the effective and high-precision convergence of the local complete model in incremental learning, realize the personalized training of the local complete model, and effectively alleviate the model drift problem caused by non-independent and identically distributed data between local complete models through the knowledge distillation method.

[0067] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims

1. A smart factory lean manufacturing fault detection method based on federated incremental learning, characterized in that: The following steps are involved: S10, the local encoder model of the local participant is pre-trained using contrastive learning to accelerate model convergence; S20, performing knowledge distillation on the global encoder model training weights and the local encoder model training weights of the local participant, extracting the knowledge learning features of the encoder model, combining the distilled local encoder model training weights of the local participant with the local decoder model of the local participant to obtain a local complete model, and performing local training; S30, splitting the local complete model after local training into the local encoder model of the local participant and the local decoder model of the local participant, retaining the training weight of the local decoder model of the local participant locally, uploading the training weight of the local encoder model of the local participant to the central server to calculate the current round of aggregation weight, completing the aggregation training to obtain the current round of global encoder training weight; S40, downloading the global encoder training weights to the local encoder model of the local participant, and combining them with the local decoder model of the local participant to form a local complete model; S50, uses the local complete model to perform fault detection on the lean manufacturing task to determine whether a fault occurs.

2. The intelligent factory lean manufacturing fault detection method based on federated incremental learning according to claim 1, characterized in that: S10 specifically includes: using N pairs of contrast loss functions to pre-train the local encoder model of the local participant, where the N pairs of samples include positive sample pairs and negative sample pairs, and maximizing the similarity of the positive sample pairs and minimizing the similarity of the negative sample pairs through contrast learning. The local decoder model of the local participant is pre-trained using the N pairs of contrast loss functions, and the calculation formula is shown in (1): Among them l N-paris represents N pairs of contrast loss functions. i represents the fault feature vector obtained by the local encoder model of the local participant for the i-th sample, where sample i is a two-dimensional image sample in lean manufacturing, including RGB image, grayscale image, coded image and infrared image; y i Represents sample f i The label represents the specific fault type, sim(f i ,f j ) = f i T f j is to calculate the fault feature vector f i and f j The phase velocity between , τ is the temperature coefficient used to scale the similarity.

3. The intelligent factory lean manufacturing fault detection method based on federated incremental learning as claimed in claim 2, characterized in that: The knowledge distillation of the global encoder model training weights and the local encoder model training weights of the local participant in S20 specifically includes: S201, input data x i Perform forward propagation through the global encoder model to obtain the global encoder model output y g ; Input data x i Through the local encoder model of the local participant, forward propagation is performed to obtain the local encoder model output t of the local participant k ; S202, the global encoder model is used as the teacher model, and the local encoder model of the local participant is used as the student model. The knowledge distillation method is used to extract the learning features of the encoder model. The calculation formulas are shown in formula (2) and formula (3): Where L kl represents the calculation of the KL divergence loss function; T is used as a temperature parameter to smooth the output distribution; σ represents the softmax function; y g (i) represents the output probability of the teacher model on the i-th category; y k (i) represents the output probability of the student model on the i-th category; Represents the loss function L KL About the student model weight w k The gradient of S203, update the local encoder model training weight of the local participant, the calculation formula is shown in formula (4): where w′ k represents the updated local encoder model training weights of the local participant; η represents the learning rate, which controls the step size of each update; S204, performing distillation calculation.

4. The intelligent factory lean manufacturing fault detection method based on federated incremental learning as claimed in claim 3 is characterized in that: The distillation calculation in S204 specifically includes: initializing the student model weight w k , and define the knowledge distillation loss function L kl To measure the difference between the output of the teacher model and the student model; in each round of training, the algorithm traverses each class of samples in the data set and processes each sample; for each sample x i , first use the teacher model to calculate the sample x i Corresponding output y k , using the Student model to calculate the sample x i Corresponding output y′ k ; Next, for each output dimension D, the KL divergence between the teacher model and the student model is calculated and the distillation loss L is accumulated. kl ; After each round of training, the algorithm updates the weight w′ of the student model through back propagation and gradient descent algorithm according to the calculated KL divergence loss k , so that the output of the student model gradually approaches the output of the teacher model; this update process depends on the learning rate η and the gradient of the KL loss function on the student model weight; after multiple training rounds, the student model is continuously optimized, gradually absorbing the knowledge of the teacher model, and finally obtaining a more accurate prediction ability; after the training is completed, the updated student model weight w′ is returned k , which is the student model optimized after knowledge distillation training.

5. The intelligent factory lean manufacturing fault detection method based on federated incremental learning as claimed in claim 4, characterized in that: In the S20, the training weights of the local encoder model of the local participant after distillation are combined with the local decoder model of the local participant to obtain a local complete model. The local training includes: the calculation formula of the local complete model M is shown in formula (5): M(x;w′ k ,w d )=f d (f k (x i ;w ′ k );w d ) (5) where w d Represents the local decoder model training weights of the local participant; f k A local encoder model representing the local participants; f d A local decoder model representing the local party.

6. The intelligent factory lean manufacturing fault detection method based on federated incremental learning according to claim 5, characterized in that: The S30 specifically includes: splitting the trained local complete model M into a local encoder model of the local participant and a local decoder model of the local participant, wherein the training weights w of the local decoder model of the local participant are d Keep it locally and upload the local encoder model weights w′ of the local participant k Go to the central server for aggregation training, calculate the aggregation weight of this round, and obtain the training weight of the global encoder of this round; the calculation formula is shown in formula (6): Where N represents the number of clients participating in the aggregation; w′ k (i) Upload the local encoder model training weights of the local party on behalf of different clients.

7. The intelligent factory lean manufacturing fault detection method based on federated incremental learning according to claim 6, characterized in that: The S40 includes: downloading the global encoder training weights to the local encoder model of the local participant, and combining them with the local decoder model of the local participant to form a local complete model, and the calculation formula is shown in formula (7): M′(x;w g ,w d )=f d (f k (x i ;w h );w d ) (7) where w g The weights of the global encoder model trained from the central server and the weights of the local decoder model of the local participant w d Combined with the final local complete model M′, the final local complete model M′ has the ability to accurately identify and classify defects in the production line. Each factory first downloads the global encoder weights w after multiple rounds of training from the central server. g , this weight includes common fault features from different production environments. By integrating these diverse fault features, the model can adapt to various production environments and ensure that it can detect and identify multiple types of defects. After downloading to the local computer, the global encoder model weight w g Will be combined with the local decoder model weight w d Combined, w d Strengthen the factory's specific testing requirements and generate personalized testing models that meet the needs of this factory.

Citation Information

Patent Citations

  • Federal learning model aggregation method based on dynamic adaptive knowledge distillation

    CN116681144A

  • Personalized federal learning method based on model and data distillation

    CN117035057A

  • Personalized federal learning method based on decoupling knowledge distillation

    CN117152480A

  • Federal learning backdoor defense method and system based on comparative learning

    CN117422130A

  • Industrial Internet of Things fault detection method based on federal incremental learning

    CN117579468A