Casting mold temperature feasible region construction and dynamic process optimization method and system based on interpretability learning

By employing an interpretable learning-based approach, utilizing the XGBoost model and SHAP value calculation, and combining dynamic time warping technology, a feasible region for mold temperature is constructed. This solves the instability problem of mold temperature control in low-pressure casting, enabling real-time monitoring of casting quality and automatic adjustment of process parameters, thereby improving production stability and casting quality.

CN122065633APending Publication Date: 2026-05-19HUAZHONG UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAZHONG UNIV OF SCI & TECH
Filing Date
2025-12-16
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing methods for controlling the temperature of low-pressure casting molds lack quantitative basis, making it impossible to monitor and dynamically correct in real time. This results in unstable casting quality, an inability to adapt to changes in the environment and mold condition of different production batches, and a lack of explanation for the relationship between temperature and defects.

Method used

An interpretable learning-based approach is adopted to construct a feasible region for mold temperature through XGBoost model and SHAP value calculation. Combined with dynamic time warping (DTW) technology, real-time monitoring of mold temperature and automatic adjustment of process parameters are realized.

Benefits of technology

It improves the accuracy and stability of casting quality prediction, reduces the defect rate, enables dynamic adaptation and real-time control of mold temperature, and enhances the automation level of the production process and product consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122065633A_ABST
    Figure CN122065633A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of casting molds, and discloses a casting mold temperature feasible region construction and dynamic process optimization method based on interpretability learning, and the method comprises the steps: mold feature region determination and thermocouple arrangement; data acquisition and database construction; data preprocessing and feature engineering; carrying out XGBoost modeling and SHAP interpretability calculation, and carrying out SHAP interpretability Constructing a feasible region and a reference curve based on SHAP; batch drift correction DTW and deviation measurement are carried out; and performing residual-driven process mapping and closed-loop optimization. According to the method, a temperature-defect associated database is established by collecting temperature data of a thermocouple on site and combining an X-ray detection result of a casting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to, but is not limited to, the field of casting mold technology, and particularly relates to a method and system for constructing a feasible temperature domain and dynamically optimizing the process of casting molds based on interpretable learning. Background Technology

[0002] Lightweighting of automobiles is a crucial strategy for achieving energy conservation, emission reduction, and performance improvement. Replacing traditional steel with aluminum alloys is a core approach to promoting lightweighting. With the development trend of new energy vehicles and high-performance vehicles, the demand for aluminum alloy wheels, structural components, and shell-type parts is increasing daily. Low-pressure casting, with its advantages of stable filling process, good feeding effect, and high degree of automation, has become one of the mainstream processes for producing complex aluminum alloy components.

[0003] In low-pressure casting, mold temperature is a key factor affecting casting quality. The molten alloy directly exchanges heat with the mold during filling and solidification, and the temperature field distribution within the mold determines the solidification sequence and cooling rate of the molten metal. Appropriate temperature conditions not only ensure the alloy solidifies along the expected path, avoiding volumetric defects such as shrinkage cavities and porosity, but also shorten solidification time and increase production cycle time, achieving a dual optimization of casting quality and production efficiency. Conversely, improper mold temperature control can lead to the following problems: when the temperature is too high, the alloy solidifies too slowly, easily forming shrinkage cavities; when the temperature is too low, insufficient filling occurs, easily resulting in defects such as cold shuts and porosity. Therefore, stabilizing the mold temperature within a scientifically reasonable optimal range is the core element in ensuring the stability of casting quality.

[0004] Currently, mold temperature control in industrial production still primarily relies on open-loop regulation. This means that the on / off timing and cooling intensity of cooling channels are set before production based on experience or process experiments. However, real-time monitoring and dynamic correction of the mold temperature evolution during production are often lacking. If a defect occurs during production, it usually depends on the process engineer's experience to add, subtract, or adjust the on / off timing of cooling channels. While this method is simple to operate, it has the following drawbacks:

[0005] Lack of quantitative basis: Temperature regulation relies on experience-based judgment rather than on complete temperature data analysis, resulting in insufficient stability of process improvement;

[0006] Strong lag: Corrections are usually made only after defects have occurred and castings have been scrapped, making preventative control impossible;

[0007] Lack of dynamic adaptability: Due to differences in ambient temperature, mold condition, and cooling conditions between different production batches, the overall temperature level of the mold drifts, and a single fixed process parameter window is difficult to adapt to actual changes.

[0008] The specific relationship between temperature and defects cannot be revealed: Existing methods fail to explain the contribution of temperature data collected by different thermocouples at different time stages to defect formation, limiting the possibility of scientific optimization.

[0009] With increasing demands for lightweighting in automobiles and the growing complexity of aluminum alloy component structures, traditional experience-based mold temperature control methods are becoming increasingly inadequate for modern production needs. On the one hand, the internal structure of castings is diverse, with significant differences in local cooling, making it impossible for a single experience window to cover the complex, multi-point temperature field. On the other hand, the temperature response of molds decays and changes over long-term use, and without dynamic correction, the feasible region can gradually become ineffective.

[0010] Therefore, there is an urgent need in this field for an intelligent mold temperature control method that can overcome the above-mentioned shortcomings. This method needs to be able to:

[0011] From massive and redundant mold temperature data, the most critical temperature measurement points and time windows for casting quality are automatically and quantitatively identified to replace subjective judgment based on experience.

[0012] Establish a high-precision, interpretable process-quality mapping model to enable defect prediction and root cause analysis, rather than just post-event remediation;

[0013] It has adaptive capabilities and can automatically correct production drift between different batches, enabling dynamic updates of control benchmarks and maintaining long-term effectiveness.

[0014] A closed-loop control is formed, which automatically maps the deviation of quality prediction into the adjustment amount of process parameters, realizing the automation from "monitoring" to "control".

