Stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning
Through virtual sample generation and transfer learning methods, the shortcomings of traditional methods in predicting stainless steel corrosion rate under small sample conditions were solved, high-fidelity virtual data was generated and knowledge transfer was realized, which improved the prediction accuracy and adaptability.
Patent Information
- Application Number
- CN202510835402.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-10-21
AI Technical Summary
Traditional corrosion rate prediction methods are difficult to effectively capture the nonlinear corrosion dynamics characteristics under the coupling of multiple factors, and machine learning models are prone to overfitting or insufficient generalization performance under small sample conditions, resulting in inaccurate stainless steel corrosion prediction results.
High-fidelity virtual corrosion data that conforms to physical constraints is generated through virtual sample generation technology. Combined with the transfer learning method, existing alloy corrosion big data is used to realize knowledge transfer in stainless steel materials, and a cross-domain transfer learning model is constructed for prediction.
By generating rich data support under small sample conditions, efficient and reliable prediction of stainless steel corrosion rate is achieved, breaking through the simplified assumptions of traditional methods and improving prediction accuracy and adaptability.
Smart Images

Figure CN120823922A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data-driven prediction models, specifically to the technical field of material corrosion performance prediction, and in particular to a stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning. Background Art
[0002] Steel corrosion is a core issue restricting the service safety of engineering materials. The durability of materials is directly related to the reliability and economic efficiency of infrastructure, placing higher demands on their corrosion resistance. Currently, long-term exposure to complex environments such as humidity, salt spray, and mechanical stress not only significantly increases maintenance difficulties but also poses a serious threat to transportation safety.
[0003] Traditional corrosion rate prediction methods, such as empirical model fitting and electrochemical parameter regression, are often based on simplified assumptions and only consider a single or limited number of environmental variables, making it difficult to effectively capture the nonlinear corrosion dynamics under the coupled effects of multiple factors. For example, empirical models are not ideal for characterizing complex environmental interactions, such as the synergistic effects of temperature, humidity, and salt concentration. Electrochemical methods are susceptible to experimental constraints in predicting long-term corrosion behavior, resulting in insufficient accuracy and robustness in practical engineering applications.
[0004] In recent years, machine learning technology, with its powerful ability to model nonlinear relationships, has provided new insights into corrosion rate prediction. However, traditional machine learning models rely heavily on large amounts of high-quality data, making them prone to overfitting and insufficient generalization when using small sample sizes. The acquisition cycle for steel corrosion data under certain conditions is long, resulting in a limited availability of corrosion data for new materials or specific operating conditions. For example, for stainless steel corrosion prediction, the available data is insufficient for the model to fully learn its complex corrosion mechanisms, limiting the reliability of the prediction results. Summary of the Invention
[0005] In order to address the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning. The small sample data set of the target material is enhanced by virtual sample generation technology to generate high-fidelity virtual corrosion data that conforms to physical constraints, thereby filling the distribution gaps in the feature space. A cross-domain transfer learning model is constructed to make full use of the corrosion big data accumulated by alloys in the environment. Through the shared feature space and knowledge transfer mechanism, the corrosion laws learned in the source domain are efficiently transferred to the target material, thereby improving the accuracy of the prediction results.
[0006] Specifically, the present invention provides a stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning, which includes the following steps:
[0007] S1: Obtain the corrosion data of the target stainless steel material. Obtain the corrosion data accumulated by low-alloy steel in the environment and use it as the source domain data of the stainless steel material. The corrosion data includes material composition, environmental parameters, corrosion time and corrosion rate; perform data standardization.
[0008] S2: Analyze the characteristic distribution results x of the target stainless steel material corrosion data obtained in step S1 norm , determine the direction and range of virtual sample data generation; perform star topology, bus topology and mesh topology on the target stainless steel material corrosion data to generate stainless steel material data synthetic samples; merge to obtain the expanded target domain training set of stainless steel material data;
[0009] S3: Build a cross-domain transfer learning model for stainless steel materials. Use the corrosion data of low-alloy steel in the environment obtained in step S1 to train an artificial neural network model, extract key corrosion features and weights, and transfer them to the target domain model.
[0010] S4: Construct the corrosion performance prediction optimization model of the target stainless steel material as follows:
[0011]
[0012] Among them, min is the minimum value function; is the source domain feature space parameter; It is the key characteristic parameter of corrosion; is the key weight parameter of corrosion; L 目标 is the mean square error of the target domain dataset; N t is the number of original training samples in the target domain; N VSG is the number of virtual samples; unfrozen is the dynamic parameter layer; is the corrosion rate of stainless steel material in the cth target domain; c is the target domain data sample number; R s Regressor optimized for corrosion performance prediction; G s Feature extractors optimized for corrosion performance prediction; is the feature mapping layer; x t The target domain characteristics include the material composition, environmental parameters and corrosion time of stainless steel;
[0013] The target domain training set of the expanded stainless steel material data obtained in step S2 is input into the target domain model in step S3 after migration, and then optimized and output to obtain the corrosion prediction result of the cth target stainless steel material.
[0014] Preferably, step S2 is specifically:
[0015] S21: Calculate the characteristic mean vector of the characteristic matrix of the target stainless steel material corrosion data training set and the characteristic mean vector of the target data vector of the corrosion data training set And obtain the data center point of the stainless steel material virtual sample
[0016] S22: Perform star topology, bus topology, and mesh topology on the target stainless steel material corrosion data to generate a synthetic sample of stainless steel material data;
[0017] S23: Combining the stainless steel material data synthesis sample generated in step S22 with the target stainless steel material corrosion data training set to obtain an expanded target domain training set of stainless steel material data.
[0018] Preferably, step S21 is specifically as follows:
[0019] S211: Based on the target stainless steel material corrosion data training set feature matrix X train , calculate the characteristic mean vector of the characteristic matrix of the corrosion data training set in, is the j-th feature mean, is the mean of the Mth feature; M is the feature dimension;
[0020] S212: Target data vector Y based on target stainless steel material corrosion data training set train =[y1, y2, ...y a …, y Ntrain ] T , calculate the characteristic mean vector of the target data vector of the corrosion data training set Among them, y a is the target data of the a-th corrosion data training set, N train is the data volume of the corrosion data training set.
[0021] Preferably, step S22 is specifically as follows: performing star topology on the target stainless steel material corrosion data to obtain the horizontal coordinate x1 of the first synthetic sample of the stainless steel material data. new and the vertical coordinate y1 new ; Perform bus topology on the target stainless steel material corrosion data to obtain the horizontal coordinate x2 of the second synthetic sample of stainless steel material data new and the vertical coordinate y2 new ; Perform mesh topology on the target stainless steel material corrosion data to obtain the horizontal coordinate x3 of the third synthetic sample of stainless steel material data new and the vertical coordinate y3 new .
[0022] Preferably, step S3 is specifically:
[0023] S31: Construct a cross-domain transfer learning model for stainless steel materials, train an artificial neural network model on the stainless steel material source domain data obtained in step S1, and optimize the model to minimize the mean square error (MSE).
[0024] S32: Obtaining key corrosion characteristic parameters according to step S31 and corrosion key weight parameters During the training process, the artificial neural network model is verified and evaluated, and the best artificial neural network model is saved;
[0025] S33: Corrosion key characteristic parameters and corrosion key weight parameters Migrate to the target domain model and introduce the feature mapping layer Get the feature map layer output Input feature extractor G s , and get the target domain model output
[0026] Preferably, step S31 establishes an artificial neural network model, specifically:
[0027]
[0028] Among them, L 源 is the mean square error of the source domain dataset; N s is the number of source domain data samples; is the feature of the b-th source domain data sample; is the b-th source domain data sample label; R s is the regressor; G S is the feature extractor; s is the source domain identifier; b is the source domain data sample number.
[0029] Preferably, step S33 is specifically as follows:
[0030] The key characteristic parameters of corrosion obtained in step S32 and corrosion key weight parameters Migrate to the target domain model as the initial parameters of the target domain model, provide prior knowledge for the target domain model to accelerate the convergence of the target domain model and improve the prediction performance; introduce the feature mapping layer The target domain feature x t Map to the source domain feature space to obtain the output of the feature mapping layer Output the mapped feature map layer Input feature extractor G s , using the feature extractor to improve the compatibility of the target domain model; obtain the corrosion prediction results of the target stainless steel material
[0031] Preferably, in step S22, the target stainless steel material corrosion data is subjected to star topology, specifically:
[0032] Each data point (x m ,y m ) and the calculated center point Pair the data points and interpolate between them to generate synthetic samples of stainless steel material data. Specifically:
[0033]
[0034] Among them, x1 new is the horizontal coordinate of the first synthetic sample of stainless steel material data; m Enter the data parameters for the horizontal coordinate of the mth stainless steel material; y1 is the horizontal coordinate of the center point of the virtual sample of stainless steel material; new is the ordinate of the first synthetic sample of stainless steel material data; m Enter the data parameters for the vertical coordinate of the mth stainless steel material; is the vertical coordinate of the center point of the virtual sample of stainless steel material; χ is the interpolation coefficient; m is the data number of the corrosion data training set.
[0035] Preferably, in step S22, bus topology is performed on the target stainless steel material corrosion data, specifically:
[0036] Arrange the target stainless steel material corrosion data training set in order, and pair adjacent samples to generate interpolation, specifically:
[0037] x2 new =x m +X(x m+1 -x m );
[0038] y2 new =y m +χ(y m+1 -y m );
[0039] Among them, x2 new y2 is the horizontal coordinate of the second synthetic sample of stainless steel material data; new is the vertical coordinate of the second synthetic sample of stainless steel material data.
[0040] Preferably, in step S22, the target stainless steel material corrosion data is meshed, specifically:
[0041] Each sample in the target stainless steel material corrosion data training set is paired with all the corrosion data training set samples excluding the sample, and the synthetic data with global coverage is generated. Specifically:
[0042] x3 new =x m +χ(x n -x m );
[0043] y3 new =y m +χ(y n -y m );
[0044] Among them, x3 new y3 is the horizontal coordinate of the third synthetic sample of stainless steel material data; new is the vertical coordinate of the third synthetic sample of stainless steel material data; n is the data number of the corrosion data training set after excluding the m-th point.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] (1) Through the virtual sample generation technology, the present invention can generate a large number of virtual samples with similar characteristics to actual stainless steel corrosion data in a short period of time, effectively expanding the data set and providing rich data support for the training of machine learning models.
[0047] (2) The present invention can make full use of existing stainless steel corrosion data through the transfer learning method to achieve efficient knowledge transfer. This process does not require a large number of repeated experimental attempts, reduces time consumption, and provides an efficient and reliable method support for the prediction of stainless steel corrosion rate, further improving the prediction performance of the model.
[0048] (3) Compared with traditional theoretical models and experimental measurements, the present invention breaks through the simplified assumptions of empirical formulas, can more accurately reflect the corrosion behavior of stainless steel materials in complex environments, and can provide guidance for the prediction of stainless steel corrosion rates under different environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is the control block diagram of the stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning;
[0050] Figure 2 Detailed flow chart of the stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning;
[0051] Figure 3 A comparison diagram of Ni element distribution before and after generating a virtual sample in the embodiment;
[0052] Figure 4 Graph showing the loss function of transfer learning in the embodiment;
[0053] Figure 5 This is a scatter plot of the predicted and actual values of the transfer learning on the test set of the target dataset in the embodiment. DETAILED DESCRIPTION
[0054] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
[0055] The embodiment of the present invention proposes a stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning, such as Figure 1 As shown, target stainless steel material corrosion data and low alloy steel corrosion data are obtained and standardized; the virtual sample generation method based on SMOTE determines the direction and range of virtual sample data generation, and generates stainless steel material data synthetic samples; a cross-domain transfer learning model for stainless steel materials is constructed, and an artificial neural network model is trained using low alloy steel corrosion data and then transferred to the target domain model; a corrosion performance prediction optimization model for the target stainless steel material is constructed, and the optimized output is obtained to obtain the corrosion prediction result of the target stainless steel material; specifically, the following steps are included:
[0056] Step S1: Obtain target stainless steel material corrosion data, including material composition, environmental parameters, corrosion time, and corrosion rate; and obtain corrosion data accumulated by low-alloy steel in the environment as stainless steel material source domain data; standardize the stainless steel material corrosion data and stainless steel material source domain data to eliminate dimensional differences and unify the numerical range of data features and labels.
[0057] The material parameters of the target stainless steel material corrosion data used in the embodiment of the present invention are composed of nine chemical components: C, Si, Mn, P, S, Al, Cu, Ni, and Cr; the environmental parameters are composed of average temperature, relative humidity, wet time, sulfur dioxide concentration, chloride concentration and exposure time; the target parameter is the corrosion rate, and the unit is mm / year.
[0058] In the embodiment, the material parameters of the corrosion data of the low alloy steel used in the present invention are composed of seven chemical components: Si, Mn, P, S, Cu, Ni and Cr; the environmental parameters are composed of average temperature, relative humidity, rainfall, pH value, chloride concentration and exposure time, and the target parameter is the corrosion rate, with the unit of mm / year.
[0059] In this embodiment of the present invention, the corrosion data of the target stainless steel material is obtained, including material composition, environmental parameters, corrosion time and corrosion rate, totaling 70 corrosion data; and the corrosion data accumulated by low-alloy steel in the environment is obtained as the source domain data of the stainless steel material, totaling 415 corrosion data. All the data obtained above are standardized using the minimum-maximum normalization method to eliminate dimensional differences and unify the numerical range of data features and labels, specifically:
[0060]
[0061] Among them, x max is the maximum value of the feature of the input data; x min is the minimum characteristic value of the input data; x norm is the data feature distribution result; x in For input data.
[0062] Step S2: Analyze the data characteristic distribution result x of the target stainless steel material obtained in step S1 norm ,The virtual sample generation method based on SMOTE determines the direction and range of ,virtual sample data generation, so that the generated virtual sample data can ,effectively supplement the target stainless steel material corrosion data.
[0063] The present invention uses the SMOTE method (full name: Synthetic Minority Over-sampling Technique) to generate synthetic data in the feature space and target space, and distributes the synthetic data according to the star topology, bus topology and mesh topology to complete oversampling; and merges the generated virtual samples with the original data set to form an expanded data set to provide richer data support for subsequent model training. SMOTE is the synthetic minority oversampling technology, which is a mature and widely used data preprocessing method for solving the problem of class imbalance in machine learning. The target stainless steel material corrosion data in step S1 is randomly shuffled, and the corrosion data training set and the corrosion data test set are divided into a ratio of 7:3. The specific calculation process of the virtual sample generation method based on SMOTE is:
[0064] Step S21: Calculate the characteristic mean vector of the characteristic matrix of the target stainless steel material corrosion data training set and the characteristic mean vector of the target data vector of the corrosion data training set The data points that make up the virtual sample of stainless steel material
[0065] Step S211: The characteristic matrix of the target stainless steel material corrosion data training set is:
[0066]
[0067] Among them, X train is the feature matrix of the corrosion data training set; x is the element of the feature matrix of the corrosion data training set; M is the feature dimension; N train is the data volume of the corrosion data training set; N train Corrosion data in row M and column M.
[0068] The characteristic mean vector of the characteristic matrix of the corrosion data training set is calculated as:
[0069]
[0070] in, is the characteristic mean vector of the characteristic matrix of the corrosion data training set; is the j-th feature mean, i is the data number of the corrosion data training set; j is the feature mean number.
[0071] Step S212: The target data vector of the target stainless steel material corrosion data training set is:
[0072] Y train =[y1, y2, ...y a …, y Ntrain ] T ;
[0073] Among them, Y train is the target data vector of the corrosion data training set; y a is the target data of the ath corrosion data training set; a is the corrosion data training set number.
[0074] The characteristic mean vector of the target data vector of the corrosion data training set is calculated as:
[0075]
[0076] in, is the feature mean vector of the target data vector of the corrosion data training set.
[0077] Step S22: Perform star topology on the target stainless steel material corrosion data. m ,y m ) and the calculated center point Pair the data points and interpolate between them to generate synthetic samples of stainless steel material data. Specifically:
[0078]
[0079]
[0080] Among them, x1 new is the horizontal coordinate of the first synthetic sample of stainless steel material data; m Enter the data parameters for the horizontal coordinate of the mth stainless steel material; y1 is the horizontal coordinate of the center point of the virtual sample of stainless steel material; new is the ordinate of the first synthetic sample of stainless steel material data; m Enter the data parameters for the vertical coordinate of the mth stainless steel material; is the vertical coordinate of the center point of the virtual sample of stainless steel material; χ is the interpolation coefficient; m is the data number of the corrosion data training set.
[0081] In the embodiment of the present invention, two virtual samples are generated for each original sample, and a total of 98 virtual samples are generated to form an expanded data set, which provides richer data support for subsequent model corrosion data training.
[0082] Perform bus topology on the target stainless steel material corrosion data. Arrange the corrosion data training set in order, and generate interpolation by pairing adjacent samples. Specifically:
[0083] x2 new =x m +χ(x m+1 -x m );
[0084] y2 new =y m +χ(y m+1 -y m );
[0085] Among them, x2 new y2 is the horizontal coordinate of the second synthetic sample of stainless steel material data; new is the vertical coordinate of the second synthetic sample of stainless steel material data.
[0086] The corrosion data of the target stainless steel material is meshed and topologically mapped. Each sample in the corrosion data training set is paired with all the samples in the corrosion data training set excluding the sample, and the synthetic data with global coverage is generated. Specifically:
[0087] x3 new =x m +χ(x n -x m );
[0088] y3 new =y m +χ(y n -y m );
[0089] Among them, x3 newy3 is the horizontal coordinate of the third synthetic sample of stainless steel material data; new is the vertical coordinate of the third synthetic sample of stainless steel material data; n Enter the data parameters for the horizontal coordinate of the nth stainless steel material; y n Input data parameters for the vertical coordinate of the nth stainless steel material; n is the data number of the corrosion data training set after excluding the mth point.
[0090] Step S23: Combine the stainless steel material data synthesis sample generated in step S22 with the target stainless steel material corrosion data training set to obtain the expanded target domain training set of stainless steel material data. Figure 3 The left figure shows the uneven distribution characteristics of a small data set. By adding virtual samples, the distribution is made more uniform, and the gaps between data values become smaller, as shown in the right figure. With this improved distribution and histogram, it is easier for the algorithm to identify relationships between data even if the amount of actual data is small.
[0091] Step S3: Construct a cross-domain transfer learning model for stainless steel materials, and use the corrosion data of low-alloy steel accumulated in the environment obtained in step S1 to train the artificial neural network model. That is, the artificial neural network model is trained on the source domain data of stainless steel materials, and the key corrosion features and weights are extracted and migrated to the target domain model as the initial parameters of the target domain model to accelerate the convergence speed during stainless steel material training and improve the prediction performance.
[0092] Machine learning technology, due to its powerful nonlinear relationship modeling capabilities, provides new ideas for corrosion rate prediction. However, traditional machine learning models are highly dependent on large amounts of high-quality data, and are prone to overfitting or insufficient generalization performance under small sample conditions. The acquisition cycle of steel corrosion data in the environment is long, resulting in the limited scale of corrosion data for new materials or specific working conditions. For example, for the corrosion prediction of new stainless steel, the existing data volume is insufficient to support the model to fully learn its complex corrosion mechanism, which seriously restricts the reliability of the prediction results. Construct a cross-domain transfer learning model, make full use of the corrosion big data accumulated by existing alloys in the environment, and efficiently transfer the corrosion laws learned in the source domain to the target material through shared feature space and knowledge transfer mechanism, thereby improving the accuracy of the prediction results.
[0093] Step S31: The embodiment of the present invention selects an artificial neural network model to conduct experiments based on the characteristics of the stainless steel material source domain data. The model consists of a feature extractor G s and the regressor R sThe loss function is the mean square error. The artificial neural network model is trained using the 415 corrosion data of low alloy steel accumulated in the environment obtained in step S1, that is, the artificial neural network model is trained on the stainless steel material source domain data. The optimization goal is to minimize the mean square error (MSE). The artificial neural network model is established as follows:
[0094]
[0095] Among them, min is the minimum value function; L 源 is the mean square error of the source domain dataset; N s is the number of source domain data samples; is the feature of the b-th source domain data sample; is the b-th source domain data sample label; R s Regressor optimized for corrosion performance prediction; G S Feature extractors optimized for corrosion performance prediction; It is the key characteristic parameter of corrosion; is the key weight parameter of corrosion; s is the source domain identification; b is the source domain data sample number.
[0096] In the embodiment, the Adam optimizer is used to minimize the above formula, and the initial learning rate η is set to 0.001, and the training round E pre =100.
[0097] Step S32: Obtaining corrosion key characteristic parameters according to step S31 and corrosion key weight parameters During the training process, the artificial neural network model is verified and evaluated, and the best artificial neural network model is saved.
[0098] like Figure 4 The figure shows a comparison of the training loss and validation loss during training. After 20 epochs of training, the two curves are essentially parallel, forming a stable interval, indicating that the model has effectively converged. The simultaneous decrease in both training and validation loss indicates that the model has effectively learned the training data and does not exhibit typical overfitting characteristics. The late increase in validation loss indicates that the model generalizes well to unseen data.
[0099] Step S33: The key characteristic parameters of corrosion obtained in step S32 are and corrosion key weight parameters Migrate to the target domain model as the initial parameters of the target domain model, provide prior knowledge for the target domain model to accelerate the convergence of the target domain model and improve the prediction performance; and introduce the feature mapping layer The target domain feature x t Mapped to the source domain feature space, specifically:
[0100]
[0101] in, Output result for feature mapping layer; is the feature mapping layer; x t The target domain characteristics include the material composition, environmental parameters and corrosion time of stainless steel; is the source domain feature space parameter; t identifies the target domain.
[0102] Output the mapped feature map layer Input feature extractor G s , using the feature extractor to improve the compatibility of the target domain model; the corrosion prediction results of the target stainless steel material are obtained as follows:
[0103]
[0104] in, Corrosion prediction results for the target stainless steel material.
[0105] Step S4: The expanded target domain training set of stainless steel material data obtained in step S2, totaling 147 data, is input into the target domain model in the migrated step S3 for fine-tuning; the parameters of the artificial neural network model are optimized using the same optimization algorithm and loss function as those used for training the artificial neural network model in step S3, so that the accuracy and robustness of the target domain model in predicting the corrosion performance of the target stainless steel material are improved; the corrosion performance of the target stainless steel material is predicted, and the accuracy and reliability of the model are verified; and the corrosion performance prediction optimization model of the target stainless steel material is established as follows:
[0106]
[0107] in, To update the model parameters by minimizing the mean square error; N t is the number of original training samples in the target domain; N VSG is the number of virtual samples; unfrozen is the dynamic parameter layer; L 目标 is the mean square error of the target domain dataset; is the corrosion rate of stainless steel material in the cth target domain; c is the target domain data sample number.
[0108] The target domain training set of the expanded stainless steel material data obtained in step S2 is input into the target domain model in step S3 after migration, and then optimized and output to obtain the corrosion prediction result of the cth target stainless steel material.
[0109] Set the fine-tuning learning rate η fine =0.001, maximum round E fine=80 , complete the optimization output of the corrosion performance prediction optimization model of the target stainless steel material, and obtain the corrosion prediction results of the target stainless steel material
[0110] like Figure 2 The figure shows the algorithm flow chart, which mainly explains the training process of the model. In the embodiment of the present invention, the fine-tuned target domain model is tested on the target domain test set divided in step S1, a total of 21 data, to evaluate the performance of the target domain model. The prediction results are quantitatively evaluated using indicators such as root mean square error and determination coefficient, so as to ensure the accuracy and reliability of the target domain model prediction. In the embodiment, the determination coefficient is 0.979 and the root mean square error is 1.835, which verifies the accuracy and reliability of the model. Figure 5 The figure shows a scatter plot comparing predicted values to true values. The horizontal axis represents the true values, and the vertical axis represents the predicted values. The black dashed line is the ideal fitting line y = x, indicating the ideal case where the predicted values are equal to the true values. The proximity of the scatter points to the dashed line directly reflects the accuracy of the model. Most of the scatter points in the figure are closely distributed near the dashed line, indicating that the model prediction effect is good. This result verifies the effectiveness of the model framework based on virtual sample generation technology and transfer learning in predicting stainless steel corrosion.
[0111] The beneficial effects of the present invention are as follows: The embodiment of the present invention proposes a stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning. A large number of virtual samples with similar characteristics to actual stainless steel corrosion data are generated through virtual sample generation technology, providing rich data support for the training of machine learning models. In addition, through the transfer learning method, existing stainless steel corrosion data is utilized to achieve efficient knowledge transfer, providing an efficient and reliable method support for stainless steel corrosion rate prediction, further improving the prediction performance of the model; compared with traditional theoretical research models, the present invention breaks through the simplified assumptions of empirical formulas, can more accurately reflect the corrosion behavior of stainless steel materials in complex environments, and can provide guidance for the prediction of stainless steel corrosion rates under different environmental conditions.
[0112] The embodiments described above are merely descriptions of preferred implementations of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should fall within the scope of protection determined by the claims of the present invention.
Claims
1. A stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning, characterized in that: It includes: S1: Obtain the corrosion data of the target stainless steel material. Obtain the corrosion data accumulated by low-alloy steel in the environment and use it as the source domain data of the stainless steel material. The corrosion data includes material composition, environmental parameters, corrosion time and corrosion rate; perform data standardization. S2: Analyze the characteristic distribution results x of the target stainless steel material corrosion data obtained in step S1 norm , determine the direction and range of virtual sample data generation; perform star topology, bus topology and mesh topology on the target stainless steel material corrosion data to generate stainless steel material data synthetic samples; merge to obtain the expanded target domain training set of stainless steel material data; S3: Build a cross-domain transfer learning model for stainless steel materials. Use the corrosion data of low-alloy steel in the environment obtained in step S1 to train an artificial neural network model, extract key corrosion features and weights, and transfer them to the target domain model. S4: Construct the corrosion performance prediction optimization model of the target stainless steel material as follows: Among them, min is the minimum value function; is the source domain feature space parameter; It is the key characteristic parameter of corrosion; is the key weight parameter of corrosion; L 目标 is the mean square error of the target domain dataset; N t is the number of original training samples in the target domain; N VSG is the number of virtual samples; unfrozen is the dynamic parameter layer; is the corrosion rate of stainless steel material in the cth target domain; c is the target domain data sample number; R s Regressor optimized for corrosion performance prediction; G S Feature extractors optimized for corrosion performance prediction; is the feature mapping layer; x t The target domain characteristics include the material composition, environmental parameters and corrosion time of stainless steel; The target domain training set of the expanded stainless steel material data obtained in step S2 is input into the target domain model in step S3 after migration, and then optimized and output to obtain the corrosion prediction result of the cth target stainless steel material.
2. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 1 is characterized by: Step S2 is specifically as follows: S21: Calculate the characteristic mean vector of the characteristic matrix of the target stainless steel material corrosion data training set and the characteristic mean vector of the target data vector of the corrosion data training set And obtain the data center point of the stainless steel material virtual sample S22: Perform star topology, bus topology, and mesh topology on the target stainless steel material corrosion data to generate a synthetic sample of stainless steel material data; S23: Combining the stainless steel material data synthesis sample generated in step S22 with the target stainless steel material corrosion data training set to obtain an expanded target domain training set of stainless steel material data.
3. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 2 is characterized in that: Step S21 is specifically as follows: S211: Based on the target stainless steel material corrosion data training set feature matrix X train , calculate the characteristic mean vector of the characteristic matrix of the corrosion data training set in, is the j-th feature mean, is the mean of the Mth feature; M is the feature dimension; S212: Target data vector Y based on target stainless steel material corrosion data training set train =[y1, y2, ...y a …, y Ntrain ] T , calculate the characteristic mean vector of the target data vector of the corrosion data training set Among them, ya is the target data of the a-th corrosion data training set, N train is the data volume of the corrosion data training set.
4. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 2 is characterized in that: Step S22 is specifically as follows: perform star topology on the target stainless steel material corrosion data to obtain the horizontal coordinate x1 of the first synthetic sample of the stainless steel material data. new and the vertical coordinate y1 new ; Perform bus topology on the target stainless steel material corrosion data to obtain the horizontal coordinate x2 of the second synthetic sample of stainless steel material data new and the vertical coordinate y2 new ; Perform mesh topology on the target stainless steel material corrosion data to obtain the horizontal coordinate x3 of the third synthetic sample of stainless steel material data new and the vertical coordinate y3 new .
5. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 1 is characterized in that: Step S3 is specifically as follows: S31: Construct a cross-domain transfer learning model for stainless steel materials, train an artificial neural network model on the stainless steel material source domain data obtained in step S1, and optimize the model to minimize the mean square error (MSE). S32: Obtaining key corrosion characteristic parameters according to step S31 and corrosion key weight parameters During the training process, the artificial neural network model is verified and evaluated, and the best artificial neural network model is saved; S33: Corrosion key characteristic parameters and corrosion key weight parameters Migrate to the target domain model and introduce the feature mapping layer Get the feature map layer output Input feature extractor G s , and get the target domain model output 6. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 5 is characterized in that: Step S31 establishes an artificial neural network model, specifically: Among them, L 源 is the mean square error of the source domain dataset; N s is the number of source domain data samples; is the feature of the b-th source domain data sample; is the b-th source domain data sample label; R s is the regressor; G S is the feature extractor; s is the source domain identifier; b is the source domain data sample number.
7. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 5, characterized in that: Step S33 is specifically as follows: The key characteristic parameters of corrosion obtained in step S32 and corrosion key weight parameters Migrate to the target domain model as the initial parameters of the target domain model, provide prior knowledge for the target domain model to accelerate the convergence of the target domain model and improve the prediction performance; introduce the feature mapping layer The target domain feature x t Map to the source domain feature space to obtain the output of the feature mapping layer Output the mapped feature map layer Input feature extractor G s ,Use feature extractors to improve target domain model compatibility; Get the corrosion prediction results of the target stainless steel material 8. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 4 is characterized in that: In step S22, the target stainless steel material corrosion data is subjected to a star topology, specifically: Each data point (x m ,y m ) and the calculated center point Pair the data points and interpolate between them to generate synthetic samples of stainless steel material data. Specifically: Among them, x1 new is the horizontal coordinate of the first synthetic sample of stainless steel material data; m Enter the data parameters for the horizontal coordinate of the mth stainless steel material; y1 is the horizontal coordinate of the center point of the virtual sample of stainless steel material; new is the ordinate of the first synthetic sample of stainless steel material data; m Enter the data parameters for the vertical coordinate of the mth stainless steel material; is the vertical coordinate of the center point of the virtual sample of stainless steel material; X is the interpolation coefficient; m is the data number of the corrosion data training set.
9. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 4, characterized in that: In step S22, the target stainless steel material corrosion data is subjected to bus topology, specifically: Arrange the target stainless steel material corrosion data training set in order, and pair adjacent samples to generate interpolation, specifically: x2 new =x m +χ(x m+1 -x m ) y2 new =y m +χ(y m+1 -y m ) Among them, x2 new y2 is the horizontal coordinate of the second synthetic sample of stainless steel material data; new is the vertical coordinate of the second synthetic sample of stainless steel material data.
10. The stainless steel corrosion rate prediction method based on virtual sample generation and transfer learning according to claim 4, characterized in that: In step S22, the target stainless steel material corrosion data is meshed, specifically: Each sample in the target stainless steel material corrosion data training set is paired with all the corrosion data training set samples excluding the sample, and the synthetic data with global coverage is generated. Specifically: x3 new =x m +χ(x n -x m ) y3 new =y m +χ(y n -y m ) Among them, x3 new y3 is the horizontal coordinate of the third synthetic sample of stainless steel material data; new is the vertical coordinate of the third synthetic sample of stainless steel material data; n is the data number of the corrosion data training set after excluding the m-th point.