A method for optimizing process parameters of magnesium alloy micro-arc oxidation

By constructing a survival risk assessment model and a regression prediction model, and combining them with the SHAP interpretive framework, the problems of low data utilization and cross-environment integration in the prediction of magnesium alloy micro-arc oxidation performance were solved, and efficient and accurate optimization of magnesium alloy surface treatment process was achieved.

CN122369711APending Publication Date: 2026-07-10CHONGQING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV OF TECH
Filing Date
2026-03-31
Publication Date
2026-07-10

Smart Images

  • Figure CN122369711A_ABST
    Figure CN122369711A_ABST
Patent Text Reader

Abstract

This application discloses a method for optimizing process parameters of micro-arc oxidation of magnesium alloys, belonging to the field of metal surface modification technology. The method includes: globally uniform sampling within the process parameter space to construct an initial dataset containing failure time and right-censored state identifiers; constructing a survival risk assessment model based on the initial dataset; using the SHAP framework to screen a set of key process parameters; generating virtual process parameter combinations and using the survival risk assessment model to screen candidate process parameter combinations; conducting accelerated corrosion tests on the candidate process parameter combinations to obtain accurate failure times and training a regression prediction model; using the survival risk assessment model and the regression prediction model for dual-model collaborative screening; performing supplementary standard tests on the screened process parameter combinations and updating the survival risk assessment model; repeating the iteration until convergence, and outputting the optimal range of process parameter values. This application improves the accuracy of predicting the performance of long-life coatings and shortens the process optimization cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of metal surface modification, and in particular to a method for optimizing the process parameters of micro-arc oxidation of magnesium alloys. Background Technology

[0002] Magnesium alloys, as the lightest metallic structural materials currently available, have broad application potential in aerospace, automotive lightweighting, and bio-implants. However, their extremely high chemical reactivity makes them highly susceptible to corrosion, severely limiting their service life. Micro-arc oxidation technology, which grows a ceramic oxide film on the surface of magnesium alloys in situ, is a core technology for improving their corrosion resistance. To efficiently optimize the complex nonlinear relationship between micro-arc oxidation process parameters and the corrosion resistance of the film, establishing performance prediction models using machine learning has become a research hotspot in this field.

[0003] However, existing technical solutions for predicting the corrosion resistance of magnesium alloys under micro-arc oxidation still have the following shortcomings: First, the inability to effectively utilize right-censored data leads to systematic bias in predictions. When evaluating the corrosion resistance of micro-arc oxidation films, salt spray tests or long-term immersion tests are commonly used. Due to time constraints or the superior performance of coatings prepared by certain processes, some samples may not show corrosion damage by the test deadline; this type of data is statistically termed "right-censored data." Existing prediction techniques are mainly based on standard regression algorithms such as linear regression, support vector regression, or artificial neural networks, which require training labels to be definite values. Therefore, when dealing with censored samples, methods such as removing data or rigidly setting the failure time as the observation cutoff time are commonly used. The former results in a significant loss of information from high-performance samples, while the latter artificially shortens the predicted lifetime, leading to obvious systematic bias in the model's prediction of long-life, high-performance coatings.

[0004] Secondly, standard test and accelerated test data are fragmented, lacking cross-environment correlation and calibration mechanisms. To obtain accurate failure times, researchers often conduct accelerated corrosion tests by increasing medium concentration or polarization intensity. While accelerated testing can quickly obtain complete failure samples, its corrosion mechanism differs from that of the standard service environment, leading to biases in predicting actual service life when models trained directly using accelerated test data are used. Current techniques typically treat standard and accelerated tests separately, lacking effective cross-environment feature correlation models. This prevents the use of accurate failure times generated by accelerated testing to effectively calibrate survival probability predictions from standard tests, limiting the reliability and generalization ability of prediction models in complex engineering environments.

[0005] In addition, the micro-arc oxidation process of magnesium alloys has numerous parameters and complex synergistic effects. Existing technologies make it difficult to quantify the contribution of a single parameter to performance. Parameters are usually selected based on experience or single-factor experiments, which is inefficient and prone to missing key parameters, further restricting the efficiency of process optimization.

[0006] In summary, existing prediction models for the micro-arc oxidation performance of magnesium alloys have significant shortcomings in handling right-censored data, fusing data across testing environments, and identifying multi-parameter coupling, making it difficult to meet the needs of efficient control of high-performance magnesium alloy surface treatment processes. Summary of the Invention

[0007] The purpose of this application is to provide a method for optimizing the process parameters of micro-arc oxidation of magnesium alloys, which can effectively utilize right-censored data to achieve cross-environmental fusion calibration of standard test and accelerated test data, improve the accuracy of long-life coating performance prediction, and shorten the process optimization cycle.

[0008] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for optimizing the process parameters of micro-arc oxidation of magnesium alloys, including: Step 1: Perform global uniform sampling within the process parameter space of magnesium alloy micro-arc oxidation to construct an initial dataset; each sample in the initial dataset includes a set of process parameters and the failure time and right censoring status identifier obtained under standard environmental corrosion resistance test. Step 2: Based on the initial dataset, construct a survival risk assessment model; the survival risk assessment model is used to process the right censoring status identifier and output the survival probability of any combination of process parameters; Step 3: Based on the initial dataset, use the SHAP interpretive framework to calculate the marginal contribution value of each process parameter to the survival probability, and select the set of key process parameters based on the marginal contribution value. Step 4: Determine multiple virtual process parameter combinations within the parameter space of the set of key process parameters, calculate the survival probability of each virtual process parameter combination using the survival risk assessment model, and filter multiple candidate process parameter combinations according to a preset survival probability threshold. Step 5: Perform accelerated corrosion tests on the multiple candidate process parameter combinations to obtain the corresponding exact failure time, and train a regression prediction model based on all the obtained exact failure times and their corresponding candidate process parameters. Step 6: Using the survival risk assessment model and the regression prediction model, predict the survival probability and failure time of the multiple candidate process parameter combinations, respectively, and screen out the process parameter combinations that meet the preset performance targets based on the joint comparison of the two prediction results. Step 7: Perform supplementary standard environment corrosion resistance tests on the process parameter combinations selected in Step 6, update the test results to the initial dataset, and retrain the survival risk assessment model based on the updated initial dataset. Step 8: Repeat steps 4 to 7 until the preset convergence condition is met, and output the parameter range formed by the combination of process parameters selected in step 6 in the last iteration as the optimal value range of each process parameter.

