Causal and anti-fact casting defect diagnosis and closed-loop control system

By employing causal structure learning, multi-expert agent arbitration, and edge-cloud dual-loop collaboration, the problems of insufficient causal guidance and unverifiable models in casting production have been solved, achieving efficient defect diagnosis and closed-loop control, significantly reducing defect rates and improving production quality.

CN121303572APending Publication Date: 2026-01-09LIAONING UNIVERSITY OF PETROLEUM AND CHEMICAL TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511477171.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

The lack of causal guidance, unverifiable model recommendations, insufficient multi-source collaboration, poor time delay and stability, and model degradation in current casting production lead to poor defect diagnosis and control.

Method used

By establishing a causal structure to clarify the direction of intervention for control variables, and by verifying suggestions through verifiable generation and knowledge graph evidence chains, multi-expert intelligent agent arbitration is achieved. The model is continuously updated by performing second-level closed-loop and minute-level re-optimization in an edge-cloud dual-loop architecture and combining an uncertainty active learning mechanism.

Benefits of technology

It improves the interpretability and stability of defect diagnosis, reduces the risk of blind parameter tuning, achieves second-level response and minute-level optimization, significantly reduces the defect rate and improves the first-pass yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303572A_ABST
    Figure CN121303572A_ABST
Patent Text Reader

Abstract

The invention discloses a casting defect diagnosis and closed-loop control system and method based on causal anti-fact and multi-agent arbitration. The system collects multi-source data such as temperature, flow, cooling, vision and the like, learns a causal structure, establishes an agent model and solves an adjustment scheme which enables the defect probability to be remarkably reduced in a security domain; performing evidence verification on the suggestions through verifiable generation and a knowledge graph, fusing vision, process, metallurgy and simulation agent arbitration, executing in an edge-cloud double ring, and triggering security rollback abnormally; and when the uncertainty is increased, active learning and incremental updating are implemented. According to the scheme, the defects of shrinkage cavities, air holes and the like can be remarkably reduced, the first-pass yield is improved, and the method is suitable for aluminum alloy sand molds, metal molds and low-pressure casting production lines.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of metal materials and intelligent manufacturing, and specifically relates to a defect diagnosis, counterfactual optimization and closed-loop control system and method for a metal casting production line, which relates to industrial data acquisition, causal structure learning, verifiable generation (VGE), multi-expert agent arbitration, edge-cloud collaboration and uncertainty-driven active learning. BACKGROUND

[0002] In the casting production, defects such as shrinkage, porosity, slag inclusion, cold shut and crack are influenced by multiple variables such as pouring temperature (T), mold temperature (M), pouring flow (Q), cooling rate (C), environmental factors (E) and process stage (S). The existing solutions mainly have the following problems: (1) Correlation instead of causality: Most systems directly adjust parameters based on correlation prediction, ignoring the causal direction of "control-defect", resulting in poor interpretability and the risk of more chaos with more adjustment.

[0003] (2) Unverifiable suggestions: Text suggestions based on general large language models (LLM) lack evidence chain constraints such as industrial regulations, metallurgical phase diagrams, historical batches and simulation reports, and are prone to "hallucination" decisions.

[0004] (3) Lack of multi-source collaboration: Visual inspection, process control, metallurgical constraints and simulation coupling are often independent, lacking a unified arbitration mechanism of "hard constraint priority and confidence weighting".

[0005] (4) Time delay and stability: On-site control requires second-level response, while model updating and re-optimization is usually minute-level; there is a lack of edge-cloud dual-loop collaboration that takes both into account.

[0006] (5) Model degradation: Model uncertainty rises due to working condition drift, shift difference and seasonal changes, and there is a lack of active learning mechanism to continuously collect key data and update stably.

[0007] Therefore, there is an urgent need for a system with causal-counterfactual closed-loop, verifiable suggestions, multi-agent arbitration, edge-cloud dual-loop collaboration and uncertainty active learning capability to achieve stable quality and auditable traceability. SUMMARY

[0008] I. Invention purpose The application provides a defect diagnosis, counterfactual optimization and closed-loop control system and method for a metal casting production line, aiming to: Establish an interpretable causal structure to clearly define the intervention direction and intensity of control variables on defects; Generate a counterfactual adjustment set that is expected to reduce the probability of defects within the safety domain; The suggestions are checked one by one by verifiable generation (VGE) and knowledge graph evidence chain, and if not passed, the answer is rejected or transferred to manual review. Based on multi-expert agent cooperation and arbitration, second-level closed loop and minute-level re-optimization are realized in the edge-cloud dual-ring architecture. When uncertainty increases or structure drifts, active learning is triggered to collect new data in a safe gain manner and incrementally update the model and structure.

