Corrosion rate prediction method for key parts of equipment based on data-mechanism fusion

By employing a data-mechanism fusion approach, combining multi-source data and generative adversarial networks, a semi-empirical model and a chemical kinetic model are constructed. This addresses the issues of accuracy and extrapolation in corrosion rate prediction, enabling precise prediction of corrosion rates in critical equipment components and supporting equipment corrosion management.

CN121415893BActive Publication Date: 2026-03-31榆林市特种设备检验检测院 +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for corrosion rate prediction suffer from problems such as difficulty in constructing traditional mechanistic models, low prediction accuracy, and poor extrapolation of data-driven models.

Method used

A data-mechanism fusion approach is adopted, which acquires multi-source data, constructs a semi-empirical model and a chemical kinetic model, performs data preprocessing and extension, uses generative adversarial networks for data augmentation, and constructs a corrosion rate prediction model based on the RF algorithm, optimizing hyperparameters to improve prediction accuracy.

Benefits of technology

It enables accurate prediction of corrosion rates in critical parts of equipment, improves the accuracy and extensibility of the prediction model, supports equipment corrosion management, and ensures the safety and stability of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121415893B_ABST
    Figure CN121415893B_ABST
Patent Text Reader

Abstract

The application discloses a kind of equipment key position corrosion rate prediction methods based on data-mechanism fusion, it is related to corrosion prediction technical field.The method includes: first, obtaining equipment operating parameter, environmental medium parameter, corrosion state parameter and other multi-source data, constructs data set and pre-processes, removes abnormal value;Then, a semi-empirical model and chemical kinetics model are constructed, the data are extended and interpolated to fill, and an extension data set is formed;Then, the two data sets are fused, and a fusion data set is obtained by generating an adversarial network;Based on the fusion data set, an initial prediction model is constructed using the RF algorithm, and the hyperparameters are optimized using the symbiotic organism search algorithm;Finally, the model is used to process the test condition data, and the corrosion rate prediction result is obtained.The application can provide support for equipment corrosion management and make up for the inherent defects of traditional prediction models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of corrosion prediction technology, and in particular to a method for predicting the corrosion rate of critical parts of equipment based on data-mechanism fusion. Background Technology

[0002] Corrosion is the most significant problem affecting the safe and stable operation of oil refining systems. In recent years, accidents such as fires and explosions caused by equipment corrosion defects have occurred frequently. For oil refining systems, equipment corrosion often leads to serious accidents, including equipment failure, leaks of toxic and hazardous substances, fires, and explosions, posing a serious threat to life and property. Therefore, research on corrosion protection for refining equipment and systematic corrosion rate prediction is of great significance to the development of the oil and gas industry and the safe and stable operation of process equipment. Corrosion rate prediction lays the foundation for engineering safety assessment, economic cost optimization, and intelligent operation and maintenance. Identifying the corrosion status of equipment through corrosion rate prediction is an important basis for assessing equipment integrity and safety.

[0003] Currently, in the field of corrosion prediction, researchers mainly focus on empirical models, semi-empirical models, mechanistic models, and data-driven models. Empirical models rely entirely on laboratory and field data to adjust parameters of predefined formulas, such as the Norsok and Jepson models for predicting CO2 corrosion rates. Semi-empirical models consider both physical mechanisms and data to adjust parameters of predefined formulas, such as the De Waard model. Mechanistic models primarily study corrosion influencing factors based on corrosion thermodynamics, corrosion kinetics, and electrochemical principles, establishing a mathematical expression to map corrosion rate to influencing factors and thus predicting the corrosion rate. In recent years, due to the rapid development of artificial intelligence, data-driven models based on machine learning algorithms have been widely applied in corrosion prediction. Researchers have constructed various machine learning models, such as Random Forest (RF), Artificial Neural Network (ANN), and Support Vector Regression (SVR), based on material parameters, environmental medium parameters, operating parameters, and corrosion result parameters, to predict corrosion rates. However, the aforementioned traditional mechanistic models suffer from drawbacks such as difficulty in construction and low prediction accuracy, as well as the poor extension and uninterpretability of data-driven models. Summary of the Invention

[0004] The purpose of this invention is to provide a method for predicting the corrosion rate of key parts of equipment based on data-mechanism fusion, aiming to solve or improve at least one of the above-mentioned technical problems.

