Method, system, terminal and medium for predicting internal corrosion rate of crude oil storage tank bottom plate
By introducing a physical-guided neural network model into the prediction of corrosion rates in storage tanks, and combining physical laws and hyperparameter optimization, the problems of low prediction accuracy and insufficient interpretability in existing technologies are solved, and corrosion rate prediction with higher accuracy and robustness is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI GENERAL MACHINERY RES INST
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-02
AI Technical Summary
Existing methods for predicting corrosion rates in storage tanks suffer from low prediction accuracy, poor generalization ability, and insufficient interpretability. In particular, data-driven models are prone to learning erroneous patterns that contradict the physical laws of corrosion in small sample scenarios.
Combining the physical laws of corrosion with efficient hyperparameter optimization, a Physically Guided Neural Network (PGNN) model is adopted. By designing physical constraint loss terms and Huber loss functions, the total loss function of the model is constructed, and the optimal hyperparameters are determined by using Bayesian optimization algorithm, integrating multi-dimensional factors such as tank structure, medium characteristics and environmental conditions.
The model's prediction accuracy and interpretability have been improved, its robustness and generalization ability have been enhanced, and corrosion rate prediction results that are more in line with engineering practice have been provided, supporting corrosion protection and maintenance decisions for storage tanks.
Smart Images

