Method and model for predicting soil corrosion rate of metal material

By using inverse distance weighted interpolation and gradient analysis to divide homogeneous regions, and combining this with a machine learning model, the problem of insufficient corrosion rate prediction caused by the complexity of soil environment in existing technologies is solved, and more accurate and efficient corrosion rate prediction is achieved.

CN121612786AActive Publication Date: 2026-03-06TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202610131522.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-30
Publication Date
2026-03-06
Estimated Expiration
2046-01-30

AI Technical Summary

Technical Problem

Existing technologies for predicting the corrosion rate of metallic materials in soil cannot fully consider the complexity and diversity of the soil environment, resulting in insufficient reliability and real-time performance of the prediction results, and they cannot effectively handle changes in soil environmental parameters over a wide range.

Method used

Soil environmental parameters were analyzed using inverse distance weighted interpolation, gradient values ​​and abrupt change boundaries were calculated, homogeneous regions were divided, corrosion rate analysis was performed using a machine learning model, and a long short-term memory network model was used for prediction.

Benefits of technology

It improves the accuracy and efficiency of predicting soil corrosion rates for metallic materials, reduces the computational cost of subsequent model predictions, and better reflects the impact of the soil environment on corrosion rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121612786A_ABST
    Figure CN121612786A_ABST
Patent Text Reader

Abstract

The invention discloses a metal material soil corrosion rate prediction method and a prediction model, and relates to the technical field of metal corrosion prediction, and the method comprises the following steps: delimiting a research area based on a metal pipeline, dividing the research area into a plurality of equal-size test areas, collecting soil environment parameters on selected sampling points, and calculating the soil corrosion rate of the metal pipeline; analyzing parameters of each sampling point by adopting an inverse distance weighted interpolation method so as to determine soil environment parameters in the test area and calculate gradient values of the soil environment parameters; determining a sudden change boundary through the gradient value, dividing a research area into a plurality of sub-areas, analyzing soil environment parameter variations of adjacent areas, performing homogenization combination, and inputting soil environment parameter values of the homogenized test areas and the types of metal pipeline materials into a corrosion rate analysis model to obtain a corrosion rate analysis result; outputting a soil corrosion rate prediction value of the metal material; and the prediction efficiency of corrosion rate prediction is obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metal corrosion prediction technology, specifically to a method and model for predicting the soil corrosion rate of metallic materials. Background Technology

[0002] In modern infrastructure construction, metal pipelines are widely used in fields such as oil, natural gas, and water conservancy. However, due to the long-term influence of environmental factors on metal materials in the soil, corrosion problems are becoming increasingly serious, leading to frequent accidents such as pipeline leaks and ruptures. This not only pollutes the environment but may also cause safety hazards, resulting in huge losses to society and the economy. Therefore, how to effectively predict the corrosion rate of metal materials in the soil has become an urgent technical problem to be solved. Existing technologies for predicting metal corrosion rates have many shortcomings. Traditional prediction models often rely on simple empirical formulas. Whether it is a simple statistical model or a complex machine learning model, they usually simply average the data from multiple monitoring points in a region, which often fails to fully consider the complexity and diversity of the soil environment. The physicochemical properties of soil are affected by many factors, such as soil pH, water content, salinity, and temperature, and these factors are often unevenly distributed in space. In addition, existing methods usually use data from a single sampling point for analysis, which cannot reflect the changes in the soil environment over a larger area. At the same time, they cannot collect soil environmental parameters from a large number of areas one by one. Ordinary interpolation methods will lead to a large amount of data accumulation. When making predictions, it is necessary to traverse a large amount of data to determine the soil environmental parameters of the detection area, resulting in insufficient reliability and real-time performance of the prediction results.

[0003] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide a method and model for predicting the soil corrosion rate of metallic materials, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for predicting the soil corrosion rate of metallic materials, comprising the following steps: The study area was delineated based on the metal pipes. The entire study area was divided into several test areas of equal size by a preset minimum detection unit. Several sampling points were selected in the study area, and soil environmental parameters of all sampling points were collected. For each soil environmental parameter, the soil environmental parameter at each sampling point is analyzed using the inverse distance weighted interpolation method to determine the soil environmental parameter in each test area, and the gradient value of each soil environmental parameter in each test area is calculated. For each soil environmental parameter gradient value, the abrupt change boundary of that soil environmental parameter in the study area is determined, and the study area is divided into several study sub-regions through the abrupt change boundary. For any test area in the study sub-region, all its adjacent areas are determined. By analyzing the change in soil environmental parameters in each adjacent area, the test areas are homogenized and merged. All test areas are traversed to form a homogenized area map under each soil environmental parameter. By using homogenized region maps under each soil environmental parameter, the soil environmental parameter values ​​at different locations on the surface of the entire study area are determined. The soil environmental parameter values ​​and the type of metal pipe material are then input into the metal corrosion rate analysis model, and the predicted values ​​of soil corrosion rate of metal materials in each test area are output.

[0006] Furthermore, the logic for determining the specific study area is as follows: the soil area where the shortest distance between the soil and the outer wall of the metal pipe is less than a preset threshold is defined as the study area; The soil environmental parameters specifically include: soil temperature, soil pH, soil moisture content, soil resistivity, and soil chloride ion concentration; wherein the soil environmental parameter data at the center point of the test area are used as the soil environmental parameter values ​​for the test area.