[0015] However, among the currently available technologies, there is no systematic solution that can simultaneously meet all of the above requirements. Summary of the Invention

[0016] To address the problems existing in the prior art, this invention provides a method for constructing a feasible temperature domain for casting molds and optimizing dynamic processes based on interpretable learning.

[0017] This invention is implemented as follows: a method for constructing feasible temperature domains and dynamically optimizing processes for casting molds based on interpretable learning, the method comprising:

[0018] S1: Determination of mold feature areas and arrangement of thermocouples;

[0019] S2: Data acquisition and database construction;

[0020] S3: Data Preprocessing and Feature Engineering;

[0021] S4: XGBoost modeling and SHAP interpretable computation;

[0022] S5: Construction of feasible region and baseline curve based on SHAP;

[0023] S6: Batch Drift Correction (DTW) and Deviation Measurement;

[0024] S7: Residual-driven process mapping and closed-loop optimization.

[0025] Furthermore, S1 specifically includes:

[0026] In low-pressure casting aluminum alloy wheel hub molds, in order to build a high-precision quality prediction model, it is first necessary to accurately identify the key feature areas of the mold's thermal field; by integrating numerical simulation results with X-ray inspection results from the trial production stage, the key areas on the casting that are prone to defects such as shrinkage cavities and porosity, such as the outer rim, inner rim, spokes, and wheel core, can be accurately located.

[0027] To fully capture the spatiotemporal evolution characteristics of mold temperature, more than or equal to 20 thermocouples are arranged in the upper mold, lower mold and side mold corresponding to the above characteristic areas to form a distributed temperature sensing network.

[0028] Simultaneously, a multi-dimensional, time-series process-quality database is constructed, with each record uniquely corresponding to a casting production cycle, mainly including:

[0029] Cooling process parameters: the identification and type of each cooling channel, including air cooling / water cooling, switching time and cooling intensity; air cooling flow rate: 50~120 m³ / h; water cooling flow rate: 3~8 L / min.

[0030] Mold temperature time series data: The temperature values ​​of 21 consecutive time points recorded by each thermocouple at 10-second intervals form the original temperature time series matrix;

[0031] Casting quality inspection data: including X-ray-based binary defect labels, defect level assessment, and mechanical property data of key feature areas;

[0032] This database provides a solid data foundation for subsequent key feature mining based on machine learning.

[0033] Furthermore, S2 specifically includes:

[0034] Data range: To ensure generalization and robustness, the database contains samples from multiple batches and operating conditions; each record includes: thermocouple timing matrix X=[Ti,j] (i=1…n, j=1…M, recommended M=21, sampling interval 10s), cooling channel parameter set {topen,j,tclose,j,Qj}, machine / batch metadata and casting quality label y, X-ray defect 0 / 1, and multiple types of defects or mechanical indicators;

[0035] Sensors and sampling: Thermocouple specifications are recommended to have an accuracy of ±0.5℃ and a response time of <1s, with dual redundancy at key points; the sampling system must ensure clock synchronization, error recording, and preservation of original timing data;

[0036] Data storage: Time series data is recommended to use a time series database. Quality and process parameters are linked by a relationship table to facilitate sampling analysis by batch, by thermocouple, and by time period.

[0037] Furthermore, S3 specifically includes:

[0038] Missing items and exception handling:

[0039] Missing data: When the percentage of missing data in a single channel is less than 10%, cubic spline or linear interpolation is used to complete the data; if the percentage of missing data in a single channel exceeds 30%, the channel is marked as invalid and removed from the online monitoring candidates.

[0040] Anomalies: Statistical anomaly detection based on median + MAD is adopted: if |T-median| > k·MAD, it is considered an anomaly and replaced with smoothed neighboring time step;

[0041] Smoothing and Difference:

[0042] Savitzky-Golay filtering with a window size of 5 and an order of 2 can be used to smooth the original time series; if necessary, an exponentially weighted moving average can be applied to the difference series to assess the heating rate.

[0043] Feature extraction:

[0044] Original characteristics: the temperatures Ti,j of each thermocouple at M time points;

[0045] Derivative characteristics: initial temperature Ti,1, peak value Ti,max, slope of the k-th segment ΔT / Δt, local energy, etc.

[0046] Standardization strategy: z-score standardization is used for model training; original physical quantities are preserved for SHAP interpretability and process mapping.

[0047] Furthermore, S4 specifically includes:

[0048] Model selection and training:

[0049] Use the XGBoost classifier / regressor for binary defect prediction or multi-objective regression.

[0050] Recommended hyperparameter ranges: learning_rate ∈ [0.01, 0.2]; max_depth ∈ [4, 10]; n_estimators ∈ [200, 1000]; subsample ∈ [0.6, 0.9]; colsample_bytree ∈ [0.6, 0.9]; regularization λ ∈ [0, 1]; use early_stopping_rounds to avoid overfitting;

[0051] Training strategy: If there is sufficient data, use the three-part training / validation / test method; if the sample size is small, use 5-fold cross-validation and retain an independent test set.

[0052] SHAP value calculation:

[0053] TreeSHAP is used to calculate the SHAP value for each feature of each sample on the trained XGBoost model. Satisfies local additability:

[0054] (k)

[0055] Where p corresponds to a certain thermocouple-time feature;

[0056] Global importance is obtained by aggregation: summing / averaging over all samples. As a feature-comprehensive contribution;

[0057] Feature ranking and selection:

[0058] Features Arrange the data in descending order and take the first K data points to form an initial set S of key points; then K can be further reduced for online monitoring, based on a trade-off between model performance and engineering feasibility.

[0059] Furthermore, S5 specifically includes:

[0060] Feasible region definition, based on key point S:

[0061] For each keypoint p∈S, calculate the mean and standard deviation μp, σp in the historical good cases set G, and define the feasible region:

[0062] Ωp=[μp-ασp, μp+ασp]

[0063] Where α is the tolerance coefficient, and 1.0 ±1σ or 1.5 is recommended;

[0064] The asymmetric interval [Qp, lower, Qp, upper] can be defined using the quantile method.

[0065] Baseline curve:

[0066] For each thermocouple i, a weighted average curve is constructed at all time points, with the weights using the SHAP normalized contribution wp of the key features, to obtain the baseline curve Bi(j):

[0067]

[0068] weight w ij |Φ can be taken ij | Normalization aims to make the baseline more biased towards the samples / times that the model considers important;

[0069] Multidimensional feasible region determination logic:

[0070] For the sample to be tested, only the set of key points S is judged; if all or most key points fall into the corresponding Ωp, the feasible region test is passed; otherwise, it is marked as a risky workpiece.

[0071] Furthermore, S6 specifically includes:

[0072] Batch drift issue: Different batches may experience an increase / decrease in the overall temperature profile or a phase shift due to variations in mold preheating, environment, and furnace conditions; directly applying the static feasible region to all batches can lead to misjudgment.

[0073] DTW calibration procedure:

[0074] The critical thermocouple integrity curve of the test sample is aligned with the baseline curve using Dynamic Time Warping (DTW), and the alignment path and minimum distance DDTW are calculated. ;

[0075] in It can be the absolute difference or the Euclidean distance;

[0076] Based on the alignment results, local offset and scale difference are calculated and linear correction or local correction based on warping path is performed, which significantly reduces batch drift.

[0077] Deviation metric and threshold:

[0078] Two types of judgment indicators are defined: the point deviation count, the number of times the critical point exceeds its Ωp, and the z-score of the DTW distance D relative to the historical defective parts distribution;

[0079] If the number of deviations at a location exceeds β or D exceeds the threshold δ, an early warning and process adjustment procedure will be triggered.

[0080] Furthermore, S7 specifically includes:

[0081] Calibration of the sensitivity matrix S:

[0082] On the experimental or simulation platform, apply small-amplitude perturbations to each cooling channel j, such as ±5s switching time or ±10% flow rate, and record the temperature change ΔTp at key points to obtain the sensitivity coefficient:

[0083]

[0084] For multiple key points p, we obtain the matrix S∈R|S|×m, where m is the number of channels;

[0085] Residual calculation:

[0086] Using the benchmark or model target as a reference, calculate the key point residual vector rp = Tpmeasured - μp;

[0087] Control quantity mapping:

[0088] Solve the least squares problem to find the adjustment Δtj for each channel:

[0089]

[0090] Where λ is a regularization term to prevent excessive adjustment; boundary constraints Δtj∈[Δtmin,Δtmax] are added;

[0091] The problem can be solved online using a constrained quadratic programming QP solver, or a fast response can be achieved by using a truncation approximation of the linear solution;

[0092] Adjustments to execution and feedback:

[0093] In the initial stage of adjusting the strategy, a semi-automatic approach is recommended: the system generates suggestions and prompts the operator for confirmation; once the system is mature, automatic control can be granted.

[0094] The effect is recorded after each adjustment and written back to the database for incremental updates of the sensitivity matrix and model.

[0095] Another object of the present invention is to provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, the computer program being executed by the processor causing the processor to perform the steps of the method for constructing a feasible temperature domain for casting molds and optimizing dynamic processes based on interpretable learning.

[0096] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method for constructing a feasible temperature domain for casting molds and optimizing dynamic processes based on interpretable learning.

[0097] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:

[0098] This invention constructs a scientific model based on real production data, clearly defining key temperature points and thermocouple placement: By collecting on-site thermocouple temperature data and combining it with X-ray inspection results of castings, a temperature-defect correlation database is established. Interpretive analysis methods such as SHAP are used to interpret the model, quantitatively determining the contribution of each thermocouple and different time points to casting defects, thereby identifying the most quality-sensitive temperature monitoring points. Compared to traditional methods relying on experience to place thermocouples, this method, supported by both theoretical and experimental verification, optimizes the number and placement of thermocouples, ensuring that temperature acquisition results accurately reflect the formation patterns of defects in different areas of the casting, reducing redundant monitoring points, and improving the scientific rigor of temperature measurement and control.

[0099] By combining machine learning models with interpretability methods, this invention improves prediction accuracy and operability: Based on a temperature-quality database, it introduces machine learning models such as XGBoost and Transformer to model the relationship between cooling process parameters, mold temperature evolution, and casting quality. Unlike traditional manual experience-based judgment, this method can not only automatically predict the presence of defects in castings during production, but also clearly identify "which thermocouples" and "which time periods" are key feature points through SHAP sorting. This improves prediction accuracy and stability (by 10%~20% compared to traditional methods) and provides interpretable guidance for process engineers, avoiding the uncontrollability of black-box models and achieving a closed loop between prediction and process adjustment.

[0100] This invention constructs a dynamic baseline curve and feasible region to solve the problem of temperature drift between batches and achieve real-time intelligent control: By statistically analyzing the temperature curves of good sample parts, a baseline curve is constructed, and a feasible region is formed by superimposing ±σ confidence intervals. In different production batches, when changes in mold condition, environment, or cooling conditions cause overall temperature deviations, alignment and correction can still be achieved through methods such as Dynamic Time Warping (DTW), thereby ensuring the applicability of the baseline curve. Compared with traditional methods that rely on manual post-production adjustments, this solution can automatically assess risks based on the deviation between real-time thermocouple temperature and the feasible region during each casting production process, issuing early warnings and prompting process personnel to adjust the opening / closing sequence of cooling pipes or cooling intensity to maintain the mold temperature within a reasonable range and ensure casting quality.