[0009] Optionally, the survival risk assessment model described in step 2 is determined by comparing the consistency indices of the Cox proportional hazards model, the random survival forest model, or other survival models.

[0010] Optionally, when the survival risk assessment model is a Cox proportional hazards model, its construction method includes: The weighting coefficients of each process parameter are estimated using a partial likelihood function; the expression for the partial likelihood function is: ; Where k is the total number of unique failure time points in the initial dataset where actual failure events occur; Let i be the specific time when the failure occurs, and let the failure times be sorted in chronological order. For at any time The vector of process parameters corresponding to the failed sample; For a moment The risk set, that is, at time... The set of all samples that have not yet expired and have not been censored, including samples that subsequently expired and right-censored samples; For risk collection The process parameter vector of the j-th sample; By taking the logarithm and derivative of the partial likelihood function, an iterative optimization algorithm is used to solve for the weight coefficient vector that maximizes the partial likelihood function, thus obtaining the weight coefficient estimation vector. The baseline cumulative risk estimate is calculated using the Breslow estimator, and the survival probability for any combination of process parameters is calculated using the following formula: ; in, The survival probability of process parameter combination x at time t Rate, As the baseline cumulative risk estimate, This is an estimate of the weighting coefficients.

[0011] Optionally, step 3 involves selecting a set of key process parameters based on the marginal contribution value, specifically including: The average absolute value of the marginal contribution of each process parameter across all samples is calculated as the global importance. The parameters are sorted from largest to smallest global importance and the cumulative contribution rate is calculated. The process parameters included when the cumulative contribution rate first reaches a preset threshold are determined as the set of key process parameters.

[0012] Optionally, the determination of multiple virtual process parameter combinations in step 4 can be achieved using Bayesian sampling or super Latin square sampling methods.

[0013] Optionally, step 6, which involves comparing the two prediction results to select a combination of process parameters that meets the preset performance target, specifically includes: Process parameter combinations that are inconsistent between the predicted survival probability and the predicted failure time are excluded. The inconsistency refers to the predicted survival probability being higher than a first preset threshold and the predicted failure time being lower than a second preset threshold, or the predicted survival probability being lower than the first preset threshold and the predicted failure time being higher than the second preset threshold.

[0014] Optionally, the preset convergence conditions in step 8 include: In two consecutive iterations, the rate of change of the parameter range formed by the combination of process parameters selected in step 6 was lower than the preset rate of change threshold.

[0015] Optionally, the global uniform sampling in step 1 is implemented using the super Latin square sampling method.

[0016] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method for optimizing the process parameters of micro-arc oxidation of magnesium alloys. By constructing a survival risk assessment model to process right-censored state markers, this method incorporates the survival information of unfailed samples into the model training, fully exploring the survival patterns contained in high-performance samples, eliminating model prediction bias caused by hard data truncation, and significantly improving the accuracy of performance evaluation for long-life coatings. This solves the technical problem in existing technologies using standard regression algorithms that cannot handle sample data that has not yet failed at the end of the experiment, typically resorting to data removal or rigidly setting the failure time as the observation cutoff time, resulting in predicted lifetimes generally lower than actual service lifetimes.

[0017] This application employs a collaborative screening process, combining a regression prediction model and a survival risk assessment model. By utilizing the precise failure time obtained from accelerated testing to calibrate the survival probability under standard conditions, it ensures that the prediction model possesses both physical realism under standard conditions and high-precision correction from accelerated experiments. This significantly improves the model's generalization ability and reliability in cross-environment applications and shortens the process optimization cycle. This addresses the technical problem in existing technologies where standard testing accurately reflects the service environment but is time-consuming and prone to right-censoring, while accelerated testing quickly obtains precise failure times, but its corrosion mechanism differs from that of the standard environment. These two methods are often treated separately, lacking an effective cross-environment feature correlation model.

[0018] This application introduces the SHAP interpretive framework to quantify the marginal contribution of each process parameter to the survival probability. Based on these marginal contribution values, a set of key process parameters is selected, identifying parameter combinations with strong coupling relationships. Redundant parameters with smaller performance contributions are then fixed. While maintaining prediction accuracy, this effectively reduces feature dimensionality, decreases the required experimental sample size, and significantly reduces R&D costs and time. This solves the technical problem of numerous and complex synergistic effects in magnesium alloy micro-arc oxidation processes, where existing technologies struggle to quantify the contribution of individual parameters to performance. Parameter selection typically relies on experience or single-factor experiments, resulting in low efficiency and the potential for overlooking key parameters.

[0019] This application achieves efficient and precise optimization of magnesium alloy micro-arc oxidation process parameters by iterating until a preset convergence condition is met, and outputting the parameter range formed by the combination of process parameters selected in the last iteration as the optimal value range. This avoids the risk of missing the optimal parameter range in a single screening and ensures that the final output process parameter range has the best corrosion resistance. This solves the technical problem in traditional optimization methods where a single screening may miss the optimal parameter range, making it difficult to guarantee that the final process parameters have optimal corrosion resistance.