[0007] Furthermore, the logic for determining the specific soil environmental parameters of each test area is as follows: For each environmental parameter, the inverse distance weighted interpolation method is used to analyze the soil environmental parameter at each sampling point, and the soil environmental parameter for each test area is calculated using the following formula: In the formula, Let j be the soil environmental parameter in the u-th test area. Let j be the soil environmental parameter at the i-th sampling point. Let be the distance from the i-th sampling point to the center point of the u-th test area. Let be the distance power, i be the index of the sampling point, j be the index of the soil environmental parameter type, u be the index of the test area, and m be the total number of sampling points. The sampling points are randomly selected within the test area.

[0008] Furthermore, for any soil environmental parameter, the specific method for calculating its gradient value in each test area is as follows: establish a spatial coordinate system, use the coordinates of the center point of each test area to represent the coordinates of each test area, calculate the gradient values ​​of each test area in the horizontal, vertical and vertical directions, and calculate the total gradient magnitude of the test area based on the gradient values ​​in the horizontal, vertical and vertical directions. The specific logic for calculating the gradient value in the horizontal direction for any test region is as follows: determine the test regions that share a common edge with the test region in the horizontal direction, and use them as the horizontally adjacent test regions of the test region; calculate the gradient value between the test region and the horizontally adjacent test regions; and take the average absolute difference between the gradient values ​​of the test region and all the horizontally adjacent test regions as the horizontal gradient. The same method is used to determine the longitudinal and vertical gradients between the test areas. The specific formula used to calculate the total gradient of the test area based on the lateral, longitudinal, and vertical gradient values ​​is as follows: In the formula, Indicates the first The total gradient of the r-th soil environmental parameter within each test area. Indicates the first The lateral gradient value of the r-th soil environmental parameter within each test area. Indicates the first The longitudinal gradient value of the r-th soil environmental parameter within each test area. Indicates the first The vertical gradient value of the r-th soil environmental parameter within each test area, where The x-coordinate variable represents the test area. Let z be the vertical coordinate of the test area, z be the vertical coordinate of the test area, and r be the index of the soil environmental parameter type. This is the index for the test region.

[0009] Furthermore, for any given soil environmental parameter, the method for determining the abrupt boundary within the study area under that soil environmental parameter is as follows: based on the gradient values ​​of each test area under that soil environmental parameter, calculate the gradient mean and standard deviation of the entire study area, and calculate the gradient skewness and gradient kurtosis based on the gradient mean and standard deviation of the entire study area. Based on gradient skewness and gradient kurtosis, combined with the gradient mean and standard deviation of the entire study area, the kurtosis-skewness adaptive threshold method is used to calculate the significance threshold. The gradient values ​​of each test area under this soil environmental parameter are compared with the significance threshold. The test areas are marked according to different comparison results to form the abrupt boundary within the study area. The specific formula used to calculate the significance threshold is as follows: In the formula, The significance threshold, The gradient mean of the entire study area. The gradient standard deviation for the entire study area. For gradient skewness, For gradient kurtosis, , and These are the influence coefficients.

[0010] Furthermore, for any soil environmental parameter, the specific logic for forming its abrupt boundary within the study area is as follows: the gradient value of the soil environmental parameter in each test area is compared with the significance threshold of the corresponding soil environmental parameter. If the gradient value of the soil environmental parameter in a test area is not less than the significance threshold of the corresponding soil environmental parameter, then this test area is marked as a candidate boundary area. All test areas are traversed to obtain all candidate boundary areas. Spatially adjacent candidate boundary areas are connected, and the trajectory of the connected areas is taken as the abrupt boundary. The study area is divided into several independent sub-regions through the abrupt boundary, thereby determining several study sub-regions under any soil environmental parameter.

[0011] Furthermore, the specific logic behind merging the test areas to achieve homogenization is as follows: Within each study sub-region, two test regions are defined as adjacent regions when they share at least one edge spatially. Within the same study sub-region, a randomly selected test region is designated as the baseline test region. All adjacent regions of the baseline test region are determined. Based on the changes in soil environmental parameters between the baseline test region and its adjacent regions, a merging cost index is calculated. The merging cost index is used to determine whether merging is necessary. The specific formula for calculating the merging cost index is as follows: In the formula, For the base test area and the first The combined cost index of adjacent regions for the j-th soil environmental parameter For the base test area and the first The mean value of the j-th soil environmental parameter for each adjacent region. For the first The j-th soil environmental parameter value of each adjacent region The index of the adjacent regions of the base test region; Based on the merging cost index of the baseline test area and adjacent areas, the logic for determining whether to merge is as follows: using a recursive analysis approach, a preset merging cost threshold is established. The merging cost index of the baseline test area and each adjacent area is compared with the preset merging cost threshold. If the merging cost index of an adjacent area is less than the preset merging cost threshold, the baseline test area is merged with the adjacent area corresponding to the minimum merging cost index. The soil environmental parameters of the merged area are set as the soil environmental parameters of the baseline test area, and the merged area is used as the new baseline test area. The area merging operation is repeated to determine the homogeneous areas within each research sub-region, forming a homogeneous area map.