[0009] Terminology and symbol convention This paper uniformly uses ASCII symbols: T: pouring temperature (℃); M: mold temperature (℃); Q: pouring flow (kg / s); C: cooling valve position / air volume (m³ / h); E: environmental factor; S: process stage enumeration; V(t): visual / thermal image time series (frame rate fps, resolution pixels). Safety domain Omega: the allowed operation space defined by equipment limits, environmental upper limits and metallurgical phase regions. delta_p: defect probability reduction amplitude (unit: percentage points). ECE / Brier / NLL: probability calibration indicators; CI: confidence interval; Wilson approximation: confidence interval estimation method of proportion. Technical solutions

[0010] (I) System overall architecture The system of the present application constitutes a closed loop along the data flow and the control flow, including: Data acquisition and time synchronization unit: acquire T, M, Q, C, E, S and V(t); perform clock alignment (alignment error not greater than 50 ms), windowing (typical window w=30-90 s, sliding step s=2-10 s) and quality labeling (missing, interpolation, drift).

[0011] Causal structure learning unit: learn the edge direction and strength of the directed acyclic graph (DAG) under the constraints of metallurgy and equipment priors; prohibit the reverse edge of "defect→control variable"; continuously correct incrementally with historical batches and on-site write-back data.

[0012] Proxy model and counterfactual optimization unit: establish and calibrate the prediction model (such as neural differential equation, Gaussian process or physical reduction + correction), solve the feasible adjustment scheme that makes the expected reduction amplitude of defect probability not less than the threshold delta_p within the safety domain Omega, and does not change the production tempo.

[0013] Verifiable generation (VGE) unit: organize the candidate scheme into a suggestion card (suggestion content, applicable premise, evidence source, risk prompt, verification result), and match and verify the evidence chain one by one by the rule engine and knowledge graph.

[0014] Multi-agent & arbitration: fusion of visual agent (masking, hot zone coverage, and confidence), process control agent (executable trajectory and confidence), metallurgical agent (TTT / CCT hard constraints and recommended intervals), simulation coupling agent (filling / solidification consistency score), following the principle of "hard constraints first, confidence weighted, consistency first" to output the final control instruction u* (including confidence and rejection reason enumeration).

[0015] Edge-cloud dual-loop execution unit: edge-side closed-loop execution time limit is not more than 3 s; cloud-side re-optimizes every 1-5 min, and updates parameters and strategies.

[0016] Uncertainty and active learning unit: monitor prediction interval bandwidth / variance and structure drift metrics; trigger dense sampling or small amplitude safety disturbance sampling (amplitude usually ±3%-±5%, interval no less than 2 beats) when threshold is exceeded, and prioritize incremental training on new data.

[0017] Evidence chain recording and auditing unit: record timestamps, responsible persons, evidence numbers, pass / rejection reasons, and quality indicator comparisons before and after execution of the entire process, support production audit and traceability.

[0018] (II) Method steps S1 Data entry and quality assurance: Align multi-source data on a unified timeline; label missing or interpolated fields and reduce their weight in subsequent decision-making. Typical frequency: T / M is 1-5 Hz, Q / C is 1-10 Hz, V(t) is not less than 30 fps; preferably increase V(t) to 45 fps when triggering active learning strategy A.

[0019] S2 Causal relationship determination: Under the constraint of "metallurgical and equipment priori", identify the operable influence path (such as T→solidification time→shrinkage hole risk), and incrementally correct the edge direction and strength with historical batch and on-site feedback data, only keep the control quantity into the edge that has operable influence on the defect result.

[0020] S3 Counterfactual candidate generation: Under the premise of not changing the production rhythm, calculate the small amplitude feasible adjustment combination of each control quantity within Omega, preferentially select the scheme that makes the expected decline of defect probability not less than delta_p (recommended initial value 5%) and does not trigger the upper limit of equipment / environment / metallurgy; those that are obviously inconsistent with historical experience or simulation results are marked as high risk and excluded.