[0020] In summary, this application constructs a predictive model that is compatible with non-fixed labels and has cross-environment extrapolation capabilities by combining the ability of survival analysis to process right-censored data with the regression calibration capability of accelerated testing. This enables the accurate characterization of the complex mapping relationship between the micro-arc oxidation process parameters of magnesium alloys and their actual service life within a short experimental period, providing reliable technical support for the directional design of high-performance magnesium alloy coatings. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This application provides a flowchart illustrating a method for optimizing the process parameters of micro-arc oxidation of magnesium alloys. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] To make the objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] The technical solution of this application: First, it solves the problems of low utilization rate of high-performance sample data and systematic bias of predicted values ​​in the prior art: Because existing regression models require training labels to be at a defined failure time, information on "right-censored" samples that have not yet failed in long-term corrosion resistance evaluations is often removed or incorrectly labeled. This application addresses this by constructing a survival risk assessment model in step 2, which uses a likelihood function to process the right-censored state markers. This incorporates the survival information of high-performance samples that have not failed into the model training, fully exploring the failure patterns of long-life coatings, eliminating model prediction bias caused by rigid data truncation, and improving the accuracy of performance evaluation for long-life coatings.

[0026] Secondly, this addresses the issue of the inability to effectively integrate and calibrate accelerated corrosion test data with standard service environment test data: While accelerated corrosion testing can quickly obtain accurate failure time values, its corrosion kinetics differ from those of standard environments, leading to biases in the prediction of actual service life when models trained directly using accelerated test data are used. This application addresses this issue by training a regression prediction model in step 5 and establishing a dual-model collaborative screening mechanism in step 6. This mechanism uses the precise failure time obtained from accelerated testing to calibrate the survival probability under standard environments across different environments. It also collaboratively compares the prediction results of the survival risk assessment model and the regression prediction model, eliminating inconsistent combinations of process parameters. This solves the problem of balancing efficiency and accuracy in prediction models operating under a single testing environment.

[0027] Furthermore, the technical challenge of low optimization efficiency in the micro-arc oxidation process of magnesium alloys under small sample and long cycle conditions needs to be addressed: The micro-arc oxidation process for magnesium alloys involves numerous parameters with complex synergistic effects. Existing technologies struggle to quantify the contribution of individual parameters to performance, typically relying on experience or single-factor experiments for parameter selection, which is inefficient and prone to overlooking key parameters. This application introduces the SHAP interpretive framework in step 3 to calculate the marginal contribution of each process parameter to the survival probability, and selects a set of key process parameters based on the cumulative contribution rate, effectively reducing feature dimensionality. Step 4 generates virtual process parameter combinations for pre-screening, and step 8 iterates until convergence, outputting the optimal value range. This application integrates the ability of survival analysis to process censored data with the regression calibration capabilities of accelerated testing, constructing a predictive model that is compatible with non-fixed labels and has cross-environment extrapolation capabilities. This enables accurate characterization of the complex mapping relationship between magnesium alloy micro-arc oxidation process parameters and actual service life within a short experimental period, providing reliable technical support for the targeted design of high-performance magnesium alloy coatings.

[0028] Specifically, such as Figure 1 As shown, this application provides a method for optimizing the process parameters of micro-arc oxidation of magnesium alloys. This method includes steps 1 to 8. Wherein: Step 1: Perform global uniform sampling within the process parameter space of magnesium alloy micro-arc oxidation to construct an initial dataset; each sample in the initial dataset includes a set of process parameters and the failure time and right censoring status identifier obtained under standard environmental corrosion resistance test.

[0029] In this application, the definition of failure is based on the actual requirements of the enterprise. Taking salt spray test as an example, if the enterprise requires the coating to not corrode for 96 hours, then the samples that corrode within 96 hours are recorded as failure data, while the samples that do not corrode after more than 96 hours are recorded as right-censored data. The process parameters of magnesium alloy micro-arc oxidation specifically include solution formulation parameters such as solute concentration and additive content, as well as equipment process parameters such as voltage, frequency, duty cycle, and processing time. Standard environmental corrosion resistance test can be carried out by means of salt spray test or long-term immersion test to simulate the corrosion resistance performance of the coating in actual service environment.

[0030] As a preferred implementation, the global uniform sampling is achieved using the super Latin square sampling method, which significantly improves the quality and construction efficiency of the initial dataset. The super Latin square sampling method can achieve global uniform coverage within the high-dimensional process parameter space of magnesium alloy micro-arc oxidation with fewer sample points, ensuring that each process parameter is uniformly sampled within its value range. This avoids sample clustering or local omissions that may occur with traditional random sampling, thus ensuring that the initial dataset has excellent space-filling characteristics and representativeness. Compared with traditional grid sampling, super Latin square sampling can cover a wider parameter space with the same number of samples, or significantly reduce the required number of samples while maintaining the same coverage, effectively reducing the initial experimental cost and cycle. Simultaneously, the initial dataset constructed by this method provides a high-quality training foundation for the subsequent survival risk assessment model, enabling the model to learn the true mapping relationship between process parameters and corrosion resistance performance from limited samples. This avoids model bias or overfitting problems caused by uneven sample distribution, laying a data foundation for the accuracy and reliability of the entire optimization process.

[0031] Step 2: Based on the initial dataset, construct a survival risk assessment model; the survival risk assessment model is used to process the right censoring status identifier and output the survival probability of any combination of process parameters.