[0101] Improving production stability and reducing defect rates and costs: The method of this invention enables dynamic monitoring and intelligent control of mold temperature during production, significantly reducing the incidence of casting defects. Experimental verification showed that the process route using this method reduced the scrap rate by 10%–15%, while shortening the debugging cycle and reducing additional costs caused by quality fluctuations. This not only improves the stability and automation level of the production process but also has significant implications for enterprises to reduce costs, increase efficiency, and improve product consistency.

[0102] (1) The technical solution of this invention fills a technical gap in the industry at home and abroad: the existing low-pressure casting temperature control technology generally has the problem of "inability to quantitatively explain the relationship between temperature change and casting defects". Traditional control relies on thermal balance experience and process personnel debugging, and lacks a data-driven quantitative model. Although there are solutions at home and abroad that use fuzzy control, neural networks or finite element simulation, these methods only achieve "prediction" or "control" and fail to achieve the combination of interpretability analysis and automatic generation of process feasible domain.

[0103] This invention is the first to use SHAP interpretive analysis to assess the importance of casting temperature temporal characteristics, and to construct a "feasible region" for mold temperature. Combined with DTW dynamic time warping technology, it achieves time-scale alignment and deviation quantification of temperature curves from different batches, intuitively revealing the temporal correspondence between local temperature fluctuations and defect distribution in the mold. This method of using machine learning interpretability to drive process boundary determination has not been publicly reported domestically or internationally.

[0104] Therefore, this invention fills a technological gap in the industry in two aspects: "mold temperature-casting quality mapping model" and "feasibility domain determination based on interpretive analysis".

[0105] (2) The technical solution of the present invention solves the technical problems that people have long wanted to solve but have never been able to solve: For a long time, the low-pressure casting industry has had the following core problems: ① The temperature distribution of the mold is complex and time-varying, and traditional temperature measurement is difficult to reflect the dynamic coupling effect of different regions; ② The relationship between defects and temperature is nonlinear and multidimensional interactive, lacking a quantifiable causal explanation; ③ Cooling control has time delay and lag, and process adjustment often lags behind the formation of defects.

[0106] This invention captures the high-dimensional relationship between mold temperature and defect probability by leveraging the nonlinear feature learning capability of the XGBoost model; it uses the SHAP algorithm to analyze the local contribution of each feature point, thereby visualizing the "cause of defects"; and it combines the DTW dynamic matching algorithm to perform time alignment and deviation quantification on the thermal behavior of different time series samples, establishing a mapping relationship between "good part baseline curve - abnormal curve".

[0107] Based on the feature importance ranking and temperature range distribution output by the above model, a "temperature feasible region" for each area of ​​the mold is further constructed. This allows for real-time determination of whether the current thermocouple temperature deviates from the optimal range during production, and automatic adjustment of cooling time and flow rate through the residual feedback module, thus achieving adaptive optimization of process parameters.

[0108] This technology enables "automatic extraction of the feasible quality domain from temperature data" and "real-time control based on deviation," successfully overcoming long-standing industry challenges such as complex coupling of mold temperature fields, uninterpretable nonlinear mapping, and hysteresis in feedback control.

[0109] (3) The technical solution of the present invention overcomes technical bias: In the field of traditional casting process control, there is a common "empirical technical bias", that is, it is believed that mold temperature control must rely on empirical parameters or manual adjustment, and machine learning models are only suitable for quality prediction and cannot be directly used for production control. The present invention breaks this bias.

[0110] First, the SHAP + DTW combined method proposed in this invention is not only used for prediction, but also for inferring the process control range from the interpretation results, enabling machine learning to "guide production". Second, traditional views hold that high-dimensional temperature data is noisy and unstable in distribution, making it difficult to establish a stable model. However, this invention achieves stable learning of the model under multiple operating conditions through time-series segmented normalization and multi-point matching mechanisms.

[0111] Furthermore, existing research typically treats machine learning models as "black boxes," while this invention emphasizes the combination of interpretability and physical consistency, constructing a hybrid model that combines data-driven approaches with physical constraints. This approach overcomes the technical limitations of "statistical models being uninterpretable and physical models not generalizing," providing a new paradigm for introducing interpretable artificial intelligence into the foundry industry. Attached Figure Description

[0112] Figure 1 This is a flowchart of the method for constructing the feasible temperature domain and dynamically optimizing the process of casting mold based on interpretable learning, provided in an embodiment of the present invention.

[0113] Figure 2 This is a multi-dimensional, time-series process-quality database provided in the embodiments of the present invention;

[0114] Figure 3 This is a schematic diagram of the confusion matrix of the xgboost classification model provided in an embodiment of the present invention;

[0115] Figure 4 This is a schematic diagram of the accuracy of the xgboost model provided in an embodiment of the present invention;

[0116] Figure 5This is a diagram showing some thermocouple SHAH values ​​provided in an embodiment of the present invention;

[0117] Figure 6 This is a diagram showing the thermocouple shap value at a specific moment provided in an embodiment of the present invention;

[0118] Figure 7 This is a schematic diagram of the feasible temperature range of the t10 thermocouple provided in the embodiments of the present invention. Detailed Implementation

[0119] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0120] like Figure 1 As shown, this embodiment of the invention provides a method for constructing a feasible temperature domain and dynamically optimizing a casting mold based on interpretable learning. The method includes:

[0121] S1: Determination of mold feature areas and arrangement of thermocouples;

[0122] S2: Data acquisition and database construction;

[0123] S3: Data Preprocessing and Feature Engineering;

[0124] S4: XGBoost modeling and SHAP interpretable computation;

[0125] S5: Construction of feasible region and baseline curve based on SHAP;

[0126] S6: Batch Drift Correction (DTW) and Deviation Measurement;

[0127] S7: Residual-driven process mapping and closed-loop optimization.