[0012] Furthermore, the metal corrosion rate analysis model is constructed based on a machine learning network model. The metal corrosion rate analysis model is trained by the corrosion rate of the metal material to be tested under different combinations of soil environmental parameter values ​​in history. The metal corrosion rate is characterized by the generation rate of corrosion products. Specifically, the type of metal material to be tested and the combination of soil environmental parameter values ​​are used as inputs, and the generation rate of corrosion products is used as a label to train the metal corrosion rate analysis model. Based on the homogenized region map, the combination of soil environmental parameter values ​​for each test area is determined. Combined with the type of metal material to be tested, the values ​​are input into the metal corrosion rate analysis model to obtain the predicted corrosion rate of the metal material to be tested in each test area.

[0013] This invention also provides a prediction model for the soil corrosion rate of metallic materials. This prediction model is used to execute the aforementioned method for predicting the soil corrosion rate of metallic materials, and includes: The minimum unit planning module is used to delineate the research area based on metal pipes. It divides the entire research area into several test areas of equal size through preset minimum detection units, selects several sampling points in the research area, and collects soil environmental parameters from all sampling points. The gradient change calculation module is used to analyze the soil environmental parameter at each sampling point using the inverse distance weighted interpolation method for each soil environmental parameter, in order to determine the soil environmental parameter of each test area and calculate the gradient value of each soil environmental parameter in each test area. The homogeneous region merging module is used to determine the abrupt change boundary of each soil environmental parameter within the study area for the gradient value of each soil environmental parameter, and divide the study area into several sub-study areas through the abrupt change boundary. For any test area within the study sub-study area, all its adjacent areas are determined. By analyzing the changes in soil environmental parameters in each adjacent area, the test areas are homogeneously merged. All test areas are traversed to form a homogeneous region map for each soil environmental parameter. The prediction model construction module is used to determine the soil environmental parameter values ​​at different locations on the surface of the entire study area through a homogenized area map under each soil environmental parameter. The soil environmental parameter values ​​and the type of metal pipe material are input into the metal corrosion rate analysis model, and the predicted values ​​of the soil corrosion rate of metal materials in each test area are output.

[0014] Compared with the prior art, the beneficial effects of the present invention are: By calculating the gradient values ​​of soil environmental parameters, abrupt boundary changes within the study area can be effectively identified. Identifying abrupt boundary changes not only reveals the important spatial variations of soil parameters but also helps to understand the influence mechanism of the soil environment on the metal corrosion rate. Through the analysis of abrupt boundary changes, the study area is divided into multiple homogeneous sub-regions, laying the foundation for subsequent corrosion rate prediction. By integrating homogenized regional maps with different soil environmental parameters and inputting the types of metal pipe materials into the corrosion rate analysis model, more accurate predicted values ​​of soil corrosion rates for metal materials can be generated. Homogenization significantly improves the prediction efficiency of corrosion rates. Since the soil environmental parameters in the merged region tend to be consistent, the large-scale and repetitive calculation costs of subsequent model prediction stages are significantly reduced by using one-time, lightweight gradient analysis and pre-calculation of regional merging. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a schematic diagram of the overall model structure of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0017] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0018] Example: Please see Figure 1 The present invention provides a technical solution: A method for predicting the soil corrosion rate of metallic materials, comprising the following steps: Step 1: Delineate the study area based on the metal pipe. Divide the entire study area into several test areas of equal size using a preset minimum detection unit. Select several sampling points in the study area and collect soil environmental parameters from all sampling points.

[0019] Based on the research objectives and soil characteristics, the area of ​​the preset minimum detection unit is determined. The shape of the minimum detection unit can be selected as square, rectangle, circle, etc., and square and rectangle are generally selected. The research area is divided according to the area of ​​the set minimum detection unit to obtain several test areas of equal size. The logic for determining the specific study area is as follows: the soil area where the shortest distance between the metal pipe and the outer wall is less than a preset threshold is defined as the study area; the preset threshold refers to the shortest distance between the outer wall of the metal pipe and the soil that has an impact. It is set according to the different corrosion effects of pipes made of different materials, such as steel and aluminum alloy, on the soil, which in turn affects the soil environmental parameters, as well as the soil type, such as sandy soil, clay, loam, etc., and is generally set between 0.3m and 1m. The soil environmental parameters specifically include: soil temperature, soil pH, soil moisture content, soil resistivity, and soil chloride ion concentration; wherein the soil environmental parameter data at the center point of the test area are used as the soil environmental parameter values ​​for the test area.

[0020] The specific method for obtaining soil environmental parameters at different sampling points is as follows: Soil temperature can be measured using a soil thermometer or a digital temperature probe. Specifically, the probe of the thermometer is inserted vertically into the soil, and after waiting for a few minutes until the temperature stabilizes, the temperature value is recorded. The above steps are repeated for each sampling point to obtain the soil temperature at each sampling point. Soil pH values ​​are obtained using a soil pH meter or pH test strips. Take a certain amount of soil sample, usually 10 grams, add deionized water, stir gently, and let stand for a few minutes until the soil particles settle. Use a pH meter or pH test strips to test the pH value of the supernatant; repeat this process to obtain the pH value at each sampling point. Soil moisture content is obtained by soil moisture meter or weighing method. A certain amount of soil sample is taken and its initial mass is recorded as soil wet weight. The sample is placed in an oven until the soil sample is completely dried. Its mass is weighed again as soil dry weight. Soil moisture content is calculated by soil wet weight and soil dry weight using the soil moisture content calculation formula. The soil moisture content calculation formula is a conventional existing technology and will not be described in detail here. Soil resistivity is obtained using a soil conductivity meter. The electrodes of the conductivity meter are inserted into the soil, ensuring full contact between the electrodes and the soil. The conductivity value is read, usually expressed in millisiemens per meter (mS / m). Soil chloride ion concentration is obtained using a chloride ion concentration meter or ion-selective electrode. A certain amount of soil sample is taken, soaked in deionized water, gently stirred, and then allowed to stand. The chloride ion concentration is measured using a chloride ion-selective electrode or a standard chloride ion determination method such as colorimetry. The chloride ion concentration value is recorded, usually expressed in milligrams per liter (mg / L).

