An AI model online incremental updating method for an industrial environment, a medium and a system
By employing the Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm and the Gradient Null Space Constraint Mechanism, the problem of decreased accuracy in old category recognition during multiple rounds of incremental updates in industrial AI models is solved, achieving stable convergence and performance improvement under non-stationary operating conditions.
Patent Information
- Application Number
- CN202611666558.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-27
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, industrial AI models experience an irreversible decline in the accuracy of old category recognition during multiple rounds of online incremental updates because the parameters are covered by the gradient of new tasks, which fails to meet the real-time requirements of industrial online incremental deployment.
An incremental update mechanism combining the Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm with Gradient Null Space Constraints is adopted. The parameters are divided into four levels by Fisher information and differential damping is applied. The parameter update is strictly projected to the null space of the Hessian matrix of the historical task. The learning rate and regularization coefficient are adjusted by dynamic fusion coefficient to ensure that the loss surface of the old task remains unchanged.
It effectively maintained the accuracy of old category recognition, avoided catastrophic forgetting, and achieved stable convergence and improved model performance under non-stationary conditions.
Smart Images

Figure CN123157246A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial large-scale model technology, specifically, it relates to an online incremental update method, medium and system for AI models in industrial environments. Background Technology
[0002] In the field of industrial visual inspection and condition recognition, the current mainstream approach is to perform offline full training on known defect categories based on deep neural networks and deploy them to the production line with fixed model parameters. When new defect types or shifts in operating conditions occur in the industrial field, existing methods typically address this by re-collecting all data and fine-tuning the model with all parameters or training from scratch. However, in continuously changing and non-stationary industrial environments, full parameter fine-tuning inevitably leads to a decline in the model's discriminative ability on old categories, i.e., catastrophic forgetting, because the gradient of new tasks can overwrite parameters that are crucial to old tasks. On the other hand, training from scratch faces constraints such as the difficulty in completely preserving historical data, excessively long training cycles, and high costs of production line downtime, failing to meet the real-time requirements of online incremental deployment in industry. Existing methods such as elastic weight consolidation attempt to alleviate forgetting by fixing important parameters, but due to their coarse granularity of parameter importance estimation and single damping strength, they still cannot effectively maintain the loss surface structure of old tasks after multiple rounds of incremental updates, resulting in a continuous degradation of model accuracy with each incremental round. In other words, existing technologies suffer from the technical problem that the accuracy of old category recognition in industrial AI models decreases irreversibly during multiple rounds of online incremental updates because the parameters are covered by the gradient of new tasks. Summary of the Invention
[0003] In view of this, the present invention provides an online incremental update method, medium and system for AI models in industrial environments, which can solve the technical problem in the prior art where the accuracy of old category recognition is irreversibly reduced due to catastrophic forgetting when industrial AI models continuously receive new working condition data.
[0004] The present invention is implemented as follows: The first aspect of the present invention provides an online incremental update method for AI models in industrial environments, comprising the following steps:
[0005] Real-time acquisition of industrial field data streams; uncertainty and representativeness measures for each sample; screening of high-value samples and storing them in an online sample pool.
[0006] High-dimensional feature manifold local density topological clustering is performed on low-confidence samples in the online sample pool. When the cluster size and the distance to the known category feature center both exceed their respective trigger thresholds, new category nodes are automatically created and the orthogonal initialization of classification weights is completed.
[0007] High-value samples from the online sample pool are mixed with samples from the historical memory replay buffer pool and fed into the distributed collaborative matrix and gradient null space constraint model. Differential damping is applied to parameters at each level based on the Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm, and incremental updates of model parameters are completed in the gradient null space.
[0008] Based on the real-time prediction error volatility, the dynamic fusion coefficient is calculated through the state memory trace decay control factor, and the learning rate and regularization coefficient are adjusted in conjunction to drive the parameters to converge to the optimal point.
[0009] After the incremental update is completed, a new model version is generated. The new version is deployed to the production environment in a canary traffic manner and run simultaneously with the old version to compare accuracy, recall and inference latency.
[0010] After the gray-scale evaluation window ends, if all performance indicators of the new version are better than those of the old version, the new version will be automatically promoted to all traffic; if the new version has a performance degradation, it will be automatically rolled back to the old version and an alarm will be triggered.
[0011] The uncertainty measure refers to quantifying the uncertainty of a sample based on the softmax entropy value of the current model's prediction output. A higher entropy value indicates that the model is more uncertain about the sample. The representativeness measure refers to selecting samples with large feature distances from existing samples as high-value samples based on the k-nearest neighbor density estimation of the sample in the feature space.
[0012] The online sample pool is maintained using a first-in-first-out (FIFO) strategy. The capacity limit is determined by conducting comparative experiments with different capacity values in the target industrial scenario, statistically analyzing the old task accuracy retention rate and the new category recognition rate after incremental training at each capacity, and using the capacity value corresponding to the maximum product of the two as the optimal capacity limit.
[0013] The high-dimensional feature manifold local density topological clustering refers to identifying the topological structure of sample distribution in the high-dimensional feature space extracted by the model using local density estimation methods. It involves calculating the sample density and manifold edge outlier degree in the neighborhood of each sample, and then combining the softmax entropy value to jointly determine potential new category candidate clusters.
[0014] The orthogonal initialization of classification weights refers to setting the initial classification weight vector of the newly created category node to be orthogonal to all existing category weight vectors, using the vector of the cluster feature center after Schmitt orthogonalization as the initial weight.
[0015] The encoder of the distributed cooperative matrix and gradient null space constraint model consists of 6 to 12 convolutional blocks. Each convolutional block embeds an adaptive gating unit based on continuous state derivatives. When the tensor flow entropy exceeds the preset threshold within the layer, the deep feedback path is activated, and the historical memory trace tensor is weighted and fused with the current feature before continuing forward propagation.
[0016] The distributed cooperative matrix and the decoder output of the gradient null space constraint model are connected to a topological self-evolving graph network. The graph network nodes correspond to each defect category, the edge weights between nodes are automatically adjusted by minimizing the node feature reconstruction error, and the nonlinear transmission coefficients are determined by the eigenvalues of the covariance matrix of the activation values output by each node after diagonalization.
[0017] The distributed collaborative matrix and the gradient null space constraint model are nested together with the Dijkstra shortest path algorithm. Each category node in the topological self-evolving graph network is used as a graph node, and the reciprocal of the nonlinear transmission coefficient between nodes is used as the edge weight. After each new category node is added, the Dijkstra shortest path algorithm is run to update the global shortest path matrix between nodes. The path distance matrix is input to the category decision logic of the output layer to help determine the affiliation of fuzzy samples.
[0018] The Gray Wolf Collaborative Anti-Forgetting Weight Protection Algorithm refers to dividing all parameters into four protection levels—Alpha, Beta, Delta, and Omega—based on the amount of Fisher information for each model parameter in historical tasks. During incremental gradient descent, the gradient update amount of each level of parameter is superimposed with the damping coefficient corresponding to the level. The damping coefficient of the Alpha level is the largest, and the damping coefficient of the Omega level is zero.
[0019] The gradient null space refers to the null space of the historical task loss function with respect to the Hessian matrix of the model parameters. Parameter perturbations in the gradient null space do not change the local curvature of the historical task loss surface. Limiting the parameter changes of incremental updates to the gradient null space is equivalent to ensuring that the optimal solution of the old task remains in the minimum neighborhood of the loss surface after the update.
[0020] Wherein, the dynamic fusion coefficient Calculated from the dynamic fusion coefficient function, to predict error volatility in real time. Cumulative sample size in the current round Current accuracy retention rate of old tasks The three data points are calculated together, specifically: ,in , , These are dimensional coefficients calibrated through multiple rounds of experiments.
[0021] The spatial orthogonal projection operator refers to a linear transformation operator that performs an orthogonal basis transformation on the input feature matrix, projecting heterogeneous features from different sources onto the same orthogonal feature subspace. The transformation matrix is obtained by performing singular value decomposition on the covariance matrix of historical multi-source data and taking the first-order vector. It consists of a set of singular vectors.
[0022] The capacity of the historical memory replay buffer pool is determined by adjusting the mixing ratio of new and old samples in multiple experiments, with the capacity value corresponding to the minimum decrease in accuracy of the old task. The trigger threshold includes a cluster size threshold and a feature center distance threshold. The feature center distance threshold is determined by calculating the average distance between the feature centers of all known categories and taking a certain proportion range as the candidate range, and then conducting a comparative experiment to determine the value corresponding to the minimum sum of the false positive rate and the false negative rate of the new category.
[0023] The duration of the grayscale evaluation window is determined by statistically analyzing the daily sample volume in the production environment, using the duration corresponding to the cumulative number of processed samples reaching the processing volume threshold as the evaluation window. The duration is determined by comparing the consistency rate between the performance evaluation conclusion of the new version and the actual performance after the final full deployment under different processing volume thresholds, and taking the processing volume threshold corresponding to the highest consistency rate.
[0024] The online sample pool capacity is capped at 2000–10000; the mixing ratio of new and old samples in the historical memory replay buffer ranges from 1:1 to 1:5, with 50–200 samples per category; the cluster size threshold is based on the minimum cluster size achieved during stable sample growth over three consecutive production cycles; the feature center distance threshold is 50%–80% of the average distance between known category feature centers; and the spatial orthogonal projection operator… The value range is 32 to 256; the proportion of the historical memory trace tensor cache to the total memory is 20% to 40%; the cumulative number of processed samples corresponding to the grayscale evaluation window is 5000 to 20000.
[0025] A second aspect of the present invention provides a computer-readable storage medium storing program instructions that, when executed in a computer, perform the above-described method for online incremental update of an AI model for an industrial environment.
[0026] A third aspect of the present invention provides an online incremental update system for AI models in industrial environments, comprising the aforementioned computer-readable storage medium, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0027] This invention constructs an incremental update mechanism that combines a gray wolf collaborative anti-forgetting weight protection algorithm with gradient null space constraints. Based on Fisher information, all parameters are divided into four protection levels and differential damping is applied. Simultaneously, the parameter update amount is strictly projected onto the null space of the Hessian matrix of the historical task, ensuring that parameter perturbations do not alter the local curvature structure of the old task's loss surface. This mathematically guarantees that the optimal solution of the old task remains in the minimum neighborhood of the loss surface after the incremental update. Furthermore, by dynamically adjusting the learning rate and regularization coefficient in real time through a fusion coefficient function, gradient oscillations and convergence stagnation caused by fixed hyperparameters are avoided, enabling stable convergence of parameters even under non-stationary conditions. In summary, this invention solves the technical problem mentioned in the background art: the irreversible decrease in the accuracy of old category recognition in industrial AI models during multiple rounds of online incremental updates due to parameters being covered by the gradient of the new task. Attached Figure Description
[0028] Figure 1 This is a flowchart of the method of the present invention.
[0029] Figure 2 This is a graph showing the dynamic fusion coefficient and learning rate as a function of the cumulative number of samples during incremental training.
[0030] Figure 3 This is a graph showing the change in the overall accuracy of the new version of the old category within the grayscale evaluation window as a function of the cumulative number of processed samples. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0032] like Figure 1 The diagram shown is a flowchart of an online incremental update method for AI models in industrial environments, provided by the first aspect of this invention. This method includes the following steps:
[0033] S01. Real-time acquisition of industrial field data streams, uncertainty and representativeness measurement of each sample, and screening of high-value samples to store in the online sample pool;
[0034] S02. Perform high-dimensional feature manifold local density topology clustering on low-confidence samples in the online sample pool. When the cluster size and the distance to the known category feature center both exceed their respective trigger thresholds, automatically create new category nodes and complete the orthogonal initialization of classification weights.
[0035] S03. Mix the high-value samples in the online sample pool with the samples in the historical memory replay buffer pool, and feed them into the distribution collaboration matrix and gradient null space constraint model. Apply differentiated damping to the parameters at each level according to the Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm, and complete the incremental update of model parameters in the gradient null space.
[0036] S04. Based on the real-time prediction error volatility, the dynamic fusion coefficient is calculated through the state memory trace decay control factor, and the learning rate and regularization coefficient are adjusted in conjunction to drive the parameters to converge to the optimal point.
[0037] S05. After the incremental update is completed, a new model version is generated. The new version is deployed to the production environment with 10% traffic in a gray-scale manner. It is run simultaneously with the old version and the accuracy, recall and inference latency are compared.
[0038] S06. After the gray-scale evaluation window ends, if all performance indicators of the new version are better than those of the old version, the new version will be automatically promoted to all traffic; if the new version has a performance degradation, it will be automatically rolled back to the old version and an alarm will be triggered.
[0039] The uncertainty measure refers to quantifying the uncertainty of a sample based on the softmax entropy value of the current model's prediction output. The higher the entropy value, the more uncertain the model is about the sample. The representativeness measure refers to selecting samples with large feature distances from existing samples as high-value samples based on the k-nearest neighbor density estimation of the sample in the feature space. The results of the two measures together determine whether a sample enters the online sample pool.
[0040] The online sample pool is maintained using a first-in-first-out (FIFO) strategy. Its capacity limit is determined by conducting comparative experiments in the target industrial scenario with different capacity values (2000-10000 images). The accuracy retention rate of the old task and the recognition rate of the new category after incremental training are statistically analyzed at each capacity. The capacity value corresponding to the maximum product of the two is taken as the optimal capacity limit.
[0041] The historical memory replay buffer pool refers to a small cache set composed of a portion of samples randomly selected from historical training data. It is mixed with new samples during each incremental training to prevent the model from forgetting old knowledge due to training only new samples. The buffer pool capacity is determined by adjusting the mixing ratio of new and old samples (1:1 to 1:5) in multiple experiments to achieve the capacity value corresponding to the minimum decrease in accuracy of the old task.
[0042] The trigger thresholds include a cluster size threshold and a feature center distance threshold. The cluster size threshold is determined by statistically analyzing the sample accumulation rate when a new category first appears in the target industrial scenario, using the minimum cluster size when the number of samples grows steadily over three consecutive production cycles as a benchmark, and after multiple rounds of experimental verification. The feature center distance threshold is determined by calculating the average distance between the feature centers of all known categories, taking 50% to 80% of this average distance as the candidate range, and determining the value corresponding to the minimum sum of the false positive rate and false negative rate of the new category through comparative experiments.
[0043] The high-dimensional feature manifold local density topological clustering refers to identifying the topological structure of sample distribution in the high-dimensional feature space extracted by the model using local density estimation methods. By calculating the sample density and manifold edge outlier in the neighborhood of each sample, and combining the softmax entropy value, potential new category candidate clusters are jointly determined. The higher the manifold edge outlier and the larger the entropy value, the greater the probability that the sample belongs to the new category candidate. This mechanism can automatically discover hidden new defect categories without manual annotation.
[0044] The orthogonal initialization of classification weights refers to setting the initial classification weight vector of the newly created category node to be orthogonal to all existing category weight vectors. The vector of the cluster feature center after Schmitt orthogonalization is used as the initial weight to ensure that the new category forms a linearly independent feature response with the known categories from the start of training, thus avoiding classification confusion with the old categories.
[0045] The distributed collaborative matrix and gradient null space constraint model is a parameterized network based on deep learning, referred to as the DZ constraint model. Its specific structure is as follows: The input layer receives the original features of mixed samples, aligns the heterogeneous industrial features via a spatial orthogonal projection operator, and outputs a feature tensor of uniform dimension. The encoder consists of 6-12 convolutional blocks, each embedding an adaptive gating unit based on continuous-state derivatives. This unit calculates the flow entropy of the current layer's output tensor in real time. When the flow entropy exceeds a preset threshold within the layer, the deep feedback path is activated, and the historical memory trace tensor is weighted and fused with the current features before continuing forward propagation. The decoder output is connected to a topological self-evolving graph network. Graph network nodes correspond to various defect categories, and the edge weights between nodes are automatically adjusted by minimizing the node feature reconstruction error. The nonlinear propagation coefficient is determined by the eigenvalues of the diagonalized decomposition of the covariance matrix of the activation values output by each node. The network embeds a gradient orthogonal projection operator in the backpropagation channel, projecting each gradient update onto the null space of the Hessian matrix of the historical task, ensuring that parameter updates do not disrupt the critical points of the old task. Structure: The connection weights between neurons in the network are divided into four levels: Alpha, Beta, Delta, and Omega, according to the Gray Wolf Collaborative Forgetting Prevention Weight Protection Algorithm. The feature transfer bandwidth between layers is dynamically allocated by the magnitude of the tensor flow entropy. The batch scheduling of data loops is determined by the output value of the dynamic fusion coefficient function. Memory allocation prioritizes gradient calculation of Alpha and Beta level parameters. In memory allocation, the historical memory trace tensor cache accounts for 20% to 40% of the total memory. This proportion is determined by testing the old task accuracy retention rate and incremental training throughput under different cache ratios, and the proportion corresponding to the maximum product of the two is used. The network also nests the Dijkstra shortest path algorithm, using each category node in the topological self-evolutionary graph network as graph nodes and the reciprocal of the nonlinear transmission coefficient between nodes as edge weights. After each new category node is added, the Dijkstra algorithm is run to update the global shortest path matrix between nodes. The path distance matrix is input to the category decision logic of the output layer to help determine the classification of fuzzy samples, thereby improving the classification accuracy at the boundary between the old and new categories.
[0046] The specific steps for establishing the training dataset for the DZ-constrained model include: collecting labeled samples covering all known categories from historical data of the target industrial scenario, and dividing them into training, validation, and test sets in a 7:2:1 ratio; artificially simulating concept drift in the training set by applying brightness shift, Gaussian noise superposition, and random rotation of feature vectors to the samples to construct incremental training batches with different drift intensities; simultaneously collecting historical memory replay samples, including 50-200 samples per category in a buffer pool subset, and mixing them with the incremental batches in a 1:3 ratio to form the final training input pairs; in addition to category labeling, the training labels also need to include Fisher information vectors for each sample in the historical task, used to supervise the accuracy of gradient null space projection during training.
[0047] The DZ-constrained model training steps specifically include: the first stage of pre-training on the full historical data, using the AdamW optimizer, with an initial learning rate of 100%. The training process involves 30-50 epochs until the loss on the validation set converges. The second epoch simulates an online incremental scenario, feeding simulated drift data in batches sequentially. After each batch of training, the gradient null projection operator is activated, the Fisher information matrix of each parameter is recorded, and the damping coefficients are updated according to the four gray wolf classification. The third epoch fine-tunes the edge weights of the topological self-evolving graph network, aiming to minimize the sum of reconstruction errors for each node's features. The encoder parameters are fixed, and the graph network is trained separately until the reconstruction error converges. Throughout the process, the accuracy of the old task and the recognition rate of the new category are evaluated every 5 epochs on the test set, and the parameter snapshot with the maximum weighted sum of the two is used as the final model weights.
[0048] The DZ-constrained model eliminates the feature distribution differences between heterogeneous industrial data through spatial orthogonal projection operators, aligning data from different sensors within a unified manifold space. It strictly limits parameter updates to directions that do not affect the curvature of the old task loss surface through gradient null space projection operators, fundamentally blocking the path to catastrophic forgetting. The dynamic expansion mechanism of the topological self-evolutionary graph network allows new category nodes to be integrated into the existing classification topology in a geometrically separable manner, ensuring that the feature decision boundaries between new and old categories remain clear. The overall structure achieves synergy between knowledge retention and knowledge expansion, enabling the model to maintain its ability to judge historical operating conditions even when continuously receiving new operating condition data.
[0049] The Gray Wolf Collaborative Forgetting Prevention Weight Protection Algorithm divides all parameters into four protection levels—Alpha, Beta, Delta, and Omega—based on the amount of Fisher information for each model parameter in historical tasks. The top 5%–15% of parameters with the highest Fisher information are assigned to the Alpha level, the next highest 15%–30% to the Beta level, the middle 30%–50% to the Delta level, and the remaining parameters to the Omega level. During incremental gradient descent, the gradient update amount for each level is superimposed with the corresponding damping coefficient. The Alpha level has the largest damping coefficient, ensuring that the parameters at this level are almost unchanging, while the Omega level has a zero damping coefficient, allowing for free updates. The proportions and damping coefficients of each level are determined through comparative experiments at different division ratios, with the parameter value corresponding to the highest weighted score of the old task accuracy retention rate and the new task convergence speed being used. This algorithm introduces a biologically inspired hierarchical collaboration mechanism into parameter protection, which forces core historical knowledge parameters to be constrained in any incremental update round. This mechanism prevents key parameters from being covered by the gradient of new tasks, while allowing redundant parameters to evolve freely to fully absorb new knowledge, thus achieving a dynamic balance between knowledge protection and knowledge acquisition.
[0050] The state memory trace decay control factor is a weighted coefficient that decays with time step and is used to control the contribution weight of the historical memory trace tensor in the current incremental update. The decay rate is determined by measuring the prediction error volatility under different non-stationary conditions, and the decay rate value corresponding to low prediction error volatility and few convergence rounds is used.
[0051] The dynamic fusion coefficient is a scalar value calculated using the dynamic fusion coefficient function, denoted as . This function predicts error volatility in real time. Cumulative sample size in the current round Current accuracy retention rate of old tasks The three data points are calculated together, specifically: ,in , , To determine the dimensional coefficients through multiple rounds of experiments, the experimental method involves traversing three sets of coefficients using a grid search under simulated non-stationary conditions. The final value is the coefficient combination where the sum of the learning rate and regularization coefficients converges to the optimum in each test scenario is minimized. When using a larger learning rate and a smaller regularization coefficient, the fitting of new working conditions is accelerated; when When a moderate learning rate and moderate regularization coefficient are used, a balance is struck between new and old knowledge; when At this time, a smaller learning rate and a larger regularization coefficient are used to strengthen the protection of old knowledge. The dynamic fusion coefficient function enables the learning rate and regularization coefficient to be automatically and collaboratively adjusted according to the operating conditions, avoiding gradient oscillations or convergence stagnation caused by fixed hyperparameters, and achieving stable parameter convergence under non-stationary operating conditions.
[0052] The gradient null space refers to the null space of the historical task loss function with respect to the Hessian matrix of the model parameters. That is, parameter perturbations in this space do not change the local curvature of the historical task loss surface, thus not destroying the storage structure of old knowledge. Restricting the parameter changes of incremental updates to the gradient null space is mathematically equivalent to ensuring that the optimal solution of the old task is still in the minimum neighborhood of the loss surface after the update.
[0053] The spatial orthogonal projection operator refers to a linear transformation operator that performs an orthogonal basis transformation on the input feature matrix, projecting heterogeneous features from different sources onto the same orthogonal feature subspace. Its transformation matrix is obtained by performing singular value decomposition on the covariance matrix of historical multi-source data and taking the first-order transform. Composed of singular vectors The value range is 32 to 256, and it is determined by finding the value corresponding to the feature reconstruction error that is minimized on the validation set of the target scene. The value is determined.
[0054] The tensor flow entropy refers to the average Shannon entropy of the output tensor of the current batch of samples after transformation by a certain layer in the network, which reflects the degree of dispersion of the feature distribution of that layer. The higher the tensor flow entropy, the more chaotic the feature distribution of that layer is, triggering a deep feedback path to introduce historical memory trace tensors for stabilization.
[0055] In this scheme, the Dijkstra shortest path algorithm uses the class nodes of the topological self-evolving graph network as the vertex set and the reciprocal of the nonlinear transmission coefficient between nodes as the edge weight. It performs a global shortest path calculation once after each new class node is added or the edge weight is updated, and outputs a distance matrix between nodes. The smaller the distance between nodes in this matrix, the more semantically similar they are in the feature space. When the output layer makes a judgment on fuzzy samples, it assigns them to the class corresponding to the nearest node in the distance matrix, thereby using the graph theory path structure to help improve the classification accuracy at the boundary.
[0056] The duration of the grayscale evaluation window is determined by statistically analyzing the daily sample volume in the production environment. The duration corresponding to the cumulative number of processed samples reaching 5,000 to 20,000 is used as the evaluation window. The specific duration is determined by comparing the consistency rate between the performance evaluation conclusion of the new version and the actual performance after the final full deployment under different processing volume thresholds, and taking the duration corresponding to the processing volume threshold with the highest consistency rate.
[0057] The specific implementation of step S01 is as follows: The system continuously acquires real-time data streams from industrial sensors or visual acquisition devices, and performs dual-index screening on each newly arrived sample. Regarding uncertainty measurement, the sample is input into the currently deployed deep neural network model, the softmax probability vector of the output layer is taken, and its Shannon entropy value is calculated. A higher entropy value indicates a more uniform distribution of the model's predictions for the sample, a lower corresponding confidence level, and a greater potential knowledge increment carried by the sample. Regarding representativeness measurement, the sample is fed into the intermediate layer of the model to extract feature vectors, and the local density of the feature vector in the current online sample pool feature distribution is calculated using the k-nearest neighbor density estimation method. A lower density indicates a greater feature distance between the sample and existing samples, and stronger representativeness. Samples whose results for both metrics are higher than the preset screening threshold are judged as high-value samples and written into the online sample pool. The online sample pool is maintained using a first-in, first-out strategy. When the number of samples in the pool exceeds the capacity limit, the earliest sample entering the pool is automatically eliminated. The reference range for the capacity limit is 2000–10000 samples, and the optimal value is determined through a comparative experiment maximizing the product of the old task accuracy retention rate and the new category recognition rate in the target scene.
[0058] The specific implementation of step S02 is as follows: For samples in the online sample pool whose softmax entropy value exceeds the low confidence threshold, their high-dimensional feature vectors are extracted, and high-dimensional feature manifold local density topological clustering is performed in the feature space. This clustering method uses the local density in the neighborhood of each sample and the outlier degree at the edge of the manifold as dual criteria. Samples with high outlier degree and high entropy value are identified as potential new category candidates, automatically discovering hidden new defects without manual annotation. When the sample size of a candidate cluster exceeds the cluster size threshold (the reference value is based on the smallest stable growth cluster in three consecutive production cycles), and the distance between the feature center of the cluster and the feature centers of all known categories exceeds the feature center distance threshold (the reference range is 50% to 80% of the average distance between the feature centers of known categories), the creation of a new category node is triggered. The initial classification weight vector of the new category node is calculated using the Schmitt orthogonalization method, starting from the feature center of the cluster, and the direction vector orthogonal to all existing category weight vectors is used as the initial weight, ensuring that the new category forms a linearly independent feature response from the old category from the start of training, avoiding classification confusion.
[0059] The specific implementation of step S03 is as follows: High-value samples selected from the online sample pool are mixed with samples uniformly drawn by category from the historical memory replay buffer at a ratio of 1:3 to form an incremental training batch, which is then fed into the distribution coordination matrix and gradient null space constraint model. The input layer of this model aligns heterogeneous industrial features through a spatial orthogonal projection operator. The transformation matrix is obtained by taking the first element from the singular value decomposition of the historical multi-source data covariance matrix. Composed of singular vectors The reference range is 32–256. The encoder consists of 6–12 convolutional blocks, each layer embedding an adaptive gating unit based on continuous-state derivatives. It calculates the tensor flow entropy of the current layer in real time. When the tensor flow entropy exceeds the in-layer threshold, a deep feedback path is activated, introducing historical memory trace tensors for weighted fusion stabilization. The decoder output is connected to a topological self-evolving graph network. Graph network nodes correspond to various defect categories, and edge weights are automatically adjusted by minimizing node feature reconstruction errors. The nonlinear transmission coefficient is determined by the eigenvalues of the node activation value covariance matrix. The graph network also embeds Dijkstra's shortest path algorithm, using the reciprocal of the nonlinear transmission coefficient as the edge weight. Each time a new category node is added, the global shortest path matrix is updated to assist the output layer in determining the affiliation of ambiguous samples. During the backpropagation phase, the gradient orthogonal projection operator projects each gradient update onto the null space of the historical task's Hessian matrix, mathematically ensuring that parameter perturbations do not disrupt the local curvature of the old task's loss surface. Meanwhile, the Grey Wolf Collaborative Forgetting Prevention Weight Protection Algorithm divides all parameters into four levels: Alpha, Beta, Delta, and Omega, based on Fisher information. The top 5% to 15% of Fisher information are assigned to the Alpha level and subjected to the strongest damping. The Omega level has a damping coefficient of zero and is allowed to be updated freely. The damping coefficients of each level are determined through comparative experiments, with the highest weighted score being the retention rate of accuracy in the old task and the convergence speed in the new task.
[0060] The specific implementation of step S04 is as follows: After each incremental training batch is completed, the system collects the real-time prediction error volatility of the current batch. The cumulative number of samples processed since the start of this round of incremental processing. and the old task accuracy retention rate evaluated on the validation set. Substitute into the dynamic fusion coefficient function Calculate the dynamic fusion coefficient ,in , , Calibration was performed under simulated non-stationary conditions using a grid search method. When the system switches to a combination of a larger learning rate and a smaller regularization coefficient, it accelerates the fitting of the new working condition; when At that time, a moderate combination of parameters is used to balance the retention and updating of old and new knowledge; when When the learning rate is lowered and the regularization coefficient is higher, the protection of old knowledge is strengthened. The state memory trace decay control factor decays with time step, controlling the contribution weight of the historical memory trace tensor in the current update. The decay rate is determined based on the measurement of the prediction error volatility under different non-stationary conditions, with the decay rate corresponding to low error volatility and few convergence rounds being the optimal value.
[0061] The specific implementation of step S05 is as follows: After the incremental update is completed, the system saves the new model weights as a snapshot of the new version and introduces the new version into the production environment through a canary deployment mechanism. Initially, only 10% of the real-time inference traffic is allocated to the new version, while the remaining 90% of the traffic continues to be processed by the old version. During the canary operation, the system synchronously records the accuracy, recall, and inference latency of the two versions for their respective traffic loads. The duration of the canary evaluation window terminates when the cumulative number of processed samples reaches 5,000 to 20,000. The specific threshold is determined by comparing the consistency rate between the performance evaluation conclusions under different processing volume settings and the actual measured performance after the final full deployment, and taking the duration corresponding to the processing volume threshold with the highest consistency rate.
[0062] The specific implementation of step S06 is as follows: After the gray-scale evaluation window ends, the system compares the statistical results of the new and old versions in terms of accuracy, recall, and inference latency. If the new version is not inferior to the old version in any of the three metrics, the system automatically switches all traffic to the new version, completing the production deployment of this round of incremental updates. If the new version experiences a performance degradation in any metric, the system automatically switches all traffic back to the old version, triggering an alarm notification during the rollback operation. The specific metric differences that caused the rollback are recorded, providing a basis for subsequent incremental strategy adjustments and ensuring that the model quality in the production environment remains under control.
[0063] It should be noted that the key technologies of this invention include: The Grey Wolf Collaborative Forgetting Weight Protection Algorithm, through a four-level parameter partitioning of Fisher information, forces core parameters to be constrained while redundant parameters gain sufficient learning freedom. Compared to the single damping strength of existing elastic weight consolidation methods, it achieves finer parameter protection granularity, thus maintaining the local minimum structure of the old task's loss surface even after multiple rounds of incremental updates. The gradient null space constraint mechanism strictly projects the parameter update amount to the null space of the historical Hessian matrix, mathematically ensuring that any incremental update does not change the loss curvature of the old task, upgrading knowledge preservation from an engineering experience constraint to a mathematically provable constraint, which cannot be achieved by simply relying on data replay or regularization terms. The dynamic fusion coefficient function jointly drives the adaptive switching of hyperparameters with three real-time indicators, solving the gradient oscillation and convergence stagnation caused by fixed hyperparameters under non-stationary conditions, making the effectiveness of the above two core mechanisms dynamically matched with the operating conditions rather than statically fixed. When the three technologies work together, the parameter protection granularity, update direction constraints, and hyperparameter adjustment strategies form a closed loop. The absence of any single technology will cause the system to degenerate into a local optimum with a single constraint under certain operating conditions. However, the combination of the three technologies covers comprehensive constraints in three dimensions: parameter space, gradient direction, and optimization path, making the knowledge preservation effect superior to existing methods at both the theoretical and engineering levels.
[0064] It should be noted that in industrial settings where multiple categories frequently alternate and drift, i.e., multiple new defect types are introduced into the same production line in a short period of time, the feature distributions of the old and new categories are highly intertwined in a high-dimensional space. The sample size of each new category is extremely limited, resulting in the new category nodes being close to the feature centers of multiple old categories in the initial stage. This leads to extremely low decision confidence of the model in the boundary region, with a large number of samples being misclassified. The mislabels are then backpropagated as gradient signals, further distorting the feature responses of existing categories and causing a chain reaction of accuracy degradation. The reason for the above technical problems is that in the high-dimensional feature space, when the sample size of the new category is insufficient, its feature distribution has not yet converged. If the initial weights are similar in direction to the weights of the old categories, the gradient direction of the new category nodes in the early stage of training will interfere with the old category nodes, causing the decision boundary of the old categories to be repeatedly modified, forming a cumulative gradient interference effect. At the same time, the alternating introduction of multiple categories frequently interrupts the Hessian matrix estimation window of the historical task. Traditional methods cannot update the parameter importance assessment of each category in a timely manner, causing the protection strategy to lag behind the changes in the working conditions. The usual solution to the above-mentioned technical problem is to increase the proportion of the historical memory replay buffer, using a large number of old sample gradients to offset the interference of new sample gradients. However, when new categories frequently appear, the sample distribution in the buffer cannot reflect the latest category structure in a timely manner. A large proportion of replay actually suppresses the normal learning of new categories, causing the recognition rate of new categories to continue to decline. On the other hand, if the replay ratio is reduced, the accuracy of old categories will decrease accordingly. There is an inherent contradiction between the two, and conventional replay strategies cannot simultaneously guarantee the recognition accuracy of new and old categories. This invention solves this technical problem well. The classification weight orthogonal initialization mechanism uses the Schmitt orthogonalization method to constrain the initial weight vector of the new category node to a direction orthogonal to all existing category weight vectors. From the initialization stage, it eliminates the direct interference of the new category gradient on the boundary of the old category, making the feature responses of each category node naturally linearly independent. The topological self-evolving graph network automatically recalculates the nonlinear transmission coefficients between nodes after each new category node is added, and updates the global distance matrix between nodes using Dijkstra's shortest path algorithm. This allows the output layer to utilize semantic distance information in the graph topology to assist in classification when dealing with ambiguous samples in the decision boundary region, rather than relying solely on the comparison of the inner product of local feature vectors. This significantly improves decision robustness in boundary regions where the distributions of old and new category features are highly intertwined. The gradient null space constraint ensures that regardless of the order in which new categories are introduced, each parameter update does not disrupt the curvature of the existing task's loss surface, allowing the old category boundary to remain stable after multiple rounds of alternating updates. These three mechanisms work together to cover the entire chain from initialization and training to inference and decision-making, systematically eliminating the cascading accuracy degradation problem under multi-category alternation drift conditions.
[0065] A second aspect of the present invention provides a computer-readable storage medium storing program instructions that, when executed in a computer, perform the above-described method for online incremental update of an AI model for an industrial environment.
[0066] A third aspect of the present invention provides an online incremental update system for AI models in industrial environments, comprising the aforementioned computer-readable storage medium. The system can be any one of a computer, a server, or a microcontroller. The computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0067] Specifically, the principle of this invention is as follows: The fundamental reason why this invention can solve the above-mentioned technical problems lies in the following mutually supporting mechanisms. First, the essence of catastrophic forgetting is that the gradient vector generated by the backpropagation of the new task is not orthogonal to the curvature direction of the old task's loss surface in the parameter space, causing the parameters to move along the direction that increases the loss of the old task. This invention calculates the null space of the Hessian matrix of the historical task loss function with respect to the model parameters, and projects the parameter change of each incremental update onto this null space, ensuring that the parameter perturbation does not change the local curvature of the old task's loss surface, fundamentally blocking the path of the new task's gradient destroying the old knowledge storage structure. Second, not all parameters are equally important to the old task. Coarse-grained uniform protection wastes the learning capacity of redundant parameters and cannot provide sufficiently strong protection for core parameters. This invention divides the parameters into four levels, from Alpha to Omega, based on Fisher information, applies the strongest damping to the core parameters with the largest Fisher information, and allows free updates to redundant parameters, so that knowledge protection and knowledge acquisition achieve precise matching at the parameter granularity. Third, under non-stationary conditions, fixed settings for the learning rate and regularization coefficient can lead to a contradiction between underfitting the model to new conditions and overprotecting old knowledge. This invention addresses this by dynamically fusing coefficient functions to jointly drive the coordinated adjustment of the learning rate and regularization coefficient using three metrics: real-time prediction error volatility, cumulative sample count, and old task accuracy retention rate. This allows hyperparameters to adaptively switch with changing conditions, eliminating gradient oscillations and convergence stagnation caused by fixed hyperparameters. Fourth, the high-value sample screening and historical memory replay mechanism ensures that the input distribution for each incremental training simultaneously covers both new and old tasks, providing a sufficient foundation for estimating historical task gradient information for gradient null space projection, further solidifying the effectiveness of knowledge retention. The synergistic effect of these mechanisms ensures that while the model continuously receives new data, the loss surface structure of the old task is always mathematically protected, thus effectively maintaining the accuracy of old category recognition during multiple rounds of online incremental updates.
[0068] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0069] The specific implementation method of step S01 is as follows.
[0070] Real-time acquisition of industrial field data streams, for each sample Calculate the uncertainty measure With representative measure Both factors jointly determine whether a sample enters the online sample pool. The uncertainty measure is based on the softmax entropy value of the current model's prediction output for the sample, expressed by the following formula:
[0071] ;
[0072] In the formula, For the model to sample In the The softmax output probability on the class This represents the total number of currently known categories. A larger value indicates greater uncertainty of the model regarding that sample. Representativeness measures are based on the sample's representation in the feature space. The nearest neighbor density estimation formula is expressed as follows:
[0073] ;
[0074] In the formula, For the sample Feature vectors extracted by the encoder for The The feature vectors of the nearest neighbor samples The nearest neighbor number is usually set to 5. To prevent smoothing terms with a denominator of zero, the empirical value is... , The smaller the value, the greater the distance between the sample and existing samples, and the stronger its representativeness. The dimension of is the reciprocal of the square of the characteristic distance, and . The two have different units of measurement, and are only used for independent threshold judgments rather than being directly added together; therefore, the difference in units of measurement does not affect usage. The criteria for determining whether a sample enters the online sample pool are: and ,in and The preset threshold was determined through a control experiment. The online sample pool is maintained using a first-in, first-out (FIFO) strategy, with a maximum capacity. By conducting comparative experiments in target industrial scenarios with different capacity values (2000–10000 images), the accuracy retention rate of the old task after incremental training at each capacity was statistically analyzed. With new category recognition rate ,Pick The capacity value corresponding to the maximum is used as .
[0075] The specific implementation method of step S02 is as follows.
[0076] For low-confidence samples in the online sample pool (i.e. Exceeding the threshold Local density topological clustering is performed on the samples in a high-dimensional feature space to calculate the local density of each sample. Outlier at the edge of the manifold The formula is expressed as follows:
[0077] ;
[0078] ;
[0079] In the formula, For the sample of A set of nearest neighbors, The kernel bandwidth parameter is typically taken as the mean distance between all nearest neighbor pairs in the feature space. This is the mean of the feature distances between all samples of the same class within the known category. The larger the value, the more the sample deviates from the known class distribution. and The units of both are on the order of the square of the feature distance, and the thresholds can be directly compared numerically. Joint and To determine candidate samples for the new category, it will satisfy and The samples are assigned to the candidate cluster, among which The outlier threshold at the manifold edge was determined through a control experiment. This threshold was used when the candidate cluster size... Exceeding the cluster size threshold And candidate cluster feature centers Center of all known category features ( The nearest distance exceeds the feature center distance threshold. When a new category is created, the following conditions are met:
[0080] and ;
[0081] in Take 50% to 80% of the average distance between known category feature centers. The classification weight vector for the new category was determined through multiple rounds of experiments, using the sample accumulation rate at the first appearance of a new category in a target industrial scenario as a benchmark, and taking the minimum cluster size when the number of samples steadily increased over three consecutive production cycles as the benchmark. Initialization is performed using the Schmitt orthogonalization method, with cluster feature centers as the basis. As the basis vector, for all existing class weight vectors ( Perform orthogonal projection removal one by one to ensure For any known category This ensures that the new category forms a feature response that is linearly independent of the known category from the start of training.
[0082] The specific implementation method of step S03 is as follows.
[0083] High-value samples from the online sample pool are mixed with samples from the historical memory replay buffer at a 1:3 ratio and then fed into the distribution coordination matrix and gradient null space constraint model for incremental parameter updates. The spatial orthogonal projection operator is applied to the input feature matrix. Perform orthogonal basis transformation, transformation matrix Covariance matrix of historical multi-source data Singular value decomposition with front-first take The singular value decomposition formula is as follows: (The structure consists of ∑_(i=1)^3 left singular vectors.)
[0084] ;
[0085] ;
[0086] ;
[0087] In the formula, It is a left singular vector matrix. It is a singular value diagonal matrix. This is the transpose of the right singular vector matrix. This is the feature tensor with uniform dimension after projection. For the original dimension of the input feature, This represents the batch sample size. The number of singular vectors to be retained, ranging from 32 to 256, is determined by the value that minimizes the feature reconstruction error on the validation set. This represents the matrix slicing operation, which selects the left singular vector matrix. All lines and the Listed to number The selected column vectors correspond to singular value diagonal matrices. The first in descending order The encoder has 6 to 12 convolutional blocks, the first of which is a singular value. The layer output tensor is denoted as Adaptive gating unit calculates in real time Tensor flow entropy The formula is expressed as follows:
[0088] ;
[0089] In the formula, for After normalization, the The first sample Dimension value, For the first Layer feature dimension To prevent smoothing terms with a logarithm of zero, the empirical value is... .when Exceeding the Layer preset threshold At that time, the deep feedback pathway is activated, and the historical memory trace tensor is processed. The weighted fusion with the current features is expressed by the following formula:
[0090] ;
[0091] In the formula, For the first The dynamic fusion weights of the layers are controlled by the state memory trace decay factor. control, With time step Attenuation, the attenuation rate is predicted by measuring the error volatility under different non-stationary operating conditions. ,Pick The decay rate value corresponding to low decay rate and few convergence cycles is determined. and , All quantities are of the same dimension, on the order of feature tensors. The gradient null space refers to the Hessian matrix of the historical task loss function with respect to the model parameters. The null space is defined as the space in which parameter perturbations do not alter the local curvature of the historical task loss surface, thus preserving the storage structure of old knowledge. The gradient null space projection operator updates the gradient amount with each step. Project to The null space is expressed by the following formula:
[0092] ;
[0093] In the formula, for The pseudo-inverse matrix, The updated parameters are represented by the projected values. Both sides of the equation have parameter dimensions, ensuring that the updated values do not disrupt the minimum neighborhood structure of the old task's loss surface. Mathematically, this is equivalent to guaranteeing that the optimal solution of the old task remains within the minimum neighborhood of the loss surface after the update. The Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm uses each parameter... Fisher's information on historical tasks The protection is divided into four levels: The largest 5% to 15% of parameters are categorized as follows: Level 1, the next highest 15% to 30% are classified as Level 1, 30% to 50% of the medium level are classified as Level, the remaining parameters are classified as Level. The actual gradient update of the parameters at each level is subject to the damping coefficient corresponding to that level, as expressed in the following formula:
[0094] ;
[0095] In the formula, For parameters Actual replacement amount after damping protection for Chinese correspondence The amount, For parameters Damping coefficient of the corresponding level, Indicates parameters Class of Rank The maximum damping coefficient of the stage ensures that the parameters of that stage remain almost unchanged. The damping coefficient of each level is zero and allows for free updates. The dimensions on both sides of the equation are parametric. The proportions and damping coefficients of each level are determined through comparative experiments, using the highest weighted score corresponding to the accuracy retention rate of the old task and the convergence speed of the new task. In the topological self-evolutionary graph network, nodes correspond to various defect categories. With nodes Nonlinear transmission coefficient between The covariance matrix of the activation values output by the two nodes After determining the eigenvalues following diagonalization, the graph network is nested with Dijkstra's shortest path algorithm to achieve the desired result. Assuming edge weights, a global shortest path calculation is performed once after each addition of a new category node or update of the edge weights, outputting a distance matrix between nodes. , Nodes with smaller distances are semantically similar in the feature space, and the output layer assigns them to different features when determining ambiguous samples. The category corresponding to the nearest node. The capacity of the history memory replay buffer was determined by adjusting the mixing ratio of new and old samples (1:1 to 1:5) in multiple experiments, with the capacity value corresponding to the minimum decrease in accuracy of the old task. The history memory trace tensor cache occupies 20% to 40% of the total memory. This ratio was determined by testing the accuracy retention rate of the old task under different cache ratios. Incremental training throughput ,Pick The proportional value corresponding to the maximum value is determined.
[0096] The specific implementation method of step S04 is as follows.
[0097] Based on real-time prediction error volatility Control factor for state memory trace decay Calculate dynamic fusion coefficient The learning rate and regularization coefficient are adjusted in tandem to drive the parameters to converge to the optimal point. Dynamic fusion coefficients. Depend on Cumulative sample size in the current round Current accuracy retention rate of old tasks The combined calculation is expressed by the following formula:
[0098] ;
[0099] In the formula, , , To obtain the dimensional coefficients calibrated through multiple rounds of experiments, a grid search method was used to traverse the simulated non-stationary conditions. The final value was the combination of coefficients for which the sum of the learning rate and regularization coefficients converged to the optimum in each test scenario was minimized. It is a dimensionless scalar. The dimensions are Reciprocal of dimensions The dimensions are Reciprocal of dimensions The dimensions are The reciprocal of the dimension, the three dimensional coefficients of which compensate for the dimension of each term. Dimensionless. When When a larger learning rate and a smaller regularization coefficient are used, the fitting of the new working condition is accelerated; when When a moderate learning rate and moderate regularization coefficient are used to balance new and old knowledge; when At that time, a smaller learning rate and a larger regularization coefficient are used to strengthen the protection of old knowledge.
[0100] The specific implementation methods for steps S05 and S06 are as follows.
[0101] After the incremental update is completed, a new model version is generated and deployed to the production environment in a 10% traffic canary rollout. It runs simultaneously with the old version, and accuracy, recall, and inference latency are compared. The canary rollout evaluation window duration is determined by statistically analyzing the daily sample processing volume. The evaluation window is defined as the duration corresponding to a cumulative sample processing volume of 5000-20000. The performance evaluation results of the new version are compared with the actual performance measured after the final full rollout, and the duration corresponding to the processing volume threshold with the highest consistency rate is used. After the evaluation window ends, if all performance indicators of the new version are superior to the old version, it is automatically promoted to all traffic; if performance degradation occurs, it is automatically rolled back to the old version and an alarm is triggered.
[0102] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0103] This embodiment uses a bearing manufacturing production line as a scenario to verify the complete execution process of the online incremental update method for AI models in industrial environments described in this invention. The production line is equipped with an area array industrial camera and vibration sensors. The initially known defect categories include six types: dimensional deviation, roundness deviation, cylindricity deviation, clearance anomaly, surface roughness deviation, and vibration anomaly. The historical training set contains 18,000 labeled samples of the above six categories, which are divided into training set, validation set, and test set in a 7:2:1 ratio. This embodiment simulates an online incremental learning scenario where two new types of defects, temperature anomaly and comprehensive performance anomaly, appear during continuous production.
[0104] The initial model was pre-trained on the full historical data. The encoder uses a 12-layer convolutional block structure, and the number of singular vectors of the spatial orthogonal projection operator is [not specified]. The value is set to 128, determined by minimizing the feature reconstruction error on the validation set. Pre-training uses the AdamW optimizer with an initial learning rate of... After 40 training epochs, the validation set loss converged. The history memory replay buffer was randomly selected from the training set at a rate of 100 images per category, for a total of 600 images, which were used as mixed input for all subsequent incremental training epochs.
[0105] After the production line enters the online operation phase, the data acquisition module operates at a frame rate of 50. Continuously acquire images and vibration signals. Step S01 calculates the softmax entropy and k-nearest neighbor density for each frame sample. Twenty samples were selected, and those whose two indicators both exceeded the preset screening thresholds were entered into the online sample pool, with a maximum capacity of 5,000 samples. After about four hours of operation, a low-confidence sample group with a softmax entropy value consistently higher than 0.85 began to accumulate in the online sample pool, which was initially identified as potential candidates for new categories.
[0106] Step S02 performs high-dimensional feature manifold local density topological clustering on the aforementioned low-confidence samples. The outlier degree of the manifold edge and the softmax entropy value of each sample in the 128-dimensional feature space are jointly calculated to form candidate clusters. The first candidate cluster reaches the cluster size threshold (80 samples in this embodiment) after approximately 6 hours, and its feature center has a minimum distance of 0.71 to the feature centers of the six known categories, exceeding the feature center distance threshold of 0.62 (65% of the average distance between the feature centers of the known categories). This triggers the creation of a new category node. After manual sampling, it is confirmed as a temperature anomaly category. An initial weight vector orthogonal to the existing six category weight vectors is obtained through Schmidt orthogonalization, completing the orthogonal initialization of the classification weights. The second candidate cluster is triggered after approximately 11 hours and is confirmed as a comprehensive performance anomaly category. Orthogonal initialization is also completed, expanding the number of classification nodes to eight categories.
[0107] Step S03 involves mixing 80 temperature anomaly samples and 71 comprehensive performance anomaly samples from the online sample pool with 600 samples from the historical memory replay buffer at a 1:3 ratio to form an incremental training batch. This batch is then fed into the distributed collaborative matrix and gradient null space constraint model for incremental updates. During backpropagation, the gradient orthogonal projection operator projects the gradient update amount onto the null space of the Hessian matrix of the historical task. The Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm divides all parameters into four levels based on Fisher information, with Alpha-level parameters accounting for approximately 10% of the total parameters. The corresponding damping coefficients are determined through comparative experiments. After two new nodes are added, the topological self-evolutionary graph network executes Dijkstra's shortest path algorithm to update the global 8×8 node distance matrix. The shortest path distances between nodes are shown in Table 1.
[0108] Table 1. Shortest path distance matrix (normalized value) between eight types of nodes in the self-evolving topology graph network after incremental update.
[0109]
[0110] As shown in Table 1, the path distance between the two new categories of nodes, namely temperature anomaly and comprehensive performance anomaly, is the smallest (0.27), while the path distance with geometric defects such as dimensional deviation and roundness deviation is the largest (0.58-0.66). The path distance with vibration anomaly is in the middle (0.33, 0.39). This is consistent with the prior knowledge that temperature anomaly and comprehensive performance anomaly are related in mechanism and geometric dimensional defect is independent in mechanism in actual working conditions. This indicates that the topological self-evolution graph network automatically learns the semantic topological relationship between categories without human intervention.
[0111] Step S04: After each batch of incremental training is completed, calculate the real-time prediction error volatility. Cumulative sample size Accuracy retention rate compared to old tasks Substitute into the dynamic fusion coefficient function to calculate Incremental training in its early stages higher Not yet stable. The value is approximately 0.82, and the system automatically uses a larger learning rate and a smaller regularization coefficient to accelerate the fitting of new categories; as... Increase and tending to stabilize Gradually reduce the value to around 0.55, and the system switches to a balanced parameter combination; final convergence phase. When the value drops to 0.35, the system switches to an enhanced old knowledge protection mode, and the parameters tend to stabilize. The trends of dynamic fusion coefficient changes at each stage of incremental updates are as follows: Figure 2 As shown, Figure 2 Reflects Follow The learning rate increases monotonically and decreases. This corresponds to the dynamic adjustment of the learning rate, which enables the model to quickly complete the construction of feature responses in the early stages when the number of samples in the new category is limited. After sufficient sample accumulation, it smoothly switches to the protection mode, avoiding the dilemma of underfitting in the early stage and overfitting in the later stage when the learning rate is fixed.
[0112] After the incremental update is completed in step S05, the new model version is connected to the production inference pipeline with 10% gray-scale traffic and runs in parallel with the old version. The gray-scale evaluation window is set to the time corresponding to the cumulative processing of 10,000 samples, which is approximately 4.8 hours. The performance indicators of the new and old versions during the gray-scale operation are compared as shown in Table 2.
[0113] Table 2 Performance Comparison of New and Old Model Versions within the Grayscale Evaluation Window
[0114]
[0115] like Figure 3 As shown, during the gray-scale operation, the overall accuracy of the new version for the six old categories remained slightly fluctuating within the range of 0.955 to 0.961 as the cumulative number of processed samples increased, without showing a monotonically decreasing trend. This indicates that, under the synergistic effect of the gradient null space constraint and the Gray Wolf collaborative anti-forgetting weight protection algorithm, the local minimum structure of the old task loss surface was effectively preserved after incremental updates. The inference latency increased from 8.3ms to 9.1ms, with the increase mainly due to the computational overhead of the path matrix in the Dijkstra shortest path algorithm after the expansion of the number of nodes. This overhead increases with the number of nodes. The growth is consistent, and it remains within the acceptable range for industrial real-time inference at a scale of 8 types of nodes.
[0116] Step S06: After the gray-scale evaluation window ends, the system determines that the new version meets the deployment conditions in three metrics: accuracy (0.958, within the fault tolerance threshold of 0.005) for the six old categories, recall (0.941, not lower than the old version's fault tolerance range of 0.947), and inference latency (9.1ms, meeting the system's set real-time requirement of within 10ms). It then automatically performs a full traffic switch, completing the production deployment of this round of online incremental updates. The old version enters a cold standby state; if subsequent monitoring detects any abnormalities in full-scale operation, it can be immediately rolled back.
[0117] From the data change trends in the above embodiments, the difference in the comprehensive accuracy of the six old categories before and after the incremental update is controlled within 0.003. The underlying reason is that the gradient null space constraint limits the parameter update amount to the null space of the Hessian matrix of the historical task, ensuring that the critical point structure of the old task is mathematically unaffected by the gradient of the new task. This fundamentally solves the technical defect in traditional full-parameter fine-tuning methods where the gradient of the new task covers the old knowledge storage structure along the curvature direction. Dynamic fusion coefficients The trend of monotonically decreasing from 0.82 to 0.35 indicates that, with the continuous accumulation of new category samples and the gradual stabilization of the accuracy of old tasks, the system automatically completed the strategy migration from rapid fitting to knowledge protection. This adaptive adjustment eliminated the accuracy fluctuations caused by gradient oscillations under fixed hyperparameter conditions, enabling the model to achieve stable convergence under non-stationary conditions.
[0118] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for online incremental update of AI models for industrial environments, characterized in that, Includes the following steps: Real-time acquisition of industrial field data streams; uncertainty and representativeness measures for each sample; screening of high-value samples and storing them in an online sample pool. High-dimensional feature manifold local density topological clustering is performed on low-confidence samples in the online sample pool. When the cluster size and the distance to the known category feature center both exceed their respective trigger thresholds, new category nodes are automatically created and the orthogonal initialization of classification weights is completed. High-value samples from the online sample pool are mixed with samples from the historical memory replay buffer pool and fed into the distributed collaborative matrix and gradient null space constraint model. Differential damping is applied to parameters at each level based on the Grey Wolf Collaborative Anti-Forgetting Weight Protection Algorithm, and incremental updates of model parameters are completed in the gradient null space. Based on the real-time prediction error volatility, the dynamic fusion coefficient is calculated through the state memory trace decay control factor, and the learning rate and regularization coefficient are adjusted in conjunction to drive the parameters to converge to the optimal point. After the incremental update is completed, a new model version is generated. The new version is deployed to the production environment in a canary traffic manner and run simultaneously with the old version to compare accuracy, recall and inference latency. After the gray-scale evaluation window ends, if all performance indicators of the new version are better than those of the old version, the new version will be automatically promoted to all traffic; if the new version has a performance degradation, it will be automatically rolled back to the old version and an alarm will be triggered.
2. The online incremental update method for AI models in industrial environments according to claim 1, characterized in that, The uncertainty measure refers to quantifying the uncertainty of a sample based on the softmax entropy value of the current model's prediction output. A higher entropy value indicates that the model is more uncertain about the sample. The representativeness measure refers to selecting samples with large feature distances from existing samples as high-value samples based on the k-nearest neighbor density estimation of the sample in the feature space.
3. The online incremental update method for AI models in industrial environments according to claim 2, characterized in that, The online sample pool is maintained using a first-in-first-out (FIFO) strategy. The capacity limit is determined by conducting comparative experiments with different capacity values in the target industrial scenario. The accuracy retention rate of the old task and the recognition rate of the new category after incremental training are statistically analyzed under each capacity. The capacity value corresponding to the maximum product of the two is taken as the optimal capacity limit.
4. The online incremental update method for AI models in industrial environments according to claim 3, characterized in that, The high-dimensional feature manifold local density topological clustering refers to identifying the topological structure of sample distribution in the high-dimensional feature space extracted by the model using local density estimation methods. It involves calculating the sample density and manifold edge outlier degree in the neighborhood of each sample, and combining the softmax entropy value to jointly determine potential new category candidate clusters.
5. The online incremental update method for AI models in industrial environments according to claim 4, characterized in that, The orthogonal initialization of classification weights refers to setting the initial classification weight vector of the newly created category node to be orthogonal to all existing category weight vectors, using the vector of the cluster feature center after Schmitt orthogonalization as the initial weight.
6. The online incremental update method for AI models in industrial environments according to claim 5, characterized in that, The encoder of the distributed cooperative matrix and gradient null space constraint model consists of 6 to 12 convolutional blocks. Each convolutional block embeds an adaptive gating unit based on continuous state derivatives. When the tensor flow entropy exceeds the preset threshold within the layer, the deep feedback path is activated, and the historical memory trace tensor is weighted and fused with the current feature before continuing forward propagation.
7. The online incremental update method for AI models in industrial environments according to claim 6, characterized in that, The decoder output of the distributed cooperative matrix and the gradient null space constraint model is connected to a topological self-evolving graph network. The nodes of the graph network correspond to each defect category. The edge weights between nodes are automatically adjusted by minimizing the node feature reconstruction error. The nonlinear transmission coefficient is determined by the eigenvalues after diagonalization of the covariance matrix of the activation values output by each node.
8. The online incremental update method for AI models in industrial environments according to claim 7, characterized in that, The distributed collaborative matrix and the gradient null space constraint model are simultaneously nested with Dijkstra's shortest path algorithm. Each category node in the topological self-evolving graph network is used as a graph node, and the reciprocal of the nonlinear transmission coefficient between nodes is used as the edge weight. After each new category node is added, Dijkstra's shortest path algorithm is run to update the global shortest path matrix between nodes. The path distance matrix is input to the category decision logic of the output layer to help determine the affiliation of fuzzy samples.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform the online incremental update method for an AI model in an industrial environment as described in any one of claims 1-8.
10. An online incremental update system for AI models in industrial environments, characterized in that, The system comprises the computer-readable storage medium of claim 9, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes program instructions stored in the computer-readable storage medium.