[0128] S1 specifically includes:

[0129] In low-pressure casting aluminum alloy wheel hub molds, in order to build a high-precision quality prediction model, it is first necessary to accurately identify the key feature areas of the mold's thermal field; by integrating numerical simulation results with X-ray inspection results from the trial production stage, the key areas on the casting that are prone to defects such as shrinkage cavities and porosity, such as the outer rim, inner rim, spokes, and wheel core, can be accurately located.

[0130] To fully capture the spatiotemporal evolution characteristics of mold temperature, more than or equal to 20 thermocouples are arranged in the upper mold, lower mold and side mold corresponding to the above characteristic areas to form a distributed temperature sensing network.

[0131] In the production of low-pressure cast aluminum alloy wheels, defects such as shrinkage cavities and porosity in the castings are usually closely related to the temperature field distribution of the mold. Through cross-validation using numerical simulation and X-ray inspection during the trial production stage, high-risk areas in the mold can be accurately identified. Subsequently, distributed thermocouple sensors are deployed in these critical areas to form a multi-point temperature monitoring network, ensuring real-time capture of temperature evolution information on the mold surface and interior, providing high-resolution foundational data for subsequent model training.

[0132] The acquired multi-channel temperature data, after preprocessing and feature engineering, is input into the XGBoost model. XGBoost can efficiently capture the nonlinear relationship between temperature time series and defect risk, while introducing SHAP values ​​for interpretability calculation, thereby quantifying the contribution of temperature in each feature region to the prediction results. This not only achieves prediction but also reveals the key influence mechanism of different mold regions on casting quality.

[0133] By utilizing the feature contributions obtained from SHAP decomposition, the mold temperature space can be mapped into a "safe and feasible region" and a "risk region." A benchmark curve is then established to create a visualized quality assurance boundary. When the mold operating parameters fall within the feasible region, the probability of casting defects is lowest; deviations from the benchmark curve indicate the need for process intervention. This is equivalent to establishing a dynamic quality monitoring model of the temperature field in the production process.

[0134] In actual production, process conditions and external disturbances can cause batch-to-batch variations in temperature distribution. By introducing Dynamic Time Warping (DTW) to compare the time-series differences between the current batch and the historical baseline curve, the degree of process drift can be quantified. The greater the deviation, the greater the gap between the current process and the historical optimal operating conditions, thus enabling real-time triggering of adjustment measures to ensure production stability.

[0135] Based on prediction and monitoring, a process mapping is established using a residual-driven method, feeding back actual deviations to the optimization stage to achieve dynamic adjustment of process parameters such as heating, cooling, and heat preservation. This closed-loop control mode not only enhances the initiative in defect prevention but also continuously corrects the model as data accumulates, giving the system adaptive evolution capabilities and ultimately achieving intelligent, interpretable, and high-quality assurance of the casting process.

[0136] like Figure 2 As shown, a multi-dimensional, time-series process-quality database is constructed, with each record uniquely corresponding to a casting production cycle, mainly including:

[0137] Cooling process parameters: the identification and type of each cooling channel, including air cooling / water cooling, switching time and cooling intensity; air cooling flow rate: 50~120 m³ / h; water cooling flow rate: 3~8 L / min.

[0138] Mold temperature time series data: The temperature values ​​of 21 consecutive time points recorded by each thermocouple at 10-second intervals form the original temperature time series matrix;

[0139] Casting quality inspection data: including X-ray-based binary defect labels, defect level assessment, and mechanical property data of key feature areas;

[0140] This database provides a solid data foundation for subsequent key feature mining based on machine learning.

[0141] S2 specifically includes:

[0142] Data Scope: To ensure generalization and robustness, the database contains samples from multiple batches and operating conditions; each record includes: thermocouple timing matrix X=[Ti,j] (i=1…n, j=1…M, recommended M=21, sampling interval 10s, where i represents the thermocouple number (from 1 to n thermocouples), j represents the time point number (a total of M time points, recommended M is 21, sampling interval is 10 seconds)), cooling channel parameter set {topen,j,tclose,j,Qj: topen,j represents the opening time of cooling channel j, tclose,j represents the closing time of cooling channel j, Qj represents the flow-related parameters of cooling channel j, which together describe the key parameters related to the operation of the cooling channel}, machine / batch metadata and casting quality label y, X-ray defect 0 / 1, multiple types of defects or mechanical indicators;

[0143] Sensors and sampling: Thermocouple specifications are recommended to have an accuracy of ±0.5℃ and a response time of <1s, with dual redundancy at key points; the sampling system must ensure clock synchronization, error recording, and preservation of original timing data;

[0144] Data storage: Time series data is recommended to use a time series database. Quality and process parameters are linked by a relationship table to facilitate sampling analysis by batch, by thermocouple, and by time period.

[0145] S3 specifically includes:

[0146] Missing items and exception handling:

[0147] Missing data: When the percentage of missing data in a single channel is less than 10%, cubic spline or linear interpolation is used to complete the data; if the percentage of missing data in a single channel exceeds 30%, the channel is marked as invalid and removed from the online monitoring candidates.

[0148] Anomalies: Statistical anomaly detection is performed based on median + MAD (Median Absolute Deviation): if |T-median|>k·MAD (T represents the temperature value at a certain time, median represents the median, MAD represents the median absolute deviation, and k is a coefficient), it is considered an anomaly and replaced with a smooth replacement from the adjacent time.

[0149] Smoothing and Difference:

[0150] Savitzky-Golay filtering with a window size of 5 and an order of 2 can be used to smooth the original time series; if necessary, an exponentially weighted moving average can be applied to the difference series to assess the heating rate.

[0151] Feature extraction:

[0152] Original characteristics: the temperatures Ti,j of each thermocouple at M time points;