[0005] To achieve the above objectives, the present invention provides the following solution:

[0006] A method for predicting corrosion rates of key components of equipment based on data-mechanism fusion includes:

[0007] Acquire multi-source data and construct a dataset for predicting equipment corrosion rates; the multi-source data includes equipment operating parameters, environmental medium parameters, and corrosion state parameters; wherein, the equipment operating parameters include temperature, pressure, and flow rate; the environmental medium parameters include pH, etc. concentration, concentration, Concentration and Concentration; the corrosion state parameter is the corrosion rate calculated by reducing the wall thickness;

[0008] The equipment corrosion rate prediction dataset is preprocessed to obtain a dataset after outlier removal; the data preprocessing includes unifying the sampling frequency and outlier handling.

[0009] A semi-empirical model and a chemical kinetic model were constructed. The semi-empirical model was constructed based on two main influencing factors identified by data correlation analysis. The chemical kinetic model was used to reveal the corrosion reaction mechanism and key influencing factors.

[0010] Based on semi-empirical models and chemical kinetic models, the maximum and minimum values ​​of flow rate and temperature are each extended by 10% of the data range. Then, the other data in the dataset after removing outliers are interpolated and supplemented using the K-nearest neighbor algorithm to obtain an extended dataset with complete variables.

[0011] The dataset after removing outliers and the extended dataset with complete variables are merged to form a modeling dataset. Then, the modeling dataset is augmented with a generative adversarial network to generate data with a distribution similar to the modeling data, resulting in a fused dataset.

[0012] Based on the fused dataset, an initial prediction model was constructed using the RF algorithm, and the hyperparameters of the model were optimized using the symbiotic organism search algorithm to obtain a corrosion rate prediction model for key corrosion areas of the equipment.

[0013] The corrosion rate prediction model is used to process the operating data of the environment under test to obtain the corrosion rate prediction results of key parts of the equipment.

[0014] Optionally, the method for acquiring the multi-source data is as follows:

[0015] Distributed control systems, laboratory information management systems, and ultrasonic thickness measuring equipment are used to acquire equipment operating parameters, environmental media parameters, and corrosion status parameters.

[0016] Optionally, the equipment corrosion rate prediction dataset undergoes data preprocessing, specifically including:

[0017] The sampling frequency of the distributed control system is set to once per minute, the sampling frequency of the laboratory information management system is set to once per day, and the sampling frequency of the ultrasonic thickness measuring device is set to once every set number of days or once per month.

[0018] The average value of the data measured by the distributed control system is taken, and the average value is made to be the same as the data sampling frequency of the laboratory information management system. The corrosion rate data is calculated based on the maximum thinning amount measured by the ultrasonic thickness measuring device, and linear interpolation is performed to complete the unified sampling frequency.

[0019] An isolated forest outlier removal process was applied to the dataset after the sampling frequency was uniform to obtain the dataset after outlier removal.

[0020] Optionally, outlier isolation forest processing can be applied to the dataset after unifying the sampling frequency, specifically including:

[0021] Constructing isolated subtrees: Randomly sample training samples {d1, d2, …, ds} from all samples, and randomly select a feature D. Obtain a cutoff value randomly between the maximum and minimum values ​​of feature D; for each training sample… Divide the data into two parts: assign data smaller than the cut value to the left branch and data greater than or equal to the cut value to the right branch. Then, repeat the processing steps in the left and right branches until the data is no longer indivisible or the binary tree reaches the limit height.

[0022] Anomaly scoring: Based on the number of edges traversed from the root node to the leaf node containing the data point, the average path length h(x) of the data point on the isolated subtree is determined. The anomaly scoring formula is as follows:

[0023] ,

[0024] in, This represents the average path length across all isolated trees. Indicates size is The dataset The average value is calculated by the following formula:

[0025] .

[0026] Optionally, the semi-empirical model is specifically:

[0027] ,

[0028] in, This represents a comprehensive constant that incorporates both material and environmental properties. This indicates the degree to which flow rate affects the corrosion rate. Indicates activation energy. Represents the gas constant. This indicates absolute temperature.

[0029] Optionally, the chemical kinetic model is specifically as follows:

[0030] ,

