Industrial visual inspection model incremental learning method and system based on edge cloud collaboration

By combining edge-cloud collaborative architecture and dynamic sparse activation mechanism with cloud deformation features to guide edge learning, the problems of high computational load and high storage requirements in incremental learning of edge devices are solved, and incremental learning of industrial vision inspection models with low computational burden and high stability is achieved.

CN121835948APending Publication Date: 2026-04-10FOSHAN LIANSEN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FOSHAN LIANSEN INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2025-09-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

When existing industrial vision inspection models perform incremental learning on resource-constrained edge devices, the computational load and storage requirements are high, leading to frequent downtime and an inability to adapt to product model switching and changes in lighting conditions, thus affecting production efficiency.

Method used

By adopting an edge-cloud collaborative architecture, dynamic sparse activation and freezing mechanisms are used to guide edge learning by combining deformation features generated from historical models in the cloud. Deformation knowledge distillation is performed to control computational and storage requirements, achieve elastic parameter reorganization, and reduce global downtime.

Benefits of technology

Incremental learning with low computational cost and constant memory is achieved on edge devices, significantly reducing computational burden and energy consumption, improving model adaptability and stability, achieving 99.99% zero-downtime upgrades, and reducing downtime to sub-second levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835948A_ABST
    Figure CN121835948A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of model increment correlation, and discloses an industrial visual inspection model incremental learning method and system based on edge cloud collaboration. Performing constraint adjustment setting on continuous incremental learning of the detection model on the edge device, and setting constant memory occupancy and calculated amount increment lt; 20%; a dynamic sparse activation mechanism is set, only partial parameter subsets are updated in each incremental training, and the sparseness is controlled by learning masks; carrying out deformation knowledge distillation by utilizing edge-cloud collaboration; carrying out elastic parameter recombination; a basic model is trained at a cloud end, then the update quantity of model parameters is received at the cloud end, a global model is updated, and then a pseudo sample playback library is generated. According to the method, the edge cloud collaborative architecture algorithm is used for upgrading, global shutdown is not needed, catastrophic forgetting is effectively relieved through innovative cloud edge collaborative deformation knowledge distillation and a dynamic sparse activation / freezing mechanism, and the model adaptability and stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of model incremental correlation, in particular to an industrial visual inspection model incremental learning method and system based on edge cloud collaboration. BACKGROUND

[0002] The core role of industrial visual inspection is defect detection surface flaw identification: detecting scratches, cracks, pits, etc. (precision up to 0.01mm); assembly integrity verification: such as electronic component missing, wrong part detection (accuracy > 99.5%); material defect analysis: identifying metal fatigue, plastic injection bubble, etc. It is widely used in industrial production, and industrial visual model is needed for visual inspection during actual detection. Industrial visual model needs a large amount of data for learning and training, and the data in the early stage of production process. When product model is switched, light condition is changed or equipment is upgraded, a large number of new samples are needed to update the model. This requires production line downtime and retraining for algorithm upgrade, which affects the production cycle. Through incremental learning, only a small amount of new samples are needed. The traditional method needs to expand the network structure or add parameters for each new task, which leads to continuous expansion of the model size and makes it impossible to deploy on resource-limited edge devices. Each incremental update requires full network parameter update, and the calculation amount is equivalent to complete training, which is difficult for edge devices to bear. The maximum number of tasks is usually preset, and the model needs to be retrained when the number exceeds the preset value. SUMMARY

[0003] To overcome the technical defects of the prior art, the present application provides an industrial visual inspection model incremental learning method based on edge cloud collaboration, which upgrades the algorithm without global downtime through the innovative cloud-edge collaborative morphing knowledge distillation and dynamic sparse activation / freeze mechanism, effectively alleviating catastrophic forgetting and improving model adaptability and stability.

[0004] The technical solution adopted by the present application is: an industrial visual inspection model incremental learning method based on edge cloud collaboration, comprising the following steps:

[0005] Step 1, realize continuous incremental learning of the detection model on the edge device and set constraints, when reasoning on the edge, load part of the parameters incrementally to maintain the stability of the runtime memory occupation; at the same time, through the sparse update strategy, control the calculation amount increment introduced by incremental training within the threshold (<20%);

[0006] Step 2, set a dynamic sparse activation mechanism, update only part of the parameter subset each time, and control the sparsity through the learning mask;

