Method and system for pitting corrosion detection and residual strength calculation of logging data of multi-arm caliper

By converting well diameter logging data into a three-dimensional model and using the improved YOLOv8 intelligent image detection model for automated identification, combined with parameters such as stress concentration coefficient, the residual strength of the pitting area is calculated, and the inefficiency and subjectivity problems of oil well column corrosion detection and residual strength evaluation in the existing technology are solved, and efficient and accurate detection and evaluation are achieved.

CN119942197AActive Publication Date: 2025-05-06SOUTHWEST PETROLEUM UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510014362.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-06
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

The prior art has problems such as inefficiency, strong subjectivity and inability to automate large-scale inspections in oil well column corrosion detection and residual strength assessment, which makes it difficult to guarantee the accuracy and consistency of the results.

Method used

By converting well diameter logging data into a three-dimensional model, and using the improved YOLOv8 intelligent image detection model for automatic identification and classification, combined with parameters such as stress concentration coefficient, the remaining intensity of the pitting area is calculated.

Benefits of technology

It realizes the automated processing of well diameter logging data, significantly improves the efficiency and accuracy of pitting corrosion detection, reduces the complexity and subjective error of human operations, and can process a large amount of data in a short time to meet real-time needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942197A_ABST
    Figure CN119942197A_ABST
Patent Text Reader

Abstract

The invention discloses a pitting corrosion detection and residual strength calculation method and system for logging data of a multi-arm caliper. Comprising the following steps: converting logging data of a multi-arm caliper into a three-dimensional model, and carrying out data cleaning and batch projection transformation to obtain a plane image sequence; classifying and marking pitting regions in the image according to a pitting type standard; an improved YOLOv8 intelligent image detection model is adopted, a bottleneck attention module is added to enhance the attention of a pitting corrosion area, a training effect is optimized through batch channel normalization, and a Shape-IoU method is adopted to replace a traditional CIoU loss function; an improved BBI-YOLOv8 model is utilized to train the annotated image sequence, and an intelligent pitting corrosion detection model is obtained; and calculating the residual strength according to the type of the pitting corrosion region, the opening length, the average depth and the stress concentration coefficient. Compared with a traditional method, the method has the advantages that the automation and accuracy of pitting corrosion detection are improved, the tubular column strength checking process is optimized, and efficient and accurate technical support is provided for safety assessment of the tubular column of an oil and gas well.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of oil and gas field engineering, and in particular to a method and system for pitting detection and residual strength calculation of multi-arm caliper logging data. Background Art

[0002] During the long-term service of oil well pipes, they are often affected by multiple factors such as geology, engineering and chemical environment, which leads to widespread corrosion. Especially in complex environments, the scale and uneven distribution of corrosion defects will increase the corrosion rate, causing problems such as perforation, squeezing and cracking of the pipe, which in turn affects the structural integrity of the pipe, shortens its service life, and seriously threatens the safety of field operations.

[0003] In oil and gas field operations, tubing corrosion is one of the main causes of downhole equipment failure and safety accidents. According to relevant statistics from Japan's oil refining and petrochemical industries, the corrosion failure rate of completion tubing in sulfur-containing environments is as high as 73.8%, and stress corrosion cracking is as high as 41.6%. In my country, the proportion of casing damage wells is also very serious in some oil fields. For example, among the 22,986 oil, gas and water wells in Shengli Oilfield, there are 3,300 casing damage wells, accounting for 14.45% of the total number of wells. Therefore, timely and accurate identification of tubing corrosion defects, prediction of residual strength, and formulation of reasonable control measures are of vital importance to ensure the safety of oil and gas wells and extend the service life of tubing.

[0004] At present, the corrosion detection and residual strength assessment of oil well tubing mainly rely on caliper logging technology. Caliper logging is a technology that measures the radius of the well wall by lowering the logging instrument and using the contact between the measuring arm and the pipe wall. It can provide detailed data on the corrosion, deformation, scaling and other damages of the inner wall of the pipe. The multi-arm caliper is a commonly used caliper logging instrument with high-precision measurement capabilities, which can accurately reflect the corrosion depth and deformation degree of the inner wall of the pipe.

[0005] Existing caliper logging data analysis methods mainly rely on manual visual inspection, expert judgment or analysis methods based on statistical characteristics. Specifically, traditional corrosion detection is usually carried out by manually analyzing the measured caliper data, manually dividing the corrosion area and assessing the type and severity of corrosion. This method is not only time-consuming and labor-intensive, but also easily affected by the operator's experience and judgment, resulting in subjective and inconsistent results, making it difficult to achieve large-scale, efficient real-time monitoring.

[0006] In addition, existing pitting detection technologies mostly rely on standards or expert systems for evaluation. This method has limited data processing capabilities and automation, lacks efficient image processing and deep learning technology, and is difficult to cope with complex pitting morphology and large-scale data processing requirements.

[0007] Limitations of existing technologies

[0008] Inefficiency and high labor intensity: Traditional methods rely on manual visual inspection and statistical analysis. The processing process is cumbersome and inefficient, and cannot respond to large-scale data needs in real time.

[0009] Strong subjectivity and poor consistency: Due to reliance on manual judgment, different operators may have large differences in corrosion area division and pitting type identification, and the accuracy and consistency of the results are difficult to guarantee.

[0010] Inability to automate large-scale detection: Existing technologies mainly rely on manual processing and expert systems, which cannot achieve automated, large-scale processing of large amounts of caliper logging data, limiting their application in real-time monitoring.

[0011] Deficiencies in pitting area and type analysis: Traditional methods lack accurate means of pitting area identification and type classification, making it difficult to conduct fine-grained pitting feature analysis, which affects the accuracy of residual strength calculations. Summary of the invention