[0032] The survival risk assessment model establishes a mapping relationship between process parameters and corrosion resistance survival risk by using process parameters as independent variables and failure time as dependent variables. Specifically, it quantifies the impact of different process parameter combinations on instantaneous failure risk by constructing a risk function with process parameters as covariates. During the model training phase, a likelihood function containing censored information is introduced. This likelihood function multiplies the probability term of failed samples with the survival probability term of right-censored samples. By maximizing the log-likelihood function, the model parameters are dynamically adjusted, thereby achieving effective processing of right-censored data label information and enabling the model to fully explore the survival patterns contained in high-performance samples.

[0033] As a preferred implementation, the survival risk assessment model in step 2 is determined by comparing the consistency indices of the Cox proportional hazards model, the random survival forest model, or other survival models. Other survival models include, but are not limited to, deep learning survival models, Bayesian survival models, and accelerated failure time models.

[0034] This application is flexibly adaptable to different application scenarios: when the initial dataset is small and it is necessary to clearly explain the contribution direction of each process parameter to corrosion resistance, the Cox proportional hazards model can be selected to directly quantify the influence of parameters through weight coefficients, providing process engineers with a clear direction for adjustment; when there is a highly nonlinear relationship between process parameters and corrosion resistance and there are complex synergistic effects among parameters, the random survival forest model can be selected to automatically capture high-dimensional nonlinear patterns by integrating multiple survival trees, avoiding the risk of model misconfiguration; both models can be seamlessly integrated with the SHAP interpretive framework to realize a model-independent key parameter screening mechanism, ensuring the universality of feature screening in step 3.

[0035] Furthermore, this application uses the Concordance Index (C-index) to evaluate the predictive accuracy of the survival risk assessment model. This index quantifies the model's ability to distinguish between the superior and inferior corrosion resistance of coatings under different combinations of process parameters by calculating the degree of consistency between the failure risk sequence predicted by the model and the actual observed failure time sequence. The closer the C-index value is to 1.0, the stronger the model's distinguishing ability, thus providing a reliable model performance guarantee for the subsequent screening and optimization of process parameters.

[0036] Step 3: Based on the initial dataset, use the SHAP interpretive framework to calculate the marginal contribution value of each process parameter to the survival probability, and select the set of key process parameters based on the marginal contribution value.

[0037] As a preferred implementation, a set of key process parameters is selected based on the marginal contribution values. Specifically, this includes: calculating the average absolute value of the marginal contribution of each process parameter across all samples as its global importance; sorting parameters by global importance from largest to smallest and calculating the cumulative contribution rate; and identifying the process parameters whose cumulative contribution rate first reaches a preset threshold as the set of key process parameters. Based on this, SHAP interaction values ​​between parameters are further extracted to identify key factors with strong interactions. By analyzing the synergistic or antagonistic effects between parameter combinations, process parameter pairs requiring synergistic optimization are identified, providing precise guidance for subsequent process control and avoiding optimization deviations caused by ignoring parameter coupling relationships. Furthermore, based on the SHAP value distribution, parameters with low contribution and no significant interaction are fixed as constants, while parameters with high importance and strong interactions are retained as core optimization variables. This achieves feature dimensionality reduction in the search space, effectively reducing feature dimensions while ensuring prediction accuracy, decreasing the number of experimental samples required, and significantly improving process optimization efficiency.

[0038] This application achieves precise quantitative ranking and objective screening of multiple process parameters: The SHAP framework is used to calculate the average absolute value of the marginal contribution of each process parameter to the survival probability, eliminating the mutual cancellation of positive and negative contributions and truly reflecting the actual impact of each parameter on corrosion resistance. The parameters are ranked from highest to lowest global importance, and the cumulative contribution rate is calculated, providing an objective and quantitative basis for parameter screening and avoiding the subjectivity and randomness of traditional methods that rely on experience or single-factor experiments. The process parameters included when the cumulative contribution rate first reaches a preset threshold are identified as the key process parameter set. This automatically identifies the core parameters that contribute the most to corrosion resistance while ensuring prediction accuracy, and fixes redundant parameters with smaller contributions, effectively reducing feature dimensionality. Simultaneously, this application can automatically identify parameter combinations with strong coupling relationships, providing a clear direction for subsequent process optimization. This solves the technical problem of difficulty in quantifying the contribution of individual parameters when there are numerous process parameters and complex synergistic effects in magnesium alloy micro-arc oxidation, further improving process optimization efficiency.

[0039] Step 4: Determine multiple virtual process parameter combinations within the parameter space of the set of key process parameters, calculate the survival probability of each virtual process parameter combination using the survival risk assessment model, and select multiple candidate process parameter combinations based on a preset survival probability threshold.

[0040] The preset survival probability threshold is determined as follows: the maximum risk score of the top 5% to 20% of the best-performing samples with the lowest risk values ​​in the initial dataset is set as the preset threshold to ensure that the selected candidate process parameter combinations have corrosion resistance potential superior to existing excellent samples; on this basis, the distribution density of low-risk parameters is further statistically analyzed, that is, the degree of clustering of samples with survival risk values ​​below the preset threshold in each parameter dimension is statistically analyzed in the virtual sampling space, thereby defining the candidate process interval with high corrosion resistance and selecting candidate parameter combinations with risk values ​​below the preset threshold, thus achieving accurate positioning and efficient screening of high-potential process intervals.

[0041] In a preferred embodiment, the determination of multiple virtual process parameter combinations is performed using Bayesian sampling or super Latin square sampling methods.