[0007] Step 3, then use the cloud historical model to generate "morphing features" to guide edge learning, and realize edge-cloud collaborative morphing knowledge distillation;

[0008] Step 4: Reorganize the elastic parameters;

[0009] Step 5: Train the base model in the cloud, load the model parameters and the current mask generator after the (t-1)th incremental task training at the edge, calculate the dynamic mask (M_t), freeze (M_t=0) the parameters, and optimize the loss; then, receive the update amount of the model parameters in the (t)th incremental task in the cloud, update the global model, and then generate a pseudo-sample replay library. This invention, through "elastic parameter recombination" and "dynamic sparse activation" mechanisms, prevents the model from growing the number of parameters indefinitely during incremental learning. Recombination can reuse or compress the parameter space, while sparse activation ensures that each update only involves a subset of parameters, jointly guaranteeing that the model's memory usage on the device remains stable; by storing only the parameter changes rather than the complete parameters, this method can significantly optimize the total storage requirements compared to saving a complete model snapshot for each incremental task. The "dynamic sparse activation mechanism" is key to this goal. Each incremental training only updates a "partial subset of parameters" selected by the mask M_t. By controlling the sparsity of the mask (i.e., the proportion of parameters activated / updated), the computational cost of each incremental training iteration can be precisely limited to a small proportion (e.g., <20%) of the computational cost of the base model, significantly reducing the computational burden and energy consumption at the edge. This invention achieves algorithm upgrades without global downtime using an edge-cloud collaborative architecture. The edge-cloud collaborative system can achieve >99.99% downtime-free upgrades through techniques such as rolling updates, hot loading, and redundancy switching. Actual downtime is typically controlled in the sub-second range.

[0010] Preferably, in step 1, according to the definition of the incremental learning task, the objective function for learning the task is expressed as:

[0011]

[0012] In the above formula, t represents the incremental task number, and D t Let θ represent the dataset for the (t)th task, which is D_t={(x_i,y_i)}_{i=1}^{N_t}; t θ represents the model parameters after training on the (t)th task. t-1 This represents the historical parameters after the (t-1)th task training, where ((t=1) are the initial model parameters); This represents... This represents the loss function for the detection task; λ represents the regularization strength coefficient, which controls the balance between new and old tasks. This represents a regular expression to prevent forgetting.

[0013] It describes the linear relationship between computational complexity and the number of activation parameters, reducing memory usage by 50%. It can not only be based on simple gradients or saliency, but also understand the correlation between tasks and the importance hierarchy of parameters, thereby selecting the most critical subset of parameters for learning new tasks and the most effective way to preserve knowledge of old tasks, thus improving the efficiency of sparse updates.

[0014] Preferably, the method for edge-cloud collaborative deformation knowledge distillation is as follows:

[0015] First, edge-based local distillation is performed, followed by cloud-based global distillation. The expression for the local distillation is:

[0016]