[0153] Derivative characteristics: initial temperature Ti,1, peak value Ti,max, slope of the k-th segment ΔT / Δt, local energy, etc.

[0154] Standardization strategy: z-score standardization is used for model training; original physical quantities are preserved for SHAP interpretability and process mapping.

[0155] S4 specifically includes:

[0156] Model selection and training:

[0157] Use the XGBoost classifier / regressor for binary defect prediction or multi-objective regression.

[0158] Recommended hyperparameter ranges: learning_rate ∈ [0.01, 0.2]; max_depth ∈ [4, 10]; n_estimators ∈ [200, 1000]; subsample ∈ [0.6, 0.9]; colsample_bytree ∈ [0.6, 0.9]; regularization λ ∈ [0, 1]; use early_stopping_rounds to avoid overfitting;

[0159] Training strategy: If there is sufficient data, use the three-part training / validation / test method; if the sample size is small, use 5-fold cross-validation and retain an independent test set.

[0160] SHAP value calculation:

[0161] TreeSHAP is used to calculate the SHAP value for each feature of each sample on the trained XGBoost model. Satisfies local additability:

[0162] (k)

[0163] Where p corresponds to a certain thermocouple-time feature;

[0164] Global importance is obtained by aggregation: summing / averaging over all samples. As a feature-comprehensive contribution;

[0165] Feature ranking and selection:

[0166] Features Arrange the data in descending order and take the first K data points to form an initial set S of key points; then K can be further reduced for online monitoring, based on a trade-off between model performance and engineering feasibility.

[0167] S5 specifically includes:

[0168] Feasible region definition, based on key point S:

[0169] For each keypoint p∈S, calculate the mean and standard deviation μp, σp in the historical good cases set G, and define the feasible region:

[0170] Ωp=[μp-ασp, μp+ασp]

[0171] Where α is the tolerance coefficient, and 1.0 ±1σ or 1.5 is recommended;

[0172] The asymmetric interval [Qp, lower, Qp, upper] can be defined using the quantile method.

[0173] Baseline curve:

[0174] For each thermocouple i, a weighted average curve is constructed at all time points, with the weights using the SHAP normalized contribution wp of the key features, to obtain the baseline curve Bi(j):

[0175]

[0176] The weight wij can be normalized using |Φij|, which aims to make the baseline more biased towards the samples / times that the model considers important.

[0177] Multidimensional feasible region determination logic:

[0178] For the sample to be tested, only the set of key points S is judged; if all or most key points fall into the corresponding Ωp, the feasible region test is passed; otherwise, it is marked as a risky workpiece.

[0179] S6 specifically includes:

[0180] Batch drift issue: Different batches may experience an increase / decrease in the overall temperature profile or a phase shift due to variations in mold preheating, environment, and furnace conditions; directly applying the static feasible region to all batches can lead to misjudgment.

[0181] DTW calibration procedure:

[0182] The critical thermocouple integrity curve of the test sample is aligned with the baseline curve using Dynamic Time Warping (DTW), and the alignment path and minimum distance DDTW are calculated. ;

[0183] in It can be the absolute difference or the Euclidean distance;

[0184] Based on the alignment results, local offset and scale difference are calculated and linear correction or local correction based on warping path is performed, which significantly reduces batch drift.

[0185] Deviation metric and threshold:

[0186] Two types of judgment indicators are defined: the point deviation count, the number of times the critical point exceeds its Ωp, and the z-score of the DTW distance D relative to the historical defective parts distribution;

[0187] If the number of deviations at a location exceeds β or D exceeds the threshold δ, an early warning and process adjustment procedure will be triggered.

[0188] Specifically, S7 includes:

[0189] Calibration of the sensitivity matrix S:

[0190] On the experimental or simulation platform, apply small-amplitude perturbations to each cooling channel j, such as ±5s switching time or ±10% flow rate, and record the temperature change ΔTp at key points to obtain the sensitivity coefficient:

[0191]

[0192] For multiple key points p, we obtain the matrix S∈R|S|×m, where m is the number of channels;

[0193] Residual calculation:

[0194] Using the benchmark or model target as a reference, calculate the key point residual vector rp = Tpmeasured - μp;

[0195] Control quantity mapping:

[0196] Solve the least squares problem to find the adjustment Δtj for each channel:

[0197]

[0198] Where λ is a regularization term to prevent excessive adjustment; boundary constraints Δtj∈[Δtmin,Δtmax] are added;

[0199] The problem can be solved online using a constrained quadratic programming QP solver, or a fast response can be achieved by using a truncation approximation of the linear solution;

[0200] Adjustments to execution and feedback:

[0201] In the initial stage of adjusting the strategy, a semi-automatic approach is recommended: the system generates suggestions and prompts the operator for confirmation; once the system is mature, automatic control can be granted.

[0202] The effect is recorded after each adjustment and written back to the database for incremental updates of the sensitivity matrix and model.

[0203] Example 1: Mold Feature Area Identification and Sensor Arrangement

[0204] In the trial production of low-pressure cast aluminum alloy wheel hubs, the thermal field distribution during solidification was first simulated using ProCAST numerical simulation, identifying the junction between the outer rim and spokes as a high-risk area prone to shrinkage cavities. Subsequently, X-ray inspection of the prototype confirmed the presence of shrinkage defects in this area, verifying the accuracy of the simulation results.

[0205] Based on the distribution of risk areas, 24 K-type thermocouples were deployed at the junction of the upper and lower molds and in the reinforcing rib area of ​​the side molds. The thermocouple arrangement is shown in Table 1 below, with a sampling frequency of once every 10 seconds. This arrangement ensures the complete capture of the temperature evolution process in key areas, providing high-precision time-series data for subsequent modeling.

[0206] Table 1 Thermocouple Arrangement

[0207]

[0208] Example 2: Multi-batch database construction