[0021] S4 Verifiable generation (VGE) and evidence chain verification: Candidate solutions are generated into suggestion cards, which include: suggestion content, applicable prerequisites, evidence sources (SOP terms, phase diagram / TTT / CCT page numbers, historical batch and simulation report numbers), risk warnings, and verification conclusions. Each suggestion undergoes a "hard constraint" check by the rule engine and evidence matching with the knowledge graph; if any item fails, the suggestion is rejected or transferred to manual review, without on-site inspection.

[0022] S5 Multi-Agent Arbitration and Secure Rollback: The system outputs results and confidence levels from four channels: vision, process, metallurgy, and simulation. The arbitrator generates the final control command u* according to the principles of "hard constraint priority, confidence level weighting, and consistency priority". If communication times out, actuator malfunctions, or the monitored quantity approaches the threshold and shows an upward trend, it enters SAFE_HOLD (maintaining the previous stable point and increasing the sampling frequency), and performs an emergency shutdown if necessary.

[0023] S6 Edge-Cloud Dual-Ring Execution and Write-back: The edge controller issues control commands and writes back observation and execution receipts within 3 seconds; the cloud refreshes the causal structure and model every 1 to 5 minutes, optimizing them in parallel, and issues updated parameters and strategies.

[0024] S7 Uncertainty-Triggered Active Learning and Incremental Updates: When the prediction interval bandwidth is too wide, the model structure drifts, or the sensitivity region becomes blurred, sensor densification or small-scale safety perturbation sampling is triggered; new data is labeled and prioritized for incremental training and structure correction until the uncertainty falls back to the target interval.

[0025] (III) Key parameters and recommended range (can be customized according to SOP) The sparse constraint coefficient of the causal structure is 0.1 to 0.5. Significantly improve threshold delta_p (expected reduction in defect probability): recommended initial value 5% (can be adjusted within the range of 5% to 10% depending on product category / season); Cloud-based re-optimization cycle: 1–5 minutes; Edge loop closure time: no more than 3 seconds; Active learning disturbance amplitude: ±3%~±5%, disturbance interval not less than 2 beats, and will stop when any safety gate is triggered; Visual inspection targets: false negative rate not exceeding 10%, false positive rate not exceeding 5%; Model calibration objectives: Example thresholds for classification tasks: ECE not higher than 0.05, Brier not higher than 0.18, and report NLL; Example thresholds for regression tasks: RMSE no higher than 0.12 or MAPE no higher than 5% (choose one based on the object and scope).

[0026] (Four) beneficial effects Compared with the prior art, the present application has the following technical advantages: Causal-Counterfactual Closed Loop: Guiding intervention in causal direction rather than directly adjusting parameters based on correlation, improving explainability and reducing the risk of blind parameter adjustment; Suggestion verification and audit: Each suggestion is forced to check through VGE and knowledge graph evidence chain, and is not issued if it does not pass, reducing "illusion" suggestions; Multi-agent collaborative arbitration: Fusion of visual, process, metallurgical, simulation and multi-source information, using "hard constraint priority, confidence weighting, consistency priority", to improve robustness; Edge-Cloud Double Ring: Combining on-site response in seconds and global re-optimization in minutes, both for stop loss and for stable state defect reduction; Uncertainty closed-loop learning: When model confidence decreases or structure drifts, active learning is carried out according to the safety domain Omega, and long-term stability is continuously maintained; Expected benefits: Under typical line conditions, the aforementioned gating and timing constraints are met, and it is expected to achieve a relative defect rate reduction of about 20% or more, and an increase of about 5-10 percentage points in first-pass yield (statistically per week / batch), and to realize evidence chain audit and traceability throughout the process. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 The figure is a schematic diagram of the overall architecture of the system (including data acquisition, causal learning, proxy model and counterfactual optimization, VGE, multi-agent arbitration and edge-cloud double ring).

[0028] Figure 2 The figure is a flowchart of causal structure learning and counterfactual optimization.

[0029] Figure 3 The figure is a schematic diagram of verifiable generation (VGE) and evidence chain verification.

[0030] Figure 4 The figure is a schematic diagram of multi-expert agent collaboration and arbitration mechanism.

[0031] Figure 5 The figure is a timing chart of edge-cloud double ring control (alarm→counterfactual→verification→arbitration→execution→writeback).

[0032] Figure 6 The figure is a schematic diagram of uncertainty-driven active learning and new data sampling strategy.

[0033] Figure 7 The figure is a flowchart of controller state machine and fault tolerance rollback strategy.