[0017] Where T ψ (f old This represents a deformable feature transformation module whose core function is to align the feature space differences between the teacher and student models through parameterized geometric transformations and nonlinear mappings. An efficient cloud-edge collaboration is employed: the scheme clearly defines the responsibilities of the cloud and edge: Cloud: responsible for maintaining the global model, storing historical model knowledge, generating deformable feature guidance signals, accepting incremental updates uploaded from the edge and integrating them into the global model, and generating a pseudo-sample replay library (for possible subsequent distillation or replay). Edge: responsible for performing incremental learning under strict resource constraints (applying masks, freezing parameters, and using cloud guidance for local optimization). This division of labor fully utilizes the powerful computing and storage capabilities of the cloud while allowing the edge to focus on resource-sensitive, efficient learning. The potential of the pseudo-sample replay library: Generating a pseudo-sample replay library in the cloud is a forward-looking design. While the current steps mainly rely on deformable feature distillation, the replay library lays the foundation and provides flexibility for implementing more efficient replay-based learning strategies (if needed) at the edge or cloud in the future. This makes knowledge transfer at the edge more effective, further improving resistance to forgetting and learning performance on new tasks.

[0018] Preferably, the expression for cloud-based global model fusion is,

[0019] Where in the formula This represents the parameters of the edge device in the t-th iteration. This represents the global parameters in the cloud after the t-th iteration. α represents a smoothing factor used to control the weights of the old and new parameters; typically, α∈(0,1). By weighted averaging of historical and current parameters, fluctuations in parameter updates are reduced. A key innovation is "deformed feature knowledge distillation," which mitigates catastrophic forgetting. Features generated using historical models (representing knowledge of past tasks) stored in the cloud are "deformed" and then used to guide the learning of the current model at the edge. This "cloud-edge collaborative" distillation method is more effective than ordinary distillation or replay at the edge, more accurately transferring and retaining historical knowledge, greatly mitigating the problem of forgetting old tasks when learning new ones. The design of "deformed features" aims to enhance knowledge transferability and robustness. By deforming historical features, possible changes in data or tasks are simulated, making the knowledge learned by the edge model more adaptable and helping to improve the overall generalization performance of the model during incremental learning. Finally, "freezing the parameters at M_t=0" ensures that most of the model's structure remains stable during incremental learning. Only the parameters selected by the mask participate in the update, which helps maintain the model's performance on the learned tasks and avoids drastic fluctuations caused by global updates.

[0020] The solution clearly defines the responsibilities of the cloud and edge: The cloud is responsible for maintaining the global model, storing historical model knowledge, generating deformation feature guidance signals, accepting incremental updates uploaded from the edge and integrating them into the global model, and generating a pseudo-sample replay library (for potential subsequent distillation or replay). The edge is responsible for performing incremental learning under strict resource constraints (applying masks, freezing parameters, and using cloud guidance for local optimization). This division of labor fully utilizes the powerful computing and storage capabilities of the cloud while allowing the edge to focus on resource-sensitive, efficient learning. The potential of the pseudo-sample replay library: Generating a pseudo-sample replay library in the cloud is a forward-looking design. While the current steps primarily rely on deformation feature distillation, the replay library lays the foundation and provides flexibility for implementing more efficient replay-based learning strategies (if needed) at the edge or cloud in the future.

[0021] Preferably, the method for reorganizing elastic parameters involves setting the storage format in the cloud, saving only key changes rather than complete parameters during the update process, and dynamically assembling them during edge inference. Where θ base This represents the basic model parameters, Δθ. t This represents the parameter increment at step t (i.e., Δθ). t =θ t -θ base ), storing only changes, M t The binary mask (or sparse index matrix) corresponding to the increment identifies the location where the increment takes effect: M tPositions where the element is 1: Apply Δθ t Positions where the element is 0: ignore the increment; ⊙ indicates element-wise multiplication, ensuring that the increment only applies to the subset of parameters specified by the mask; T active This represents a dynamically activated set of increments: selectively loading some increments based on input data characteristics. During parameter reconfiguration, it implements optimized parameter reuse, sharing, or compression strategies to minimize the potential impact of reconfiguration on model performance while maintaining constant memory usage.

[0022] Preferably, the method for setting the storage format involves defining the mathematical definition of the storage format as follows: Where Φ represents the entire storage system, including all incremental records from time step t = 1 to T; M t This represents the metadata (such as a mask / index) at step t, used to identify the location or structural information of parameter updates, Δθ. t The parameter increment at step t, i.e., θ t -θ t-1 It stores only the changes, not the complete parameters, where the subscripts... This represents the incremental sequence stored in the order of time steps t = 1, 2, ..., T; only the change Δθ is retained. t and location information M t This significantly reduces memory usage.

[0023] This invention proposes a highly optimized edge continuous learning framework. Its core advantage lies in strictly meeting the resource constraints of edge devices (constant memory, low computational increment). Simultaneously, through innovative cloud-edge collaborative deformation knowledge distillation and dynamic sparse activation / freezing mechanisms, it effectively mitigates catastrophic forgetting and improves model adaptability and stability. Combined with the "deep thinking" capabilities of the DeepSeek model, this scheme is expected to achieve more intelligent and efficient optimization in key stages such as mask generation, knowledge transfer (deformation features), parameter reorganization, and global fusion, thereby achieving more robust and efficient continuous learning capabilities in resource-constrained edge environments.

[0024] Preferably, a system is used to apply the above-mentioned incremental learning method for industrial visual inspection models based on edge-cloud collaboration, characterized in that it includes a condition constraint module, a dynamic sparse activation mechanism setting module, an edge-cloud collaborative deformation knowledge distillation module, an elastic parameter recombination module, and a cloud-based basic model training module.