[0021] Step 2: For each soil environmental parameter, the soil environmental parameter at each sampling point is analyzed using the inverse distance weighted interpolation method to determine the soil environmental parameter of each test area, and the gradient value of each soil environmental parameter in each test area is calculated.

[0022] The logic for determining the soil environmental parameters of each test area is as follows: For each environmental parameter, the inverse distance weighted interpolation method is used to analyze the soil environmental parameter at each sampling point, and the soil environmental parameter for each test area is calculated using the following formula: In the formula, Let j be the soil environmental parameter in the u-th test area. Let j be the soil environmental parameter at the i-th sampling point. Let be the distance from the i-th sampling point to the center point of the u-th test area. Let be the distance power, i be the index of the sampling point, j be the index of the soil environmental parameter type, u be the index of the test area, and m be the total number of sampling points. The sampling points are randomly selected within the test area.

[0023] It should be noted that inverse distance weighted interpolation is a commonly used spatial interpolation method, widely applied in geographic information systems and environmental science; this method can extend discrete sampling point data into continuous predicted values ​​for the entire study area.

[0024] In the formula Partial representation in the calculation of the first Test areas When calculating soil environmental parameters, the first The influence of each sampling point; with As the magnitude increases, this influence will decrease rapidly; These are key parameters. Larger ones... A higher value will result in a smaller influence on more distant points, thus emphasizing the influence of closer points; while a smaller value will result in a smaller influence on more distant points. This value allows distant points to play a greater role in interpolation; typically, a value is chosen. This is a common practice; The denominator in the formula Part of it is used for normalization weights to ensure that the sum of the influence of the interpolation result at different sampling points is 1; this can avoid the deviation of the interpolation result caused by different numbers of sampling points.

[0025] For any soil environmental parameter, the specific method for calculating its gradient value in each test area is as follows: establish a spatial coordinate system, use the coordinates of the center point of each test area to represent the coordinates of each test area, calculate the gradient values ​​of each test area in the horizontal, vertical and vertical directions, and calculate the total gradient magnitude of the test area based on the gradient values ​​in the horizontal, vertical and vertical directions. The specific logic for calculating the lateral gradient value of any test area is as follows: Identify test areas that share a common edge with the test area in the lateral direction, specifically including left and right adjacent areas, as the lateral adjacent test areas of the test area. Calculate the gradient value between the test area and the lateral adjacent test areas, and use the average absolute difference between the gradient values ​​of the test area and all lateral adjacent test areas as the lateral gradient. The gradient can be calculated based on a certain soil environmental parameter data, using the difference method to calculate the gradient value between the test area and the left and right adjacent test areas. The same method is used to determine the longitudinal and vertical gradients between the test areas. The specific formula used to calculate the total gradient of the test area based on the lateral, longitudinal, and vertical gradient values ​​is as follows: In the formula, Indicates the first The total gradient of the r-th soil environmental parameter within each test area. Indicates the first The lateral gradient value of the r-th soil environmental parameter within each test area. Indicates the first The longitudinal gradient value of the r-th soil environmental parameter within each test area. Indicates the first The vertical gradient value of the r-th soil environmental parameter within each test area, where The x-coordinate variable represents the test area. Let z be the vertical coordinate of the test area, z be the vertical coordinate of the test area, and r be the index of the soil environmental parameter type. This is the index of the test area. It should be noted that the gradient is a vector representing the rate of change and direction of a certain soil environmental parameter in space. By calculating the gradients in the horizontal, vertical, and longitudinal directions respectively, a comprehensive understanding of the changes in soil environmental parameters in three-dimensional space can be obtained; the synthesis of gradient values ​​in various directions can better describe the changing trends of soil environmental parameters. In mathematics, the use of the sum of squares helps avoid the cancellation of negative values, ensuring that the result is always non-negative. Squaring the gradient values ​​in each direction, summing them, and then taking the square root yields the magnitude of the total gradient. This approach effectively combines gradients from different directions into a single scalar value, denoted as the total gradient magnitude, facilitating analysis and comparison. The formula considers the variations in soil environmental parameters in three-dimensional space, which is essential in environmental research. Soil properties often exhibit complex spatial variations; considering only one direction may overlook the overall changes.

[0026] Step 3: For the gradient value of each soil environmental parameter, determine the abrupt change boundary of that soil environmental parameter within the study area, and divide the study area into several sub-regions through the abrupt change boundary. For any test area within the study sub-region, determine all its adjacent areas. By analyzing the changes in soil environmental parameters in each adjacent area, homogenize and merge the test areas. Traverse all test areas to form a homogenized region map for each soil environmental parameter.