[0034] Figure 8This is a schematic diagram of the visual defect recognition and segmentation results.

[0035] Figure 9 This is a graph showing the error assessment and calibration curves for the surrogate model.

[0036] List of reference numerals ① Data acquisition layer; ② Causal learning unit; ③ Agent model and calibration; ④ Counterfactual optimization; ⑤ VGE verification and knowledge graph; ⑥ Multi-expert agent arbitration; ⑦ Edge-cloud dual loop; ⑧ Active learning trigger; S1~S7 are process steps; F1 / F2 are SAFE_HOLD / EMERGENCY_STOP; u* is the final control command; Log is the evidence chain and audit log. Detailed Implementation

[0037] To make the technical solution of the present invention clearer, the implementation process is described in detail below with reference to the accompanying drawings and typical working conditions. The embodiments described are for illustrating the present invention, but do not limit the scope of protection of the present invention.

[0038] Example 1: Online Diagnosis and Closed-Loop Control of Aluminum Alloy Sand Casting Line I. Production Line and System Deployment Production line target: Aluminum alloy sand casting gravity casting line (ladle, pouring cup, ingate, sand core / chill, sand mold cooling circuit); 1 online thermal imager, PLC / SCADA to collect temperature, flow rate, valve position, etc.

[0039] System topology (see) Figure 1 ): ① Data acquisition layer (PLC / camera / sensor) → ② Causal learning unit → ③ Proxy model (calibration) → ④ Counterfactual optimization → ⑤ VGE evidence verification → ⑥ Multi-expert agent arbitration → ⑦ Edge-cloud dual loop → ⑧ Active learning trigger.

[0040] Networks and Time Series (see Figure 5 Edge controllers and PLCs use Ethernet (≥100 Mbps) for synchronization with PTP / NTP; the edge closed loop from alarm to execution does not exceed 3 seconds, and cloud-based re-optimization occurs every 1–5 minutes.

[0041] II. Data Acquisition, Alignment, and Quality Control Figure 1 ①、 Figure 2 S1、 Figure 5 t0) Sampling and Events: T / M: 1~5 Hz; Q / C: 1~10 Hz; E, S: Recorded by station event (starting pouring / filling / heat preservation / cooling / demolding); V(t): not less than 30 fps, 640×480 or above.

[0042] Alignment and Window: PTP Alignment; Sliding Window w=60 s, Step s=5 s; Batch Keys: {Date, Team, Model Number, Alloy Number, Mold Temperature Range}.

[0043] Missing tests and drift: Fields with a missing test rate greater than 5% are marked and downweighted in decision-making; numerical drift is determined by median ± 3MAD; outliers are soft deleted but the original values ​​are retained in the audit log.

[0044] Log fields (partial list): batch_id, ts, sensor_id, rate, missing_ratio, drift_score, window_id, op_id (see also...) Figure 5 "Rewrite", Figure 3 "Chain of Evidence Log").

[0045] III. Causal Structure Learning and Identification of Interventionible Variables Figure 1 ②、 Figure 2 S2 / S3) Prior constraints: solidify the causal precedence of "metallurgy-equipment"; for example, "T increases → solidification time increases → shrinkage cavity risk increases", "Q increases → turbulence increases → slag inclusion risk increases"; prohibit the reverse edge of "defect → control quantity".

[0046] Structure and Increment: The initial structure was trained using batches over the past 3 months; incremental correction was performed using write-back data from the past 2 weeks, retaining only the inbound edges that have an operational impact on "shrinkage cavities, porosity, slag inclusions, and cold shuts".

[0047] The operable set Omega_ctrl is defined as {M, C, Q, holding time H, pouring cup preheating G…}; the safety domain Omega is jointly defined by equipment limits, environmental protection, and metallurgical phase regions.

[0048] IV. Establishing the Proxy Model, Confidence Calibration, and Thresholds ( Figure 1 ③、 Figure 9 ) Model objectives and scope: RMSE / MAPE is used for continuous index (such as shrinkage volume fraction) regression; Brier / NLL / ECE is used for defect probability classification.

[0049] Calibration method: temperature scaling or Platt calibration; reliability bins are divided into 10 equal parts; ECE not higher than 0.05 is preferred.

[0050] Acceptance thresholds: For regression examples, RMSE should not exceed 0.12; for classification examples, Brier should not exceed 0.18 and ECE should not exceed 0.05. Only those meeting these thresholds can proceed to the counterfactual stage (see...). Figure 2 S4).