[0031] in, This represents the baseline corrosion rate level of the system under specific environmental conditions. This indicates the degree of influence of the concentration of each medium on the corrosion rate, where i represents the i-th medium. Indicates pressure, Indicates flow rate. Indicates activation energy. Represents the gas constant. This indicates absolute temperature.

[0032] Optionally, the remaining data in the dataset after outlier removal is interpolated and padded based on the K-nearest neighbor algorithm, specifically including:

[0033] Constructing a KNN reference library: Using the dataset after outlier removal as the database of the original data, represented as: ;in, m Indicates the ID of all database samples;

[0034] Finding k-nearest neighbors in low-dimensional space: for incomplete samples Find the K nearest samples in the original data;

[0035] Estimating missing features: Extracting from the K nearest neighbors The following distance-weighted average was used for interpolation to complete the result:

[0036] ,

[0037] ,

[0038] in, Indicates the first Estimates of the missing features, Indicates the first The weight of each neighbor reflects the magnitude of that neighbor's contribution to the estimation of missing values. Indicates the neighbor's number 1 eigenvalue, x Indicates a sample, Indicates the first The nearest neighbor samples.

[0039] Optionally, the loss function construction method in the generative adversarial network is as follows: a feature importance loss function is added to the original loss function, and the specific steps include:

[0040] The original loss function for constructing the generator :

[0041] ,

[0042] in, Indicates the noise All possible values, and according to the probability distribution Calculate the expected value. This indicates that the samples generated by the generator are passed through the discriminator's output;

[0043] Constructing a feature importance loss function :

[0044] ,

[0045] in, It is a feature The weight, and Representing the first and second parts of the real data and generated data respectively The importance of each feature;

[0046] Generate gradient conjugate directions:

[0047] ,

[0048] Spearman Correlation is the correlation between the importance ranking of features in real and generated data;

[0049] Based on the results generated from the aforementioned gradient conjugate directions, a feature importance loss function is added to the original loss function:

[0050] ,

[0051] in, The feature importance loss weights are dynamically adjusted based on the epoch during training. For the total loss function, The feature importance loss function is... This represents the relevance weight.

[0052] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0053] This invention discloses a method for predicting corrosion rates of key components of equipment based on data-mechanism fusion. The method includes first acquiring multi-source data such as equipment operating parameters, environmental medium parameters, and corrosion state parameters, constructing a dataset and preprocessing it to remove outliers; then constructing a semi-empirical model and a chemical kinetic model, extending and interpolating the data to form an extended dataset; then fusing the two datasets and enhancing them with a generative adversarial network to obtain a fused dataset; then, based on the fused dataset, using the RF algorithm to construct an initial prediction model, and using a symbiotic search algorithm to optimize the hyperparameters; finally, using this model to process the test condition data to obtain the corrosion rate prediction result.

[0054] This invention proposes to establish a corrosion rate prediction model using a data-mechanism fusion modeling approach. Based on collected operating parameters of oil refining equipment, environmental media parameters, and corrosion state parameters, data augmentation is performed using Generative Adversarial Networks (GANs) to enhance the diversity of data samples. Finally, a corrosion rate prediction model for key parts of the equipment is established based on the SOS-RF model, providing support for equipment corrosion management and overcoming the inherent defects of traditional prediction models. Attached Figure Description

[0055] 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 introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 A flowchart is established for the SOS-RF model in this embodiment;

[0057] Figure 2 This is a comparison chart of the original data after anomaly detection in this embodiment; where (a) is a schematic diagram of the original data; and (b) is a schematic diagram of iForest.

[0058] Figure 3 This is a comparison diagram of the density distribution based on the iF algorithm in this embodiment; where (a) is a schematic diagram of the original data; and (b) is a schematic diagram of the iF algorithm.

[0059] Figure 4 This is a schematic diagram of the correlation analysis in this embodiment;

[0060] Figure 5 This is a comparison chart of the distribution of generated data and extended data in this embodiment;

[0061] Figure 6This is a comparison chart of importance before and after data augmentation in this embodiment;

[0062] Figure 7 This is a comparison chart of accuracy before and after data augmentation in this embodiment;

