A weld quality prediction model online drift detection and incremental calibration method and system

CN123015467APending Publication Date: 2026-10-30CHENGDU DAHONGLI MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611208634.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

用少量新样本去更新模型时,容易发生遗忘,即模型学会了新工况,却忘掉了老工况;而把未经充分验证的新模型直接推上产线,一旦新模型更差,反而会造成批量误判

Benefits of technology

1、用极低的检测/标注代价抑制漂移:通过不确定性引导抽检,把稀缺的无损检测名额投给信息价值最高的焊缝段,同样的检测量换来对模型问题最有揭示力的标签,避免了全量重训所需的高昂标注成本;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015467A_ABST
    Figure CN123015467A_ABST
Patent Text Reader

Abstract

The application discloses a kind of weld quality prediction model online drift detection and incremental calibration method and system, it is related to intelligent welding and industrial machine learning model maintenance technical field, for the problem that prediction model gradually loses accurate in long-term operation, and the cost of full quantity re-labeling is high, the present application establishes traceability archives with weld section as unit, records the feature of each section, predicted defect probability, quality margin, confidence and model version;Accordingly, according to the information value, guide physical sampling inspection, preferentially select the weld section with lower confidence and closer to the qualified boundary to obtain the true label;Further, use confidence offset criterion and confidence normalized residual criterion double criterion to detect drift, and according to the triggered criterion, the causes are divided into covariate drift and concept drift, respectively, to expand distribution or re-labeling output difference to differentiate small sample incremental calibration, supplemented by anti-forgetting and version safety use.The present application suppresses drift with very low detection and labeling cost, and is safe and traceable throughout.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent welding and industrial machine learning model maintenance technology, and in particular to a method and system for online drift detection and incremental calibration of weld quality prediction models. Background Technology

[0002] In welding production, more production lines are adopting data-driven machine learning models to predict weld quality based on welding process signals, such as predicting whether a section of weld will have defects, or whether its penetration depth or formation meets standards. These models typically perform well in the initial stages of deployment, but they face a common problem in long-term operation: model drift.

[0003] Drift, in this context, refers to the gradual decrease in the predictive accuracy of a model over time. There are two main types of causes for drift, both manifesting as the model becoming increasingly inaccurate, but their root causes are completely different: The first type is covariate drift (also known as operating condition migration): the model's input distribution changes. For example, a new batch of base material is used, the contact nozzle wears out, or the gas flow rate or ambient temperature and humidity changes, causing the statistical characteristics of the current welding process signal to deviate from the range seen during model training. In this case, the model is making predictions based on unfamiliar inputs, which naturally makes it prone to errors. The second type is concept drift (also known as model degradation): the model's input distribution remains largely unchanged, but the correspondence between the input and quality has changed. For example, adjustments to process standards or changes in testing caliber can lead to different actual quality conclusions for the same process signal compared to the past. In this case, the model is not unfamiliar with the input, but the signal-quality mapping it has learned is outdated.

[0004] Regarding drift, existing technologies have the following shortcomings: First, it relies on full or periodic retraining. Many solutions treat the model as if it were trained and used permanently, or periodically collect a large number of samples, re-label them, and retrain the entire model to update it. However, in welding scenarios, obtaining true quality labels requires non-destructive testing such as X-rays and ultrasound, which is costly and time-consuming, making full re-labeling almost economically impractical. Secondly, random sampling wastes testing resources. To obtain accurate labels, production lines typically conduct random sampling at a fixed ratio. However, random sampling distributes testing slots evenly across a large number of ordinary weld segments that are "already accurately judged by the model," while the weld segments that truly expose model problems and are most worthy of inspection may not be selected, resulting in very low information value from each inspection. Third, the causes of drift are not differentiated. Most drift detection schemes only answer "whether there is drift," not "why there is drift." As mentioned earlier, the remedies for covariate drift and concept drift are completely different. The former requires the model to adapt to new conditions, such as expanding its input coverage, while the latter requires correcting the model's output decision relationships. If all models are retrained or thresholds are adjusted indiscriminately, it is often counterproductive or even worse. Fourth, incremental updates carry the risks of forgetting and deployment. When updating the model with a small number of new samples, forgetting can easily occur, meaning the model learns the new conditions but forgets the old ones. Conversely, pushing a new model that has not been fully validated directly onto the production line can lead to batch misjudgments if the new model turns out to be worse.

[0005] Therefore, how to detect the drift of the weld quality prediction model in a timely manner, identify its causes, and safely calibrate it with the lowest possible detection and labeling costs is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides an online drift detection and incremental calibration method and system for weld quality prediction models. This method suppresses drift with low detection and annotation costs, promptly detects drift in weld quality prediction models, identifies their causes, and safely calibrates them.