[0027] For any given soil environmental parameter, the method for determining the abrupt boundary within the study area under that soil environmental parameter is as follows: Based on the gradient values ​​of each test area under that soil environmental parameter, calculate the gradient mean and standard deviation of the entire study area, and calculate the gradient skewness and gradient kurtosis based on the gradient mean and standard deviation of the entire study area; the specific formulas for calculating gradient skewness and gradient kurtosis are conventional existing techniques and will not be elaborated here. Based on gradient skewness and gradient kurtosis, combined with the gradient mean and standard deviation of the entire study area, the kurtosis-skewness adaptive threshold method is used to calculate the significance threshold. The gradient values ​​of each test area under this soil environmental parameter are compared with the significance threshold. The test areas are marked according to different comparison results to form the abrupt boundary within the study area. The specific formula used to calculate the significance threshold is as follows: In the formula, The significance threshold, The gradient mean of the entire study area. The gradient standard deviation for the entire study area. For gradient skewness, For gradient kurtosis, , and These are the influence coefficients.

[0028] It should be noted that the significance threshold This indicates that within a specific study area, the gradient value of a certain soil environmental parameter is considered a critical point for significant change; Used to determine when the gradient value of a test region is significantly higher than the overall gradient level; when the gradient value of a test region exceeds... At that time, it was considered that there were significant changes in soil environmental parameters in the area, reflecting potential abrupt boundary or heterogeneous region; as a criterion, It provides an objective reference point that can be used to compare the gradient values ​​of various test areas, thereby enabling regional division and homogeneity analysis; Gradient mean of the entire study area As a baseline value, it provides a benchmark for the gradient level across the entire study area; it represents the gradient distribution characteristics of most test areas. Gradient standard deviation of the entire study area This reflects the dispersion of gradient values. A higher standard deviation means greater variation in gradient values; therefore, it is added to the significance threshold. The sensitivity of the threshold can be adjusted so that the significance threshold is increased accordingly in highly variable regions, thereby improving the ability to identify mutation boundaries; Gradient skewness Skewness describes the symmetry of the gradient value distribution; a large skewness value indicates that the gradient value may be biased to one side, suggesting the existence of non-uniformity. This can be addressed by adding... The significance threshold can be adjusted according to the magnitude of skewness, thereby more accurately identifying regions where mutations may occur; Gradient kurtosis This measures the sharpness of the gradient value distribution; if the kurtosis is greater than 3, it indicates that the tail of the data distribution is heavy, and there may be a strong abrupt change signal; therefore, by adding... The significance threshold can be further adjusted based on changes in kurtosis in order to better capture potential mutation regions; The relationship between the significance threshold and skewness and kurtosis is dynamic. Skewness and kurtosis both reflect the distribution characteristics of gradient values, and the significance threshold can be adjusted more flexibly by changing these distribution characteristics.

[0029] Gradient skewness and kurtosis are important statistics describing the distribution pattern of data, revealing nonlinear characteristics and distribution anomalies. Incorporating these factors into the calculation of significance thresholds allows for a more comprehensive consideration of changes in soil environmental parameters, thereby improving the accuracy and sensitivity of abrupt change boundary identification.

[0030] The adaptive thresholding method not only relies on simple mean and standard deviation, but also takes into account the distribution characteristics of the data, which can better cope with complex soil environmental changes and thus achieve more accurate regional division.

[0031] This process involves analyzing historical data or previous research results to determine the initial value of the influence coefficient. In conjunction with opinions from experts in relevant fields, information on the importance and relevance of the influencing factors is provided to determine an appropriate coefficient value; it is generally set to... and , and All are greater than 0.

[0032] For any soil environmental parameter, the logic for forming its mutation boundary within the study area is as follows: compare the gradient value of the soil environmental parameter in each test area with the significance threshold of the corresponding soil environmental parameter. If the gradient value of the soil environmental parameter in a test area is not less than the significance threshold of the corresponding soil environmental parameter, then this test area is marked as a candidate boundary area. Traverse all test areas to obtain all candidate boundary areas. Connect spatially adjacent candidate boundary areas and use the trajectory of the connected areas as mutation boundaries. Divide the study area into several independent sub-regions through mutation boundaries to determine several study sub-regions under any soil environmental parameter. The specific steps include: if the gradient value of a certain test area is not less than the corresponding significance threshold, the area is marked as a candidate boundary area; using graph theory or spatial analysis tools, adjacent candidate boundary areas in space are identified and connected, and adjacent candidate areas are connected by line segments or polygonal contours to form the trajectory of abrupt boundary; the study area is divided into several independent study sub-regions according to the abrupt boundary; each study sub-region represents a relatively uniform soil environment characteristic.