[0042] This application significantly improves the exploration efficiency and coverage quality of the virtual parameter space: the super Latin square sampling method can achieve global uniform coverage in the high-dimensional space of the key process parameter set with fewer sampling points, ensuring that the distribution of virtual parameter combinations in the parameter space has good space-filling characteristics, avoiding local clustering or omissions, thereby ensuring that the survival risk assessment model has global representativeness in screening candidate process intervals; the Bayesian sampling method can, based on the distribution pattern of existing samples, focus on sampling high-probability candidate regions while maintaining global exploration capabilities, further improving screening efficiency, especially suitable for scenarios where the optimal interval is gradually focused during iterative optimization. Both sampling methods can be seamlessly integrated with the survival risk assessment model, effectively controlling the number of virtual parameters generated while ensuring the diversity of candidate process parameter combinations, avoiding the waste of computational resources caused by exhaustive search, providing a high-quality candidate set for the limited sample screening of subsequent accelerated testing, significantly improving process optimization efficiency, and solving the technical problem of difficulty in efficiently exploring the optimal process interval due to the large parameter space in traditional methods.

[0043] Step 5: Perform accelerated corrosion tests on the multiple candidate process parameter combinations to obtain the corresponding exact failure time, and train a regression prediction model based on all the obtained exact failure times and their corresponding candidate process parameters.

[0044] The regression prediction model is constructed using a few-shot learning algorithm, which includes at least one of Gaussian regression, support vector regression, or Bayesian linear regression. This algorithm is used to establish a high-precision mapping relationship between process parameters and the exact failure time under accelerated corrosion environment under limited experimental sample conditions. This effectively solves the problems of long standard test cycles and the easy generation of right-censored data, and provides an accurate data foundation for subsequent cross-environment calibration.

[0045] The accelerated corrosion test includes at least one of increasing the concentration of the corrosive medium, increasing the test temperature, or applying an electrochemical polarization voltage.

[0046] Step 6: Using the survival risk assessment model and the regression prediction model, predict the survival probability and failure time of the multiple candidate process parameter combinations, respectively, and select the process parameter combinations that meet the preset performance targets based on the synergistic comparison of the two prediction results.

[0047] Specifically, the step of selecting process parameter combinations that meet preset performance targets based on the synergistic comparison of the two prediction results includes: Process parameter combinations that are inconsistent between the predicted survival probability and the predicted failure time are excluded. Inconsistency refers to either a predicted survival probability higher than a first preset threshold and a predicted failure time lower than a second preset threshold, or a predicted survival probability lower than the first preset threshold and a predicted failure time higher than the second preset threshold. Inconsistency also refers to a better prediction result in the standard environment but a worse prediction result in the accelerated environment, or vice versa.

[0048] Step 6 eliminates process parameter combinations where the predicted survival probability and failure time are inconsistent, thereby achieving effective fusion and mutual calibration of standard and accelerated environment test data. This avoids prediction bias caused by a single model or a single test environment, significantly improving the reliability and cross-environment generalization ability of the screening results. At the same time, it accelerates the iterative convergence process, ensuring that the optimal range of the final output process parameters has both the long life characteristics of the real service environment and the high reliability of engineering verification.

[0049] Step 7: Perform supplementary standard environment corrosion resistance tests on the process parameter combinations selected in Step 6, update the test results to the initial dataset, and retrain the survival risk assessment model based on the updated initial dataset.

[0050] Step 8: Repeat steps 4 to 7 until the preset convergence condition is met, and output the parameter range formed by the combination of process parameters selected in step 6 in the last iteration as the optimal value range of each process parameter.

[0051] The preset convergence condition includes: the rate of change of the parameter range formed by the combination of process parameters selected in step 6 in two consecutive iterations is lower than the preset rate of change threshold.

[0052] This application achieves adaptive termination of the iterative optimization process and ensures the stability of the results: During the iterative optimization process, as the number of iterations increases, the parameter range formed by the combination of process parameters selected in step 6 will gradually narrow and tend to stabilize. When the rate of change of the parameter range in two consecutive iterations is lower than a preset threshold, it indicates that the model has converged to a stable optimal process range, and further iterations will not bring significant improvement. This convergence judgment mechanism based on the rate of change of the parameter range can objectively quantify the degree of convergence of the optimization process, avoid underfitting or overfitting problems that may be caused by subjective judgment or fixed number of iterations, and ensure that the iteration is terminated in time when the optimal process range is reached, effectively balancing optimization accuracy and computational efficiency. At the same time, this convergence condition forms a logical closed loop with the optimal value range output in step 8 - the final result is only output when the parameter range tends to stabilize, ensuring that the final output process parameter range has the best corrosion resistance and reliable engineering application value, avoiding the risk of missing the optimal parameter range in a single screening or premature termination of iteration leading to insufficient optimization, and solving the technical problem in traditional optimization methods that it is difficult to determine the optimization termination point due to the lack of objective convergence criteria.

[0053] By implementing steps 1 to 8 above, this application first constructs an initial dataset using global uniform sampling methods such as super Latin square sampling in step 1. This ensures the representativeness and diversity of samples within the high-dimensional process parameter space, laying a high-quality data foundation for subsequent model construction. Secondly, the survival risk assessment model constructed in step 2 effectively handles the right-censored state markers generated during standard environment corrosion resistance performance testing. It incorporates the survival information of unfailed high-performance samples into model training, rather than simply removing or rigidly truncating them as in traditional techniques. This fully explores the failure patterns of long-life coatings, eliminates systematic biases in the evaluation of long-life, high-performance coatings, and significantly improves the accuracy of predicting the performance of long-life coatings. This survival risk assessment model can output the survival probability of any combination of process parameters, providing a reliability assessment benchmark under standard conditions for subsequent screening. Furthermore, step 3 introduces the SHAP interpretive framework. By calculating the marginal contribution value of each process parameter to the survival probability and screening the set of key process parameters based on the cumulative contribution rate, it achieves accurate quantitative ranking of the synergistic effects of multiple parameters, identifies strongly coupled parameter combinations, and fixes redundant parameters, effectively reducing the feature dimensionality while ensuring prediction accuracy.