[0063] Figure 8 This is a comparison chart of model performance before and after optimization in this embodiment; where (a) is a schematic diagram without optimization; (b) is a schematic diagram with SOS optimization; (c) is a schematic diagram with GA optimization; and (d) is a schematic diagram with PSO optimization.

[0064] Figure 9 For performance comparison of different models in this embodiment (average R0), 2 Figure 1; where (a) is a schematic diagram of RF; (b) is a schematic diagram of ANN; (c) is a schematic diagram of SVR; (d) is a schematic diagram of GBDT; (e) is a schematic diagram of DT; and (f) is a schematic diagram of AdaBoost.

[0065] Figure 10 This is a schematic diagram comparing the accuracy of the six models in this embodiment;

[0066] Figure 11 This is a schematic diagram comparing the generalization capabilities of the models in this embodiment. Detailed Implementation

[0067] 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, and 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.

[0068] The purpose of this invention is to provide a method for predicting the corrosion rate of key parts of equipment based on data-mechanism fusion, aiming to solve or improve at least one of the above-mentioned technical problems.

[0069] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] like Figure 1 As shown, based on historical multi-source parameter data of key corrosion sites in equipment, a corrosion prediction method based on data-mechanism fusion is established by combining corrosion mechanism analysis and data prediction models for key corrosion sites in oil refining equipment. The corrosion rate prediction method for key equipment components based on data-mechanism fusion provided by this invention includes:

[0071] S1: Multi-source data acquisition. Equipment operating parameters, environmental media parameters, and corrosion status parameters are acquired through a distributed control system (DCS), a laboratory information management system (LIMS), and ultrasonic thickness gauges. Equipment operating parameters include temperature, pressure, and flow rate; environmental media parameters include pH, etc. concentration, concentration, Concentration and Concentration; corrosion state parameters are the corrosion rates calculated through wall thickness reduction. A dataset for predicting equipment corrosion rates is established to provide data support for subsequent modeling and prediction.

[0072] S2: Data preprocessing. This step mainly includes two aspects: standardizing the sampling frequency and handling outliers.

[0073] (1) Unified sampling frequency: The sampling frequency of the LIMS system is once a day, the sampling frequency of the DCS system is once a minute, and the sampling frequency of the wall thickness reduction data is once every few days or once a month. The average value of the DCS data per day is taken to make it the same as the sampling frequency of the LIMS. The corrosion rate data calculated based on the maximum wall thickness reduction is linearly interpolated to make its sampling frequency the same as the parameter data sampling frequency, which is once a day.

[0074] (2) Outlier handling: Outlier handling is performed on the dataset after uniform sampling frequency using Isolation Forest (IF). The specific process is as follows:

[0075] ① Constructing an isolated subtree: Randomly sample training samples {d1, d2, …, ds} from all samples, and randomly select a feature D. Then, randomly obtain a cutoff value between the maximum and minimum values ​​of feature D. Finally, for each training sample… The data is divided into two branches: data smaller than the cutoff value is assigned to the left branch, and data greater than or equal to the cutoff value is assigned to the right branch. This process is repeated in both branches until the data is no longer indivisible or the binary tree reaches its maximum height.

[0076] ② Anomaly scoring: The average path length (denoted by h(x)) of a data point on the isolated subtree is the number of edges traversed from the root node to its leaf node. The anomaly scoring is shown in equation (1):

[0077] (1)

[0078] in, This represents the average path length across all isolated trees. It is the size of The dataset The average value can be calculated by the following formula (2):

[0079] (2)

[0080] S3: Construction of Semi-Empirical and Chemical Kinetic Models. Correlation analysis of the data identified the two most significant influencing factors, and a semi-empirical model was constructed to support subsequent data extrapolation. The chemical kinetic model was used to quantitatively analyze the effects of temperature, flow rate, pressure, and reactant concentration on the reaction rate, revealing the corrosion reaction mechanism and key influencing factors.

[0081] (1) Semi-empirical model: This technique selects temperature and flow rate as two influencing factors through correlation analysis to construct a semi-empirical model. The Arrhenius equation is used to reflect the relationship between temperature and corrosion rate, and the exponential relationship is used to reflect the relationship between flow rate and corrosion rate. In corrosion kinetics research, this formula is often used to quantify the influence of temperature on corrosion rate, as shown in the following equation (3):

[0082] (3)