[0012] In view of the defects of the prior art, the present invention provides a method and system for pitting detection and residual strength calculation of multi-arm caliper logging data. By converting the caliper logging data into a three-dimensional model, the pitting area is automatically identified and classified through intelligent image recognition technology (improved YOLOv8 model), and the residual strength of the pitting area is accurately calculated in combination with parameters such as stress concentration factor. This method realizes the automated processing of caliper logging data, greatly improves the efficiency and accuracy of pitting detection, solves the subjectivity and inefficiency of traditional methods, and provides more reliable technical support for corrosion integrity management and safety prediction of pipe strings.

[0013] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:

[0014] A method for pitting detection and residual strength calculation of multi-arm caliper logging data, comprising the following steps:

[0015] S1, converting the multi-arm caliper logging data into a three-dimensional model;

[0016] S2, cleaning the data of the three-dimensional model and performing batch projection transformation to obtain a planar image sequence;

[0017] S3, classifying and labeling the pitting areas in the plane image sequence according to the pitting type standard;

[0018] S4. Introduce the YOLOv8 intelligent image detection model, add the bottleneck attention module (BAM) to enhance the network's attention to the pitting area, replace the batch normalization function (BN) in the model with the batch channel normalization function (BCN) to improve the training effect, and replace the complete intersection-over-union (CIoU) loss function in the model with the improved bounding box regression method Shape-IoU to improve the detection ability of irregular pitting areas, and obtain the improved BBI-YOLOv8 intelligent image detection model;

[0019] S5. Use the improved BBI-YOLOv8 intelligent image detection model to train the annotated plane image sequence to obtain an intelligent pitting detection model;

[0020] S6. Calculate the residual strength of the pitting area based on the pitting type, opening length, average depth and stress concentration factor (K) of the pitting area.

[0021] Furthermore, in S1, the original caliper logging data is mapped into a three-dimensional spatial coordinate system and a preliminary three-dimensional caliper model is generated.

[0022] Furthermore, data cleaning in S2 includes removing noise data, outliers and measurement errors in the caliper data, and smoothing the three-dimensional model.

[0023] Furthermore, the pitting areas in S3 were classified into shallow hemispherical, hemispherical, and deep hemispherical according to the morphology of pitting, and the opening length, depth, and position of each pitting area were marked.

[0024] Furthermore, the stress concentration factor (K) is calculated based on the shape and size characteristics of the pitting area.

[0025] Furthermore, the planar image data set includes a plurality of images converted from measurement results of a multi-arm caliper logging instrument at different depths and angles in the oil well.

[0026] Further, the calculation of the residual strength of the pitting area specifically includes:

[0027] Based on the detection results of the pitting area, including the pitting type, opening length and depth information, the stress concentration factor (K) of each pitting area is calculated.

[0028] According to the type and geometric characteristics of pitting corrosion and combined with the existing mechanical model, the residual strength of the pitting corrosion area is calculated.

[0029] The residual strength of the pitting area is statistically analyzed to obtain the residual strength of the entire pipe string.

[0030] The remaining strength is compared with the original strength of the pipe string to assess the corrosion level of the pipe string and its safety.

[0031] Provides residual strength calculation results for pipe corrosion assessment and decision support.

[0032] The present invention also discloses an intelligent pitting corrosion detection system for realizing pitting corrosion detection and residual strength calculation method of multi-arm caliper logging data, comprising:

[0033] A data conversion module, used to convert multi-arm caliper logging data into a three-dimensional model;

[0034] The data processing module is used to clean the data of the three-dimensional model and perform batch projection transformation to obtain a planar image sequence;

[0035] A classification and labeling module is used to classify and label the pitting areas in the plane image sequence according to the pitting type standard;

[0036] Intelligent detection module, which is used to introduce the YOLOv8 intelligent image detection model, add the bottleneck attention module (BAM), replace the batch normalization function (BN) with the batch channel normalization function (BCN), and improve the efficiency of pitting detection through the Shape-IoU bounding box regression method;

[0037] Model training module, used to train the annotated planar image sequence using the improved BBI-YOLOv8 intelligent image detection model;

[0038] The strength calculation module is used to calculate the residual strength of the pitting area according to the pitting type, opening length, average depth and stress concentration factor (K) of the pitting area.

[0039] Furthermore, the intelligent detection unit also includes a pitting area positioning module for accurately identifying the pitting area in the image and improving the robustness of the model in complex backgrounds.

[0040] Compared with the prior art, the advantages of the present invention are:

[0041] 1. The present invention utilizes the improved BBI-YOLOv8 intelligent image detection model and uses automated image recognition technology to quickly and accurately identify and classify pitting areas in caliper logging data, significantly improving the efficiency of pitting detection.

[0042] 2. The present invention reduces the complexity and subjective errors of manual operation and improves the accuracy and consistency of detection results through automated processing of intelligent models.

[0043] 3. The present invention uses an intelligent detection model to directly extract pitting area information from logging data, and combines parameters such as stress concentration factor (K) to quickly calculate the residual strength of the pipe string, significantly improving the efficiency of pipe string strength verification. This method can process a large amount of data in a relatively short time and meet the real-time needs in actual production.

[0044] 4. The present invention combines the pitting type, opening length, depth and stress concentration factor (K) of the pitting area to establish a scientific residual strength calculation model, which provides a more accurate evaluation basis for the corrosion integrity management of the pipe string and can provide effective support for the safety control and risk management of oil and gas production operations.

[0045] 5. By evaluating the residual strength of the pipe string in real time and accurately, the present invention can provide a theoretical basis for predicting the safe service life of the pipe string. Using this method, possible corrosion defects and potential risks of the pipe string can be discovered in advance, so that effective control measures can be taken in advance to avoid pipe string failure or sudden accidents.