[0051] V. Counterfactual Optimization and Feasibility Check ( Figure 1 ④ Figure 2 S4~S7) Candidate generation: Within Omega, minor adjustments are made: M is increased by +2 to +3 °C; C is decreased by no more than 3%; Q is finely adjusted by ±4%; H is adjusted by ±2 s. Only candidates whose defect probability is expected to decrease by no less than delta_p (suggested initial value 5%) are retained.

[0052] Consistency and Simulation: Candidates must be consistent with historical batches of the same type or with filling / solidification simulations. Figure 4 The score for "simulated coupled intelligent agent" is no less than 0.70.

[0053] Infeasible elimination: Candidates that trigger equipment limits, environmental protection limits, or metallurgical restricted areas are marked as "high risk" and eliminated; reasons for refusal may include: equipment limits, metallurgical restricted areas, environmental protection limits, missing / contradictory evidence, and conflict with history.

[0054] VI. VGE Recommendation Card and Chain of Evidence Verification ( Figure 1 ⑤、 Figure 3 ) Suggested card structure: {Suggested content, expected improvement delta_p, applicable premises, evidence list [eid], risks and alternatives, confidence level}.

[0055] Evidence sources: SOP terms, phase diagram / TTT / CCT page numbers, historical batch IDs, simulation report numbers.

[0056] Gating rules: Each item will be checked against equipment / environmental / metallurgical hard constraints and evidence will be matched; failure to meet any requirement will result in rejection or manual review; successful entries will be sent to arbitration (see...). Figure 3 "Output").

[0057] VII. Multi-expert agent arbitration and weighting ( Figure 1 ⑥、 Figure 4 ) Sub-agent outputs: vision (defect mask, hot zone coverage r_hot, confidence level c_v), process control (executable trajectory u_path, confidence level c_p), metallurgy (hard constraint H, recommended interval R, confidence level c_m), and simulation coupling (consistency score c_s).

[0058] Arbitration principles: Hard constraints take precedence → Confidence weighting (e.g., mapping c_i to weights w_i∈[0,1] in a piecewise linear manner; automatically reducing weights when c_i<0.6) → Consistency takes precedence; the objective is to minimize the comprehensive cost J(u)=Σ w_i·J_i, and output the final instruction u* (see...).Figure 4 "Arbitrator").

[0059] 8. Edge-Cloud Dual-Ring Execution and Write-Back ( Figure 1 ⑦ Figure 5 , Figure 7 ) Time series ( Figure 5 t0→t6): Alarm → Counterfactual → Evidence Verification → Arbitration → Execution Order → Log Writeback.

[0060] Edge execution and rollback: Complete within 3 seconds from receiving u*; if communication times out, actuator malfunctions, or any monitored quantity reaches 95% of the threshold and shows an upward trend, enter SAFE_HOLD (maintain the previous stable point and increase the sampling frequency), and retry exponentially in 0.5 / 1 / 2 s increments, up to 3 times; if it still fails, enter EMERGENCY_STOP ( Figure 7 ).

[0061] SAFE_HOLD release condition: If the critical monitoring quantity is below 90% of the threshold for two consecutive windows, and a trend consistent with u* is confirmed, then the MONITOR will be automatically released and restored.

[0062] Cloud-based re-optimization: Refresh and distribute the causal structure / parameter table / arbitration weights every 1–5 minutes (see...). Figure 5 "Cycle re-optimization").

[0063] Feedback content: Suggestion card summary, reasons for approval / rejection, execution receipt, before-and-after quality comparison, operator and timestamp (see...) Figure 3 , Figure 5 (Logs / Audit).

[0064] IX. Active Learning Triggered by Uncertainty Figure 1 ⑧、 Figure 6 ) Triggering criteria: 95% CI bandwidth exceeds the threshold, structural drift index exceeds the threshold, or the sensitivity conclusions of key control quantities are contradictory.

[0065] Strategy: A. Increase sensor density (V(t) from 30 to 45 fps); B. Safe small disturbance ±3% to ±5% (interval not less than 2 beats, single variable priority).

[0066] Safety gate: If the TTT / CCT restricted area is about to be triggered or the equipment / environmental limit is reached, immediately stop and roll back to SAFE_HOLD. Figure 6 "Safety door").

