Data-driven method and system for constructing aluminum alloy composition-corrosion resistance prediction models
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]为此,本发明实施例提供了一种数据驱动的铝合金成分-耐蚀性预测模型构建方法及系统,用于解决现有技术中忽略数据质量差异、特征交互作用缺失以及模型正则化与物理机制脱节,导致预测精度低、泛化能力差的问题
第一,本发明通过引入数据置信度权重、自适应LOF异常检测及同类置信度样本中位数填充,有效控制了数据源质量差异和异常值干扰;同时采用二阶互信息筛选特征对生成交互项,构建增强特征集,并结合自适应弹性网络正则化(重要特征L2惩罚减弱、冗余特征受更强约束),经贝叶斯优化与交叉验证筛选最优模型。经典型Al-Si系铸造合金验证,预测自腐蚀电流与实测值高度一致,决定系数R²可达0.85以上,泛化性能显著优于传统机器学习方法。
Smart Images

Figure CN122392700B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of material property prediction technology, and in particular to a data-driven method and system for constructing a prediction model for the composition and corrosion resistance of aluminum alloys. Background Technology
[0002] Aluminum alloys, with their excellent lightweight properties, have become key materials for energy conservation and carbon reduction in the transportation sector. Among them, Al-Si aluminum alloys, due to their good fluidity, low hot cracking tendency, excellent casting performance, and good mechanical properties and corrosion resistance, are widely used in critical components such as automotive engine blocks, wheel hubs, and transmission housings. However, in harsh conditions such as marine environments, industrial atmospheres, or saline media, the corrosion problem of Al-Si aluminum alloys remains prominent, severely restricting their service life and further expansion of application range. Research shows that the corrosion resistance of an alloy is the result of the combined effects of its composition, microstructure, and heat treatment process, with alloy composition design being the fundamental means of controlling corrosion resistance. Therefore, developing efficient and accurate methods for predicting the relationship between alloy composition and corrosion resistance is of great significance for accelerating the research and development of corrosion-resistant aluminum alloys.
[0003] Traditional research on the corrosion resistance of aluminum alloys mainly relies on the "trial and error" experimental model, which involves preparing a large number of alloy samples with different compositions, conducting electrochemical tests and corrosion morphology characterization, and gradually screening and optimizing the composition. This model has obvious shortcomings: First, the experimental cycle is long and the cost is high, and a single composition optimization often takes several weeks or even months; Second, the composition design is largely blind and it is easy to repeatedly enter the proven ineffective composition range, resulting in a waste of resources; Third, the large amount of experimental data accumulated in the literature is difficult to effectively integrate and utilize due to the diverse sources, different test conditions, and inconsistent data quality. In recent years, data-driven machine learning methods have provided new ideas for predicting material properties. Some researchers have tried to use algorithms such as random forests and support vector machines to establish a mapping model between alloy composition and corrosion resistance. However, existing methods generally have the following problems: (1) they do not fully consider the quality differences of data from different sources and treat all samples with equal weight; (2) they ignore the synergistic effect of nonlinear interactions between features on corrosion resistance; (3) the model regularization strategy is disconnected from the physical mechanism, making it difficult to distinguish between important features and redundant features. Therefore, it is urgent to establish a systematic and high-precision method for predicting the corrosion resistance of aluminum alloys to overcome the above-mentioned technical defects. Summary of the Invention
[0004] To address this, embodiments of the present invention provide a data-driven method and system for constructing an aluminum alloy composition-corrosion resistance prediction model, which solves the problems of low prediction accuracy and poor generalization ability caused by ignoring data quality differences, missing feature interactions, and the disconnect between model regularization and physical mechanisms in the prior art.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide a data-driven method for constructing an aluminum alloy composition-corrosion resistance prediction model, the method comprising the following steps: Step S1: Extract alloy composition parameters and self-corrosion current data from Al-Si aluminum alloy literature and research data to construct an initial dataset, and assign reliability weights to each data set according to literature level, test method standardization, and number of parallel tests. ; Step S2: Based on the confidence weights obtained in Step S1, the adaptive local anomaly factor method is used to detect and remove outliers. Missing values are filled with the median of the same feature in samples of the same confidence level. Then, all features are standardized by Z-score to obtain a standardized dataset. Step S3: Based on the standardized dataset obtained in step S2, the linear correlation between each feature and the target value is analyzed using the Pearson correlation coefficient, and the second-order mutual information between any two features and the target value is calculated. Feature pairs with mutual information greater than the threshold are selected to generate interaction terms, and the interaction terms are merged with the original features to form an enhanced feature set. Step S4: Divide the enhanced feature set obtained in step S3 into training set and test set according to the proportion, select multiple machine learning algorithms as candidate models, and introduce adaptive elastic network regularization in model training. The regularization term dynamically adjusts the L2 penalty strength according to the feature importance. Combine five-fold cross-validation and Bayesian optimization to select the optimal model, and use the coefficient of determination and root mean square error as evaluation indicators. Step S5: Based on the optimal model selected in Step S4, use the SHAP method to perform interpretability analysis, quantify the contribution direction and degree of each feature to the prediction results, and output the key feature sequence affecting corrosion resistance. Step S6: Select a variety of typical Al-Si cast aluminum alloys, use the optimal model obtained in step S4 to predict their self-corrosion current, and prepare corresponding alloy samples to carry out electrochemical testing and corrosion morphology characterization to verify the reliability of the model prediction.
[0006] Preferably, in step S1, the confidence weight The calculation formula is: ; in, This is the document ranking coefficient. This is the standardization coefficient of the test method. The number of parallel tests. The maximum number of parallel tests in the dataset; For preset weighting coefficients and .
[0007] Preferably, in step S2, the adaptive local anomaly factor method has a neighborhood radius parameter. Adaptively adjust based on the local density of each sample: ; in, For the total sample size, For the first The ratio of the local density of a sample to the global average density; the same confidence sample refers to the top 30% of high confidence samples after sorting the samples by confidence weight from high to low.
[0008] Preferably, in step S3, the second-order mutual information is calculated as follows: for any two component features and Calculate joint features With target value Mutual information between The formula is as follows: ; in, for and The joint probability density function, for The marginal probability density function, for The marginal probability density function; Mutual information value greater than threshold Features for generating interaction items ,in Features and The Pearson correlation coefficient between them is used; then the selected interaction terms are combined with the original component features to form an enhanced feature set.
[0009] Preferably, in step S4, the introduction of adaptive elastic network regularization during model training improves the model objective function. for: ; in, The total number of training samples. Here is the loss function, used to measure the loss of the first... The true value of each sample Compared with model predictions The differences between them This represents the total number of regression trees. For the first The structural complexity penalty term of a regression tree The total number of features, For the first The coefficients of each feature in the model To adjust the parameters, For the first The importance score of each feature in the initial model. , where L1 and L2 are the regularization coefficients; this objective function reduces the L2 penalty on important features and imposes stronger constraints on redundant features.
[0010] Preferably, in step S4, the various machine learning algorithms include linear regression, multilayer perceptron, decision tree, random forest, gradient boosting decision tree, support vector machine, XGBoost, CatBoost, and LightGBM; the five-fold cross-validation and Bayesian optimization aim to maximize the determination coefficient of cross-validation; the determination coefficient The formulas for calculating the root mean square error (RMSE) are as follows: , ; in, For the first The true value of each sample For the first The model prediction value for each sample. The arithmetic mean of all true values in the samples is calculated using the following formula: , This represents the total number of training samples.
[0011] Preferably, in step S5, the SHAP method outputs the SHAP value of each feature of each sample, quantifies the influence direction and contribution of the feature on the prediction result, and summarizes all samples to obtain the global feature importance ranking, thereby revealing the intrinsic correlation law between the composition and corrosion resistance of Al-Si system cast aluminum alloys.
[0012] Preferably, in step S6, the typical Al-Si cast aluminum alloy includes Al-9Si-0.4Fe, Al-9Si-0.4Fe-0.2Mn, Al-9Si-0.4Fe-0.2Mn-0.03Sr, and Al-9Si-0.4Fe-0.2Mn-0.03Sr-0.3V; the electrochemical test is carried out in a 3.5% NaCl solution, and the measured value of self-corrosion current is obtained by polarization curve test, which is compared with the model prediction value to verify the reliability of the prediction.
[0013] This invention also provides a data-driven aluminum alloy composition-corrosion resistance prediction model construction system. This system is used to implement the aforementioned data-driven aluminum alloy composition-corrosion resistance prediction model construction method, specifically including: The data acquisition and weighting module is used to extract alloy composition parameters and self-corrosion current data from Al-Si aluminum alloy literature and research data, construct an initial dataset, and assign reliability weights to each data set according to literature level, test method standardization, and the number of parallel tests. ; The data preprocessing module is used to detect and remove outliers based on confidence weights using the adaptive local anomaly factor method. Missing values are filled with the median of the same feature in samples of the same confidence level. Then, all features are standardized by Z-score to obtain a standardized dataset. The feature enhancement module is used to analyze the linear correlation between each feature and the target value based on a standardized dataset using the Pearson correlation coefficient, calculate the second-order mutual information between any two features and the target value, filter feature pairs with mutual information greater than a threshold to generate interaction terms, and merge the interaction terms with the original features to form an enhanced feature set. The model training and optimization module is used to divide the enhanced feature set into training and test sets according to a certain ratio, select a variety of machine learning algorithms as candidate models, and introduce adaptive elastic network regularization in model training. This regularization term dynamically adjusts the L2 penalty strength according to the importance of features. The optimal model is selected by combining five-fold cross-validation and Bayesian optimization, and the coefficient of determination and root mean square error are used as evaluation indicators. The interpretability analysis module is used to perform interpretability analysis based on the optimal model using the SHAP method, quantify the direction and degree of contribution of each feature to the prediction results, and output the key feature sequence that affects corrosion resistance. The model validation module is used to select a variety of typical Al-Si cast aluminum alloys, use the optimal model to predict their self-corrosion current, and prepare corresponding alloy samples to carry out electrochemical testing and corrosion morphology characterization to verify the reliability of the model prediction.
[0014] This invention also provides an electronic device, which includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to realize the data-driven aluminum alloy composition-corrosion resistance prediction model construction method described above.
[0015] As can be seen from the above technical solutions, this invention application has the following beneficial effects: First, this invention effectively controls data source quality differences and outlier interference by introducing data confidence weights, adaptive LOF anomaly detection, and median padding of similar confidence samples. Simultaneously, it employs second-order mutual information to filter feature pairs and generate interaction terms, constructing an enhanced feature set. Combined with adaptive elastic network regularization (reduced L2 penalty for important features and stronger constraints on redundant features), the optimal model is selected through Bayesian optimization and cross-validation. Validation on classic Al-Si cast alloys shows a high degree of consistency between the predicted self-corrosion current and the measured value, with a determination coefficient R² exceeding 0.85, demonstrating significantly better generalization performance than traditional machine learning methods.
[0016] Second, based on Pearson linear correlation analysis, this invention introduces second-order mutual information quantification to assess the nonlinear predictive contribution of any two alloy composition features to the target variable. It filters feature pairs with mutual information greater than a threshold to generate product interaction terms and multiplies them by the correlation coefficient, thereby effectively extracting the influence of synergistic or antagonistic effects between elements on corrosion resistance. This solves the problem of prediction bias caused by neglecting feature interactions in existing methods.
[0017] Third, this invention conducts SHAP interpretability analysis based on the optimal model, quantifies the contribution direction and degree of each alloying element and interaction term to the self-corrosion current, outputs the global feature importance ranking, and reveals physical laws such as magnesium increasing and decreasing corrosion resistance, and iron and other elements synergistically improving corrosion resistance. Through dual verification by electrochemical testing and corrosion morphology characterization of typical alloys, the prediction results have clear physical basis and experimental support, providing reliable guidance for the composition design of corrosion-resistant aluminum alloys. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Referring to the drawings will make the features and advantages of the present invention clearer. The drawings are illustrative and should not be construed as limiting the present invention in any way. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 A flowchart illustrating a data-driven method for constructing an aluminum alloy composition-corrosion resistance prediction model provided by this invention; Figure 2 A heatmap showing the correlation coefficients between elements and between each element and the corrosion current; Figure 3 The diagram illustrates the prediction performance of nine machine learning models on the dataset, where (a) shows a comparison of default parameters, (b) shows a comparison after hyperparameter optimization, and (c) shows a comparison of the predicted values of the optimal model with the experimental values. Figure 4 This is a schematic diagram illustrating the optimal experimental hyperparameters for each machine learning model. Figure 5 A scatter plot of SHAP feature importance; Figure 6 This is a schematic diagram of the dynamic potential polarization curves of four alloys after exposure to 3.5% NaCl solution for 48 hours. Figure 7 The diagram shows the predicted and measured values of the self-corrosion current for four alloys, and a ranking of corrosion resistance based on the measured values. Figure 8 The diagram shows the corrosion morphology of the alloy surface, where (a) represents Al-9Si-0.4Fe-0.2Mn-0.03Sr and (b) represents Al-9Si-0.4Fe-0.2Mn-0.03Sr-0.3V. Figure 9 This is a block diagram of a data-driven aluminum alloy composition-corrosion resistance prediction model construction system provided by the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Example 1: To address the problems of low prediction accuracy and poor generalization ability caused by neglecting data quality differences, missing feature interactions, and the disconnect between model regularization and physical mechanisms in existing technologies, this embodiment proposes a data-driven method for constructing an aluminum alloy composition-corrosion resistance prediction model. Figure 1 As shown, the method includes the following steps S1 to S6.
[0021] Step S1: Extract alloy composition parameters and self-corrosion current data from Al-Si aluminum alloy literature and research data to construct an initial dataset, and assign reliability weights to each data set according to literature level, test method standardization, and number of parallel tests. .
[0022] Specifically, literature focusing on Al-Si aluminum alloys was selected from publicly available academic databases such as Google Scholar, Web of Science, and CNKI. The alloy composition parameters (such as the content of elements such as Si, Mg, Fe, Mn, Sr, and V) and self-corrosion current data published in the literature were extracted to construct an initial dataset.
[0023] At the same time, reliability weights are assigned to each data set based on the type of literature from the data source, the standardization of the testing method, and the number of parallel tests conducted. The weight calculation formula is: ; in, Document ranking coefficient: 1 for SCI-indexed or core journals, 0.6 for ordinary journals, and 0.4 for conference papers; The test method standardization coefficient is 1 for standard electrochemical tests (such as GB / T 24196-2009 or ASTM G59) and 0.5 for non-standard tests. The number of parallel tests. The maximum number of parallel tests in the dataset; As a preset weighting coefficient, this embodiment takes... , , ,and .
[0024] Step S2: Based on the confidence weights obtained in Step S1, the adaptive local anomaly factor method is used to detect and remove outliers. Missing values are filled with the median of the same feature in the same confidence samples. Then, all features are standardized by Z-score to obtain a standardized dataset.
[0025] Specifically, based on the confidence weights obtained in step S1, the Adaptive Local Outlier Factor (LOF) method is used for outlier detection. The neighborhood parameters of traditional LOF... For a fixed value, this invention adaptively adjusts the neighborhood radius parameter based on the local density of each sample. : ; in, For the total sample size, For the first The ratio of the local density of each sample to the global average density. Outliers are removed.
[0026] For missing values, the median of this feature among samples of the same confidence level is used for imputation. Specifically, samples are weighted according to their confidence levels. Sort the samples from highest to lowest confidence and take the top 30% of high-confidence samples as samples of the same confidence level. Calculate the median of each feature in these samples and use it to fill in the missing values of the corresponding feature.
[0027] Finally, Z-score standardization is performed on all features to make the mean of each feature 0 and the standard deviation 1, so as to eliminate the difference in units and obtain a standardized dataset.
[0028] Step S3: Based on the standardized dataset obtained in Step S2, Pearson correlation coefficient is used to analyze the linear correlation between each feature and the target value, and the second-order mutual information between any two features and the target value is calculated. Feature pairs with mutual information greater than the threshold are selected to generate interaction terms, and the interaction terms are merged with the original features to form an enhanced feature set.
[0029] Specifically, based on the standardized dataset obtained in step S2, the Pearson correlation coefficient method is first used to calculate the pairwise correlations between the alloy composition characteristics, heat treatment process parameters, and the target variable (self-corrosion current), and a correlation heatmap is plotted (see...). Figure 2 ).Depend on Figure 2 It can be seen that, apart from the extremely strong correlation between Al and Si elements and between aging temperature 2 and aging time 2, the absolute values of the linear correlation coefficients between other features and between features and the target variable do not exceed 0.95, indicating that there is no extremely strong linear relationship and the redundancy between variables is low. All features can be retained for subsequent modeling.
[0030] Based on the above linear correlation analysis, we further introduce the construction and screening of second-order mutual information interaction terms: (1) For any two component features and Calculate their mutual information joint features With target value Mutual information between them: ; in, for and The joint probability density function, for The marginal probability density function, for The marginal probability density function.
[0031] (2) Mutual information values greater than the threshold Features Generate interactive items: ; in, Features and The Pearson correlation coefficient between them.
[0032] (3) The selected interaction items and the original component features are combined to form an enhanced feature set, which replaces the original features for subsequent modeling.
[0033] Step S4: Divide the enhanced feature set obtained in step S3 into training set and test set according to the proportion, select multiple machine learning algorithms as candidate models, and introduce adaptive elastic network regularization in model training. The regularization term dynamically adjusts the L2 penalty strength according to the feature importance. Combine five-fold cross-validation and Bayesian optimization to select the optimal model, and use the coefficient of determination and root mean square error as evaluation indicators.
[0034] Specifically, the enhanced feature set obtained in step S3 is divided into a training set and a test set in an 8:2 ratio, whereby the training set is used for model training and hyperparameter optimization, and the test set is used for model generalization performance verification.
[0035] A variety of classic machine learning algorithms were selected as candidate models, including linear regression (LR), multilayer perceptron (MLP), decision tree (DT), random forest (RF), gradient boosting decision tree (GBT), support vector machine (SVM), and ensemble learning algorithms such as XGBoost, CatBoost, and LightGBM.
[0036] In model training, this invention introduces adaptive elastic network regularization, and the improved model objective function... for: ; in, The total number of training samples, For the first Confidence weights for each sample; The loss function is used to measure the true value. Compared with the predicted value The differences between them; This represents the total number of regression trees. For the first The structural complexity penalty term for a regression tree; For the total number of features, For the first Model coefficients for each feature; These are the L1 and L2 regularization coefficients. For the first The importance score of each feature in the initial model. To adjust the parameters (in this embodiment, we take...) ).
[0037] This objective function makes important features ( The L2 penalty on large features is reduced (because the Sigmoid function value approaches 0), redundant features are subject to stronger L2 constraints, while the L1 terms remain sparsity.
[0038] Hyperparameter optimization employs a combination of 5-fold cross-validation and Bayesian optimization. The search scope is , The search scope is The optimization objective is to maximize the coefficient of determination of cross-validation. Maximize. Finally, obtain the optimal hyperparameter combination and corresponding stability score for each candidate model.
[0039] With the coefficient of determination The root mean square error (RMSE) is the core evaluation metric. , ; in, .
[0040] Based on independent test set data, the candidate models were compared. The model with the highest prediction accuracy and the strongest generalization ability is selected as the best model by combining RMSE and other factors.
[0041] Figure 3 The predictive performance of nine machine learning models on the dataset is shown. Figure 3 In the middle (a), the RMSE and RMSE values are the default parameters. contrast; Figure 3 In the middle (b), the RMSE and hyperparameters are optimized. contrast; Figure 3 In Figure (c), the experimental and predicted self-corrosion currents of the optimal model (improved CatBoost) are compared. The results show that the CatBoost model with adaptive elastic network regularization performs optimally, with the best results observed on both the training and test sets. The values were 0.892 and 0.851, respectively, and the RMSE values were 0.312 and 0.298, respectively. Figure 4 The optimal experimental hyperparameters for various machine learning models have been summarized.
[0042] Step S5: Based on the optimal model selected in Step S4, use the SHAP method to perform interpretability analysis, quantify the contribution direction and degree of each feature to the prediction results, and output the key feature sequence that affects corrosion resistance.
[0043] Specifically, based on the optimal model (improved CatBoost) selected in step S4, interpretability analysis is performed using the SHAP method. SHAP values output the contribution of each feature to each sample, quantifying the direction and degree of feature influence on the prediction results. The overall feature importance ranking is obtained by summarizing all samples (see...). Figure 5 This reveals the intrinsic correlation between composition and corrosion resistance in Al-Si cast aluminum alloys.
[0044] Figure 5The display shows that a high magnesium (Mg) content in the alloy corresponds to a positive SHAP value, indicating that an increase in magnesium content will increase the self-corrosion current and reduce corrosion resistance—excess magnesium easily precipitates a continuous β phase along the grain boundaries. Iron (Fe) content leads to intergranular corrosion; high iron (Fe) content corresponds to a negative SHAP value, that is, increased iron content will reduce self-corrosion current and improve corrosion resistance. This phenomenon may be related to the synergistic effect of iron with other elements (such as manganese and silicon).
[0045] Step S6: Select a variety of typical Al-Si cast aluminum alloys, use the optimal model obtained in step S4 to predict their self-corrosion current, and prepare corresponding alloy samples to carry out electrochemical testing and corrosion morphology characterization to verify the reliability of the model prediction.
[0046] Specifically, to verify the reliability of the constructed corrosion resistance prediction model, four typical Al-Si cast aluminum alloys were selected: Al-9Si-0.4Fe, Al-9Si-0.4Fe-0.2Mn, Al-9Si-0.4Fe-0.2Mn-0.03Sr, and Al-9Si-0.4Fe-0.2Mn-0.03Sr-0.3V. The optimal model obtained in step S4 was used to predict the self-corrosion current, and corresponding alloy samples were prepared. Electrochemical tests (polarization curve testing) and surface corrosion morphology characterization were performed in 3.5% NaCl solution.
[0047] Figure 6 The dynamic potential polarization curves of the four alloys are shown. The measured values of the self-corrosion current density of each alloy are extracted by the Tafel extrapolation method. Figure 7 The predicted and measured values of self-corrosion current for four alloys were summarized, and their corrosion resistance was ranked based on the measured values. The results show that the predicted self-corrosion current and the experimental measured values exhibit a high degree of consistency in trend: the Al-9Si-0.4Fe-0.2Mn-0.03Sr alloy has the lowest predicted and measured self-corrosion current, indicating the best corrosion resistance; the Al-9Si-0.4Fe-0.2Mn-0.03Sr-0.3V alloy has the highest predicted and measured self-corrosion current, indicating the worst corrosion resistance. The relative errors between the predicted and measured values for each alloy are within a reasonable range, confirming that the constructed model has good predictive accuracy and generalization ability.
[0048] Figure 8 Comparison of corrosion morphology on alloy surfaces: Figure 8 In the middle (a), the best corrosion-resistant alloy Al-9Si-0.4Fe-0.2Mn-0.03Sr was observed, with only localized shallow corrosion and an intact matrix. Figure 8 In the middle (b) is the worst corrosion-resistant alloy, Al-9Si-0.4Fe-0.2Mn-0.03Sr-0.3V, with deep and dense pits and severe damage to the matrix. The surface morphology differences perfectly match the self-corrosion current and model prediction results.
[0049] In summary, the data-driven aluminum alloy composition-corrosion resistance prediction model construction method proposed in this invention significantly improves the prediction accuracy and reliability of the corrosion resistance performance of Al-Si cast aluminum alloys by introducing data confidence weights, adaptive LOF anomaly detection, mutual information-driven interaction term construction, and feature importance-aware adaptive elastic network regularization. This provides an efficient and interpretable computational tool for the composition design of corrosion-resistant aluminum alloys.
[0050] Example 2: This embodiment provides a data-driven aluminum alloy composition-corrosion resistance prediction model construction system to implement the method described in Embodiment 1. Figure 9 As shown, the system specifically includes: The data acquisition and weighting module 100 is used to extract alloy composition parameters and self-corrosion current data from Al-Si aluminum alloy literature and research data, construct an initial dataset, and assign reliability weights to each data set according to the literature level, test method standardization, and number of parallel tests. ; The data preprocessing module 200 is used to detect and remove outliers based on confidence weights using an adaptive local anomaly factor method. Missing values are filled with the median of the same feature in samples of the same confidence level. Then, all features are standardized by Z-score to obtain a standardized dataset. The feature enhancement module 300 is used to analyze the linear correlation between each feature and the target value based on a standardized dataset using the Pearson correlation coefficient, calculate the second-order mutual information between any two features and the target value, filter feature pairs with mutual information greater than a threshold to generate interaction terms, and merge the interaction terms with the original features to form an enhanced feature set. The model training and optimization module 400 is used to divide the enhanced feature set into training set and test set according to the proportion, select multiple machine learning algorithms as candidate models, and introduce adaptive elastic network regularization in model training. This regularization term dynamically adjusts the L2 penalty strength according to the feature importance. Combined with five-fold cross-validation and Bayesian optimization, the optimal model is selected, and the coefficient of determination and root mean square error are used as evaluation indicators. The interpretability analysis module 500 is used to perform interpretability analysis based on the optimal model using the SHAP method, quantify the contribution direction and degree of each feature to the prediction results, and output the key feature sequence that affects corrosion resistance. The model verification module 600 is used to select a variety of typical Al-Si cast aluminum alloys, use the optimal model to predict their self-corrosion current, and prepare corresponding alloy samples to carry out electrochemical testing and corrosion morphology characterization to verify the reliability of the model prediction.
[0051] This embodiment provides a data-driven aluminum alloy composition-corrosion resistance prediction model construction system, used to implement the aforementioned data-driven aluminum alloy composition-corrosion resistance prediction model construction method. Therefore, the specific implementation of the data-driven aluminum alloy composition-corrosion resistance prediction model construction system can be found in the embodiment section of the data-driven aluminum alloy composition-corrosion resistance prediction model construction method described above. For example, the data acquisition and weighting module 100, data preprocessing module 200, feature enhancement module 300, model training and optimization module 400, interpretability analysis module 500, and model verification module 600 are respectively used to implement steps S1, S2, S3, S4, S5, and S6 in the aforementioned data-driven aluminum alloy composition-corrosion resistance prediction model construction method. Therefore, its specific implementation can be referred to the description of the corresponding embodiments. To avoid redundancy, it will not be repeated here.
[0052] Example 3: This invention provides an electronic device, which includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to realize the above-mentioned data-driven aluminum alloy composition-corrosion resistance prediction model construction method.
[0053] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0055] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0056] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A data-driven method for constructing an aluminum alloy composition-corrosion resistance prediction model, characterized in that, Includes the following steps: Step S1: Extract alloy composition parameters and self-corrosion current data from Al-Si aluminum alloy literature and research data to construct an initial dataset, and assign reliability weights to each data set according to literature level, test method standardization, and number of parallel tests. ; Step S2: Based on the confidence weights obtained in Step S1, the adaptive local anomaly factor method is used to detect and remove outliers. Missing values are filled with the median of the same feature in samples of the same confidence level. Then, all features are standardized by Z-score to obtain a standardized dataset. Step S3: Based on the standardized dataset obtained in step S2, the linear correlation between each feature and the target value is analyzed using the Pearson correlation coefficient, and the second-order mutual information between any two features and the target value is calculated. Feature pairs with mutual information greater than the threshold are selected to generate interaction terms, and the interaction terms are merged with the original features to form an enhanced feature set. Step S4: Divide the enhanced feature set obtained in step S3 into training set and test set according to the proportion, select multiple machine learning algorithms as candidate models, and introduce adaptive elastic network regularization in model training. The regularization term dynamically adjusts the L2 penalty strength according to the feature importance. Combine five-fold cross-validation and Bayesian optimization to select the optimal model, and use the coefficient of determination and root mean square error as evaluation indicators. Among these, adaptive elastic network regularization is introduced during model training, which improves the model objective function. for: ; in, The total number of training samples. Here is the loss function, used to measure the loss of the first... The true value of each sample Compared with model predictions The differences between them This represents the total number of regression trees. For the first The structural complexity penalty term for a regression tree. The total number of features, For the first The coefficients of each feature in the model. To adjust the parameters, For the first The importance score of each feature in the initial model. , where L1 and L2 are the regularization coefficients; this objective function reduces the L2 penalty on important features and imposes stronger constraints on redundant features; Step S5: Based on the optimal model selected in Step S4, use the SHAP method to perform interpretability analysis, quantify the contribution direction and degree of each feature to the prediction results, and output the key feature sequence affecting corrosion resistance. Step S6: Select a variety of typical Al-Si cast aluminum alloys, use the optimal model obtained in step S4 to predict their self-corrosion current, and prepare corresponding alloy samples to carry out electrochemical testing and corrosion morphology characterization to verify the reliability of the model prediction.
2. The data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to claim 1, characterized in that, In step S1, the confidence weight The calculation formula is: ; in, This is the document ranking coefficient. This is the standardization coefficient of the test method. The number of parallel tests. The maximum number of parallel tests in the dataset; For preset weighting coefficients and .
3. The data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to claim 1, characterized in that, In step S2, the adaptive local anomaly factor method has a neighborhood radius parameter. Adaptively adjust based on the local density of each sample: ; in, For the total sample size, For the first The ratio of the local density of a sample to the global average density; the same confidence sample refers to the top 30% of high confidence samples after sorting the samples by confidence weight from high to low.
4. The data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to claim 1, characterized in that, In step S3, the second-order mutual information is calculated as follows: for any two component features and Calculate joint features With target value Mutual information between The formula is as follows: ; in, for and The joint probability density function, for The marginal probability density function, for The marginal probability density function; Mutual information value greater than threshold Features for generating interaction items ,in Features and The Pearson correlation coefficient between them is used; then the selected interaction terms are combined with the original component features to form an enhanced feature set.
5. The data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to claim 1, characterized in that, In step S4, the various machine learning algorithms include linear regression, multilayer perceptron, decision tree, random forest, gradient boosting decision tree, support vector machine, XGBoost, CatBoost, and LightGBM; the five-fold cross-validation and Bayesian optimization aim to maximize the decision coefficient of cross-validation; the decision coefficient... The formulas for calculating the root mean square error (RMSE) are as follows: , ; in, For the first The true value of each sample For the first The model prediction value for each sample. The arithmetic mean of all true values in the samples is calculated using the following formula: , This represents the total number of training samples.
6. The data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to claim 1, characterized in that, In step S5, the SHAP method outputs the SHAP value of each feature of each sample, quantifies the influence direction and contribution of the feature on the prediction result, and summarizes all samples to obtain the global feature importance ranking, thereby revealing the intrinsic correlation between composition and corrosion resistance of Al-Si cast aluminum alloys.
7. The data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to claim 1, characterized in that, In step S6, the typical Al-Si cast aluminum alloys include Al-9Si-0.4Fe, Al-9Si-0.4Fe-0.2Mn, Al-9Si-0.4Fe-0.2Mn-0.03Sr, and Al-9Si-0.4Fe-0.2Mn-0.03Sr-0.3V; the electrochemical test is carried out in a 3.5% NaCl solution, and the measured value of self-corrosion current is obtained by polarization curve test, which is compared with the model prediction value to verify the reliability of the prediction.
8. A data-driven system for constructing a composition-corrosion resistance prediction model for aluminum alloys, characterized in that, The system is used to implement the data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to any one of claims 1 to 7, specifically including: The data acquisition and weighting module is used to extract alloy composition parameters and self-corrosion current data from Al-Si aluminum alloy literature and research data, construct an initial dataset, and assign reliability weights to each data set according to literature level, test method standardization, and the number of parallel tests. ; The data preprocessing module is used to detect and remove outliers based on confidence weights using the adaptive local anomaly factor method. Missing values are filled with the median of the same feature in samples of the same confidence level. Then, all features are standardized by Z-score to obtain a standardized dataset. The feature enhancement module is used to analyze the linear correlation between each feature and the target value based on a standardized dataset using the Pearson correlation coefficient, calculate the second-order mutual information between any two features and the target value, filter feature pairs with mutual information greater than a threshold to generate interaction terms, and merge the interaction terms with the original features to form an enhanced feature set. The model training and optimization module is used to divide the enhanced feature set into training and test sets according to a certain ratio, select a variety of machine learning algorithms as candidate models, and introduce adaptive elastic network regularization in model training. This regularization term dynamically adjusts the L2 penalty strength according to the importance of features. The optimal model is selected by combining five-fold cross-validation and Bayesian optimization, and the coefficient of determination and root mean square error are used as evaluation indicators. The interpretability analysis module is used to perform interpretability analysis based on the optimal model using the SHAP method, quantify the direction and degree of contribution of each feature to the prediction results, and output the key feature sequence that affects corrosion resistance. The model validation module is used to select a variety of typical Al-Si cast aluminum alloys, use the optimal model to predict their self-corrosion current, and prepare corresponding alloy samples to carry out electrochemical testing and corrosion morphology characterization to verify the reliability of the model prediction.
9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a bus system. The processor and the memory are connected through the bus system. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the data-driven aluminum alloy composition-corrosion resistance prediction model construction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Titanium alloy stress corrosion critical stress intensity factor prediction method
CN116110526A
Device for predicting aluminum product properties, method for predicting aluminum product properties, control program, and storage medium
US20200024712A1