[0209] Production data for 500 wheel hubs were collected during five consecutive batches of casting experiments on a certain production line. Each wheel hub corresponds to an independent record, which includes thermocouple matrix data at 21 time points, the opening and closing times of each cooling channel, flow parameters, and mechanical performance test data.

[0210] All data is stored in the time-series database InfluxDB, while process and quality parameters are linked using the relational database MySQL. This allows researchers to flexibly extract samples by batch, channel, or time dimension, enabling efficient data retrieval.

[0211] Example 3: Anomaly Data Processing and Feature Extraction

[0212] In the third batch of experiments, some thermocouples experienced poor contact, resulting in approximately 5% of the data points being missing. The system automatically used cubic spline interpolation to complete the data, with the error controlled within 0.3℃. For individual thermocouples exhibiting abrupt changes, the data was marked as abnormal using a median + absolute deviation criterion and replaced with neighboring values.

[0213] The processed time-series data is further extracted to extract derived features such as peak temperature, heating rate, and local energy. Combined with the original time-series matrix input model, this preserves both physical meaning and numerical stability, improving prediction performance.

[0214] Example 4: Modeling and Interpretive Computation

[0215] XGBoost modeling was performed using 400 samples, with the target variable being a binary label (qualified / unqualified) for X-ray defects. Model parameters were set to a learning rate of 0.1, a maximum depth of 6, and 100 base learners. The prediction accuracy on the test set reached 92%. The calculation results are as follows. Figure 3 , Figure 4 .

[0216] The TreeSHAP algorithm was used to calculate the characteristic contribution of each thermocouple at each moment. Some thermocouple shap values ​​are shown below. Figure 5 As shown, the results indicate that temperature changes near the outer rim during the early cooling phase have the greatest impact on the prediction results, contributing approximately 40% of the overall effect. This provides engineers with a clear direction for quality control and allows them to obtain the data influence weights of specific thermocouples at different times, such as... Figure 6 As shown, this provides a clear range for calculating the feasible region.

[0217] Example 5: Construction of Feasible Region and Baseline Curve

[0218] From historical data of 400 qualified wheel hubs, the mean and standard deviation of key thermocouple temperatures were calculated. The feasible region was defined as mean ± 1.5 times the standard deviation to ensure coverage of most normal samples while eliminating abnormal fluctuations. Partial thermocouple feasible regions are shown below. Figure 7 As shown.

[0219] The thermocouple time-series curves were weighted using SHAP to obtain a baseline curve. Comparing the curve of a wheel hub from the fourth batch with the baseline curve revealed that its temperature was below the lower limit at the 8th minute, ultimately leading to the detection of shrinkage defects. This verified the effectiveness of the feasible region determination.

[0220] Example 6: Batch Drift Correction and Deviation Measurement

[0221] In the fifth batch of production, the overall temperature curve rose by 5°C compared to the baseline due to the increased ambient temperature. Directly applying the static feasible region would lead to widespread misjudgments.

[0222] The dynamic time warping method was used to align the curves of the fifth batch with the baseline curve, resulting in a DTW distance of 15, a significant reduction compared to the unaligned distance of 45. Deviation measurement results showed that only two key points exceeded the feasible region threshold, thus avoiding misjudgment and guiding the normal operation of the process. The table below shows some of the DTW distance calculation results.

[0223] Table 2 Partial DTW Distance Calculation Results

[0224]

[0225] Example 7: Residual-driven process optimization

[0226] In a certain batch of production, the critical point temperature residual calculated based on the baseline curve showed that the temperature in the lower mold area was approximately 3°C lower. Sensitivity matrix analysis indicated that this area was highly correlated with the flow rate of the second cooling channel.

[0227] The system, through residual mapping calculations, recommended increasing the water cooling flow rate of the second channel by 10%. After the adjustment was implemented, the temperature residual in this area of ​​subsequent castings decreased to within 0.5℃, and the shrinkage porosity defect rate decreased by approximately 30%.

[0228] Example 8: Sensitivity Matrix Calibration

[0229] On the test platform, ±5-second switching disturbances and ±10% flow disturbances were applied to each of the six cooling channels, and the temperature response at key points was collected. The results showed that the first channel had the greatest impact on the inner rim temperature, with a sensitivity coefficient of 0.25℃ / second, while the fourth channel contributed the most to the outer rim temperature.

[0230] This sensitivity matrix provides an accurate linear mapping relationship for residual-driven process optimization, making optimization decisions more controllable and engineering feasible.

[0231] Example 9: Integrated System Implementation

[0232] A prototype system was built, with hardware including a 24-channel data acquisition module, a time-series database server, and a process control terminal. The software implemented the entire process of data acquisition, model training, feasible region determination, batch calibration, and optimization control.

[0233] During a month of continuous production verification, the system was able to monitor the mold temperature curve of each wheel hub in real time, accurately identify abnormal batches and provide optimization suggestions, improving the pass rate by more than 5%.

[0234] Example 10: Online Closed-Loop Optimization Operation

[0235] During mass production, the optimization system is switched to semi-automatic mode. After the system generates cooling channel adjustment suggestions, the operator confirms and implements them. After two weeks of stable operation, it is switched to fully automatic closed-loop mode.

[0236] During closed-loop optimization, the system adjusts cooling parameters in real time, and the effect of each adjustment is recorded and written back to the database, enabling online updates of the model and sensitivity matrix. Ultimately, the defect rate of the wheel hub products decreased from 8% to 3%, significantly improving process stability.

[0237] Evidence related to the technical effects obtained by the embodiments of the present invention.

[0238] I. Verification Plan and Evaluation Indicators

[0239] Offline verification:

[0240] Historical data was used for cross-validation to calculate ROC, PR curves, false alarm rate, and false negative rate; the coverage rate of good parts within the feasible region and the excess rate of bad parts were calculated.