[0046] 6. The present invention converts traditional wellbore logging data into computer-recognizable image data and combines it with advanced deep learning algorithms to realize intelligent detection of tubing corrosion pitting, greatly improving the degree of automation of tubing integrity management and the accuracy of tubing corrosion monitoring, which is of great significance to improving the production efficiency and safety of oil and gas wells. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flow chart of a method for detecting pitting corrosion and calculating pitting corrosion area strength of multi-arm caliper logging data according to an embodiment of the present invention;

[0048] Figure 2 The embodiment of the present invention is a link relationship diagram of various parts of the pitting detection and pitting area strength calculation system;

[0049] Figure 3 The embodiment of the present invention is a schematic diagram of a 40-arm caliper collecting caliper data;

[0050] Figure 4 The embodiment of the present invention is a flow chart of a 40-arm caliper collecting caliper data;

[0051] Figure 5 The NURBS curve interpolation method of the embodiment of the present invention realizes three-dimensional imaging in space;

[0052] Figure 6 1 is a top view of a mechanical caliper according to an embodiment of the present invention on a wellbore cross section, wherein (a) is a top view and (b) is a simplified geometric diagram;

[0053] Figure 7 Embodiment of the present invention Figure 6(b) Auxiliary line drawing;

[0054] Figure 8 is a three-dimensional image of the radius data sequence after correction according to an embodiment of the present invention;

[0055] Fig. 9 is a corrosion depth thermogram of an embodiment of the present invention;

[0056] Fig.10 This is the Pytoch framework diagram of YOLOv8;

[0057] Fig.11 This is the CBS (Conv2d-BatchNorm-SiLU) module framework flow chart;

[0058] Fig.12 is a flow chart of the C2f module of an embodiment of the present invention;

[0059] Fig.13 It is a flow chart of the SPPF module of an embodiment of the present invention;

[0060] Fig.14 This is a simplified model diagram of the residual strength of the oil casing according to an embodiment of the present invention;

[0061] Fig.15 2 is a pitting shape diagram of an embodiment of the present invention, wherein (a) is a deep hemispherical pitting defect, (b) is a shallow hemispherical pitting defect, and (c) is a hemispherical pitting defect;

[0062] Fig.16 It is a classification and annotation diagram of the pitting heat map of an embodiment of the present invention;

[0063] Fig.17 This is the overall architecture diagram of BBI-YOLOv8 in the embodiment of the present invention;

[0064] Fig.18 It is a basic structural diagram of the BAM of the embodiment of the present invention;

[0065] Fig.19 is a flow chart of normalization of feature images by BCN according to an embodiment of the present invention;

[0066] Fig. 20 is a regression diagram of Shape-IoU in an embodiment of the present invention;

[0067] Fig.21 1 is a graph showing the stress concentration factor of an embodiment of the present invention as a function of pit depth and opening length, (a) is a deep hemisphere, (b) is a hemisphere, and (c) is a shallow hemisphere;

[0068] Fig. 22 is a graph of the residual anti-external squeeze strength and the residual anti-internal compressive strength of each pitting area in the sample image of the embodiment of the present invention; DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples.

[0070] like Figure 1 As shown, the present invention provides a method for pitting detection and pitting area intensity calculation of multi-arm caliper logging data, comprising the following steps: S1. converting the caliper logging data into a three-dimensional model I; S2. performing data cleaning and batch projection transformation on the three-dimensional model I to obtain a plane image sequence I(n); S3. classifying the pitting areas in the plane image sequence I(n) according to the pitting type standard and marking them as shallow hemispherical, hemispherical, and deep hemispherical; S4. introducing the YOLOv8 intelligent image detection model, adding a bottleneck attention module (Bottleneck Attention Module, BAM), replacing the batch normalization function (BatchNormalization, BN) in the model with the batch channel normalization function (Batch channel Normalization, BCN), and replacing the complete intersection-over-union ratio (Complete Intersection-over-Union) in the model with the improved bounding box regression method Shape-IoU. S5. The improved BBI-YOLOv8 intelligent image detection model is used to train the labeled image dataset I(n) to obtain the intelligent pitting detection model; S6. The residual strength of the pitting area is calculated according to the pitting type, opening length, average depth and stress concentration factor K of the pitting area.

[0071] like Figure 2 As shown, the pitting detection and pitting area strength calculation system consists of: logging equipment-multi-arm caliper, expert support module, data management module, image generation module, BBI-YOLOv8 intelligent pitting detection module and residual strength calculation module.

[0072] Technical features of each part:

[0073] ① Logging equipment - multi-arm caliper: measure and count the diameter of the casing and tubing, the remaining wall thickness, the well wall defects and the deformation parts, and interpret the maximum diameter, minimum diameter, average diameter and other characteristics of the casing and tubing based on the logging data.

[0074] ② Expert support module: The expert user accepts the input data collected by the caliper, sets the format and scale of the input data, performs preliminary statistics, interpretation and analysis on the caliper logging data and outputs it to the data management module; accepts the calculation results of the residual strength of the casing and tubing, and predicts and controls the safe service life and critical load of the casing and tubing based on the results.

[0075] ③Data management module: accepts data input from the expert support module for data cleaning and data preprocessing, and distributes data according to module requirements.

[0076] ④ Image generation module: organize and collect the logging data obtained by the on-site caliper measurement, convert it into an image training set and label the pitting areas in the image.

[0077] ⑤BBI-YOLOv8 intelligent pitting detection module: The YOLOv8 model is improved, and the image training set is input into the model for training to obtain the BBI-YOLOv8 intelligent pitting detection model that can perform pitting area division and type recognition on caliper logging data in real time.

[0078] ⑥ Residual strength calculation module: The concentrated stress coefficient K is used to approximate different types of pitting areas, and the concentrated stress coefficient of each area is calculated according to the type, and the residual strength of the string in the area is further calculated.

[0079] Working principle:

[0080] ① Logging equipment - multi-arm caliper: Multi-arm caliper logging is a logging method for measuring the geometry of oil well boreholes. The instrument is lowered into the bottom of the well, the center of the circle is moved upward, and the measuring arm is slowly rotated. The radius of the well wall at each position is measured one by one through the contact between the measuring arm and the inner wall, so as to confirm the corrosion, deformation, scaling and other damage of the pipe string. Common multi-arm caliper models include XY caliper, micro caliper, 8-arm, 18-arm, 38-arm, 40-arm and 60-arm specifications. The multi-arm caliper has high measurement accuracy and can measure the corrosion depth at various locations on the inner wall of the oil pipe.

[0081] like Figure 3 As shown in the figure, H represents the sequence of one cycle of caliper measurement, and r is the distance from the axis to the wellbore wall of a series of equal arcs. All distances constitute an n×40 matrix that records the caliper information of the entire well section.

[0082] ② Expert support module: a. Receive the signal transmitted by the caliper, convert the signal into structured features and transmit it to the data management module; b. After receiving the data from the residual strength calculation module, predict the safe service life and risk warning of the corresponding oil casing according to the residual strength and relevant standards, and further provide a management and control plan that considers the corrosion integrity of the oil casing.

[0083] ③Data management module: accepts data input and feature input from the expert support module. Since the original caliper logging data may contain errors caused by instruments or human operations, if these errors are not processed, it will lead to misjudgment in subsequent modules. Therefore, data cleaning and data preprocessing are required to reduce the training time of the model and improve the prediction accuracy of the model. After processing and cleaning, data is allocated according to module requirements. This module always maintains the normality of the data.

[0084] ④ Image generation model: Organize and collect the logging data obtained by the on-site caliper measurement, convert it into a spatial coordinate sequence, use color linear transformation to reflect the radius sequence transformation, establish a three-dimensional model in space based on NURBS curve interpolation, clean the three-dimensional model, and then project the transformation to generate a series of pitting depth thermodynamic maps with equal side lengths and equal vertical depth steps.

[0085] The specific process is as follows:

[0086] like Figure 4 As shown in the figure, the data tested this time are the inner wall data of a certain oil pipe measured by a 40-arm caliper in the Keshen gas field in the Tarim Basin. The basic information of the oil pipe is shown in the table.

[0087]

[0088] The robot arm uses 9° of each horizontal plane as a measurement angle step and 25.0mm as a measurement depth step to obtain logging data from 294.5388m to 1004.0888m. The measured radius sequence can be represented in the form of a matrix R with n rows and 40 columns, where each row represents the well depth measured by the current caliper and each column represents the radius distance from the center of the tubing to the well wall.

[0089] First, the logging data is converted into a three-dimensional model, and the errors in the original data are found through data visualization. Outlier detection and posture correction are used to complete data cleaning. Finally, the corrected three-dimensional image data is batch converted into a two-dimensional image training set through projection transformation.

[0090] To map each element of the matrix to three-dimensional coordinates in space, the following conversion can be performed:

[0091]

[0092] Where: R ij is the radius length of the i-th row and j-th column measured by the caliper, and x is the element R ij Transverse displacement in space, (mm), y is the element R ij Longitudinal displacement in space, (mm), z is vertical depth, (m).

[0093] After obtaining the coordinate mapping of all elements in three-dimensional space, MATLAB is used as a tool to realize three-dimensional imaging in space based on the NURBS curve interpolation method, such as Figure 5 shown.

[0094] Figure 5 The figure shows the three-dimensional morphology of the inner wall of the oil pipe from 290m to 320m, and the color represents the difference between the measured radius and the theoretical inner diameter, that is, the corrosion depth (mm). Figure 5 It can be seen that the shape of the inner wall in this area is not accurate in some areas. For example, the inner wall at 315m-320m is concave on the left and protrudes on the right, with obvious deviation, which indicates that the radius data measured by the caliper has errors. Therefore, it is necessary to correct the wrong measurement data and perform data cleaning on the measurement data.

[0095] The errors in wellbore measurement can be divided into two categories. One is the systematic error caused by the accuracy of the mechanical wellbore instrument itself, including insufficient sensor accuracy, product defects, wear and deformation of the mechanical arm, etc. This type of data requires replacement of equipment and re-measurement; the other is due to personnel calculation or operational errors, such as the instrument is not centered in the well during the measurement process, the instrument is not perpendicular to the wellbore axis and tilted, and human errors are recorded, resulting in accidental errors. The errors caused by this type of data can be avoided and can be corrected through data analysis, calculation, and cleaning methods.

[0096] The object of this wellbore measurement is a straight well section, so the following assumptions can be made for the existing abnormal data:

[0097] (1) The caliper itself does not have systematic errors;

[0098] (2) The oil pipe is not deformed;

[0099] (3) There are no attachments or scaling points on the inner wall of the oil pipe that reduce the radius;

[0100] (4) The caliper is always perpendicular to the wellbore axis;

[0101] When studying the changing pattern of a continuous variable, outliers are usually treated as abnormal data. Therefore, the isolation forest algorithm is used to screen out outliers and abnormal data with a fluctuation range greater than the wall thickness.

[0102] In order to eliminate the abnormal data generated by condition (4), it is necessary to first confirm whether the current measurement data is centered. If it is not centered, it is necessary to obtain the center offset of the measuring instrument at the current depth and correct it, and finally recalculate the radius sequence of the current depth.

[0103] If the mechanical caliper is offset to the first quadrant at the center of the circle, its top view on the wellbore cross section is shown in Figure 6.