[0067] 10. Gating threshold and interface (example, can be adjusted according to the line) Metallurgy (illustrated): For example, alloy grade L3xx, mold temperature at the end of solidification M∈[190,210] ℃; flow rate during filling stage Q∈[Q_min,Q_max] (from equipment nameplate / simulation calibration table, see SOP).

[0068] Equipment: Valve position C ∈ [5%, 85%]; Execution stroke / cycle according to PLC recipe file.

[0069] Environmental protection / energy consumption: Maximum air volume F_max, noise level not higher than N_lim; exceeding the limits will result in gate control failure.

[0070] Interface and Timeout: PLC variable mapping table (including read / write permissions / safety bits / timeout); write instruction timeout 2 s, heartbeat timeout 10 s; failure retry strategy is the same as above.

[0071] XI. Results of the Operation Visual results: Provide a batch of triptychs (original image / mask / boundary), with a false positive rate of no more than 5% and a false negative rate of no more than 10%.

[0072] Calibration quality: Decisive reliability plot and bin absolute error; Example: ECE=0.038, Brier=0.172, NLL=0.49.

[0073] A / B statistics: 5 groups, total sample size n=1630; defect rate range for scheme A is approximately [8.9%, 12.0%], and for scheme B it is approximately [4.7%, 6.2%] (95% CI, Wilson approximation); first pass rate (FPY) improved by an average of +5.0 to +9.5 percentage points.

[0074] Example 2: Uncertainty-driven active learning (night shift fluctuation scenario, combined with safety small perturbation DoE) I. Triggers and Diagnosis Figure 6 S1、 Figure 2 Feedback dotted line) Triggered by any of the following conditions: 95% CI bandwidth ≥ set threshold (e.g., 0.25); structural drift index (e.g., KL or MMD) ≥ set threshold; contradictory sensitivity conclusions for key control variables across time periods / models. Initial gate check: Perform a "safety gate check" (…). Figure 6 "Safety gates" must not be triggered by equipment / environmental / metallurgical restricted areas; otherwise, active learning will not be initiated.

[0075] II. Strategy Selection and Sampling Plan Figure 6 S2) Strategy A: Sensor enhancement. V(t) 30→45 fps; Temperature / flow sampling encryption +50%; Effective window N_win=6 (based on w=60 s, s=5 s).

[0076] Strategy B: Safety Small Perturbation (DoE). Variables: C, Q; amplitude ±3% to ±5%; single variable per instance, interval not less than 2 cycles, cumulative N_pert not exceeding 8 times; before each perturbation, perform a rapid evaluation of the consistency between hard constraint gating and simulation (score not less than 0.60).

[0077] Strategy C: Resampling / reweighting of difficult cases. Increase the weight of rare cases by 1.5 to 2.0 times, or fine-tune the threshold to reduce the impact of class imbalance.

[0078] III. Execution and Security Figure 5 , Figure 7 ) Edge controller ( Figure 7 S1→S2→S6) Disturbances are generated during non-critical cycles; if any monitored quantity approaches the upper limit (e.g., C>85% or Q approaches 95% of the nameplate upper limit), SAFE_HOLD is entered, and incomplete sampling steps are recorded. Communication timeout, impending gate violation, or "consistency score <0.60" all trigger SAFE_HOLD → retry (no more than 3 times) → EMERGENCY_STOP if necessary. Figure 7 F1 / F2).

[0079] IV. Incremental Update, Verification, and Stopping Figure 6 S4 / S5) New data is written to the "Active Learning" tag and bound to metadata (workstation, shift, equipment status); the proxy model parameters and causal edge weights / sparseness are incrementally updated (prior remains unchanged). Verification focuses on a significant reduction in CI bandwidth (e.g., dropping to no higher than 0.15) and Brier / NLL. Stopping conditions: CI bandwidth reaches the target and maintains at least the N_win sustained window; or K consecutive increases are below the threshold (e.g., ΔBrier < 0.01); or budget is exhausted / hard constraint triggering symptoms appear. The updated parameters / thresholds / weights are incorporated into the cloud strategy and distributed to the edge. Figure 5 "Periodic re-optimization"), and updated the SOP appendix.

[0080] V. Operation and Revenue Example Comparison: Within two weeks of enabling active learning, the ECE of the model calibration example decreased from 0.061 to 0.039, and the Brier rate decreased from 0.184 to 0.171; the median defect rate for the night shift decreased by approximately 28% in the example, while the FPY rate increased by +6.2 percentage points in the example. The above figures are based on examples / simulations.