[0241] On-site A / B testing:

[0242] Under the same machine / mold conditions, a control group (adjusted by human experience) and an experimental group (adjusted according to this method) were compared, and the scrap rate, defect rate, debugging time, energy consumption and other indicators were statistically analyzed.

[0243] Key Indicator Recommendations:

[0244] Prediction accuracy ≥ 90%; good parts coverage ≥ 85%; defective parts excess rate ≥ 70%; on-site scrap rate decrease ≥ 10%.

[0245] II. Project Implementation Details and Alternative Solutions

[0246] Sensor redundancy and anomaly mechanism: critical thermocouples are dual-mounted for redundancy; in case of an anomaly, interpolation is performed using a nearby thermocouple and a maintenance prompt is triggered.

[0247] Alternative algorithms and extensions: When the sample size is large, a temporal neural network (Transformer / LSTM) combined with attention can be used to replace XGBoost for interpretability; however, note that model interpretability needs to be combined with SHAP or attention visualization.

[0248] Safety Boundaries and Human Intervention: Automatic control requires tiered authorization. Initially, a "suggestion + manual confirmation" model will be adopted, gradually transitioning to "semi-automatic → automatic" while retaining the authority to revoke manual control.

[0249] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.

[0250] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for constructing feasible temperature domains and dynamically optimizing processes for casting molds based on interpretable learning, characterized in that, Includes the following steps: Step 1: Determine the key thermal characteristic regions of the mold, and arrange more than or equal to 20 thermocouples in the upper mold, lower mold, and side mold of the characteristic regions to construct a distributed temperature sensing network; Step 2: Collect temperature time series data, cooling process parameters, and casting quality inspection data from multiple batches and under multiple operating conditions, and construct a process-quality database; Step 3: Perform missing and anomaly handling, smoothing and differential processing on the temperature time series data, and extract features such as starting temperature, peak value, slope, and local energy. Step 4: Use the XGBoost model to perform defect prediction modeling and calculate the contribution of each feature using the SHAP method. Step 5: Construct the feasible region and baseline curve of mold temperature based on SHAP feature contributions; Step 6: Use dynamic time warping to compare the difference between the current batch and the historical baseline curve, calculate the batch drift and measure the degree of deviation; Step 7: Based on the residual-driven process mapping method, the cooling channel parameters are adjusted to achieve closed-loop optimization of the process.

2. The method according to claim 1, characterized in that, Each record in the process-quality database contains: The temperature time series matrix X is obtained by sampling from n thermocouples at M consecutive time points; Cooling channel parameter set, including switching time, cooling intensity and flow rate; Casting quality labels, including X-ray inspection-based defect labels and mechanical properties of critical areas.

3. The method according to claim 1, characterized in that, The anomaly detection in step three uses a statistical method of median plus absolute deviation. When the difference between the temperature value and the median exceeds k times the absolute deviation, it is identified as an anomaly and replaced with a smooth value from the nearest time.

4. A method for modeling and interpreting the temperature of casting molds based on interpretable learning, characterized in that, XGBoost classification or regression models are used for prediction, and the SHAP value of each feature is calculated using the TreeSHAP algorithm, satisfying the locally additive decomposition relation: The predicted function value equals the baseline value plus the sum of the contribution values ​​of each feature; The average of the absolute values ​​of the feature contribution values ​​across all samples is used to characterize global importance and for feature ranking and selection.

5. The method according to claim 4, characterized in that, The features are sorted in descending order of global importance, and the top K features are selected as the key point set, which is then used as the online monitoring indicator.

6. A method for constructing a feasible temperature domain for a mold based on interpretable learning, characterized in that, include: Based on historical qualified casting samples, the mean and standard deviation of the temperature at key points are calculated, and the feasible region is defined as the interval between the standard deviation of the mean minus the tolerance factor and the standard deviation of the mean plus the tolerance factor. The baseline curve is obtained by weighting the temperature of the thermocouple at time points according to the SHAP contribution weight. The temperature of key points of the sample to be tested is compared with the feasible region. If most key points fall within the feasible region, the workpiece is determined to pass the inspection.

7. A batch drift correction method for casting molds, characterized in that, include: The temperature curve of the sample under test is aligned with the reference curve using the dynamic time warping method to obtain the minimum matching distance; Based on the alignment path, local offset and scale difference are calculated, and linear correction or local correction is performed to reduce the overall drift of temperature profiles between batches. The degree of process deviation is determined based on the statistical distribution of the number of times key points exceed the feasible region and the minimum matching distance.

8. A residual-driven method for optimizing casting processes, characterized in that, include: Calculate the key point residual vector based on the reference temperature and the measured temperature; A linear mapping relationship between key point temperature and cooling channel adjustment amount is established based on the sensitivity matrix; Solve the quadratic programming problem with regularization constraints to obtain the adjustment amount for each cooling channel, and write the adjustment effect back to the database for model update after the process is executed.

9. The method according to claim 8, characterized in that, The sensitivity matrix is ​​obtained by subjecting each cooling channel to small perturbations on a test or simulation platform. These perturbations include increasing or decreasing the switching time by 5 seconds and increasing or decreasing the flow rate by 10%.

10. A casting mold temperature monitoring and optimization system based on interpretable learning, characterized in that, include: Temperature acquisition unit is used to collect time-series temperature data at multiple points in the mold; The database unit is used to store temperature timing, cooling process parameters, and quality inspection data. Modeling unit, used to perform XGBoost modeling and SHAP computation; The decision unit is used to construct the feasible region and make a decision on the sample to be tested; The correction unit is used for batch drift alignment and deviation measurement. The optimization unit is used to adjust the cooling channel parameters based on the residual-driven process mapping to achieve closed-loop process optimization.