[0083] in, It is a comprehensive constant that incorporates both material and environmental properties.

[0084] The quantitative relationship between flow rate and corrosion rate is shown in equation (4) below:

[0085] (4)

[0086] The final semi-empirical model is shown in equation (5) below:

[0087] (5)

[0088] (2) Chemical kinetic model: This technique uses a chemical kinetic model to quantitatively analyze the effects of factors such as temperature, flow rate, pressure, and reactant concentration on the reaction rate. The specific model constructed is shown in equation (6) below:

[0089] (6)

[0090] S4: Data Extension. This technique considers the influence of the on-site environment and abnormal operating conditions, and extends the maximum and minimum values ​​of flow rate and temperature by 10% of the data range. The extension rules are shown in the following formulas (7) and (8):

[0091] (7)

[0092] (8)

[0093] After data extrapolation, the K-Nearest Neighbors (KNN) algorithm is used to interpolate and pad other feature parameters, thereby obtaining a dataset with complete variables to achieve the purpose of data extrapolation. The specific steps are as follows:

[0094] (1) Constructing the KNN reference library: original data samples This is used as a database of complete features. m This indicates the ID of all database samples.

[0095] (2) Finding k-nearest neighbors in low-dimensional space: for incomplete samples The principle of finding the K nearest samples in the original data is shown in equation (9) below:

[0096] (9)

[0097] (3) Estimate missing features: extract from the K nearest neighbors The following distance-weighted average was used for interpolation to complete the result:

[0098] (10)

[0099] (11)

[0100] Where k is a subset of m, representing the neighbor number in the KNN algorithm. The complete sample of the k nearest neighbors is represented by a vector (containing all features); This represents the j-th feature value of the k-th nearest neighbor sample, which is the scalar derived from the complete vector; The weights of the k nearest neighbors.

[0101] S5: Data Augmentation. The dataset after removing outliers and the extended dataset are merged to form the modeling dataset. The modeling dataset is augmented using a Generative Adversarial Network (GAN) to generate data with a distribution similar to the modeling data, thereby improving the diversity and extension of the data samples. The GAN generates data similar to the original data through an adversarial game between the generator and the discriminator, as shown in Equation (12). This technique adds a feature importance loss function to its basic cross-entropy loss function to generate data that is more similar to the original data and of higher quality, as shown in Equations (13) to (17).

[0102] (12)

[0103] in, Minimize the loss function for the generator. To maximize the loss function of the discriminator, The value function of the entire confrontation process. To determine the distribution of real data Take the expected value. For the sample The probability derived from the actual data distribution, with values ​​between [0,1].

[0104] (13)

[0105] in, This indicates that the sample generated by the generator is passed through the output of the discriminator, with the goal of making the output as close to 1 as possible.

[0106] (14)

[0107] in, It is a feature The weights are normalized based on the feature importance of the random forest model. and Representing the first and second parts of the real data and generated data respectively n The importance of each feature.

[0108] (15)

[0109] Spearman Correlation measures the correlation between the importance ranking of features in real and generated data.

[0110] (16)

[0111] (17)

[0112] in, It is the original loss of the generator, while The feature importance loss weights are dynamically adjusted based on the epoch during training. This is the total loss function.

[0113] S6: Dataset Partitioning and Data Modeling. After obtaining the dataset resulting from the fusion of data and mechanisms, the augmented dataset is partitioned and a model is built.

[0114] (1) Data set division: 20% of the data in the augmented dataset is randomly selected as the test set for the final validation of the model according to the ratio of 8:2, and the remaining 80% of the data is used as the training set for subsequent model optimization training.

[0115] (2) Data Modeling: Based on the above dataset partitioning, a corrosion rate prediction model for key corrosion areas of the equipment is constructed using the RF algorithm. The Symbiotic Organisms Search (SOS) algorithm is then used to optimize the model's hyperparameters, further improving the model's prediction accuracy. Therefore, this step includes both hyperparameter optimization and SOS-RF model establishment.

[0116] 1. Model Hyperparameter Optimization. The SOS algorithm is applied to the partitioned training set data to optimize three key parameters in the RF prediction model: n_estimators, max_depth, and max_features. The SOS algorithm primarily finds the optimal solution in the solution space by simulating cooperation and competition among organisms. By simulating these interactions in nature, the SOS algorithm can adaptively explore the solution space of the problem. The SOS algorithm simulates biological behavior based on the following three symbiotic relationships:

[0117] ① Initialization phase: Randomly generated n An organism is randomly generated. n An organism { X 1, X 2,..., X n A population is formed, initialized according to the objective function, and the current best individual is determined. .

[0118] ② Mutually beneficial symbiotic stage: For individuals Randomly select another organism from the population The fitness of both is calculated according to formulas (18) to (20), and the new fitness is... and If the organism's fitness is better than before, update the organism.

[0119] (18)

[0120] (19)

[0121] (20)

[0122] in, and It is a trend factor, that is, a trend factor that symbiotically tends towards the best individual and the mutually beneficial individual.

[0123] ③ Coexistence stage: One individual benefits from the advantages of another individual and adjusts its own solution according to those advantages, thereby improving its fitness. The fitness calculation formula is as follows (21):

[0124] (twenty one)

[0125] ④ Parasitic stage: Individual A parasite PV is created, which replicates and modifies itself using random vectors to generate mutation vectors. The fitness of the PV and the host is compared. When the fitness of the PV is better than that of the host, the PV is selected. When the corresponding fitness is specified, PV is used instead. .

[0126] ⑤ Update individual position: Update the individual's position (i.e., its position in the solution space) based on the symbiotic relationship, fitness evaluation results, and specific rules of the algorithm.

[0127] ⑥ Termination condition judgment: Determine whether the stopping condition is met (e.g., maximum number of iterations or accuracy requirement). If it is met, output the result; otherwise, return to ②.

[0128] 2. Construct the SOS-RF model. Substitute the optimized parameters into the original RF model and input them into the test set for verification. The final SOS-RF model flow is as follows: Figure 1 As shown.

[0129] S7: Extreme Condition Data Prediction. The SOS-RF model, trained using an augmented dataset, predicts data under extreme conditions to simulate extreme situations encountered in actual chemical production environments. By introducing diverse input data, including various possible extreme environmental factors, the model effectively captures complex nonlinear relationships, simulating extreme conditions that may be encountered in actual production processes, ensuring the safety and stability of the production process.

[0130] As a specific implementation, taking the top of a typical atmospheric and vacuum distillation unit in the oil refining process as the object, multi-source parameter data of key corrosion parts of the equipment were collected. A modeling dataset was constructed by using methods such as unified sampling frequency and outlier processing, and applied research was conducted to predict corrosion rates.

[0131] Three metrics were primarily selected to evaluate the corrosion rate prediction results of the model: Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Coefficient of Determination (R-Squared, R²). RMSE measures the magnitude of the error between the model's predicted and actual values. MAE measures the average absolute difference between the model's predicted and actual values, indicating the overall degree to which the model's predictions deviate from the actual values. R² reflects the correlation between the model's predicted and actual values, measuring the model's ability to explain data variability; a value closer to 1 indicates that the model fits the data better and can explain more variability.

[0132] After standardizing the sampling frequency, the iF algorithm was used to detect outliers on the original dataset, reducing the number of original data sets from 249 to 217. Using this data... For example, the detected abnormal data and its sample distribution can be visualized. Figure 2 and Figure 3 As shown.

[0133] After outlier handling, the model's prediction accuracy and R-value... 2 All showed some improvement, as shown in Table 1.

[0134] Table 1. Comparison of model accuracy before and after outlier handling

[0135]

[0136] Correlation analysis of the data yielded the following results: Figure 4 As shown, temperature and flow rate were identified as the most influential factors. Furthermore, considering the influence of the on-site environment and abnormal operating conditions, the maximum and minimum values ​​of flow rate and temperature were each extended by 10% of the data range, with the extension rules shown in equations (7) and (8) above. Then, the KNN algorithm was used to interpolate and complete the data, and the extended data is shown in Table 2. The prediction accuracy of the complete variable dataset after KNN interpolation was verified using the chemical kinetic model constructed above. Verification showed that when using the extended data after KNN interpolation, the evaluation metrics RMSE was 0.0033, MAE was 0.028, and R² was 0.96. Finally, the accuracy of the original dataset, the dataset processed by iF, and the extended dataset were compared, and the results are shown in Table 3.

[0137] Table 2. Data after KNN interpolation

[0138]

[0139] Table 3 Comparison of Dataset Accuracy

[0140]

[0141] By using GANs to augment the extended dataset, sample diversity is improved, and the distribution of the generated data is compared with that of the extended data. Figure 5 As shown, the importance of the data did not shift significantly before and after data augmentation, preserving the original data characteristics, such as... Figure 6 As shown.

[0142] Compare the prediction accuracy of the datasets before and after data augmentation using the RF model, such as... Figure 7 As shown, the accuracy of both the training and test sets has been improved to some extent.

[0143] To further improve the prediction accuracy of the model, this technique employs the SOS algorithm to optimize three important hyperparameters of the RF algorithm: n_estimators, max_depth, and max_features. A horizontal comparison is then made between the model and SOS using Particle Swarm Optimization (PSO), Genetic Algorithm (GA), and other algorithms. The comparison results are shown in Table 4. Figure 8 It can be seen that most of the models after parameter tuning by the optimization algorithm are concentrated within 5% of the actual values, and the SOS-RF model has the highest accuracy.

[0144] Table 4. Comparison of different optimization algorithms

[0145]

[0146] To evaluate the accuracy and generalization ability of the proposed data augmentation method and prediction model, this paper will conduct a cross-sectional comparison using six machine learning algorithms: RF, ANN, SVR, DT, GBDT, and AdaBoost. Simultaneously, SOS will be used to optimize the hyperparameters of these six models, and the dataset partitioning method described above will be continued. The performance of the models will be evaluated using a test set. The evaluation results (…) Figure 9 and Figure 10 This indicates that the RF model has the highest R2 and the fewest samples outside the 5% error threshold among the six models.

[0147] To demonstrate the effectiveness and generalization ability of the proposed data-enhanced data-mechanism fusion modeling method, the trained SOS-RF model was used to predict outliers in the original dataset to simulate extreme situations encountered in actual chemical plant environments. The results are as follows: Figure 11 As shown.

[0148] In summary, this technology, based on the RF algorithm, applies the GAN algorithm to enhance the data and improve sample diversity, and uses the SOS intelligent optimization algorithm to tune parameters. The established SOS-RF model shows a certain generalization ability and adaptability to extreme operating conditions in actual processes, providing some technical support for equipment corrosion protection.

[0149] As another specific implementation method, the data augmentation method proposed in this technology is mainly for situations where there are insufficient samples. When there are sufficient samples, data augmentation processing can be omitted, and the corresponding algorithm can be used directly to predict the corrosion rate.

[0150] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

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

Claims

1. A method for predicting corrosion rate of critical sites of equipment based on data-mechanism fusion, characterized in that, The method comprises the following steps: Obtaining multi-source data, and constructing a device corrosion rate prediction dataset; the multi-source data includes device operating parameters, environmental medium parameters, and corrosion state parameters; wherein the device operating parameters include temperature, pressure, and flow; the environmental medium parameters include pH, concentration, concentration, concentration, and concentration; the corrosion state parameters are corrosion rates converted by wall thickness thinning; data preprocessing is performed on the device corrosion rate prediction data set to obtain a data set with abnormal values removed; the data preprocessing comprises uniform sampling frequency and abnormal value processing; a semi-empirical model and a chemical kinetics model are constructed; the semi-empirical model is constructed according to two main influencing factors determined by data correlation analysis; the chemical kinetics model is used to reveal the corrosion reaction mechanism and key influencing factors; based on the semi-empirical model and the chemical kinetics model, the maximum and minimum values of the flow and temperature are each extended by 10% of the data range, and other data in the data set with abnormal values removed are interpolated and supplemented based on a K-nearest neighbor algorithm to obtain an extended data set with complete variables; the data set with abnormal values removed and the extended data set with complete variables are fused to form a modeling data set, and a generative adversarial network is used to perform model data enhancement on the modeling data set to generate data similar to the modeling data distribution, thereby obtaining a fusion data set; based on the fusion data set, an RF algorithm is used to construct an initial prediction model, and a symbiotic biological search algorithm is used to optimize the model hyperparameters to obtain a corrosion rate prediction model for key corrosion parts of the device; the corrosion rate prediction model is used to process the working condition data of the to-be-tested environment to obtain corrosion rate prediction results of key parts of the device; the semi-empirical model is specifically: , wherein, represents a combined constant including material and environmental characteristics, represents the degree of influence of flow rate on corrosion rate, represents activation energy, represents a gas constant, represents absolute temperature; the chemical kinetics model is specifically: , wherein, represents the reference corrosion rate level of the system in a specific environment, represents the degree of influence of each medium concentration on the corrosion rate, i represents the i-th medium, represents pressure, represents flow rate, represents activation energy, represents the gas constant, represents absolute temperature. 2.The data-mechanism fusion based equipment critical site corrosion rate prediction method according to claim 1, characterized in that, the method for obtaining the multi-source data is: device operating parameters, environmental medium parameters and corrosion state parameters are obtained by using a distributed control system, a laboratory information management system and an ultrasonic thickness measuring device. 3.The data-mechanism fusion based equipment critical site corrosion rate prediction method according to claim 1, characterized in that, data preprocessing is performed on the device corrosion rate prediction data set, specifically comprising: the sampling frequency of the distributed control system is set to once per minute, the sampling frequency of the laboratory information management system is set to once per day, and the sampling frequency of the ultrasonic thickness measuring device is set to once every set number of days or once per month; the average value of the data measured by the distributed control system is taken, the average value has the same data sampling frequency as the data of the laboratory information management system, and the corrosion rate data is calculated based on the maximum thinning amount measured by the ultrasonic thickness measuring device, and linear interpolation processing is performed to complete the uniform sampling frequency; isolation forest abnormal value processing is performed on the data set after the uniform sampling frequency to obtain a data set with abnormal values removed. 4.The data-mechanism fusion based corrosion rate prediction method for critical sites of equipment according to claim 3, wherein, isolation forest abnormal value processing is performed on the data set after the uniform sampling frequency, specifically comprising: Constructing Isolation Tree: Randomly sample training samples {d1, d2, …, ds} from all samples, and randomly select a feature D, randomly obtain a cutting value between the maximum value and the minimum value of the feature D; divide each of the training samples, assign data less than the cutting value to the left branch, and assign data greater than or equal to the cutting value to the right branch, and then repeat the processing steps in the left and right branch data until the data is no longer divisible or the binary tree reaches the limited height; abnormal score: according to the number of edges from the root node to the leaf node where the data point is located, the average path length h(x) of the data point on the isolation tree is determined, and the abnormal score formula is: , wherein, represents the average path length in all isolated trees, represents the average value of the of a data set of size is calculated by the following formula: 。 5.The data-mechanism fusion based equipment critical site corrosion rate prediction method according to claim 1, wherein, based on the K-nearest neighbor algorithm, other data in the data set with abnormal values removed are interpolated and supplemented, specifically comprising: Building KNN reference library: the data set after removing outliers as the database of raw data, denoted as: ; wherein m represents the number of all database samples; Finding k-nearest neighbors in low-dimensional space: for incomplete samples Finding the nearest K samples in the original data; Estimate missing features: interpolate from the last K neighbors using the following distance-weighted average: , , wherein, denotes the estimate of the missing feature, denotes the weight of the denotes the denotes the nearest neighbor sample.​​​ 6.The data-mechanism fusion based equipment critical site corrosion rate prediction method according to claim 1, wherein, the loss function construction method in the generative adversarial network comprises: adding a feature importance loss function to the original loss function, and the specific steps comprise: Original loss function of the construction generator : , wherein, represents all possible values of the noise and the expected value is calculated according to the probability distribution represents the output of the discriminator for the sample generated by the generator;​ Constructing feature importance loss function : , in, It is a feature The weight, and Representing the first and second parts of the real data and generated data respectively The importance of each feature; gradient conjugate direction generation is performed: , wherein, Spearman Correlation is the correlation of the feature importance ranking of the real and generated data. Based on the gradient conjugate direction generated results, in the original loss function, add feature importance loss function: , , wherein, is a feature importance loss weight dynamically adjusted according to the epoch in the training process, is a total loss function, is a feature importance loss function, is a correlation weight.

Citation Information

Patent Citations

  • Corrosion rate prediction system based on multi-source data

    CN114565185A

  • Cable defect detection method and system based on artificial intelligence

    CN120279341A