[0081] Impact control: Sampling / disturbance are all within Omega and are only executed in non-critical cycles; the impact on production capacity is less than 0.5% (based on cycle count).

[0082] Statistical scope and calculation methods Confidence calibration: Reliability plot binning is 10; ECE calculation is based on bin-weighted absolute difference; Brier / NLL is calculated based on the full sample.

[0083] Proportion range: The 95% confidence interval of defect rate / FPY uses the Wilson approximation.

[0084] Significantly improved criteria: By default, delta_p is not less than 5%, or ΔFPY is not less than 3 percentage points; this can be adjusted according to the line body strategy.

[0085] Data compliance: Statistics are based on batch deduplication, soft deletion of abnormal samples, and consistency of statistical methods (see [reference]). Figures 8-9 ).

[0086] Industrial applicability

[0087] This invention can be deployed on aluminum alloy sand mold and metal mold production lines, and can interface with existing PLC / SCADA / MES systems, supporting incremental deployment and smooth transition; it meets the requirements for mass production introduction through evidence chains and audit logs, and has significant industrial application value.

[0088] Best practice

[0089] Preferably, to address seasonal environmental fluctuations and shift differences, the cloud-based re-optimization cycle is set to 1–3 minutes; the initial value of delta_p is set to 8% (which can be adjusted within the range of 5%–10% by product category / season); the visual detection threshold is set to a value that ensures a false negative rate of no more than 10% and a false positive rate of no more than 5% on the validation set, and can be set in tiers for day / night shifts; the active learning perturbation amplitude is controlled within ±3%–±4%, and is limited to execution in non-critical cycles to reduce the impact on production capacity.

Claims

1. A method for diagnosing and controlling casting defects, applied to a metal casting production line, characterized in that, The following steps are included: (1) Data acquisition and time synchronization: Collect multi-source data including pouring temperature T, mold temperature M, pouring flow rate Q, cooling rate C, environmental and process stage information E, S and visible light / thermal image V(t), perform clock alignment and windowing on data of different frequencies, and mark missing measurements, interpolation and drift with quality; (2) Causal structure learning: Under the prior constraints of metallurgy and equipment, learn the directed acyclic graph structure between process variables and defects, output edge direction and strength, and prohibit the reverse edge from defect variables to control variables; (3) Proxy model establishment and calibration: Based on the aligned data in step (1), the proxy model for defect probability prediction is trained and calibrated to obtain the defect probability estimate and uncertainty index under the current working conditions; (4) Counterfactual candidate generation: Within the safety domain Omega that satisfies the constraints of equipment, environmental protection and metallurgy, process adjustment candidates that reduce the defect probability delta_p to a preset threshold are generated; (5) Verifiable generation and evidence chain verification (VGE): Each candidate is organized into a suggestion card, which includes the suggestion content, applicable premise, evidence source and risk warning, and the hard constraints and evidence numbers are verified one by one by the rule engine and knowledge graph. Those that fail to pass are rejected or transferred to manual review; (6) Multi-expert intelligent agent arbitration: The conclusions and confidence levels of the visual intelligent agent, process control intelligent agent, metallurgical intelligent agent and simulation coupled intelligent agent are integrated, and the final control command u* is output according to the principle of "hard constraint priority, confidence weighting and consistency priority"; (7) Edge-cloud dual-loop execution: The edge side executes u* within the time limit and writes back the execution receipt and new observation, and the cloud refreshes the causal structure and agent model on a periodic basis and optimizes the distribution update strategy; (8) Uncertainty-driven active learning and incremental update: When the prediction confidence interval bandwidth or structure drift metric exceeds the threshold, the sensor densification or small disturbance sampling in the safety domain is triggered, the new data is marked and given priority for incremental updates of the model and structure until the uncertainty falls back to the target interval; (9) Evidence chain recording and auditing: Log the entire process of suggestion, verification, arbitration and execution in steps (4) to (7), recording timestamps, responsible persons, evidence numbers, reasons for approval / rejection, execution receipts and quality indicators before and after.