[0025] The condition constraint module is used to adjust the constraints for continuous incremental learning of the detection model on the edge device; the dynamic sparse activation mechanism setting module is used to set the dynamic sparse activation mechanism so that each incremental training only updates a subset of parameters; the edge-cloud collaborative knowledge distillation module is used to perform edge distillation and cloud distillation; the elastic parameter recombination module is used to set the elastic parameter recombination; and the cloud basic model training module is used to train the model, update the global model, and then generate a pseudo-sample replay library.

[0026] The beneficial effects of this invention are as follows: 1. This invention implements constraint adjustment settings for continuous incremental learning of the detection model on edge devices, setting constant memory usage and incremental computation <20%; setting a dynamic sparse activation mechanism, updating only a subset of parameters in each incremental training, and controlling sparsity through learning masks; then using historical models in the cloud to generate "deformation features" to guide edge learning, thereby achieving edge-cloud collaborative deformation knowledge distillation; performing elastic parameter recombination; training the basic model in the cloud, loading the model parameters and the current mask generator after the (t-1)th incremental task training at the edge, calculating the dynamic mask (M_t), freezing (M_t=0) parameters, and optimizing the loss; then receiving the update amount of model parameters in the (t)th incremental task in the cloud, updating the global model, and then generating a pseudo-sample replay library, with constant memory usage: through the "elastic parameter recombination" and "dynamic sparse activation" mechanisms, the model will not grow the number of parameters indefinitely during incremental learning. Recombination can reuse or compress the parameter space, while sparse activation ensures that each update involves only a subset of parameters, jointly guaranteeing that the model's memory footprint on the device remains stable; the incremental computational cost is controllable (<20%): the "dynamic sparse activation mechanism" is key to this goal. Each incremental training only updates a "partial subset of parameters" selected by the mask M_t. By controlling the sparsity of the mask (i.e., the ratio of activated / updated parameters), the computational cost of each incremental training can be precisely limited to a small proportion (e.g., <20%) of the computational cost of the base model, significantly reducing the computational burden and energy consumption at the edge.

[0027] 2. This invention utilizes an edge-cloud collaborative architecture algorithm for upgrades without requiring global downtime. The edge-cloud collaborative system can achieve >99.99% zero-downtime upgrades through technologies such as rolling updates, hot reloading, and redundancy switching. Actual downtime is typically controlled to the sub-second level.

[0028] 3. This invention mitigates catastrophic forgetting: "Deformation feature knowledge distillation" is one of its core innovations. Features generated from historical models (representing knowledge of past tasks) stored in the cloud are "deformed" and then used to guide the learning of the current model at the edge. This "cloud-edge collaborative" distillation method is more effective than ordinary distillation or replay at the edge, more accurately transferring and retaining historical knowledge, greatly mitigating the problem of forgetting old tasks when learning new ones. It also enhances model adaptability and generalization: the design of "deformation features" aims to enhance knowledge transferability and robustness. By deforming historical features, it simulates possible changes in data or tasks, making the knowledge learned by the edge model more adaptable and helping to improve the overall generalization performance of the model during incremental learning. Finally, it maintains model stability: "Freezing parameters M_t=0" ensures that most of the model's structure remains stable during incremental learning. Only the parameters selected by the mask participate in the update, which helps maintain the model's performance on learned tasks and avoids drastic fluctuations caused by global updates.

[0029] 4. This invention employs efficient cloud-edge collaboration: The solution clearly defines the responsibilities of the cloud and edge: Cloud: Responsible for maintaining the global model, storing historical model knowledge, generating deformation feature guidance signals, accepting incremental updates uploaded from the edge and integrating them into the global model, and generating a pseudo-sample replay library (for possible subsequent distillation or replay). Edge: Responsible for performing incremental learning under strict resource constraints (applying masks, freezing parameters, and using cloud guidance for local optimization). This division of labor fully utilizes the powerful computing and storage capabilities of the cloud while allowing the edge to focus on resource-sensitive, efficient learning. Potential of the pseudo-sample replay library: Generating a pseudo-sample replay library in the cloud is a forward-looking design. Although the current steps mainly rely on deformation feature distillation, the replay library lays the foundation and provides flexibility for implementing more efficient replay-based learning strategies (if needed) at the edge or cloud in the future.