[0054] Next, step 4 generates virtual process parameter combinations within the critical process parameter space. Using the established survival risk assessment model, the survival probability of each virtual parameter combination is calculated and pre-screened, quickly defining the candidate process range for high corrosion resistance and efficiently narrowing the optimization space. Step 5 rapidly obtains the exact failure time by performing accelerated corrosion tests on the candidate process parameter combinations. Based on all obtained exact failure times and their corresponding process parameters, a regression prediction model is trained. This regression prediction model solves the problems of long standard test cycles and the tendency to generate right-censored data, providing accurate failure time prediction capabilities for subsequent cross-environment calibration.

[0055] Subsequently, step 6 utilizes a dual-model collaborative screening approach, combining a survival risk assessment model and a regression prediction model. Survival probability and failure time predictions are performed on candidate process parameter combinations, respectively. By eliminating process parameter combinations with inconsistent or abnormally correlated predictions, false positive parameter points that might perform well in a single model evaluation but have poor actual performance are effectively identified. This achieves cross-environmental fusion calibration of data from standard and accelerated testing environments, ensuring the prediction model possesses both physical realism under standard conditions and high-precision correction from accelerated experiments, significantly improving the model's generalization ability and reliability in complex engineering environments. Step 7 supplements the corrosion resistance performance tests of the process parameter combinations selected in step 6 using standard environments. The test results are updated to the initial dataset, and the survival risk assessment model is retrained based on the updated dataset. This iterative optimization of the model allows its predictive performance to continuously improve with each iteration.

[0056] Finally, step 8 repeats steps 4 to 7 until the preset convergence condition is met, and outputs the parameter range formed by the combination of process parameters selected in step 6 of the last iteration as the optimal value range. This avoids the risk of missing the optimal parameter range in a single screening, ensures that the final output process parameter range has the best corrosion resistance, and shortens the entire process optimization cycle from several months in the traditional method to several weeks, significantly improving R&D efficiency.

[0057] In summary, this application constructs a prediction model that is compatible with non-fixed labels and has cross-environment extrapolation capabilities by integrating a survival risk assessment model and a regression prediction model through a dual-mode collaborative screening mechanism. This enables the accurate characterization of the complex mapping relationship between the micro-arc oxidation process parameters of magnesium alloys and their actual service life within a relatively short experimental period, providing reliable technical support for the targeted design of high-performance magnesium alloy coatings.

[0058] Furthermore, when the survival risk assessment model is a Cox proportional hazards model, its construction method includes: The weighting coefficients of each process parameter are estimated using a partial likelihood function; the expression for the partial likelihood function is: ; Where k is the total number of unique failure time points in the initial dataset where actual failure events occur; Let i be the specific time when the failure occurs, and let the failure times be sorted in chronological order. For at any time The vector of process parameters corresponding to the failed sample; For a moment The risk set, that is, at time... The set of all samples that have not yet expired and have not been censored, including samples that subsequently expired and right-censored samples; For risk collection The process parameter vector of the j-th sample; By taking the logarithm and derivative of the partial likelihood function, an iterative optimization algorithm is used to solve for the weight coefficient vector that maximizes the partial likelihood function, thus obtaining the weight coefficient estimation vector. The baseline cumulative risk estimate is calculated using the Breslow estimator, and the survival probability for any combination of process parameters is calculated using the following formula: ; in, The survival probability of process parameter combination x at time t Rate, As the baseline cumulative risk estimate, This is an estimate of the weighting coefficients.

[0059] Specifically, when the survival risk assessment model is a Cox proportional hazards model, its construction method includes: First, the instantaneous risk function is constructed: Assume the input set of magnesium alloy micro-arc oxidation process parameters is a covariate vector x=(x1,x2,…,x…). p ) T The instantaneous risk function h(t|x) corresponding to time t is defined as: ; Where h(t|x) is the instantaneous failure risk (Hazard Rate) at time t under process parameter x. The baseline risk function represents the inherent risk background that changes over time when all process parameters are at the baseline reference level. ; is the weight coefficient vector of the process parameters, reflecting the magnitude and direction of each process parameter's contribution to the failure risk; x is the input process parameter vector.

[0060] The core assumption of the Cox model is that the hazard rate can be decomposed into the product of the baseline hazard function and the covariate effect, where exp(β) T x) is called relative risk, representing the factor by which process parameters amplify or reduce risk. The weighting coefficient β directly determines the offset of the risk curve relative to the baseline level for a specific process combination; specifically, exp(β) i This indicates that, with other process parameters remaining constant, process parameter x... i The multiple of risk change caused by each additional unit.

[0061] Secondly, the weighting coefficient β is estimated using the partial likelihood function: To handle right-censored data generated in standard environmental corrosion resistance tests, the model solves for the optimal weighting coefficient β by maximizing the partial likelihood function.

[0062] During model training, the partial likelihood function deals with the conditional probability of "why a sample with this combination of process parameters fails rather than other samples at a specific failure time." For failed samples, the model adjusts β to maximize the probability of the observed failure path. For right-censored samples, they are included in the denominator of the partial likelihood function, i.e., the risk set, and participate in the calculation as "survival background," enabling the model to learn the true mapping relationship between process parameters and failure risk from data containing censored information.

[0063] By taking the logarithm and derivative of the partial likelihood function, and using iterative optimization algorithms such as the Newton-Raphson algorithm to maximize the weight coefficient vector of the partial likelihood function, the optimal estimated value of the weight coefficient vector after training can be obtained. The model finds an optimal set of β values ​​by maximizing the log-likelihood function, so that the risk distribution predicted by the model closely matches the failure patterns observed in practice, including censored information.