2. A casting defect diagnosis and closed-loop control system for implementing the method of claim 1, characterized in that, include: (1) Data acquisition and time synchronization unit, used to acquire and align T, M, Q, C, E, S and V(t) and perform quality marking; (2) Causal structure learning unit, used to obtain the directed acyclic graph structure and edge weights under prior constraints; (3) Proxy model and counterfactual optimization unit, used to output defect probability estimates, uncertainties and candidate adjustments within the safety domain Omega; (4) Verifiable generation and evidence chain verification unit, used to generate suggestion cards and perform hard constraint and evidence matching verification through rule engine and knowledge graph; (5) Multi-expert agent and arbitration unit, including vision, process control, metallurgy and simulation coupled agents and arbitrator, used to output u* based on hard constraint priority and confidence weight; (6) Edge-cloud dual-loop execution unit, used for edge-side execution and write-back, and cloud-side periodic refresh and re-optimization; (7) Uncertainty and active learning unit, used to trigger sampling plans and perform incremental updates of models and structures; (8) Evidence chain recording and auditing unit, used for full-process logging and traceability.

3. The method or system according to claim 1 or 2, characterized in that, The causal structure learning adopts structure learning with sparse constraints. The sparse constraint coefficients range from 0.1 to 0.5, and a priori mask is set to prohibit the existence of reverse edges of "defect → control quantity" and forced known physical edges.

4. The method or system according to any one of the preceding claims, characterized in that, The surrogate model is at least one of a neural differential equation model, a Gaussian process model, or a physical reduced-order model superimposed with data-driven calibration; its calibration metrics include the root mean square error (RMSE) and / or mean absolute percentage error (MAPE) meeting the preset target, and it reports probabilistic calibration metrics including the expected calibration error (ECE) and / or the Brier score and / or the negative log-likelihood (NLL).

5. The method or system according to any one of the preceding claims, characterized in that, Counterfactual candidate generation satisfies: (i) the candidate is located in a multidimensional constraint set within the security domain Omega, the set including at least one of equipment travel, temperature and flow upper limits, environmental regulations restrictions and metallurgical phase region prohibition conditions; (ii) the defect probability decrease delta_p is not lower than a preset threshold. (iii) Perform simulation consistency verification on the candidates. If they are significantly inconsistent with historical batches or simulation conclusions, they are marked as high risk and not allowed to proceed to the downstream.

6. The method or system according to any one of the preceding claims, characterized in that, Verifiable generation and evidence chain verification include: each suggestion card contains suggestion content, applicable premises, evidence source identification and risk warning; the rule engine checks hard constraints item by item, and the knowledge graph matches the evidence sources by number; if any item fails, the answer is rejected or transferred to manual review.

7. The method or system according to any one of the preceding claims, characterized in that, The multi-expert agent and arbitration include: (1) the visual agent outputs the defect mask, hot zone coverage and confidence level; (2) the process control agent outputs the control trajectory and confidence level that meet the cycle time and stroke limits; (3) the metallurgical agent outputs the TTT / CCT hard constraints and recommended intervals and confidence level; (4) the simulation coupling agent outputs the filling / solidification consistency score; (5) the arbitration generates u according to the rules of hard constraint priority, confidence level weighting and consistency priority.

8. The method or system according to any one of the preceding claims, characterized in that, The edge-cloud dual-loop execution satisfies the following: the closed-loop execution time limit tau_e on the edge side does not exceed 3 seconds, and the refresh and re-optimization cycle tau_c on the cloud is 1 to 5 minutes; in the event of communication failure, actuator failure, or expected violation of hard constraints, it enters a safe rollback state to maintain the previous stable point, and triggers an emergency shutdown if necessary.

9. The method or system according to any one of the preceding claims, characterized in that, The triggering conditions for uncertainty-driven active learning include at least one of the following: the prediction confidence interval bandwidth exceeds the threshold, the structural drift metric exceeds the threshold, and the sensitivity conclusion for the key control quantity is inconsistent; the sampling strategy includes sensor densification and / or small perturbation sampling within the safety domain Omega, the perturbation amplitude is preferably ±3% to ±5%, and the perturbation interval is not less than two production cycles.

10. The method or system according to any one of the preceding claims, characterized in that, Evidence chain recording and auditing includes recording timestamps, responsible persons, evidence numbers, reasons for approval / rejection, execution receipts, and quality indicators before and after adjustments throughout the entire process of recommendation, verification, arbitration, and enforcement, in order to support batch-level auditing and traceability.

Citation Information

Cited By

  • Aluminum alloy casting defect prediction method and system

    CN121638064A