[0104] Figure 6In the figure, O' is the center of the instrument, and the measuring arm A axis (sequence 1) is used as the initial angle and rotated counterclockwise. The radii of the four axes rotated by 90° (sequence 11), 180° (sequence 21), and 270° (sequence 31) are recorded respectively. AC and BD are perpendicular to each other. When restoring the data measured with this offset, the measured radii of AO' and BO' will be smaller than the actual radii, and the measured radii of CO' and DO' will be larger than the actual radii. In order to obtain the true center position, the true diameters of AC and BD are calculated first, and the model can be simplified as above. Figure 6 (b) The geometric problem shown.

[0105] According to the sine law, the theoretical radius of the inner wall of the AC and BD arms is obtained:

[0106]

[0107] In the formula: the length and angle of each straight line can be easily obtained by the Pythagorean theorem and trigonometric functions.

[0108] In order to obtain the offset values ​​Δx and Δy between O' and the center of the circle O, draw auxiliary lines as shown in Figure 7.

[0109] In the triangle AOC and BOD, it is easy to get:

[0110]

[0111] Where: |Δx| and |Δy| are moduli, and their positive and negative signs are determined by O'A, O'B and r. After the quadrant of O' is confirmed, the determination rules are shown in the table.

[0112] Logging data offset determination criteria

[0113]

[0114] In order to correct the radius measurement sequence of the offset circle center to the centered radius sequence, it is necessary to obtain the plane coordinates of each radius, correct them by the offset values ​​Δx and Δy, and then re-transform them into the radius sequence. The corrected radius r' can be expressed as:

[0115]

[0116] Through the above data cleaning, the corrected true radius sequence R' can be obtained.

[0117] However, for a radius sequence, it is necessary to determine whether the mechanical caliper is offset from the center of the circle by judging the size of O'A, O'B and r. Only when the offset is confirmed will the data cleaning process of condition (4) be executed. However, since the inner wall of the oil pipe itself has been corroded to varying degrees, the actual radius r of the inner wall in the corroded area is no longer equal to the theoretical radius of 62.0 mm. O'A and O'B cannot be compared with r without knowing whether the inner wall is corroded. Therefore, a threshold of 0.5 mm is set. If and only if the calculation result of the horizontal plane r is within 62±0.5 mm, it is considered that the inner wall here is not corroded, and the radius sequence of the horizontal plane is corrected. Otherwise, the next radius sequence is selected and the above operation is repeated until the next horizontal plane radius sequence. The final corrected radius data sequence has a three-dimensional image as shown below. Figure 8 shown.

[0118] Note that the original data is the radius sequence measured by the mechanical caliper. If the projection of the radius sequence on the horizontal plane is directly used as the input image, it will be deformed due to the projection. In order to truly restore the local corrosion and obtain accurate feature information, the oil pipe string can be cut along the wellbore axis and stretched and flattened.

[0119] The projection transformation formula is:

[0120]

[0121] Where: r is the theoretical inner diameter of the oil pipe (mm).

[0122] The corrosion depth ranges from -11mm to 0mm, so the linear color change from -11 to 0 is used to represent the corrosion depth. Let the unit length of the horizontal axis be equal to the vertical depth, and truly restore the image of the target shape to generate a series of corrosion depth heat maps with the same vertical depth step length and an inner diameter circumference of 0.400m, such as Fig. 9 shown.

[0123] ⑤ BBI-YOLOv8 intelligent pitting detection module: The pitting detection of the inner wall of the oil pipe is divided into two parts. First, Each pitting area is divided, and then the pitting shape of each divided area is identified. Regions can be divided and identified, but before that, the original image samples need to be labeled to train the model. Rules for dividing pitting areas and types are formulated and an improved YOLOv8 model adapted to them is developed to improve recognition accuracy. To this end, this chapter proposes the following improvements:

[0124] The present invention proposes a technology for generating images based on wellbore logging data and a method for pitting image recognition and residual strength calculation of the inner wall logging data of the oil pipe using a convolutional neural network (CNN). The learning of CNN is based on the Pytoch framework of YOLOv8. Fig.10 shown.

[0125] YOLOv8 overall structure

[0126] The core modules of the network include:

[0127] (1) CBS (Conv2d-BatchNorm-SiLU) module

[0128] The module consists of three parts: two-dimensional convolution, batch normalization function BatchNorm and SiLU activation function:

[0129] like Fig.11 As shown in the figure, the two-dimensional convolution extracts the features of the input image; BatchNorm batch normalizes the input by learning the scale parameter γ and the offset parameter β to prevent the gradient from disappearing or exploding; the activation function SiLU combines the advantages of the sigmoid function and the linear function to perform a nonlinear transformation on the output result.

[0130] (2) C2f module

[0131] like Fig.12 As shown in the figure, the input image first undergoes a layer of CBS module, and then the output feature image is divided into two halves according to dimension c, one half of which enters the BottleNeck module in series, where the BottleNeck module is composed of two layers of CBS (S=1, K=3) in series. The output results of each layer of BottleNeck are connected before the last CBS module to achieve feature fusion.

[0132] (3) SPPF module

[0133] like Fig.13 As shown in the figure, the input image first undergoes a layer of CBS module, and then the output feature image is input into three series-connected MaxPooling layers. The output results of each layer of BottleNeck are connected before the last CBS module to achieve feature fusion.

[0134] YOLOv8 uses the backbone network to extract image features, and then uses the SPPF, C2f module and neck network to achieve cross-layer fusion of various features. It uses dual-path prediction and convolutional neural networks to detect targets, and introduces cascade and pyramid concepts to accelerate model training efficiency.

[0135] The pitting detection of the inner wall of the oil pipe based on YOLOv8 is divided into two parts. First, each corrosion area must be divided, and then the pitting shape of each divided area must be identified. YOLOv8 can divide and identify pitting areas, but before that, the original image samples need to be labeled to train the model. Therefore, it is necessary to formulate rules for dividing pitting areas and types and formulate an improved YOLOv8 model adapted thereto to improve recognition accuracy. To this end, the present invention proposes the following improvements:

[0136] 1) A pitting shape classification scheme was designed to produce image sample labels. The samples were divided into training set, test set and validation set to train the model, which provided the premise for the subsequent calculation of the residual strength of the pitting area.

[0137] In order to evaluate the corrosion integrity of the above-mentioned string images, it is necessary to classify pitting defects according to the width and height of the detection area and the pitting depth. Although there are many standards for classifying the pitting shapes of metals and alloys, most of them are based on visual inspection and lack strict numerical specifications. To this end, a simplified scheme for pitting shape classification is proposed that can strictly follow the pitting transverse opening size (width), longitudinal opening size (height) and pitting depth. The pitting defect shape is approximated as a spherical shape, and the stress concentration factor k is introduced to calculate the residual strength of the oil casing after pitting occurs. The simplified model is as follows: Fig.14 shown.

[0138] Fig.14 In the equation, d is the opening diameter (mm) of the pit after it is approximately hemispherical, satisfying:

[0139]

[0140] r2 is the radius of the concentric circle tangent to the outer wall of the oil casing with O as the center (mm), which represents the inscribed circle of the pitting target detection frame. When the width and height of the detection frame are (w, h), r2 = min (w, h);

[0141] r1 is the pit radius (mm), which satisfies:

[0142] r1=r2+rh

[0143] h is the theoretical wall thickness of the oil casing (mm);

[0144] r is the pit depth (mm), which represents the average depth of all pit areas in the pit target detection area:

[0145]

[0146] At this time, the stress σ around the pit is:

[0147]

[0148] Where: σ0 is the initial axial stress (Mpa); μ is the Poisson's ratio of the casing; d is the distance from any point on the pipe wall to the axis o of the pit (mm).

[0149] like Fig.15 As shown in the figure, the residual strength is calculated according to different pitting defect types, and the stress concentration factors under different pitting pit shapes are calculated respectively:

[0150] (1) Deep hemispherical pitting defects

[0151] When the width and height of the pitting area are similar and the pitting depth is relatively deep, the pitting defect morphology of the area is approximated as a deep hemispherical pitting defect. At this time, the depth of the pitting hemisphere is greater than the hemisphere radius. The hemisphere radius, opening diameter and pitting depth of this morphology satisfy the following relationship:

[0152]

[0153] The stress concentration factor in this area is:

[0154]

[0155] Where:

[0156]

[0157] The pitting shape is as follows Fig.15 (a)

[0158] (2) Shallow hemispherical pitting defects

[0159] When the width and height of the pitting area are similar and the pitting depth is relatively shallow, the pitting defect morphology of the area is approximated as a shallow hemispherical pitting defect. At this time, the depth of the pitting hemisphere is less than the hemisphere radius. The pitting radius, opening diameter and pitting depth of this morphology satisfy the following relationship:

[0160]

[0161] The stress concentration factor in this area is:

[0162]

[0163] Where:

[0164]

[0165] The pitting shape is as follows Fig.15 (b)

[0166] (3) Hemispherical pitting defects

[0167] When the width and height of the pitting area are similar and the pitting depth is relatively moderate, the pitting defect morphology of the area is approximated as a hemispherical pitting defect. At this time, the depth of the pitting hemisphere is equal to the radius of the hemisphere, that is:

[0168]

[0169] The stress concentration factor in this area is:

[0170]

[0171] The pitting shape is as follows Fig.15(c)

[0172] Combining K with the internal pressure resistance and external collapse resistance of API standards, the calculation formula for the residual strength of oil casing considering pitting corrosion is obtained.

[0173] The remaining anti-external collapse strength of the oil casing is:

[0174]

[0175] The residual internal pressure resistance of the oil casing is:

[0176]

[0177] Where: y is the minimum yield strength of the oil casing material (MPa); R is the theoretical outer diameter of the oil casing (mm).

[0178] Annotate the previously generated pitting heat map according to the classification annotation, such as Fig.16 shown.

[0179] Fig.16 In the figure, shallow hemispherical pitting defects are marked as wide_shallow; hemispherical pitting defects are marked as ellipse; and deep hemispherical pitting defects are marked as narrow_depth.

[0180] 2) In the face of problems such as overlapping and interlacing of pits, the Bottleneck Attention Module (BAM) is introduced. BAM combines the advantages of channel attention and spatial attention, adaptively and selectively enhancing or weakening the feature responses of different channels to improve the sensitivity to important information and enhance the detection accuracy of pitting areas.

[0181] 3) The batch normalization function (BN) in the CBS module of the YOLOv8 model was replaced with the batch channel normalization function (BCN). BCN combines the advantages of BN and layer normalization (LN), while considering the batch, channel, height and width of the pitting image, integrating multi-scale feature information, and enhancing the feature representation of the pitting area image.

[0182] 4) For the problem that the small pitting pits on the inner wall of the oil pipe are complicated and dense, which makes them difficult to detect, the Complete IoU (CIoU) loss function in the original YOLOv8 model is replaced by the improved bounding box regression method Shape-IoU. In addition to considering the geometric relationship between the real box and the predicted box, Shape-IoU also considers the shape and size of the edge box, thereby enhancing the edge detection accuracy of the model, thereby enhancing the positioning performance and generalization ability of the model.

[0183] Based on the above three modifications, we further enhance YOLOv8’s ability to focus on spatial dimensions, reduce the interference of complex background, noise or redundant channels on image features, enhance the recognition sensitivity of boundary shape and size, speed up model iteration efficiency, and propose an improved pitting recognition model BBI-YOLOv8. The overall architecture is as follows: Fig.17 shown.