[0064] Furthermore, the benchmark cumulative risk is calculated using the Breslow estimator. : In obtaining the weight coefficient estimation vector Then, the benchmark cumulative risk function is calculated using the Breslow estimator. The formula is as follows: ; in, This represents the baseline cumulative risk estimate corresponding to time t; For at any time The number of samples that failed (typically if there were no concurrent failures) ); To sum over all failure times that are earlier than or equal to the current prediction time t; The baseline cumulative risk H0(t) represents the total cumulative risk of failure occurring within the time period [0,t] when all process parameters are taken at the baseline reference level.

[0065] In mathematical definition, the baseline risk function h0(t) is the time derivative of H0(t), i.e., h0(t) = dH0(t) / dt. However, in practical engineering calculations, the focus is usually on the specific failure time point t. i The resulting risk increment ΔH0(t) i ),Right now: ; This increment can be considered as t i Instantaneous benchmark risk at any given moment.

[0066] Finally, the cumulative risk and survival probability of any combination of virtual process parameters are calculated: After obtaining the optimal weight coefficient estimation vector and benchmark cumulative risk estimate Then, for any input set of new virtual process parameters x new The corresponding cumulative risk level and survival probability can be directly derived from this.

[0067] (1) Cumulative risk level Calculation: ; The cumulative risk under this set of virtual process parameters is equal to the risk multiple of the baseline cumulative risk based on this parameter combination. (To enlarge or reduce)

[0068] (2) Probability of survival Calculation: Since there is a strict negative exponential relationship between the survival probability function and the cumulative risk function, the derivation is as follows: ; in, For a given combination of process parameters Under these conditions, the lifespan of the magnesium alloy micro-arc oxidation coating exceeds time [time value missing]. The probability of survival.

[0069] Through the aforementioned negative exponential transformation, the cumulative risk ranging from [0, +∞) is perfectly mapped to the survival probability ranging from [0, 1], and this probability increases over time. As the risk increases, the probability of survival gradually decreases monotonically, which is consistent with the physical law of failure of micro-arc oxidation coatings in corrosive environments.

[0070] When the survival risk assessment model described in this application adopts the Cox proportional hazards model, its construction method accurately processes right-censored data through the partial likelihood function, realizing the effective utilization of survival information of unfailed high-performance samples: the risk set mechanism in the partial likelihood function includes samples that have not yet failed and have not been censored into the denominator, making them participate in the estimation of weight coefficients as "survival background", thereby avoiding the prediction bias caused by the elimination or hard truncation of right-censored data in traditional regression algorithms; by taking the logarithm and derivative of the partial likelihood function, the weight coefficient estimation vector is solved using an iterative optimization algorithm, enabling the model to learn the direction and degree of influence of different process parameter combinations on failure risk; further, the Breslow estimator is used to calculate the baseline cumulative risk estimate, and combined with the survival probability formula, the cumulative risk is mapped to an intuitive survival probability, providing a reliability assessment benchmark under standard conditions for subsequent dual-mode collaborative screening; this application not only fully explores the failure law of long-life coatings and significantly improves the accuracy of high-performance coating life prediction, but also provides clear weight coefficient guidance for the directional control of process parameters, realizing the accurate characterization of the complex mapping relationship between magnesium alloy micro-arc oxidation process parameters and actual service life.

[0071] This application achieves the following significant improvements by introducing a survival risk assessment model, the SHAP interpretive framework, and a dual-mode iterative screening mechanism: First, the effective use of right-censored data eliminates systematic biases in corrosion resistance assessment. Existing technologies, employing standard regression algorithms such as linear regression, support vector regression, or artificial neural networks, cannot handle sample data that has not yet failed by the end of the experiment. Typically, this is done by removing data or rigidly setting the failure time as the observation cutoff time, resulting in predicted lifetimes generally lower than actual service lifetimes. This application, through the survival risk assessment model constructed in step 2, incorporates the survival information of unfailed samples into the model training using a likelihood function containing censored information. This allows right-censored samples to participate in model parameter estimation as a survival background, fully exploring the survival patterns contained in high-performance samples, eliminating model prediction biases caused by rigidly truncated data, and significantly improving the accuracy of long-life coating performance assessment.

[0072] Secondly, it achieves precise quantitative ranking and interaction identification of process parameters, reducing experimental costs. The micro-arc oxidation process for magnesium alloys involves numerous parameters with complex synergistic effects. Existing technologies struggle to quantify the contribution of individual parameters to performance, typically relying on experience or single-factor experiments for parameter selection, which is inefficient and prone to overlooking key parameters. This application introduces the SHAP interpretive framework in step 3. By calculating the average absolute value of the marginal contribution of each process parameter to the survival probability as global importance, it filters the set of key process parameters based on a cumulative contribution rate threshold. Furthermore, it extracts SHAP interaction values ​​between parameters, identifying parameter combinations with strong coupling relationships, such as the interaction between voltage and electrolyte concentration. Based on this, parameters with low contribution and no significant interaction are fixed as constants, while parameters with high importance and strong interactions are retained as core optimization variables. While maintaining prediction accuracy, it effectively reduces feature dimensions, decreasing the required experimental sample size by approximately 40%, significantly reducing R&D costs and time.