[0033] The logic behind merging and homogenizing test regions is as follows: Within each study sub-region, two test regions are defined as adjacent regions when they share at least one edge spatially. Within the same study sub-region, a randomly selected test region is designated as the baseline test region. All adjacent regions of the baseline test region are determined. Based on the changes in soil environmental parameters between the baseline test region and its adjacent regions, a merging cost index is calculated. The merging cost index is used to determine whether merging is necessary. The specific formula for calculating the merging cost index is as follows: In the formula, For the base test area and the first The combined cost index of adjacent regions for the j-th soil environmental parameter For the base test area and the first The mean value of the j-th soil environmental parameter for each adjacent region. For the first The j-th soil environmental parameter value of each adjacent region The index of the adjacent regions of the base test region; It should be noted that the basal test area is related to the first For each adjacent region, the combined cost index of the j-th soil environmental parameter... Indicates the base test area and the first The adjacent region in the first The difference between the mean and the actual values ​​of the combined soil environmental parameters; the greater the difference, the higher the cost of the combination, that is, the greater the change in soil environmental parameters that the combination may lead to. By calculating the merging cost, the similarity between the baseline test area and adjacent areas in specific soil environmental parameters can be reflected. A smaller value indicates that the two values ​​are similar under that parameter, the cost of merging is smaller, and the merged result may maintain relative consistency. Introducing the mean The reason for using the squared difference as the cost calculation method is to comprehensively consider the overall characteristics of the base test area and the adjacent areas. The logic is that the squared difference can emphasize the impact of larger differences, making the merging decision more rigorous and avoiding the neglect of small differences; merging will only be inclined when the parameter values ​​are very close, thus ensuring the continuity and consistency of soil environmental characteristics of the merged area.

[0034] Based on the merging cost index of the baseline test area and adjacent areas, the logic for determining whether to merge is as follows: using a recursive analysis approach, a preset merging cost threshold is established. The merging cost index of the baseline test area and each adjacent area is compared with the preset merging cost threshold. If the merging cost index of an adjacent area is less than the preset merging cost threshold, the baseline test area is merged with the adjacent area corresponding to the minimum merging cost index. The soil environmental parameters of the merged area are set as the soil environmental parameters of the baseline test area, and the merged area is used as the new baseline test area. The area merging operation is repeated to determine the homogeneous areas within each research sub-region, forming a homogeneous area map.

[0035] The recursive analysis approach allows the merging process to proceed step by step, facilitating layer-by-layer optimization. Each merging step is based on the current merging cost, ensuring that each merging is performed while minimizing the cost. After merging, the new merged region is used as the baseline test region, effectively reflecting changes in soil environmental parameters and ensuring that the merged regions are similar in characteristics. The soil environmental parameters of the merged region are set as those of the baseline test region to avoid infinite merging. The preset merging cost threshold is specifically set based on expert experience, generally between 0.1 and 0.5.

[0036] Homogeneous region maps provide a direct basis for differentiated protection, eliminating the need to interpret prediction results from tens of thousands of grid points. Only a limited number of protection schemes need to be formulated for dozens of regions. Moreover, storing a small number of regional model parameters or results consumes far less computational resources than storing a large number of grid point data.

[0037] Step 4: Using the homogenized region map under each soil environmental parameter, determine the soil environmental parameter values ​​at different locations on the surface of the entire study area. Input the soil environmental parameter values ​​and the type of metal pipe material into the metal corrosion rate analysis model, and output the predicted value of the soil corrosion rate of metal materials in each test area.

[0038] The metal corrosion rate analysis model is constructed based on a machine learning network model, specifically selecting a Long Short-Term Memory (LSTM) network model as the base model. For this LSTM model, an activation function and optimization algorithm are selected, with the Tanh function chosen as the activation function and Adam as the optimization algorithm. The formula for the Tanh function is: In the formula, Represents the Tanh function, with the independent variable... This represents the weighted sum of the neuron's inputs, that is, the result of the weighted sum of the inputs received by the neuron from the previous layer; Simultaneously, the hyperparameters of the LSTM model are set, including: number of network layers, number of iterations, learning rate, batch size, number of training iterations, number of batches, and number of hidden layer neurons. The network is set to a 3-layer network structure, the number of iterations is set to 200, the learning rate is set to 0.001, the batch size is set to 32, the number of training iterations is set to 100, the batch size is set to 256, and the number of hidden layer neurons is set to 32. The corrosion rate analysis model of the metal corrosion rate is trained by using the corrosion rate of the metal material to be tested under different combinations of soil environmental parameters. The corrosion rate of the metal is characterized by the formation rate of corrosion products. Specifically, the type of metal material to be tested and the combination of soil environmental parameters are used as inputs, and the formation rate of corrosion products is used as a label to train the metal corrosion rate analysis model. The data is divided into training, validation, and test sets, for example, in a ratio of 70%, 15%, and 15%. The specific training steps include: initializing model parameters such as the weights and biases of the neural network; passing the input data, including metal type and soil environmental parameters, to the model to obtain the predicted value of metal corrosion rate; calculating the loss value, and using the mean squared error (MSE) loss function to calculate the error based on the actual and predicted values ​​of metal corrosion rate. The model parameters are adjusted using gradient descent or other optimizers like Adam to minimize the loss function. The forward and backward propagation processes are repeated until the loss value converges or a preset stopping condition is met. After each training round, the loss value on the validation set is calculated to monitor the model's generalization performance and avoid overfitting. Finally, the test set is used to evaluate the model's final performance to ensure that the model has good generalization ability.

[0039] Based on the homogenized region map, the combination of soil environmental parameter values ​​for each test area is determined. Combined with the type of metal material to be tested, the values ​​are input into the metal corrosion rate analysis model to obtain the predicted corrosion rate of the metal material to be tested in each test area.