[0030] 5. This invention proposes a highly optimized edge continuous learning framework. Its core advantage lies in strictly meeting the resource constraints of edge devices (constant memory, low computational increment). Simultaneously, through innovative cloud-edge collaborative deformation knowledge distillation and dynamic sparse activation / freezing mechanisms, it effectively mitigates catastrophic forgetting and improves model adaptability and stability. Combined with the "deep thinking" capabilities of the DeepSeek model, this scheme is expected to achieve more intelligent and efficient optimization in key stages such as mask generation, knowledge transfer (deformation features), parameter reorganization, and global fusion, thereby achieving more robust and efficient continuous learning capabilities in resource-constrained edge environments. Attached Figure Description

[0031] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0032] Figure 1 This is a schematic diagram of the process of the present invention;

[0033] Figure 2 This is a system block diagram of the present invention.

[0034] Figure labeling: 1. Condition constraint module; 2. Dynamic sparse activation mechanism setting module; 3. Edge-cloud collaborative knowledge distillation module; 4. Elastic parameter recombination module; 5. Cloud-based basic model training module. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the various embodiments of this invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this invention to facilitate a better understanding of this application. However, the technical solutions claimed in the claims of this application can be implemented even without these technical details and with various variations and modifications based on the following embodiments.

[0036] like Figure 1 As shown, this embodiment provides an incremental learning method for industrial visual inspection models based on edge cloud collaboration, including the following steps:

[0037] Step 1: Implement continuous incremental learning of the detection model on edge devices and adjust the constraints. When performing inference at the edge, maintain the stability of runtime memory usage by dynamically loading some parameter increments. At the same time, control the increase in computational cost introduced by incremental training within the threshold (<20%) through a sparse update strategy.

[0038] Step 2: Set up a dynamic sparse activation mechanism, where each incremental training iteration only updates a subset of parameters, and sparsity is controlled by learning a mask;

[0039] Step 3: Then, use the cloud-based historical model to generate "deformation features" to guide edge learning, thereby achieving edge-cloud collaborative deformation knowledge distillation;

[0040] Step 4: Reorganize the elastic parameters;

[0041] Step 5: Train the base model in the cloud, load the model parameters and the current mask generator after the training of the (t-1)th incremental task at the edge, calculate the dynamic mask (M_t), freeze the parameters (M_t=0), and optimize the loss; then receive the update amount of the model parameters in the (t)th incremental task in the cloud, update the global model, and then generate the pseudo sample replay library.

[0042] In step 1, based on the definition of the incremental learning task, the objective function for learning the task is expressed as:

[0043]

[0044] In the above formula, t represents the incremental task number, and D t Let θ represent the dataset for the (t)th task, which is D_t={(x_i,y_i)}_{i=1}^{N_t}; t θ represents the model parameters after training on the (t)th task. t-1 This represents the historical parameters after the (t-1)th task training, where ((t=1) are the initial model parameters); This represents... This represents the loss function for the detection task; λ represents the regularization strength coefficient, which controls the balance between new and old tasks. This represents a regular expression to prevent forgetting.

[0045] The method described above for edge-cloud collaborative deformation knowledge distillation is...

[0046] First, edge-based local distillation is performed, followed by cloud-based global distillation. The expression for the local distillation is:

[0047]

[0048] Where T ψ (f old ) represents a deformable feature transformation module, whose core function is to align the feature space differences between the teacher model and the student model through parameterized geometric transformations and nonlinear mappings.

[0049] The expression for cloud-based global distillation is,

[0050] Where in the formula This represents the parameters of the edge device in the t-th iteration. The denotes the global parameters in the cloud after the t-th iteration, and α represents the smoothing factor (usually...). α∈(0,1)) controls the weight of the old and new parameters. By weighted averaging of historical parameters and current parameters, fluctuations in parameter updates are reduced.

[0051] The method for reorganizing elastic parameters involves setting the storage format in the cloud, saving only key changes rather than complete parameters during the update process, and dynamically assembling them during edge inference. Where θ base This represents the basic model parameters, Δθ. t This represents the parameter increment at step t (i.e., Δθ). t =θ t -θ base ), storing only changes, M t The binary mask (or sparse index matrix) corresponding to the increment identifies the location where the increment takes effect: M t Positions where the element is 1: Apply Δθ t Positions where the element is 0: ignore the increment; ⊙ indicates element-wise multiplication, ensuring that the increment only applies to the subset of parameters specified by the mask; T active Represents a dynamically activated set of increments: selectively loading some increments based on the characteristics of the input data.