[0184] Firstly, the Bottleneck Attention Module is introduced into the original Backbone network. This module simultaneously introduces the channel attention mechanism and the spatial attention mechanism to extract features from the pitting image, focusing the attention on highly correlated features, thereby improving the model's attention to key information in the pitting area features and optimizing the model's detection performance. Then, the batch normalization function BatchNorm is improved in the original CBS module, and the layer normalization function LayerNormalization is added to obtain the batch channel normalization function Batch channel Normalization, thereby improving the robustness of the model and being able to better complete the tasks of pitting area detection and type recognition. Then, in the Head network, the CIoU bounding box loss function in the area detection module is replaced by the Shape-IoU bounding box loss function. Shape-IoU considers the geometric relationship between the real box and the predicted box while combining the shape and size of the bounding box to affect the bounding box regression, thereby enhancing the model's ability to capture the edge features of the pitting area and making the bounding box regression more accurate.

[0185] ① Bottleneck attention module

[0186] In order to enhance the model's ability to pay attention to the dimensions of pitting areas and weaken the misjudgment of regional division caused by the stacking and interlacing of pitting areas, the present invention proposes to use a simple and lightweight BAM, which simultaneously introduces a channel attention mechanism and a spatial attention mechanism, allowing the model to adaptively and selectively enhance or weaken the feature responses of different channels to improve sensitivity to important information.

[0187] Fig.18The basic structure of BAM is shown in Figure 2, where FC refers to Fully Connected Layer. Different from the general attention mechanism, BAM integrates the channel attention results M c (F)∈R C×1×1 And the spatial attention result M s (F)∈R 1×H×W Calculate the attention map M(F)∈R C×H×W accomplish:

[0188] M(F)=sigmoid(M c (F)+M s (F)

[0189] The outputs of the two are fused together by multiplication to obtain the final BAM output, which includes adaptive feature adjustments in both channel and space.

[0190] The channel attention calculation formula is:

[0191] M c (F) = BN(MLP 2 (AvgPool(F)))

[0192] Where AvgPool is average pooling, MLP is a multi-layer perceptron with one hidden layer, and BN is a batch normalization function.

[0193] The spatial attention calculation formula is:

[0194]

[0195] In the formula, conv represents the convolution operation, the superscript represents the convolution filter size, and the subscript represents the convolution order. The convolution kernel of size 1 is used to reduce the number of channels, and the convolution kernel of size 3 is used to aggregate contextual information through a larger receptive field.

[0196] ②Batch channel normalization

[0197] The batch normalization function BN in the CBS module does not consider the impact of the channel on it, which may cause the model to lose some features of the image channel. In order to make the model pay more attention to the relationship between different channels and effectively extract feature images, the batch channel normalization function (BCN) is proposed. BCN combines the advantages of BN and LN, and considers the batch, channel, height and width of the pitting image at the same time.

[0198] Fig.19The figure shows the normalization process of BCN for feature images. N, C, H and W represent batch, channel, spatial height and width dimensions respectively. BN calculates the mean and variance along the (N, H, W) dimension, and LN calculates the mean and variance along the (C, H, W) dimension. Finally, the normalized outputs are combined according to the adaptive parameters to improve the robustness of the model for feature image processing.

[0199] The BN in BCN calculates the mean μ1 and variance σ1 of the input features along the (N, H, W) direction:

[0200]

[0201] Similarly, LN calculates the mean μ2 and variance σ2 of the input features along the (C, H, W) direction.

[0202] Then use (μ1, σ1); (μ2, σ2) to normalize respectively:

[0203]

[0204] In order to combine the normalized outputs, an additional learning parameter ι is introduced, usually ι is taken as 0.9:

[0205]

[0206] Finally, set the scale parameter γ and offset parameter β to get the output result:

[0207]

[0208] In complex situations, the BCN function has better robustness than other normalized functions such as BN, LN, IN, and GN, and can better complete the tasks of pitting area detection and type identification.

[0209] ③Bounding box regression function

[0210] In order to further enhance the model's ability to capture the edge features of the pitting area, an improved bounding box regression method Shape-IoU is proposed to replace the Complete IoU (CIoU) loss function in the original YOLOv8 model. While considering the geometric relationship between the true box and the predicted box, the influence of the inherent properties of the bounding box (such as shape and size) on the bounding box regression is combined to make the bounding box regression more accurate.

[0211] like Fig. 20 As shown, GT is the real box boundary, Anchor is the predicted box boundary, and the weight coefficients ww and hh in the horizontal and vertical directions are set:

[0212]

[0213] Where: w gt is the actual frame width, h gt is the real box height, and scale is the scale factor, which depends on the size of the data set and is generally between 0 and 1.5.

[0214] So we have:

[0215]

[0216] Where: is the difference in the horizontal axis, is the difference in the ordinate, and c is the proportional coefficient, which depends on the ratio of the actual image size to the pixel size.

[0217] Then calculate:

[0218]

[0219] Where:

[0220]

[0221] The final border regression loss function is:

[0222] L shape-IoU =1-IoU+distance shape +0.5Ω shape

[0223] Compared with YOLOv8's bounding box regression loss function CIoU, Shape-IoU has stronger edge recognition capabilities and is better at capturing irregular, blurred, and small-target pitting objects in complex environments, thereby better dynamically optimizing the loss weight of the pitting border to improve the detection performance of the model.

[0224] ⑥ Residual strength calculation module: Based on the basic parameters of the oil pipe and the residual strength calculation model of pitting type, the stress concentration factor K of the three pitting pit shapes is obtained as the distribution pattern of the pitting pit depth and opening length is obtained. The results of pitting detection include pitting shape, length, width and depth information. Therefore, after the model obtains the pitting target image, the residual strength of the oil pipe can be further calculated based on the recognition results. For this reason, the output results of the intelligent pitting detection model are improved so that each area divided by the model can contain complete corrosion information such as the length, width, depth, etc. of the pitting target, and then further converted into the residual strength of the pipe string in each area according to the pitting shape.

[0225] like Fig.21 As shown in the figure, the stress concentration factor K shows an overall increasing trend with the increase of pit depth and opening length.

[0226] The steps to improve the output of the model are as follows:

[0227] (1) Obtain the depth of all corrosion points in the corrosion target detection area and calculate the average depth of the pitting pit as the pitting pit depth r;

[0228] (2) Obtain the center coordinates (x, y) and width and height (w, h) of the corrosion target detection frame, and obtain the radius of the circumscribed circle r2 of the approximate hemisphere, the radius of the pitting pit r1 and the opening length d. Draw a circular detection area frame in the image according to the center and opening radius, and select the corrosion area as the calculation area of ​​the residual intensity;

[0229] (3) According to the pit depth and opening length, the residual internal pressure strength and external collapse strength of the oil pipe in this area are calculated according to the type selection formula and marked in the image.

[0230] Taking the test set as an example, the residual anti-external squeeze strength and residual anti-internal pressure strength of each pitting area in the sample image were calculated through the above process:

[0231] like Fig. 22 As shown in the figure, the pink area is a shallow hemispherical pitting defect, the red area is a deep hemispherical pitting defect, the solid circle is the pitting pit hemisphere, the ring is the pitting pit circumscribed circle, and the dotted line is the pitting pit concentric circumscribed circle. It can be seen that the residual strength of the deep hemispherical pitting defect is generally smaller than that of the shallow hemispherical pitting defect, and decreases with the increase of the opening length and pitting depth, which is consistent with the actual situation and can be used as a reference for the calculation of residual strength.

[0232] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for pitting detection and residual strength calculation of multi-arm caliper logging data, characterized in that: The following steps are involved: S1, converting the multi-arm caliper logging data into a three-dimensional model; S2, cleaning the data of the three-dimensional model and performing batch projection transformation to obtain a planar image sequence; S3, classifying and labeling the pitting areas in the plane image sequence according to the pitting type standard; S4. Introduce the YOLOv8 intelligent image detection model, add the bottleneck attention module BAM to enhance the network's attention to the pitting area, replace the batch normalization function BN in the model with the batch channel normalization function BCN to improve the training effect, and replace the complete intersection-over-union loss function in the model with the improved bounding box regression method Shape-IoU to improve the detection ability of irregular pitting areas, and obtain the improved BBI-YOLOv8 intelligent image detection model; S5. Use the improved BBI-YOLOv8 intelligent image detection model to train the annotated plane image sequence to obtain an intelligent pitting detection model; S6. Calculate the residual strength of the pitting area based on the pitting type, opening length, average depth and stress concentration factor K of the pitting area.

2. The method for pitting detection and residual strength calculation according to claim 1, characterized in that: In S1, the original caliper logging data is mapped into a three-dimensional spatial coordinate system and a preliminary three-dimensional caliper model is generated.

3. The method for pitting detection and residual strength calculation according to claim 1, characterized in that: Data cleaning in S2 includes removing noise data, outliers and measurement errors in the caliper data and smoothing the 3D model.

4. The method for pitting detection and residual strength calculation according to claim 1, characterized in that: The pitting areas in S3 are classified into shallow hemispherical, hemispherical, and deep hemispherical according to the morphology of pitting, and the opening length, depth, and position of each pitting area are marked.

5. The method for pitting detection and residual strength calculation according to claim 1, characterized in that: The stress concentration factor K is calculated based on the shape and size characteristics of the pitting area.

6. The method for pitting detection and residual strength calculation according to claim 1, characterized in that: The planar image data set includes a plurality of images converted from the measurement results of a multi-arm caliper logging instrument at different depths and angles of the oil well.

7. The method for pitting detection and residual strength calculation according to claim 1, characterized in that: The calculation of the residual strength of the pitting area specifically includes: Based on the detection results of the pitting area, including the pitting type, opening length and depth information, the stress concentration factor K of each pitting area is calculated; According to the type and geometric characteristics of pitting corrosion, combined with the existing mechanical model, the residual strength of the pitting corrosion area is calculated; The residual strength of the pitting area is counted to obtain the residual strength of the entire pipe string; Compare the remaining strength with the original strength of the pipe string to assess the corrosion level and safety of the pipe string; Provides residual strength calculation results for pipe corrosion assessment and decision support.

8. An intelligent pitting detection system for implementing the pitting detection and residual strength calculation method according to any one of claims 1 to 7, characterized in that: include: A data conversion module, used to convert multi-arm caliper logging data into a three-dimensional model; The data processing module is used to clean the data of the three-dimensional model and perform batch projection transformation to obtain a planar image sequence; A classification and labeling module is used to classify and label the pitting areas in the plane image sequence according to the pitting type standard; Intelligent detection module, which is used to introduce the YOLOv8 intelligent image detection model, add the bottleneck attention module BAM, replace the batch normalization function BN with the batch channel normalization function BCN, and improve the efficiency of pitting detection through the Shape-IoU bounding box regression method; Model training module, used to train the annotated planar image sequence using the improved BBI-YOLOv8 intelligent image detection model; The strength calculation module is used to calculate the residual strength of the pitting area according to the pitting type, opening length, average depth and stress concentration factor K of the pitting area.

9. The method for pitting detection and residual strength calculation according to claim 8, characterized in that: The intelligent detection unit also includes a pitting area positioning module for accurately identifying the pitting area in the image and improving the robustness of the model in complex backgrounds.

Citation Information

Patent Citations

  • Improved hull corrosion line detection and identification method based on YOLOv5 algorithm

    CN117475281A

  • Substation equipment defect detection method and system based on improved YOLOv9

    CN118469986A

  • Improved YOLOv8 tower foundation target detection method and device

    CN119048736A