[0040] Please see Figure 2 The present invention also provides a prediction model for the soil corrosion rate of metallic materials. This prediction model is used to execute the aforementioned method for predicting the soil corrosion rate of metallic materials, and includes: The minimum unit planning module is used to delineate the research area based on metal pipes. It divides the entire research area into several test areas of equal size through preset minimum detection units, selects several sampling points in the research area, and collects soil environmental parameters from all sampling points. The gradient change calculation module is used to analyze the soil environmental parameter at each sampling point using the inverse distance weighted interpolation method for each soil environmental parameter, in order to determine the soil environmental parameter of each test area and calculate the gradient value of each soil environmental parameter in each test area. The homogeneous region merging module is used to determine the abrupt change boundary of each soil environmental parameter within the study area for the gradient value of each soil environmental parameter, and divide the study area into several sub-study areas through the abrupt change boundary. For any test area within the study sub-study area, all its adjacent areas are determined. By analyzing the changes in soil environmental parameters in each adjacent area, the test areas are homogeneously merged. All test areas are traversed to form a homogeneous region map for each soil environmental parameter. The prediction model construction module is used to determine the soil environmental parameter values ​​at different locations on the surface of the entire study area through a homogenized area map under each soil environmental parameter. The soil environmental parameter values ​​and the type of metal pipe material are input into the metal corrosion rate analysis model, and the predicted values ​​of the soil corrosion rate of metal materials in each test area are output.

[0041] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0042] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0043] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0044] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method of predicting the rate of soil corrosion of a metal material, characterized by, The specific steps include: Based on the metal pipeline, the research area is demarcated, the entire research area is divided into several equal size test areas by a preset minimum detection unit, several sampling points are selected in the research area, and the soil environment parameters of all sampling points are collected; For each type of soil environment parameter, the soil environment parameter of each test area is determined based on the inverse distance weighted interpolation method for analyzing the soil environment parameter of each sampling point, and the gradient value of each type of soil environment parameter in each test area is calculated; For the gradient value of each type of soil environment parameter, the mutation boundary of the type of soil environment parameter in the research area is determined, and the research area is divided into several research sub-areas through the mutation boundary, for any test area in the research sub-area, all adjacent areas are determined, the test area is homogenized and combined by analyzing the soil environment parameter change amount of each adjacent area, and all test areas are traversed to form a homogenization area map under each type of soil environment parameter; Through the homogenization area map under each type of soil environment parameter, the soil environment parameter values at different positions on the surface of the entire research area are determined, the soil environment parameter values and the types of metal pipeline materials are input into the metal corrosion rate analysis model, and the predicted values of the metal material soil corrosion rate of each test area are output.

2. A method of predicting the rate of corrosion of a metal material in soil according to claim 1, characterized in that: The logic for determining the specific research area is to demarcate the soil area with a shortest distance from the outer wall of the metal pipeline less than a preset threshold as the research area. The specific soil environment parameters include soil temperature, soil pH value, soil moisture content, soil resistivity and soil chloride ion concentration; wherein the soil environment parameter data of the center point of the test area is taken as the soil environment parameter value of the test area.

3. A method of predicting the rate of corrosion of a metal material in soil according to claim 2, characterized in that: The specific logic for determining the soil environment parameter of each test area is that for each type of environment parameter, the inverse distance weighted interpolation method is used to analyze the soil environment parameter of each sampling point, and the soil environment parameter of each test area is calculated, and the specific formula is: In the formula, is the jth soil environment parameter in the u th test area, is the jth soil environment parameter of the i th sampling point, is the distance from the i th sampling point to the center point of the u th test area, is the distance power, i is the index of the sampling point, j is the index of the soil environment parameter type, u is the index of the test area, and m is the total number of sampling points, where the sampling points are randomly selected in the test area.

4. A method of predicting the rate of corrosion of a metal material in soil according to claim 3, characterized in that: The specific method for calculating the gradient value of any type of soil environment parameter in each test area is to establish a spatial coordinate system, express the coordinates of each test area by the coordinates of the center point of each test area, calculate the gradient values of each test area in the horizontal, vertical and vertical directions, and calculate the total gradient size of the test area based on the gradient values in the horizontal, vertical and vertical directions; The specific logic for calculating the gradient value of any test area in the horizontal direction is to determine the test areas with common edges between the test area and the test area along the horizontal direction as the horizontal adjacent test areas of the test area, calculate the gradient values of the test area and the horizontal adjacent test areas, and take the average absolute difference value of the gradient values of the test area and all horizontal adjacent test areas as the horizontal gradient; The same method is used to determine the vertical gradient and vertical gradient between the test areas, and the specific formula for calculating the total gradient size of the test area based on the gradient values in the horizontal, vertical and vertical directions is: In the formula, Indicates the first The total gradient of the r-th soil environmental parameter within each test area. Indicates the first The lateral gradient value of the r-th soil environmental parameter within each test area. Indicates the first The longitudinal gradient value of the r-th soil environmental parameter within each test area. Indicates the first The vertical gradient value of the r-th soil environmental parameter within each test area, where The x-coordinate variable represents the test area. Let z be the vertical coordinate of the test area, z be the vertical coordinate of the test area, and r be the index of the soil environmental parameter type. This is the index for the test region.