[0073] Third, the dual-model collaborative calibration balances the accuracy of predictions with R&D efficiency. In existing technologies, standard testing accurately reflects the service environment but is time-consuming and prone to right-censoring data. Accelerated testing quickly obtains precise failure times, but its corrosion mechanism differs from the standard environment. These two methods are often treated separately, lacking an effective cross-environment feature correlation model. This application trains a regression prediction model in step 5, using few-shot learning algorithms such as Gaussian regression, support vector regression, or Bayesian linear regression to establish a mapping relationship between process parameters and precise failure times under accelerated corrosion conditions. Step 6 establishes an iterative screening mechanism between the survival risk assessment model and the regression prediction model. The precise failure times from accelerated testing are used to perform cross-environment calibration of the survival probability under the standard environment, eliminating process parameter combinations with inconsistent or abnormally correlated predictions. This ensures that the prediction model possesses both physical accuracy under the standard environment and high-precision correction from accelerated experiments, significantly improving the model's generalization ability and reliability in cross-environment applications and shortening the process optimization cycle.

[0074] In summary, this application constructs a predictive model that is compatible with non-fixed labels and has cross-environment extrapolation capabilities by combining the ability of survival analysis to process right-censored data with the regression calibration capability of accelerated testing. This enables the accurate characterization of the complex mapping relationship between the micro-arc oxidation process parameters of magnesium alloys and their actual service life within a short experimental period, providing reliable technical support for the directional design of high-performance magnesium alloy coatings.

[0075] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0076] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for optimizing the process parameters of micro-arc oxidation of magnesium alloys, characterized in that, The method includes: Step 1: Perform global uniform sampling within the process parameter space of magnesium alloy micro-arc oxidation to construct an initial dataset; each sample in the initial dataset includes a set of process parameters and the failure time and right censoring status identifier obtained under standard environmental corrosion resistance test. Step 2: Based on the initial dataset, construct a survival risk assessment model; the survival risk assessment model is used to process the right censoring status identifier and output the survival probability of any combination of process parameters; Step 3: Based on the initial dataset, use the SHAP interpretive framework to calculate the marginal contribution value of each process parameter to the survival probability, and select the set of key process parameters based on the marginal contribution value. Step 4: Determine multiple virtual process parameter combinations within the parameter space of the set of key process parameters, calculate the survival probability of each virtual process parameter combination using the survival risk assessment model, and filter multiple candidate process parameter combinations according to a preset survival probability threshold. Step 5: Perform accelerated corrosion tests on the multiple candidate process parameter combinations to obtain the corresponding exact failure time, and train a regression prediction model based on all the obtained exact failure times and their corresponding candidate process parameters. Step 6: Using the survival risk assessment model and the regression prediction model, predict the survival probability and failure time of the multiple candidate process parameter combinations, respectively, and screen out the process parameter combinations that meet the preset performance targets based on the joint comparison of the two prediction results. Step 7: Perform supplementary standard environment corrosion resistance tests on the process parameter combinations selected in Step 6, update the test results to the initial dataset, and retrain the survival risk assessment model based on the updated initial dataset. Step 8: Repeat steps 4 to 7 until the preset convergence condition is met, and output the parameter range formed by the combination of process parameters selected in step 6 in the last iteration as the optimal value range of each process parameter.

2. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 1, characterized in that, The survival risk assessment model described in step 2 is determined by comparing the consistency indices of the Cox proportional hazards model, the random survival forest model, or other survival models.

3. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 2, characterized in that, When the survival risk assessment model is a Cox proportional hazards model, its construction method includes: The weighting coefficients of each process parameter are estimated using a partial likelihood function; the expression for the partial likelihood function is: ; Where k is the total number of unique failure time points in the initial dataset where actual failure events occur; Let i be the specific time when the failure occurs, and let the failure times be sorted in chronological order. For at any time The vector of process parameters corresponding to the failed sample; For a moment The risk set, that is, at time... The set of all samples that have not yet expired and have not been censored, including samples that subsequently expired and right-censored samples; For risk collection The process parameter vector of the j-th sample; By taking the logarithm and derivative of the partial likelihood function, an iterative optimization algorithm is used to solve for the weight coefficient vector that maximizes the partial likelihood function, thus obtaining the weight coefficient estimation vector. The baseline cumulative risk estimate is calculated using the Breslow estimator, and the survival probability for any combination of process parameters is calculated using the following formula: ; in, The survival probability of process parameter combination x at time t Rate, As the baseline cumulative risk estimate, This is an estimate of the weighting coefficients.

4. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 1, characterized in that, Step 3 involves selecting a set of key process parameters based on the marginal contribution value, specifically including: The average absolute value of the marginal contribution of each process parameter across all samples is calculated as the global importance. The parameters are sorted from largest to smallest global importance and the cumulative contribution rate is calculated. The process parameters included when the cumulative contribution rate first reaches a preset threshold are determined as the set of key process parameters.

5. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 1, characterized in that, Step 4 describes determining multiple combinations of virtual process parameters using Bayesian sampling or super Latin square sampling methods.

6. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 1, characterized in that, Step 6, which involves a collaborative comparison of the two prediction results to select process parameter combinations that meet the preset performance targets, specifically includes: Process parameter combinations that are inconsistent between the predicted survival probability and the predicted failure time are excluded. The inconsistency refers to the predicted survival probability being higher than a first preset threshold and the predicted failure time being lower than a second preset threshold, or the predicted survival probability being lower than the first preset threshold and the predicted failure time being higher than the second preset threshold.

7. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 1, characterized in that, The preset convergence conditions mentioned in step 8 include: In two consecutive iterations, the rate of change of the parameter range formed by the combination of process parameters selected in step 6 was lower than the preset rate of change threshold.

8. The method for optimizing the process parameters of magnesium alloy micro-arc oxidation according to claim 1, characterized in that, The global uniform sampling described in step 1 is implemented using the super Latin square sampling method.