[0052] The method for setting the storage format is as follows: the mathematical definition of the storage format is defined as follows: Where Φ represents the entire storage system, including all incremental records from time step t = 1 to T; M t This represents the metadata (such as a mask / index) at step t, used to identify the location or structural information of parameter updates, Δθ. t The parameter increment at step t, i.e., θ t -θ t-1 It stores only the changes, not the complete parameters, where the subscripts... This represents the incremental sequence stored in the order of time steps t = 1, 2, ..., T; only the change Δθ is retained. t and location information M t This significantly reduces memory usage.

[0053] The method described above for edge-cloud collaborative deformation knowledge distillation is...

[0054] First, edge-based local distillation is performed, followed by cloud-based global distillation. The expression for the local distillation is:

[0055]

[0056] Where T ψ (f old ) represents a deformable feature transformation module, whose core function is to align the feature space differences between the teacher model and the student model through parameterized geometric transformations and nonlinear mappings.

[0057] 5. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 1, characterized in that: the expression for the cloud-based global distillation is,

[0058] Where in the formula This represents the parameters of the edge device in the t-th iteration. This represents the global parameters in the cloud after the t-th iteration. α represents the smoothing factor used to control the weights of the old and new parameters, and α∈(0,1). By weighted averaging of historical parameters and current parameters, the fluctuations in parameter updates are reduced.

[0059] In the formula This represents the parameters of the edge device in the t-th iteration. This represents the global parameters in the cloud after the t-th iteration. α represents the smoothing factor used to control the weights of the old and new parameters, and α∈(0,1). By weighted averaging of historical parameters and current parameters, the fluctuations in parameter updates are reduced.

[0060] The method for setting the storage format is as follows: the mathematical definition of the storage format is defined as follows: Where Φ represents the entire storage system, including all incremental records from time step t = 1 to T; M t This represents the metadata (such as a mask / index) at step t, used to identify the location or structural information of parameter updates, Δθ. t The parameter increment at step t, i.e., θ t -θ t-1 It stores only the changes, not the complete parameters, where the subscripts... This represents the incremental sequence stored in the order of time steps t = 1, 2, ..., T; only the change Δθ is retained. t and location information M t This significantly reduces memory usage.

[0061] A system, such as Figure 2 As shown, the method for applying the above-mentioned incremental learning method for industrial visual inspection model based on edge-cloud collaboration is characterized by including: a condition constraint module 1, a dynamic sparse activation mechanism setting module 2, an edge-cloud collaborative knowledge distillation module 3, an elastic parameter recombination module 4, and a cloud-based basic model training module 5.

[0062] The condition constraint module 1 is used to adjust the constraints for continuous incremental learning of the detection model on the edge device; the dynamic sparse activation mechanism setting module 2 is used to set the dynamic sparse activation mechanism so that each incremental training only updates a subset of parameters; the edge-cloud collaborative knowledge distillation module 3 is used to perform edge distillation and cloud distillation; the elastic parameter recombination module 4 is used to set the elastic parameter recombination; and the cloud basic model training module 5 is used to train the model, update the global model, and then generate a pseudo-sample replay library.

[0063] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.

[0064] Those skilled in the art will understand that the above embodiments are specific examples of implementing the present invention, and in practical applications, various changes in form and detail may be made without departing from the spirit and scope of the present invention.

Claims

1. An incremental learning method for industrial visual inspection models based on edge cloud collaboration, characterized by: Includes the following steps: Step 1: Implement continuous incremental learning of the detection model on edge devices and adjust the constraints. When performing inference at the edge, maintain the stability of runtime memory usage by dynamically loading some parameter increments. At the same time, control the increase in computational cost introduced by incremental training within the threshold (<20%) through a sparse update strategy. Step 2: Set up a dynamic sparse activation mechanism, where each incremental training iteration only updates a subset of parameters, and sparsity is controlled by learning a mask; Step 3: Then, use the cloud-based historical model to generate "deformation features" to guide edge learning, thereby achieving edge-cloud collaborative deformation knowledge distillation; Step 4: Reorganize the elastic parameters; Step 5: Train the basic model in the cloud, load the model parameters and the current mask generator after the training of the (t-1)th incremental task at the edge, calculate the dynamic mask (M_t), freeze the parameters (M_t=0), and optimize the loss; then receive the update amount of the model parameters in the (t)th incremental task in the cloud, update the global model, and then generate a pseudo sample replay library.

2. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 1, characterized in that: In step 1, based on the definition of the incremental learning task, the objective function for learning the task is expressed as: In the above formula, t represents the incremental task number, and D t Let θ represent the dataset for the (t)th task, which is D_t={(x_i,y_i)}_{i=1}^{N_t}; t θ represents the model parameters after training for the (t)th task. t-1 This represents the historical parameters after the (t-1)th task training, where ((t=1) are the initial model parameters); This represents... This represents the loss function for the detection task; λ represents the regularization strength coefficient, which controls the balance between new and old tasks. This represents a regular expression to prevent forgetting.

3. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 1, characterized in that: Step 2, which involves setting up a dynamic sparse activation mechanism, first constructs a binary mask matrix, M. t ∈{0,1} |θ| The mathematical expression is: In the above formula, the TopK function represents the set of scores for the selection parameters. The top k indices i with the largest values ​​in the model are M, where k = γ|θ|, γ∈[0,1], |θ| represents the total number of model parameters, and M t It is a binary vector with the same dimension as the parameters, where γ|θ| represents the number of TopK parameters retained in each training round, and the mask matrix is ​​adjusted according to the score at different time steps t. Dynamically adjust the activation position; The location parameter update rule is as follows: The computational cost is reduced to O(γ|θ|) for a full update, where O(γ|θ|) describes the linear relationship between computational complexity and the number of activation parameters, resulting in a 50% reduction in memory usage.

4. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 1, characterized in that: The method described above for edge-cloud collaborative deformation knowledge distillation is... First, edge-based local distillation is performed, followed by cloud-based global distillation. The expression for the local distillation is: Where T ψ (f old ) represents a deformable feature transformation module, whose core function is to align the feature space differences between the teacher model and the student model through parameterized geometric transformations and nonlinear mappings.

5. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 1, characterized in that: The expression for cloud-based global distillation is, Where in the formula This represents the parameters of the edge device in the t-th iteration. This represents the global parameters in the cloud after the t-th iteration. α represents the smoothing factor used to control the weights of the old and new parameters, and α∈(0,1). By weighted averaging of historical parameters and current parameters, the fluctuations in parameter updates are reduced.

6. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 1, characterized in that: The method for reorganizing elastic parameters involves setting the storage format in the cloud, saving only key changes rather than complete parameters during the update process, and dynamically assembling them during edge inference. Where θ base This represents the basic model parameters, Δθ. t This represents the parameter increment at step t (i.e., Δθ). t =θ t -θ base ), storing only changes, M t The binary mask (or sparse index matrix) corresponding to the increment identifies the location where the increment takes effect: M t Positions where the element is 1: Apply Δθ t Positions where the element is 0: ignore the increment; ⊙ indicates element-wise multiplication, ensuring that the increment only applies to the subset of parameters specified by the mask; T active Represents a dynamically activated set of increments: selectively loading some increments based on the characteristics of the input data.

7. The incremental learning method for industrial visual inspection models based on edge cloud collaboration according to claim 6, characterized in that: The method for setting the storage format is as follows: the mathematical definition of the storage format is defined as follows: Where Φ represents the entire storage system, including all incremental records from time step t = 1 to T; M t This represents the metadata (such as a mask / index) at step t, used to identify the location or structural information of parameter updates, Δθ. t The parameter increment at step t, i.e., θ t -θ t-1 It stores only the changes, not the complete parameters, where the subscripts... This represents the incremental sequence stored in the order of time steps t = 1, 2, ..., T; only the change Δθ is retained. t and location information M t This significantly reduces memory usage.

8. A system for application with incremental learning methods for industrial visual inspection models based on edge cloud collaboration as described in claims 1-7, characterized in that: It includes a condition constraint module (1), a dynamic sparse activation mechanism setting module (2), an edge-cloud collaborative knowledge distillation module (3), an elastic parameter recombination module (4), and a cloud-based basic model training module (5); The condition constraint module (1) is used to adjust the constraint settings for continuous incremental learning of the detection model on the edge device; the dynamic sparse activation mechanism setting (2) module is used to set the dynamic sparse activation mechanism so that each incremental training only updates a subset of parameters; The edge-cloud collaborative knowledge distillation module (3) is used to perform edge distillation and cloud distillation. The elastic parameter reorganization module (4) is used to set the elastic parameter reorganization. The cloud basic model training module (5) is used to train the model and update the global model, and then generate a pseudo sample replay library.