5. A method of predicting the rate of corrosion of a metal material in soil according to claim 4, characterized in that: For any kind of soil environmental parameter, the method for determining the mutation boundary in the study area under the soil environmental parameter is: based on the gradient value of each test area under the soil environmental parameter, the gradient mean and standard deviation of the entire study area are calculated, and the gradient skewness and gradient kurtosis are calculated according to the gradient mean and standard deviation of the entire study area; Based on the gradient skewness and gradient kurtosis, combined with the gradient mean and standard deviation of the entire study area, the peak-threshold adaptive threshold method is used to calculate the significance threshold, and the gradient value of each test area under the soil environmental parameter is compared with the significance threshold, and the test area is labeled according to different comparison results, to form the mutation boundary in the study area; The formula for calculating the significance threshold is: wherein is a saliency threshold, is the gradient mean of the entire study region, is the gradient standard deviation of the entire study region, is the gradient skewness, is the gradient kurtosis, , and are influence coefficients, respectively.

6. A method of predicting the rate of corrosion of a metal material in soil according to claim 5, characterized in that: For any kind of soil environmental parameter, the logic for forming the mutation boundary in the study area is: comparing the gradient value of each test area of the soil environmental parameter with the significance threshold of the corresponding soil environmental parameter, if the gradient value of the test area of the soil environmental parameter is not less than the significance threshold of the corresponding soil environmental parameter, the test area is labeled as a candidate boundary region, all candidate boundary regions are obtained by traversing all test areas, and adjacent candidate boundary regions are connected, the region trajectory formed by the connection is taken as the mutation boundary, and the study area is divided into several independent sub-regions through the mutation boundary, so as to determine several study sub-regions under any kind of soil environmental parameter.

7. A method of predicting the rate of corrosion of a metal material in soil according to claim 6, characterised in that: The logic for homogenizing and merging test areas is: In each study sub-region, define two test areas as adjacent regions when they share at least one edge in space, and define a randomly selected test area as a base test area, determine all adjacent regions of the base test area, calculate the merging cost index according to the soil environmental parameter change amount of the base test area and each adjacent region, and determine whether to merge according to the merging cost index. The formula for calculating the merging cost index is: In the formula, For the base test area and the first The combined cost index of adjacent regions for the j-th soil environmental parameter For the base test area and the first The mean value of the j-th soil environmental parameter for each adjacent region. For the first The j-th soil environmental parameter value of each adjacent region The index of the adjacent regions of the base test region; Based on the merging cost index of the base test area and the adjacent region, the logic for determining whether to merge is: using the idea of recursive analysis, presetting the merging cost threshold, comparing the merging cost index of the base test area and each adjacent region with the preset merging cost threshold, if there is an adjacent region whose merging cost index is less than the preset merging cost threshold, merging the base test area and the adjacent region corresponding to the minimum merging cost index, setting the soil environmental parameter of the merged region as the soil environmental parameter of the base test area, and taking the merged region as a new base test area, repeating the region merging operation, thereby determining the homogenization region in each study sub-region, and forming a homogenization region map.

8. A method of predicting the rate of corrosion of a metal material in soil according to claim 7, characterized in that: The metal corrosion rate analysis model is constructed based on a machine learning network model, and the metal corrosion rate analysis model is trained through the corrosion rates of historical metal materials to be detected under different combinations of soil environment parameter values, and the metal corrosion rate is characterized by the generation rate of corrosion products, specifically, the type of metal material to be detected and the combination of soil environment parameter values are input, and the generation rate of corrosion products is taken as a label to train the metal corrosion rate analysis model. According to the homogenization region map, the combination of soil environment parameter values of each test region is determined, combined with the type of metal material to be detected, and input into the metal corrosion rate analysis model to obtain the corrosion rate prediction value of the metal material to be detected in each test region.

9. A model for predicting the rate of soil corrosion of a metal material, characterized in that: The metal material soil corrosion rate prediction model is used to execute the metal material soil corrosion rate prediction method of any one of claims 1-8, comprising: The minimum unit planning module is used to divide the research area based on the metal pipeline, divide the entire research area surface into a plurality of test regions of equal size by the preset minimum detection unit, select a plurality of sampling points in the research area, and collect the soil environment parameters of all sampling points; The gradient change calculation module is used to analyze the soil environment parameter of each sampling point based on the inverse distance weighted interpolation method for each soil environment parameter to determine the soil environment parameter of each test region and calculate the gradient value of each soil environment parameter in each test region; The homogenization region merging module is used to determine the mutation boundary of the soil environment parameter in the research area for the gradient value of each soil environment parameter, and divide the research area into a plurality of research sub-regions through the mutation boundary, determine all adjacent regions of any test region in the research sub-region, and perform homogenization merging on the test region by analyzing the soil environment parameter change amount of each adjacent region, and traverse all test regions to form a homogenization region map under each soil environment parameter; The prediction model construction module is used to determine the soil environment parameter values at different positions on the surface of the entire research area through the homogenization region map under each soil environment parameter, input the soil environment parameter values and the type of metal pipeline material into the metal corrosion rate analysis model, and output the metal material soil corrosion rate prediction value of each test region.

Citation Information

Patent Citations

  • Method and model for predicting soil corrosion rate of metal material

    CN116227217A

  • Soil erosion monitoring system for wind-water composite erosion area

    CN118858123A

  • Method for rapidly repairing scoliosis spine model based on semantic feature optimization

    CN119205716A

  • Anti-corrosion protection method and system for propeller in deep sea environment

    CN120485784A

  • Infrared thermal imaging full-dimension monitoring method for corrosion of pipeline under thermal insulation layer

    CN120761272A