[0007] In order to achieve the objective of this invention, the following solution is proposed: A method for online drift detection and incremental calibration of a weld quality prediction model, specifically including the following steps: S1. Establish weld section-level traceability files. When the deployed weld quality prediction model is running, for each weld segment, its segment-level feature vector is calculated. Defect probability output by the model Signed quality margin ( This indicates that there is still a margin before reaching the acceptable boundary. (Indicates that the boundary has been crossed) Prediction confidence level (The familiarity of the current feature with respect to the training distribution), along with the product serial number, weld segment number, timestamp, online intervention action, model version number, process version number, etc., forms a structured record stored in the traceability archive. The traceability archive is the common data source for subsequent sampling inspections, drift detection, and incremental calibration, and also makes the entire quality control process auditable and traceable. It should be noted that this invention does not limit the specific algorithm of the above prediction confidence. It can be obtained by the distribution distance from the current feature to the representative samples of the training set, Mahalanobis distance, nearest neighbor density, ensemble model prediction variance, etc. The key is that it can distinguish whether the model is familiar with or unfamiliar with the current working conditions.

[0008] S2, Uncertainty-guided sampling Non-destructive testing (NDT) slots are a scarce resource and should not be allocated equally, but rather allocated to the weld segments that are most deserving of inspection. Therefore, a sampling priority should be calculated for each weld segment. To satisfy: confidence level The lower the value, the less certain the model is, the more likely it is to make mistakes, and the more worthwhile it is to validate it with real-world testing; absolute value of the quality margin The smaller the weld (the closer it is to the acceptable boundary, the more critical the judgment, and the more direct the consequences of a wrong judgment), and the higher the risk, the higher the priority. Under the constraints of the production line's available testing capacity during the shift—for example, only 15% of weld segments can be inspected—weld segments are selected from high to low priority for non-destructive testing to obtain their true quality labels and supplement the records. In this way, the same number of tests yields the labels most revealing to the model's problems, i.e., obtaining the greatest information value with the fewest tests.

[0009] S3, Dual-criteria drift detection Based on weld segments with newly added real labels, this invention uses two criteria to monitor drift in parallel. The first is the confidence shift criterion: monitoring the degree of decrease in the average confidence relative to the reference value within a recent window—an overall decrease in confidence indicates that a large number of weld segments have fallen outside the training distribution. The second is the confidence-normalized residual criterion: first, calculating the residual between the model prediction and the real label, such as the deviation between the predicted defect probability and the actual defect, or the statistical measure of the deviation between the predicted quality level and the measured quality; then, normalizing the residual using the expected error band determined by the confidence level of that segment. The key consideration here is that a weld segment with low confidence (unfamiliar working conditions) should inherently have a larger prediction error. If a fixed threshold is used to limit its original residual, it will turn false alarms that should have been wrong into model degradation. Therefore, the expected error band increases as the confidence decreases, and the criterion is only triggered when the residual exceeds the error level that the confidence level should have. Drift is determined when either criterion exceeds its threshold. The detection can be triggered periodically or when the cumulative number of samples reaches a set value.

[0010] S4, Drift Attribution If the drift is mainly triggered by the confidence shift criterion (the overall confidence has recently decreased, and a large number of weld segments have moved outside the training distribution), it is judged as covariate drift; If the drift is mainly triggered by the confidence level normalized residual criterion (the confidence level has not decreased significantly, but the residual exceeds the level that the confidence level should be), it is judged as concept drift.

[0011] This distinction holds true because the two criteria measure two different things: confidence shift measures whether the input has become unfamiliar, while the confidence-normalized residual measures whether, after excluding unfamiliar inputs that should already be wrong, there are still additional, undue errors. The former corresponds to covariate drift, and the latter to conceptual drift; they complement each other, preventing a single residual signal from conflating the two types of drift. Furthermore, when neither criterion points to the aforementioned cause, but a systematic inconsistency between prediction and label still exists, it can be judged as data or labeling anomaly, triggering a record review.

[0012] S5, Differentiated Incremental Calibration Treat the symptoms according to the cause of S4: To address covariate drift: Add the features and labels of newly labeled weld segments with low confidence (i.e., representing new working conditions) in S2 to the training samples, perform small-sample incremental training on the model, and allow the model to include new working conditions in its coverage; at the same time, update the reference sample set so that the working condition will no longer be misjudged as unfamiliar in the future.

[0013] To address concept drift: Keep the feature extraction part of the model unchanged, and only recalibrate the model's decision output with new labels. For example, refit the classification threshold, perform temperature / Platt calibration on the predicted probability, correct the bias and scale of the regression output, and correct outdated output relationships.

[0014] To avoid learning new things and forgetting old ones (catastrophic forgetting), incremental updates use archive playback: samples representing historical conditions are selected from the retrospective archive to form a playback set, which participates in the update along with new samples; alternatively, only the output / decision layer can be updated or a regularization term to suppress parameter deviation can be added to the loss.

[0015] To avoid problems from hastily deploying new models, a version-safe deployment approach is adopted: the new version obtained from calibration is first predicted in parallel and silent mode, but does not participate in online intervention. The residuals of the new and old versions are compared on the labels obtained from subsequent sampling. The new version is only deployed if it shows improvement; otherwise, it is automatically rolled back to the old version based on the model version number recorded in the file.

[0016] Furthermore, this invention also includes a self-updating reference sample set: when a weld segment under a new working condition is repeatedly sampled and passes inspection over a period of time, it indicates that it has become a new normal. Therefore, its representative characteristics are added to the reference sample set used to calculate the confidence level, so that the confidence level of similar weld segments will rise in the future. In this way, the confidence estimator itself also keeps pace with the times and will not misjudge a familiar working condition as unfamiliar for a long time.

[0017] The beneficial effects of this invention are as follows: 1. Suppress drift with extremely low detection / labeling costs: By guiding sampling through uncertainty, scarce non-destructive testing slots are allocated to weld segments with the highest information value. The same amount of testing is exchanged for labels that are most revealing to the model's problems, avoiding the high labeling costs required for full retraining. 2. More accurate drift detection and clearer cause identification: The confidence normalized residual criterion first deducts the errors that should exist under unfamiliar operating conditions, and only alarms for errors that exceed the expected level, reducing false alarms; in conjunction with the confidence offset criterion, it cleanly separates covariate drift from conceptual drift, the former expands the full distribution, and the latter recalibrates the output, avoiding erroneous and invalid calibration. 3. Make full use of testing resources: The allocation of sampling quotas takes into account the physical cost of relocating flaw detection equipment, prioritizes the grouping of adjacent high-priority sections, and can further reduce the consumption of expensive physical testing by using online intervention results, product-level acceptance and other weak label pre-screening; drift signals can also drive sampling to adaptively concentrate on suspected drift areas, and confirm drift more quickly. 4. No forgetting, rollbackable, and safe to use: File playback suppresses catastrophic forgetting, background trial operation verification plus version rollback ensures that calibration will not get worse; furthermore, multiple versions are retained and the best version is selected for each segment according to the working conditions; 5. Full traceability and auditability: Based on the weld section-level traceability archive, the characteristics, predictions, actions, test results, and model versions of each section can be checked, which facilitates quality traceability and responsibility determination; 6. Long-term adaptive: The admission and elimination of the reference sample set ensures that the confidence estimate is synchronized with the current status of the production line and remains bounded, so that the system can remain accurate as the production line evolves over a long period of time. Attached Figure Description

[0018] Figure 1 The overall system structure block diagram is shown; Figure 2 The overall flowchart of the method is shown; Figure 3 A schematic diagram of drift cause discrimination based on confidence distribution is shown; Figure 4 The diagram illustrates the incremental calibration and the new version's background trial run verification and rollback closed loop. Detailed Implementation

[0019] Example 1 This embodiment takes a production line that uses welding robots to mass-produce stainless steel structural parts as an example. The production line has deployed a weld quality prediction model that can output the defect probability online for each weld segment (e.g., every 5mm segment). Signed quality margin With prediction confidence The system of this invention operates as a maintenance layer for the prediction model, and its module structure is as follows: Figure 1 As shown, the overall process of the method is as follows: Figure 2 As shown, the online drift detection and incremental calibration method for the weld quality prediction model is as follows: (a) Establish weld segment-level traceability archives. The traceability archiving module generates a structured data record for each weld segment (one record per weld segment), with fields including: Identification elements: Product serial number (SN), weld seam number, weld seam segment number, timestamp; Feature class: Segment-level feature vectors (such as mean / standard deviation of current, mean / standard deviation of voltage, mean / standard deviation of molten pool thermal radiation, correlation coefficient between current and voltage, mean arc power, etc.); Predictive type: Defect probability Quality margin Prediction confidence ; Action-related: Online intervention actions (such as maintenance / fine-tuning / speed reduction / shutdown) and parameter correction amounts; Version-related: Model version number (e.g., v3), process card version number; Inspection category: Whether it was sampled and inspected, non-destructive testing results (real quality label, to be added after inspection, blank if not inspected).

[0020] This record is uploaded to the Manufacturing Execution System (MES) along with the product information card. An example record (illustrated) includes the following fields: product serial number (e.g., A2026-0007), weld number, weld segment number, segment-level feature vector, defect probability (e.g., 0.18), quality margin (e.g., 0.03), prediction confidence (e.g., 0.46), online intervention action (e.g., back-up and re-welding), model version number (e.g., v3), process card version number (e.g., P2), whether sampling inspection was conducted, and non-destructive testing results (empty if no inspection was conducted).

[0021] (ii) Uncertainty-guided sampling inspection. In this embodiment, the non-destructive testing capability is approximately 15% of the total number of weld segments. The uncertainty-guided sampling inspection module calculates the sampling priority for each weld segment: Among them, take , , ; Take as ( (For a quality margin scale, e.g., 0.05), thus The smaller the value (the closer it is to the acceptable boundary), the larger this value will be; The risk index for this segment (by...) and get, All weld sections were arranged according to... Sort by quality from highest to lowest, and select the top 15% of applicants to undergo X-ray or ultrasound testing to obtain a genuine quality label and supplement their records.

[0022] Example: A certain weld section , , ,but Another weld section , , ,but The former has a much higher priority than the latter and is sent for inspection first. This is precisely to allocate inspection slots to the segments where the model is least confident and closest to the boundary. Compared to random sampling, with the same 15% inspection volume, this approach significantly increases the proportion of weld segments that are most likely to expose model problems.

[0023] (iii) Dual-criteria drift detection. The drift detection and attribution module monitors drift in parallel within a sliding window (e.g., the 200 weld segments with recently added real labels) using two criteria.

[0024] One is the confidence bias criterion: calculating the average predicted confidence of inspected weld segments within the recent window. , and reference confidence level (For example, take the average confidence level of 0.72 during the initial stable operation of the model) for comparison; when relatively The decrease exceeded the preset threshold (In this embodiment, the value is 0.15). The criterion is triggered when the confidence level is low overall, indicating that a large number of weld segments have recently fallen outside the training distribution.

[0025] The second is the confidence-normalized residual criterion: first, calculate the residual between the model prediction and the actual label for each inspected weld segment. (For example, take the weighted average of the classification residual and the regression residual, where the classification residual is the proportion of inconsistencies between the predicted defects and the actual inspection results, and the regression residual is the normalized absolute value of the difference between the predicted quality level and the measured quality); then use the expected error band determined by this confidence level. Normalize it to obtain the normalized residual. The expected error band is obtained by fitting the correspondence between the confidence level and the prediction error of weld segments within the training data distribution during the initial stage of model deployment. It increases as the confidence level decreases (in this embodiment, the expected error of a segment with a confidence level of 0.9 is approximately 0.03, and the expected error of a segment with a confidence level of 0.5 is approximately 0.09). When the mean of the normalized residuals within the window exceeds a preset margin... (In this embodiment, the value is 0.04). This criterion is triggered when the residual exceeds the level that the confidence level should be. This means that weld segments with low confidence (unfamiliar working conditions) should have larger errors. Only when the residual exceeds the level that the confidence level should be is it considered a real anomaly, thereby avoiding misreporting unfamiliar working conditions that should be wrong as model inaccuracy.

[0026] The above two criteria trigger an evaluation every 200 new labels (or can be triggered periodically); if either criterion is triggered, it is determined that the weld quality prediction model has drifted.

[0027] (iv) Drift attribution (corresponding to) Figure 3 Once drift is detected, the cause is determined based on which criterion was triggered: If primarily triggered by the confidence shift criterion (a significant recent decrease in average confidence, for example, from 0.72 to 0.48, with a decrease exceeding...) If the input distribution changes, it is determined to be a covariate drift, meaning that the input distribution has changed and a large number of weld seam segments have recently moved outside the training distribution. This usually corresponds to changes in working conditions such as changing batches of base materials, wear of contact nozzles, changes in gas flow rate, or changes in ambient temperature and humidity. If the primary trigger is the confidence level normalized residual criterion (the average confidence level has not decreased significantly, for example, it remains at 0.70, but the window mean of the normalized residuals exceeds...), then... If the input is not unfamiliar, it is considered a concept drift, meaning that the model is not unfamiliar with the input, but the correspondence between the signal and the quality has changed (such as the adjustment of process standards or the change of detection diameter).

[0028] The two criteria measure two different things: the confidence shift metric "whether the input becomes unfamiliar," and the confidence normalized residual metric "whether there are additional, undue errors after excluding the 'unfamiliarity should be wrong' error." The former corresponds to covariate drift, and the latter to conceptual drift. They complement each other, preventing a single residual signal from conflating the two types of drift. Furthermore, when neither criterion points to the aforementioned cause, but a systematic inconsistency between the prediction and the true label still exists, it can be judged as data or labeling anomaly, triggering a review of the corresponding traceability files.

[0029] (v) Differentiated Incremental Calibration (corresponding to) Figure 4 Incremental calibration and version management modules are executed based on cause: Covariate drift: The features and labels of the newly labeled low-confidence weld segments (representing new working conditions) in the uncertainty-guided sampling step are merged with the historical representative samples of each working condition replayed from the archive (in this embodiment, 500 representative samples are retained as the replay set) to perform small-sample incremental training on the model; at the same time, the reference sample set is updated.

[0030] Concept drift: Freeze the feature extraction part of the model and recalibrate the decision output only with the new label. For example, refit the decision threshold for the classifier head, perform temperature calibration on the predicted probability, and refit the bias and scale for the regression head.

[0031] (vi) Version security deployment (corresponding to) Figure 4 After the incremental update yields a new version (e.g., v4), v4 is initially run in parallel with v3 for prediction without participating in online intervention. The residuals of v3 and v4 are then compared on subsequently sampled labels. If v4 has a lower residual and shows no degradation on the playback set, v4 is deployed and becomes the new current version; otherwise, it is rolled back based on the model version number recorded in the file, and v3 continues to be used. Since each file records the model version number used at that time, version comparisons and rollbacks are based on reliable data.

[0032] (vii) Self-updating of the reference sample set. If a weld segment of a new working condition is sampled multiple times within a certain period of time and all of them pass the inspection, its representative features (such as the centers obtained by clustering the samples of this working condition) are added to the reference sample set used to calculate the confidence level, so that the confidence level of similar weld segments will rise in the future and avoid misjudging familiar working conditions as unfamiliar ones in the long term.

[0033] (viii) Numerical review of a complete drift event. After replacing the base material with a new batch on a certain day: the sliding window residual increased from approximately 0.05 to 0.14 (exceeding...). Meanwhile, the recent average confidence level decreased from 0.72 to 0.48 (a decrease of 0.24 > 0.48). The system identified the issue as covariate drift. Based on this, it merged approximately 40 newly labeled low-confidence weld segments from the day's guided sampling with 500 replay samples for incremental training, resulting in v4, and updated the reference sample set. After a batch of parallel silent runs of v4, its window residual decreased to approximately 0.06, and the replay set showed no degradation; v4 was then deployed. In contrast, in another event, the residual rose to 0.13, but the average confidence remained at 0.70 (no significant decrease), indicating concept drift. The system only recalibrated the classification threshold and probability calibration, resulting in a decrease in residuals without altering the feature extraction portion. The entire process consumed only 15% of the usual sampling volume, plus a small amount of incremental training, without requiring full relabeling.

[0034] Example 2 This embodiment, based on Embodiment 1, further illustrates the specific implementation of several mechanisms of the present invention.

[0035] (I) Confidence-normalized residuals and dual-criteria drift detection During the initial stable operation of the model, the confidence level of weld segments within the training distribution is statistically analyzed. Error with actual prediction The relationship between them is used to fit an expected error band. , its follow The expected error increases as the confidence level decreases (for example, the expected error of a segment with a confidence level of 0.9 is about 0.03, and the expected error of a segment with a confidence level of 0.5 is about 0.09).

[0036] Online runtime: Calculation of recent average confidence level using the confidence shift criterion. relative reference value The decrease exceeded (e.g., 0.15) triggers the test; the confidence-normalized residual criterion is calculated for each detected segment. When its mean within the window exceeds a preset margin (e.g., 0.04) triggers the event.

[0037] For example: a certain section The expected error is approximately 0.035, while the measured error reaches 0.12, exceeding 0.085. This indicates that the model misinterpreted a familiar operating condition that it should have answered well, a strong signal of concept drift. Conversely, if the segments with large errors are almost all low-confidence segments, then the errors fall within the expected error band, the normalized residual criterion is not triggered, and the confidence shift criterion identifies it as covariate drift. In this way, the two criteria each perform their respective functions and do not confuse with each other.

[0038] (II) Allocation of sampling quotas based on perceived physical testing costs Non-destructive testing (especially radiographic testing) involves relocating and re-setting up the equipment at different locations on the weldment, which is inherently time-consuming and costly. Therefore, this embodiment does not simply select the top few based on priority, but considers maximizing the total priority of the inspected segments while minimizing the relocation cost of the testing equipment: several spatially adjacent weld segments with high priority on the same weldment are grouped together and continuously inspected in a single setup. In engineering, this can be modeled as a selection problem that maximizes the sum of the priorities of the inspected segments under the constraint of relocation cost budget, and can be approximated using greedy algorithms or dynamic programming. Compared to selecting the highest priority segments one by one (which may be scattered throughout the weldment and require frequent relocation), group inspection can inspect several more high-value segments at the same inspection cost.

[0039] (III) Adaptive Sampling Driven by Drift Signal Under normal circumstances, sampling is performed at a fixed percentage (e.g., 15%). Once the value of a certain drift criterion rises close to its threshold (e.g., reaching 80% of the threshold), the system temporarily increases the sampling percentage (e.g., to 25%) and concentrates the new sampling on suspected drift areas. If the criterion approaching the threshold is a confidence shift criterion, more of the current low-confidence segments (mostly new operating conditions) are checked; if the criterion is a confidence normalized residual criterion, more of the segments close to the acceptable boundary are checked. This allows for faster acquisition of key labels and earlier confirmation and characterization of drift when it first appears, triggering calibration only after confirmation.

[0040] (iv) Pre-screening of weak labels The traceability archive already records the online intervention actions and results for each segment (e.g., a segment was judged to have a serious defect and triggered a rollback and resoldering), as well as the final product-level acceptance result of the product to which that segment belongs (pass / rework / scrap; these results are usually 100% recorded with almost zero additional cost). This embodiment treats them as weak labels: for example, if a product passes the product-level acceptance, then its segments are likely to pass, and the sampling priority of these segments can be lowered accordingly; conversely, if a product is judged to be reworked, the sampling priority of its related segments is increased. A preliminary screening is performed using free weak labels, further focusing expensive non-destructive testing slots on segments that weak labels cannot determine and that the model is unsure about.

[0041] (v) Multi-version matching and safe rollback based on operating conditions After the incremental update yields version v4, a purely binary global switch between v3 and v4 is unnecessary. The system retains both v3 and v4, recording their residuals on the sampled validation set separately for each operating condition. For a specific weld segment, the version with the lower validation residual for that operating condition is selected for prediction. For example, if v4 is better on the new base material condition and v3 is more stable on the old condition, then v4 is used for the new base material segment and v3 for the old condition segment. Only when the new version shows no improvement across all operating conditions is a complete rollback based on the version number recorded in the file. Since each file records the model version number used at the time, both operating condition comparisons and segment-by-segment matching calls are based on reliable data.

[0042] (vi) Admission and Rejection of Reference Sample Set The reference sample set is used to calculate confidence levels and must remain bounded and consistent with the current situation. Admission: If a segment of a new operating condition is repeatedly sampled and passes inspections within a certain period, its representative sample (cluster center) is added to the reference set, increasing the confidence level of that operating condition and preventing it from being sampled at high frequencies again. Elimination: If a representative sample of a certain operating condition no longer appears within a preset time period, or its corresponding process card version has been discontinued (e.g., the model is no longer in production), it is removed from the reference set. In this way, the reference set always reflects the actual operating conditions currently being performed on the production line, avoiding both unbounded expansion and misjudging familiarity by retaining obsolete operating conditions.

[0043] Example 3 This embodiment describes a system for implementing the above method, the overall structure of which is as follows: Figure 1As shown. This system operates as a maintenance layer for the deployed weld quality prediction model and includes four parts: a traceability and archiving module, an uncertainty-guided sampling inspection module, a drift detection and attribution module, and an incremental calibration and version management module. These four modules can be software functional modules running on the same server or industrial control computer, or they can be distributed across different hardware carriers such as edge computing units, manufacturing execution system (MES) servers, and inspection workstations, interconnected via industrial buses or factory networks; this invention does not limit the physical division of the modules. The composition and function of each module are as follows.

[0044] (i) Traceability and Archiving Module. This module is connected to the deployed weld quality prediction model and welding execution mechanism to perform the aforementioned methods. Upon completion of welding each weld segment, it collects and aggregates the segment-level feature vector for that weld segment. Defect probability output by the model Signed quality margin With prediction confidence The online intervention actions and parameter corrections, along with the product serial number, weld number, weld segment number, timestamp, model version number, and process card version number, are combined into a structured data record and written into the traceability archive database, and uploaded to the MES along with the product information. This module also reserves fields for whether sampling inspections were conducted and for non-destructive testing results, for subsequent data entry after sampling inspections. This module serves as the common data source for all subsequent modules.

[0045] (ii) Uncertainty-guided sampling inspection module. This module reads the confidence level of each weld segment from the traceability archive. Quality margin With risk For each weld segment, calculate the increase in confidence level and the absolute value of quality margin. Decrease and increase the priority of random inspection Under the constraint of the on-duty non-destructive testing capability, weld segments with higher sampling priority are selected, and sampling tasks are generated and issued to the non-destructive testing workstation (such as X-ray or ultrasonic testing equipment). The returned real quality labels are then added to the corresponding traceability files. In the preferred implementation, this module is also configured to: take into account the physical testing cost of the testing device shifting between weld segments when selecting weld segments, prioritize grouping spatially adjacent high-priority weld segments into the same inspection; and increase the sampling ratio and concentrate the sampling quota on suspected drift areas when any drift criterion value of the drift detection and attribution module approaches its threshold.

[0046] (III) Drift Detection and Attribution Module. This module operates in parallel using two criteria: a confidence shift criterion, which monitors the decrease in the average confidence level of weld segments with newly added real labels relative to the reference confidence level within a recent window; and a confidence normalized residual criterion, which calculates the residual between the model prediction and the actual quality label, and normalizes the residual using the expected error band determined by the confidence level of the weld segment, which increases as the confidence level decreases, to obtain the normalized residual. When either criterion exceeds its corresponding threshold, the module determines that a drift has occurred; and further attributes the drift based on which criterion primarily triggered it. If primarily triggered by the confidence shift criterion (overall decrease in confidence level), it is classified as covariate drift; if primarily triggered by the confidence normalized residual criterion (no significant decrease in confidence level but high normalized residual), it is classified as concept drift. This module outputs the drift determination and cause results to the incremental calibration and version management module.

[0047] (iv) Incremental Calibration and Version Management Module. This module selects features and true quality labels for corresponding weld segments from the traceability archive based on the determined causes of drift, and performs small-sample incremental updates to the weld quality prediction model: for covariate drift, newly acquired true-label low-confidence weld segments are included in the training to ensure the model covers newly emerging working conditions; for concept drift, the feature extraction part of the model is frozen, and only its decision threshold or output mapping is recalibrated. Anti-forgetting measures are adopted during incremental updates (archive playback, updating only the output layer, or introducing regularization terms). In the preferred implementation, this module is also responsible for version security deployment and multi-version matching based on working conditions: the new version model is verified in a parallel silent running mode, multiple versions before and after the update are retained, and based on the residuals of each version verified under different working conditions, the version with the lower verification residual is selected for prediction for each weld segment according to its working condition; if necessary, the model version number recorded in the archive is rolled back. In addition, this module also performs admission and elimination maintenance on the reference sample set used to calculate confidence.

[0048] (V) Data Flow and Closed Loop Between Modules. The above four modules work collaboratively with traceability archives as the central hub: the traceability archiving module continuously writes weld segment records; the uncertainty-guided sampling inspection module selects weld segments for inspection and adds real labels accordingly; the drift detection and attribution module determines and attributes drift based on the added labels; the incremental calibration and version management module updates the model and reference sample set according to the causes, and the updated results are applied to the weld quality prediction model, thereby improving its prediction results for subsequent weld segments, which are then recorded by the traceability archiving module. This cycle forms a model maintenance closed loop of "archiving—sampling inspection—detection and attribution—calibration—re-archiving". In one implementation, the functions of the above modules are implemented by a computer program stored on a computer-readable storage medium, which completes the steps of the aforementioned method when executed by a processor.

[0049] The above embodiments are only used to illustrate the technical ideas and features of the present invention, and are not intended to be unique or to limit the present invention. Those skilled in the art should understand that various changes or equivalent substitutions made to the present invention without departing from its scope are all within the scope of protection of the present invention.

Claims

1. A method for online drift detection and incremental calibration of a weld quality prediction model, characterized in that, Used to maintain the deployed weld quality prediction model, which outputs the defect probability for each weld segment. Quality margin With prediction confidence Among them, the probability of defects To characterize the likelihood of welding defects in this weld segment, the quality margin is... To characterize the signed quantity representing the distance of the weld segment from the acceptable boundary, the prediction confidence level is... Characterizing the familiarity of the weld segment's features with respect to the model's training data distribution; methods include: S1. Establish a traceability file for each weld segment. The traceability file should at least record the segment-level feature vector of that weld segment. Defect probability Quality margin With prediction confidence The product identifier, weld segment identifier, model version identifier, and process version identifier of the weld segment are also included. S2. Calculate the sampling priority for each weld segment, with the sampling priority varying with the prediction confidence level. It increases as the mass margin decreases and increases with decreasing mass margin. The decrease in absolute value leads to an increase in the sampling priority of weld segments that are more uncertain and closer to the qualified boundary. Under the preset testing capacity constraints, weld segments are selected from high to low sampling priority for physical quality testing until the number of tests allowed by the testing capacity constraints is reached. The real quality label of the selected weld segment is obtained and the real quality label is added to the corresponding traceability file. S3. Dual-criteria drift detection: The first is the confidence shift criterion, used to monitor the degree of decrease in the predicted confidence relative to the reference confidence of the weld segment with added real quality labels within the recent window; the second is the confidence normalized residual criterion, used to calculate the residual between the prediction result of the weld quality prediction model and the real quality label, and normalize the residual with the expected error band determined by the predicted confidence of the weld segment to obtain the normalized residual, where the expected error band increases as the predicted confidence decreases; when either the confidence shift criterion or the confidence normalized residual criterion exceeds its corresponding threshold, it is determined that the weld quality prediction model has drifted. S4. Drift Attribution: When the drift is mainly triggered by the confidence shift criterion, it is determined to be covariate drift; when the drift is mainly triggered by the confidence normalized residual criterion, it is determined to be concept drift. S5. Differentiated Incremental Calibration: Based on the drift causes determined in S4, features and true quality labels of corresponding weld segments are selected from the traceability archives to perform small-sample incremental updates on the weld quality prediction model, and the incremental updates adopt anti-forgetting measures; Specifically, for covariate drift, weld segments with newly obtained true quality labels and prediction confidence lower than the preset confidence threshold are included in the training to ensure that the model covers newly emerging working conditions; For concept drift, the model's decision output is recalibrated while keeping the feature extraction part of the model unchanged.

2. The method according to claim 1, characterized in that, In S2, the priority of random inspection Determine using the following formula: in, , , Weighting coefficients that are greater than zero. The function is a function that decreases as the independent variable increases, so that weld segments closer to the acceptable boundary have higher priority. This represents the risk index for that weld segment.

3. The method according to claim 1, characterized in that, In S2, when selecting weld segments for physical quality inspection under the constraint of inspection capability, the physical inspection cost of the physical inspection device shifting between weld segments is also taken into account: multiple weld segments that are spatially adjacent and whose sampling priority exceeds the preset selection threshold are prioritized to be grouped together in the same inspection, so as to maximize the sum of the sampling priority of the inspected weld segments under the given inspection cost.

4. The method according to claim 1, characterized in that, S2 also includes adaptive sampling driven by drift signals: when the value of either the confidence offset criterion or the confidence normalized residual criterion is close to its corresponding threshold, the sampling ratio is increased and the sampling quota is concentrated in the suspected drift area. Specifically, for the confidence offset criterion, the sampling is concentrated in the weld segment where the predicted confidence is lower than the preset confidence threshold, and for the confidence normalized residual criterion, the sampling is concentrated in the weld segment where the absolute value of the quality margin is less than the preset margin threshold.

5. The method according to claim 1, characterized in that, In S3, the expected error band is obtained by fitting the correspondence between the prediction confidence and prediction error of weld segments that are historically within the training data distribution; when the residual of a weld segment exceeds the expected error band determined by its prediction confidence by a preset margin, the confidence normalized residual criterion is triggered; the residual is a statistical measure of the deviation between the prediction result and the true quality label within the sliding window, and the deviation includes at least one of the deviation between the defect probability and whether it is actually a defect, and the deviation between the quality margin and the actual quality level.

6. The method according to claim 1, characterized in that, In S5, to address covariate drift, weld segments with newly acquired true quality labels and prediction confidence levels lower than the preset confidence threshold are included in the training, and the model is incrementally trained to cover the newly emerging working conditions. To address concept drift, while keeping the feature extraction part of the model unchanged, the decision threshold or output mapping of the model is recalibrated using the newly obtained real quality labels; anti-forgetting measures include at least one of the following: selecting samples representing each historical working condition from the traceability archive to form a replay sample set, and using it together with the newly labeled samples for incremental updates; updating only the output layer or decision layer of the model; and introducing a regularization term to suppress the deviation of model parameters from their original values ​​in the loss function of incremental updates.

7. The method according to claim 1, characterized in that, S5 also includes version security deployment and condition-based multi-version matching: the new version model obtained after incremental update is tested and verified in the background in a parallel silent manner, that is, the new version model predicts subsequent weld segments, but is not used for online decision-making; the residuals of the new version model and the previous version model are compared on the real quality labels obtained from subsequent sampling inspections; multiple model versions before and after the incremental update are retained, and based on the residuals of each version verified by sampling inspections on different conditions, the model version with the smallest residual verified by sampling inspections on each weld segment is selected for prediction according to its working condition; when the new version model does not improve in all working conditions, it is rolled back according to the model version identifier recorded in the traceability file.

8. The method according to claim 1, characterized in that, In S1, the traceability file also records the timestamp of the weld segment, online intervention actions and parameter corrections, as well as whether it was sampled and the results of physical quality inspection; the traceability file is uploaded to the manufacturing execution system along with the product information in a structured record format with the weld segment as the smallest granularity.

9. An online drift detection and incremental calibration system for a weld quality prediction model, characterized in that, Used to maintain the deployed weld quality prediction model, which outputs the defect probability for each weld segment. Quality margin With prediction confidence Among them, the probability of defects To characterize the likelihood of welding defects in this weld segment, the quality margin is... To characterize the signed quantity representing the distance of the weld segment from the acceptable boundary, the prediction confidence level is... The system characterizes the familiarity of the weld segment's features with respect to the model's training data distribution; the system includes: The traceability and archiving module is used to create a traceability file for each weld segment. The traceability file records at least the segment-level feature vector of the weld segment, the defect probability, quality margin and prediction confidence output by the deployed weld quality prediction model, as well as the product identifier, weld segment identifier, model version identifier and process version identifier. The uncertainty-guided sampling module is used to calculate the sampling priority for each weld segment, which increases as the prediction confidence decreases and as the absolute value of the quality margin decreases. Under the preset detection capability constraints, weld segments are selected from high to low sampling priority for physical quality inspection until the number of inspections allowed by the detection capability constraints is reached, and the real quality label is obtained and added to the traceability file. The drift detection and attribution module is used to monitor the degree of decline in recent prediction confidence relative to reference confidence using confidence shift criteria, and to calculate the residual between the prediction result and the true quality label using confidence normalized residual criteria. The residual is normalized using the expected error band that increases as prediction confidence decreases. Drift is determined when any criterion exceeds its corresponding threshold. When drift is triggered by confidence shift criteria, it is determined to be covariate drift. When drift is triggered by confidence normalized residual criteria, it is determined to be concept drift. The incremental calibration and version management module is used to select the features and true quality labels of the corresponding weld segments from the traceability archive based on the determined causes of drift and to perform small-sample incremental updates on the weld quality prediction model. Specifically, for covariate drift, the model is made to cover newly emerging working conditions, and for concept drift, the model's decision output is recalibrated while keeping the feature extraction part unchanged.