Figure CN122135805A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tank corrosion prediction technology, specifically to a method, system, terminal, and medium for predicting the corrosion rate inside the bottom plate of a crude oil storage tank. Background Technology
[0002] Crude oil storage tanks are core equipment for storing crude oil in the petrochemical industry. The tank bottom plate is in constant contact with the crude oil medium and is highly susceptible to internal corrosion due to factors such as the crude oil's water content, sulfur content, and acid value. The corrosion rate is a key indicator for assessing the safe operation of storage tanks. Accurately predicting the corrosion rate of the tank bottom plate is of significant practical importance for preventative maintenance and accident risk management of storage tanks.
[0003] Existing methods for predicting corrosion rates in storage tanks are mainly divided into two categories: mechanism-driven models and data-driven models. Mechanism-driven models are based on the principles of corrosion electrochemistry. While they possess a certain degree of interpretability, they often rely on ideal assumptions and fail to fully consider the coupling effects of multiple parameters under actual operating conditions. This often leads to significant deviations from actual corrosion conditions on-site, resulting in limited prediction accuracy. Data-driven models, such as support vector machines and artificial neural networks, achieve predictions by mining the correlation patterns between data. However, in small sample scenarios, they are prone to learning erroneous patterns that contradict the physical laws of corrosion, leading to poor generalization ability. Furthermore, most data-driven models do not incorporate the universal physical laws governing storage tank corrosion, resulting in insufficient interpretability. Summary of the Invention
[0004] This invention provides a method, system, terminal, and medium for predicting the corrosion rate inside the bottom plate of crude oil storage tanks. By combining the physical laws of corrosion with efficient hyperparameter optimization, it solves the problems of low prediction accuracy, poor generalization ability, and insufficient interpretability of existing models.
[0005] To achieve the above objectives, the present invention provides the following technical solution: This invention discloses a method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank, comprising: S1. Obtain operating parameter samples and corresponding measured data of corrosion rate in the bottom plate of the operating crude oil storage tank; the operating parameters are multi-dimensional characteristic data that characterize the structural properties of the tank body, the physicochemical properties of the storage medium, and the service environment; the sample data are preprocessed and then divided into training set, validation set and test set; S2. Construct a physical-guided neural network model; based on the physical regularity that increased crude oil water content, sulfur content, acid value, and filling frequency will exacerbate tank bottom corrosion, design a physical constraint loss term; adopt the Huber loss function as the data fidelity loss term; and weight and fuse the physical constraint loss term and the data fidelity loss term to construct the model's total loss function. S3. Determine the hyperparameter search space of the physical-guided neural network model, and use the Bayesian optimization algorithm to iteratively find the optimal combination of hyperparameters; S4. Substitute the optimal hyperparameters into the physics-guided neural network model, train the physics-guided neural network model using the training set, and monitor the training process and adjust the training parameters using the validation set. S5. The operating parameters of the crude oil storage tank to be predicted are preprocessed and then input into the trained physical guided neural network model, which outputs the predicted value of the corrosion rate inside the tank bottom plate.
[0006] As a further improvement to the above scheme, the operating parameters specifically include: structural form, construction material, construction wall thickness, presence or absence of insulation, tank volume, presence or absence of anode blocks, presence or absence of heaters, tank purpose, service time, filling frequency, medium type, medium sulfur content, medium water content, medium acid value, external corrosion, tank foundation condition, acoustic emission test results, local average annual precipitation, local average temperature, and soil resistivity.
[0007] As a further improvement to the above scheme, the physical guidance neural network model includes an input layer, a hidden layer, and an output layer; wherein, the number of nodes in the input layer is consistent with the dimension of the running parameters, the hidden layer adopts the ReLU activation function, and the output layer outputs the predicted value of the corrosion rate inside the tank bottom plate; During the iterative training cycle of the model, any one of the following factors—medium water content, medium sulfur content, medium acid value, and filling frequency—is randomly selected and increased to generate perturbation samples. If the corrosion rate prediction value output by the physical-guided neural network model for the perturbation samples is less than the corrosion rate prediction value for the unadjusted samples, then the physical difference term is calculated as the physical constraint loss term, and the calculation formula is as follows: ; In the formula, This is the physical constraint loss term; The total number of samples; The physical-guided neural network model predicts the corrosion rate for the i-th unadjusted sample. This is the physical-guided neural network model's prediction of the corrosion rate for the i-th perturbation sample. The formula for calculating the data fidelity loss item is as follows: ; In the formula, For the first Huber loss value for each sample; This represents the true corrosion rate on the i-th sample. The Huber loss threshold; The model's total loss function is: ; In the formula, represents the physical loss weight; max(·) is used to take the maximum value.
[0008] As a further improvement to the above scheme, in step S5, the SHAP value method is also used to calculate the contribution of each operating parameter to the corrosion rate prediction value; wherein, the SHAP value of the k-th operating parameter of a single sample i satisfies: ; In the formula, The average predicted value for all samples; For the first In the nth sample The SHAP value of each feature; The calculation optimization formula using Kernel SHAP is as follows: ; In the formula, The vector of SHAP values to be solved, whose elements represent the contribution of each operating parameter to the predicted corrosion rate; A set of operating parameters that affect the corrosion rate of the bottom plate of crude oil storage tanks; For feature subset The weights; This represents the total number of runtime parameters. This represents the factorial operation; To retain only a subset of features The model's predicted value at that time.
[0009] As a further improvement to the above scheme, in step S3, the hyperparameters include the learning rate, the number of hidden layer nodes, the Huber loss threshold, and the physical loss weights. The learning rate search space is [0.0001, 0.01], the hidden layer node number search space is [8, 128], the Huber loss threshold search space is [0.0001, 0.1], and the physical loss weights are... The search space is [0.1, 1.0]; the Bayesian optimization algorithm iterative optimization specifically includes: using Gaussian process regression to construct a surrogate model of the objective function, and combining the acquisition function to select hyperparameter combinations one by one for evaluation until the maximum number of iterations is reached.
[0010] As a further improvement to the above scheme, the objective function is expressed as follows: ; In the formula, The objective function is... Hyperparameter set for physics-guided neural network models; It is a mean function; Hyperparameter set In the mean function The probability distribution below; Represents probability distribution The gradient; This is the kernel function, and the superscript T is the transpose symbol; The hyperparameters are selected to improve the acquisition function, and the expression is: ; In the formula, To improve the acquisition function for evaluating hyperparameter sets within a Bayesian optimization framework. Potential improvements can be identified to filter out those that improve the objective function. Better hyperparameters; This represents the current optimal objective function value. and These are the mean and standard deviation of the Gaussian process regression prediction, respectively. The cumulative distribution function is the standard normal distribution. It is the probability density function of the standard normal distribution.
[0011] As a further improvement to the above scheme, in step S1, the numerical sample data is normalized using the following formula: ; In the formula, The data is after normalization; This refers to the original operating parameter data; and These are the maximum and minimum values of the corresponding parameters in the original dataset, respectively; For categorical sample data, one-hot encoding is used to convert it into a vector representation.
[0012] This invention also discloses a prediction system for the corrosion rate inside the bottom plate of a crude oil storage tank, which applies the prediction method for the corrosion rate inside the bottom plate of a crude oil storage tank as described above; the prediction system includes: The data acquisition module is used to acquire operating parameter samples and corresponding measured data of corrosion rate in the bottom plate of the crude oil storage tank in operation; the operating parameters are multi-dimensional characteristic data that characterize the structural properties of the tank body, the physicochemical properties of the storage medium, and the service environment. The preprocessing module is used to preprocess the sample data and then divide it into training set, validation set and test set; The model building module is used to build a physical-guided neural network model; based on the physical regularity that increased crude oil water content, sulfur content, acid value, and filling frequency will aggravate the corrosion of the tank bottom plate, a physical constraint loss term is designed; the Huber loss function is used as the data fidelity loss term; the physical constraint loss term and the data fidelity loss term are weighted and fused to construct the model's total loss function; The parameter optimization module is used to determine the hyperparameter search space of the physical-guided neural network model, and uses the Bayesian optimization algorithm to iteratively find the optimal combination of hyperparameters. The training module is used to input the optimal hyperparameters into the physics-guided neural network model, train the physics-guided neural network model using the training set, and monitor the training process and adjust the training parameters using the validation set. The prediction module is used to input the preprocessed operating parameters of the crude oil storage tank to be predicted into the trained physical-guided neural network model, and output the predicted value of the corrosion rate inside the tank bottom plate.
[0013] The present invention also discloses a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method for predicting the corrosion rate inside the bottom plate of crude oil storage tank as described above.
[0014] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank as described above.
[0015] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention discloses a method for predicting the corrosion rate of the bottom plate of crude oil storage tanks. It integrates the universal physical laws governing crude oil tank corrosion into the loss function of a Physically Guided Neural Network (PGNN) model, constructing a corrosion law-guided PGNN model. This avoids data-driven models learning erroneous laws that contradict physics, thus improving the model's interpretability and generalization ability. This invention uses Huber loss as the data loss term, effectively reducing the interference of outliers (extreme operating condition samples) in the measured data on model training, improving the model's robustness and prediction stability. A Bayesian optimization algorithm is used to optimize the hyperparameters of the PGNN model, which has higher optimization efficiency and accuracy compared to traditional empirical methods and grid search methods, further improving the model's prediction accuracy. Finally, the model input parameters cover multiple dimensions such as tank structure, medium characteristics, and environmental conditions, comprehensively considering the influencing factors of crude oil storage tank bottom plate corrosion, resulting in prediction results that are more consistent with engineering practice.
[0016] 2. The corrosion rate prediction system for the bottom plate of crude oil storage tank disclosed in this invention is easy to integrate through modular design, and can realize rapid and accurate prediction of the corrosion rate inside the bottom plate of crude oil storage tank, providing a quantitative basis for corrosion protection and maintenance decisions of storage tanks.
[0017] 3. As research into the corrosion mechanism of crude oil storage tank bottom plates deepens and the understanding system gradually improves, the methodological framework provided in this application will further enhance the accuracy and adaptability of corrosion prediction through parameter calibration, model structure optimization, or functional module expansion. The core of this application lies in its highly flexible and scalable methodological framework. It is not limited to specific corrosion scenarios or existing mechanistic understandings, but rather can accommodate mechanistic research results at different depths. This provides a solid foundation for subsequent technological iteration and optimization based on a more comprehensive and accurate understanding of corrosion mechanisms, thereby continuously expanding its application value and reliability in various corrosion prediction scenarios. Attached Figure Description
[0018] Figure 1 This is a flowchart of the method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank in Embodiment 1 of the present invention.
[0019] Figure 2 This is a logic block diagram of the method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank in Embodiment 1 of the present invention.
[0020] Figure 3 Ri is the prediction model of each model in Embodiment 1 of the present invention. 2 Performance comparison chart.
[0021] Figure 4 This is a comparison chart of the MAE performance of each prediction model in Embodiment 1 of the present invention.
[0022] Figure 5 This is a comparison chart of the RMSE performance of each prediction model in Embodiment 1 of the present invention.
[0023] Figure 6 This is a comparison chart of the MAPE performance of each prediction model in Embodiment 1 of the present invention.
[0024] Figure 7 This is a graph showing the analysis results of the importance of each parameter (feature) in Embodiment 1 of the present invention.
[0025] Figure 8 This is a graph showing the distribution (top 8) of the importance of each parameter in Embodiment 1 of the present invention.
[0026] Figure 9 This is a partial dependency graph of the PGNN+CR+BO and PGNN+BO models on crude oil sulfur content and crude oil acid value in Embodiment 1 of the present invention.
[0027] Figure 10 This is a structural diagram of the system for predicting the corrosion rate inside the bottom plate of a crude oil storage tank in Embodiment 2 of the present invention.
[0028] Figure 11 This is a schematic diagram of the structure of the computer terminal in Embodiment 3 of the present invention. Detailed Implementation
[0029] 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.
[0030] Example 1 Please see Figure 1 and Figure 2 This embodiment provides a method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank, including steps S1 to S5.
[0031] S1. Obtain operating parameter samples and corresponding measured data of corrosion rate in the bottom plate of the operating crude oil storage tank; the operating parameters are multi-dimensional characteristic data that characterize the structural properties of the tank body, the physicochemical properties of the storage medium and the service environment; the sample data are preprocessed and then divided into training set, validation set and test set.
[0032] In this embodiment, the operating parameters and corresponding measured corrosion rate data of 108 crude oil storage tanks were collected, totaling 108 sets of samples. Operating parameters include structural form (vertical cylindrical / spherical), construction material (Q235B / 16MnR), wall thickness (6-20mm), insulation (yes / no), tank volume (500-10000m³), presence / absence of anode blocks (yes / no), presence / absence of heater (yes / no), tank purpose (crude oil storage / blending), service life (1-15 years), filling frequency (1-12 times / month), medium type (light crude oil / heavy crude oil), medium sulfur content (0.5-3.0wt%), medium water content (0.1-5.0wt%), medium acid value (0.1-1.5mgKOH / g), external corrosion (mild / moderate / severe), tank foundation condition (good / fair / poor), acoustic emission test results (low / medium / high), local average annual precipitation (500-1200mm), local average temperature (5-25℃), and soil resistivity (10-100Ω). m).
[0033] The numerical sample data is normalized using the following formula: ; In the formula, The data is after normalization; This refers to the original operating parameter data; and These are the maximum and minimum values of the corresponding parameters in the original dataset, respectively.
[0034] For categorical sample data (such as structural form, presence or absence of insulation, etc.), one-hot encoding is used to convert it into a vector representation. The mathematical expression for one-hot encoding is: for data with... Discrete parameters of each category Its one-hot encoded vector satisfy: ; In the formula, Discrete parameters The Categories .
[0035] The processed samples were divided into a training set (77 groups), a validation set (22 groups), and a test set (11 groups) in a ratio of 7:2:1.
[0036] S2. Construct a physical-guided neural network model; based on the physical regularity that increased crude oil water content, sulfur content, acid value, and filling frequency will exacerbate tank bottom corrosion, design a physical constraint loss term; adopt the Huber loss function as the data fidelity loss term; and weight and fuse the physical constraint loss term and the data fidelity loss term to construct the model's total loss function.
[0037] The physical guidance neural network model includes an input layer, hidden layers, and an output layer. The input layer has 20 nodes (consistent with the dimensions of the running parameters); the hidden layer has 3 layers, with initial node counts of 64, 32, and 16 in each layer, using the ReLU activation function; the output layer has 1 node, outputting the predicted corrosion rate inside the tank bottom plate. The expressions for each layer are as follows: 1) Input layer: , For the dimensions of runtime parameters, For the first Normalized values of each running parameter; 2) Hidden layer: The first Hidden layer output for: ; In the formula, For the first Hidden layer weight matrix, For the first Hidden layer bias vector, , For activation functions; 3) Output layer: Corrosion rate prediction for: ; In the formula, To hide the number of layers, The output layer weight vector, Output layer bias value.
[0038] During the iterative training cycle of the model, any one of the following factors—medium water content, medium sulfur content, medium acid value, and filling frequency—is randomly selected and its value is increased by 10%. If the corrosion rate prediction value of the physical-guided neural network model for the perturbed sample is less than the corrosion rate prediction value for the unadjusted sample, then the physical difference term is calculated as the physical constraint loss term, and the calculation formula is as follows: ; In the formula, This is the physical constraint loss term; The total number of samples; The physical-guided neural network model predicts the corrosion rate for the i-th unadjusted sample. This is the physical-guided neural network model's prediction of the corrosion rate for the i-th perturbation sample. The formula for calculating the data fidelity loss item is as follows: ; In the formula, For the first Huber loss value for each sample; This represents the true corrosion rate on the i-th sample. The Huber loss threshold; The model's total loss function is: ; In the formula, represents the physical loss weight; max(·) is used to take the maximum value.
[0039] S3. Determine the hyperparameter search space of the physical-guided neural network model, and use the Bayesian optimization algorithm to iteratively find the optimal hyperparameter combination.
[0040] In step S3, the hyperparameters include the learning rate, the number of hidden layer nodes, the Huber loss threshold, and the physical loss weights. The learning rate search space is [0.0001, 0.01], the hidden layer node number search space is [8, 128], the Huber loss threshold search space is [0.0001, 0.1], and the physical loss weights are... The search space is [0.1, 1.0].
[0041] Using the MAPE of the validation set as the objective function, a Bayesian optimization algorithm was employed, with a maximum number of iterations set to 100. A surrogate model was constructed using Gaussian process regression, and hyperparameter combinations were selected in conjunction with the Expected Improvement (EI) acquisition function. After optimization, the optimal hyperparameters were found to be: learning rate = 0.001, and the number of hidden layer nodes being 64, 32, and 16. optimal value .
[0042] The objective function is expressed as follows: ; In the formula, The objective function is... Hyperparameter set for physics-guided neural network models; It is a mean function; Hyperparameter set In the mean function The probability distribution below; Represents probability distribution The gradient; This is the kernel function, and the superscript T is the transpose symbol; The hyperparameters are selected to improve the acquisition function, and the expression is: ; In the formula, The expected improvement acquisition function is used to evaluate the hyperparameter set within a Bayesian optimization framework. Potential improvements and benefits; This represents the current optimal objective function value. and These are the mean and standard deviation of the Gaussian process regression prediction, respectively. The cumulative distribution function is the standard normal distribution. It is the probability density function of the standard normal distribution.
[0043] Physics-Guided Neural Networks (PGNNs), as a machine learning framework that integrates physical laws and data-driven approaches, effectively solves the "black box" problem of traditional neural networks by embedding prior physical knowledge into the model training process, demonstrating good application potential in fields such as corrosion prediction and fluid simulation. This invention applies the PGNN model to corrosion prediction of crude oil storage tank bottom plates, specifically incorporating the physical influence of key factors such as crude oil water content, sulfur content, acid value, and filling frequency on corrosion. Furthermore, a Bayesian optimization algorithm is used to determine the model's hyperparameters, optimizing both efficiency and accuracy.
[0044] S4. Substitute the optimal hyperparameters into the physics-guided neural network model, train the physics-guided neural network model using the training set, monitor the training process and adjust the training parameters using the validation set to prevent overfitting.
[0045] In this embodiment, four metrics—mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination (R²)—can be used to verify the model's performance on the test set.
[0046] ; ; ; ; in This represents the average of the true corrosion rates.
[0047] The training run consisted of 200 epochs with a batch size of 32, and the Adam optimizer was used. , The weight decay coefficient was 0.0001. An early stopping strategy was used during training; training stopped when the MAPE on the validation set did not decrease for 10 consecutive rounds. After training, the model performance was validated on the test set and compared with the traditional PGNN model and the Bayesian-optimized SVM model. The traditional PGNN model did not incorporate physical constraint loss, and hyperparameters were optimized using grid search (learning rate 0.005, hidden layer node numbers 32, 16, 8). The Bayesian-optimized SVM model used the RBF kernel function, with hyperparameters C[0.1, 100] and γ[0.001, 10], and their optimal values were determined through Bayesian optimization. The prediction results of each model are as follows: Figures 3 to 6 As shown.
[0048] Depend on Figures 3 to 6 It can be seen that the MAE, RMSE, and MAPE of the method of the present invention (PGNN+CR+B0) are significantly lower than those of the traditional PGNN model and the Bayesian optimized SVM model, and R² is closer to 1, indicating that the prediction accuracy of the method of the present invention is higher.
[0049] S5. The operating parameters of the crude oil storage tank to be predicted are preprocessed and then input into the trained physical guided neural network model, which outputs the predicted value of the corrosion rate inside the tank bottom plate.
[0050] In step S5, the contribution of each operating parameter to the predicted corrosion rate is calculated using the SHAP value method; wherein, the SHAP value of the k-th operating parameter for a single sample i satisfies: ; In the formula, The average predicted value for all samples; For the first In the nth sample The SHAP value of each feature; The calculation optimization formula using Kernel SHAP is as follows: ; In the formula, The vector of SHAP values to be solved, whose elements represent the contribution of each operating parameter to the predicted corrosion rate; A set of operating parameters that affect the corrosion rate of the bottom plate of crude oil storage tanks; For feature subset The weights; This represents the total number of runtime parameters. This represents the factorial operation; To retain only a subset of features The model's predicted value at that time.
[0051] Based on the analysis of current data, Figure 7 and Figure 8 The parameter importance analysis results show that among the 20 parameters affecting the corrosion rate of the bottom plate of crude oil storage tanks, the importance of the features exhibits a clear hierarchical distribution: the key influencing factors are acoustic emission detection results (0.1658), crude oil water content (0.1631), crude oil sulfur content (0.1434), external corrosion (0.1406), and soil resistivity (0.1381), which are the top five key influencing factors, contributing nearly 75% of the importance weight in total. Among them, the importance of acoustic emission detection results and crude oil water content is the most prominent, with their values being close and significantly higher than other parameters. This also illustrates the importance of acoustic emission detection in determining the severity of tank corrosion. The top eight important features also include service time (7.0%), filling frequency (5.9%), and crude oil acid value (5.6%), while the importance of other parameters such as tank structure and local average temperature is relatively low, accounting for less than 20% in total. From the perspective of corrosion mechanism, the top five key parameters correspond to core corrosion pathways such as sulfide corrosion, electrochemical and microbial corrosion, and external environmental erosion. Their engineering significance is also quite clear—for example, measures such as controlling the sulfur content and water content of crude oil, strengthening external anti-corrosion coatings, and improving grounding systems can directly and specifically reduce corrosion risks. This also verifies the predictive model's ability to accurately capture key corrosion influencing factors, providing a clear directional reference for subsequent corrosion protection decisions.
[0052] from Figure 9The dependency graph clearly shows that the model proposed in this application (red curve) has a significantly higher degree of agreement with the corrosion mechanism than other models. For example, in core parameter dimensions such as "crude oil water content" and "crude oil sulfur content," the trend of the model curve is more reasonable in relation to the mechanism than other models. For example, the corrosion chemistry regularity of "increased water content / sulfur content → increased corrosion rate" is evident. In contrast, the comparative models show problems such as trend fluctuations and logical contradictions (such as a decrease in corrosion rate when water content increases), further confirming the mechanism adaptability of the method in this application. This result not only indirectly verifies the technical feasibility of the "prediction model integrating physical constraints," but also shows that as the multi-scale mechanisms of tank corrosion (such as sulfide electrochemical corrosion and microbial synergistic corrosion) become clearer, this method can more accurately characterize the dynamic change law of corrosion rate with multi-parameter coupling effect by iteratively updating the physical constraint rules, providing more useful technical reference support for the accurate prediction and protection of tank corrosion.
[0053] Example 2 Please see Figure 10 This embodiment provides a prediction system for the corrosion rate inside the bottom plate of a crude oil storage tank, applying the prediction method for the corrosion rate inside the bottom plate of a crude oil storage tank as described in Embodiment 1; the prediction system includes: The data acquisition module is used to acquire operating parameter samples and corresponding measured data of corrosion rate in the bottom plate of the crude oil storage tank in operation; the operating parameters are multi-dimensional characteristic data that characterize the structural properties of the tank body, the physicochemical properties of the storage medium, and the service environment. The preprocessing module is used to preprocess the sample data and then divide it into training set, validation set and test set; The model building module is used to build a physical-guided neural network model; based on the physical regularity that increased crude oil water content, sulfur content, acid value, and filling frequency will aggravate the corrosion of the tank bottom plate, a physical constraint loss term is designed; the Huber loss function is used as the data fidelity loss term; the physical constraint loss term and the data fidelity loss term are weighted and fused to construct the model's total loss function; The parameter optimization module is used to determine the hyperparameter search space of the physical-guided neural network model, and uses the Bayesian optimization algorithm to iteratively find the optimal combination of hyperparameters. The training module is used to input the optimal hyperparameters into the physics-guided neural network model, train the physics-guided neural network model using the training set, and monitor the training process and adjust the training parameters using the validation set. The prediction module is used to input the preprocessed operating parameters of the crude oil storage tank to be predicted into the trained physical-guided neural network model, and output the predicted value of the corrosion rate inside the tank bottom plate.
[0054] Example 3 This embodiment provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank as described in Embodiment 1.
[0055] like Figure 11 As shown, the computer terminal provided in this embodiment includes: at least one processor 101, and a memory 102 connected to at least one processor 101. This embodiment does not limit the specific connection medium between the processor 101 and the memory 102. Figure 11 The example shown is the connection between processor 101 and memory 102 via bus 100. Bus 100 is... Figure 11 The connections between other components are shown in bold lines and are for illustrative purposes only, not as limiting information. Bus 100 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 11 The bus is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. Alternatively, the processor 101 may also be called a controller; there is no restriction on the name.
[0056] In this embodiment, the memory 102 stores instructions that can be executed by at least one processor 101. The at least one processor 101 can execute the aforementioned method by executing the instructions stored in the memory 102.
[0057] The processor 101 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 102 and calling data stored in memory 102, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0058] In one possible design, processor 101 may include one or more processing units. Processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 101. In some embodiments, processor 101 and memory 102 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0059] Processor 101 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank disclosed in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in processor 101.
[0060] Memory 102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 102 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In this embodiment, memory 102 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0061] By designing and programming the processor 101, the code corresponding to the method for predicting the corrosion rate inside the bottom plate of the crude oil storage tank described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during operation. Figure 1 The steps of the method for predicting the corrosion rate inside the bottom plate of the crude oil storage tank are shown. How to design and program the processor 101 is a technique well-known to those skilled in the art and will not be described further here.
[0062] Example 4 This embodiment provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it implements the steps of the method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank as described in Embodiment 1.
[0063] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., provided on the computer device. Of course, the storage medium may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is typically used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.
[0064] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank, characterized in that, include: S1. Obtain operating parameter samples and corresponding measured data of corrosion rate in the bottom plate of the operating crude oil storage tank; The operating parameters are multidimensional feature data that characterize the structural properties of the storage tank, the physicochemical properties of the storage medium, and the service environment. The sample data is preprocessed and then divided into training set, validation set, and test set. S2. Construct a physical-guided neural network model; based on the physical regularity that increased crude oil water content, sulfur content, acid value, and filling frequency will exacerbate tank bottom corrosion, design a physical constraint loss term; adopt the Huber loss function as the data fidelity loss term; and weight and fuse the physical constraint loss term and the data fidelity loss term to construct the model's total loss function. S3. Determine the hyperparameter search space of the physical-guided neural network model, and use the Bayesian optimization algorithm to iteratively find the optimal combination of hyperparameters; S4. Substitute the optimal hyperparameters into the physics-guided neural network model, train the physics-guided neural network model using the training set, and monitor the training process and adjust the training parameters using the validation set. S5. The operating parameters of the crude oil storage tank to be predicted are preprocessed and then input into the trained physical guided neural network model, which outputs the predicted value of the corrosion rate inside the tank bottom plate.
2. The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank according to claim 1, characterized in that, In step S1, the operating parameters specifically include: structural form, construction material, construction wall thickness, presence or absence of insulation, tank volume, presence or absence of anode blocks, presence or absence of heaters, tank purpose, service time, filling frequency, medium type, medium sulfur content, medium water content, medium acid value, external corrosion, tank foundation condition, acoustic emission test results, local average annual precipitation, local average temperature, and soil resistivity.
3. The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank according to claim 2, characterized in that, The physical guidance neural network model includes an input layer, a hidden layer, and an output layer; wherein, the number of nodes in the input layer is consistent with the dimension of the running parameters, the hidden layer uses the ReLU activation function, and the output layer outputs the predicted value of the corrosion rate inside the tank bottom plate; During the iterative training cycle of the model, any one of the following factors—medium water content, medium sulfur content, medium acid value, and filling frequency—is randomly selected and increased to generate perturbation samples. If the corrosion rate prediction value output by the physical-guided neural network model for the perturbation samples is less than the corrosion rate prediction value for the unadjusted samples, then the physical difference term is calculated as the physical constraint loss term, and the calculation formula is as follows: In the formula, This is the physical constraint loss term; The total number of samples; The physical-guided neural network model predicts the corrosion rate for the i-th unadjusted sample. This is the physical-guided neural network model's prediction of the corrosion rate for the i-th perturbation sample. The formula for calculating the data fidelity loss item is as follows: In the formula, For the first Huber loss value for each sample; This represents the true corrosion rate on the i-th sample. The Huber loss threshold; The model's total loss function is: In the formula, represents the physical loss weight; max(·) is used to take the maximum value.
4. The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank according to claim 3, characterized in that, In step S5, the contribution of each operating parameter to the predicted corrosion rate is calculated using the SHAP value method; wherein, the SHAP value of the k-th operating parameter for a single sample i satisfies: In the formula, The average predicted value for all samples; For the first In the nth sample The SHAP value of each feature; The calculation optimization formula using Kernel SHAP is as follows: In the formula, The vector of SHAP values to be solved, whose elements represent the contribution of each operating parameter to the predicted corrosion rate; A set of operating parameters that affect the corrosion rate of the bottom plate of crude oil storage tanks; For feature subset The weights; This represents the total number of runtime parameters. This represents the factorial operation; To retain only a subset of features The model's predicted value at that time.
5. The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank according to claim 1, characterized in that, In step S3, the hyperparameters include the learning rate, the number of hidden layer nodes, the Huber loss threshold, and the physical loss weights. The learning rate search space is [0.0001, 0.01], the hidden layer node number search space is [8, 128], the Huber loss threshold search space is [0.0001, 0.1], and the physical loss weights are... The search space is [0.1, 1.0]; the Bayesian optimization algorithm iterative optimization specifically includes: using Gaussian process regression to construct a surrogate model of the objective function, and combining the acquisition function to select hyperparameter combinations one by one for evaluation until the maximum number of iterations is reached.
6. The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank according to claim 5, characterized in that, The objective function is expressed as follows: In the formula, The objective function is... Hyperparameter set for physics-guided neural network models; It is a mean function; Hyperparameter set In the mean function The probability distribution below; Represents probability distribution The gradient; This is the kernel function, and the superscript T is the transpose symbol; The hyperparameters are selected to improve the acquisition function, and the expression is: In the formula, To improve the acquisition function for evaluating hyperparameter sets within a Bayesian optimization framework. Potential improvements can be identified to filter out those that improve the objective function. Better hyperparameters; This represents the current optimal objective function value. and These are the mean and standard deviation of the Gaussian process regression prediction, respectively. The cumulative distribution function is the standard normal distribution. It is the probability density function of the standard normal distribution.
7. The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank according to claim 1, characterized in that, In step S1, the numerical sample data is normalized using the following formula: In the formula, The data is after normalization; This refers to the original operating parameter data; and These are the maximum and minimum values of the corresponding parameters in the original dataset, respectively; For categorical sample data, one-hot encoding is used to convert it into a vector representation.
8. A system for predicting the corrosion rate inside the bottom plate of a crude oil storage tank, characterized in that, The method for predicting the corrosion rate inside the bottom plate of a crude oil storage tank as described in any one of claims 1 to 7 is applied; the prediction system includes: The data acquisition module is used to acquire operating parameter samples and corresponding measured data of corrosion rate in the bottom plate of the crude oil storage tank in operation; the operating parameters are multi-dimensional characteristic data that characterize the structural properties of the tank body, the physicochemical properties of the storage medium, and the service environment. The preprocessing module is used to preprocess the sample data and then divide it into training set, validation set and test set; The model building module is used to build a physical-guided neural network model; based on the physical regularity that increased crude oil water content, sulfur content, acid value, and filling frequency will aggravate the corrosion of the tank bottom plate, a physical constraint loss term is designed; the Huber loss function is used as the data fidelity loss term; the physical constraint loss term and the data fidelity loss term are weighted and fused to construct the model's total loss function; The parameter optimization module is used to determine the hyperparameter search space of the physical-guided neural network model, and uses the Bayesian optimization algorithm to iteratively find the optimal combination of hyperparameters. The training module is used to input the optimal hyperparameters into the physics-guided neural network model, train the physics-guided neural network model using the training set, and monitor the training process and adjust the training parameters using the validation set. The prediction module is used to input the preprocessed operating parameters of the crude oil storage tank to be predicted into the trained physical-guided neural network model, and output the predicted value of the corrosion rate inside the tank bottom plate.
9. A computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for predicting the corrosion rate inside the bottom plate of crude oil storage tank as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method for predicting the corrosion rate inside the bottom plate of crude oil storage tank as described in any one of claims 1 to 7.