A method for detecting gas well leakage points

By combining ultrasonic measuring instruments and gyroscope technologies, a three-dimensional model of the gas well is constructed and supervised learning algorithms are applied, which solves the problems of low leakage detection accuracy, poor real-time performance and neglected external structures in the existing technology, and achieves efficient and accurate gas well leakage detection and positioning.

CN119642126BActive Publication Date: 2025-05-27GUANGHAN CHUANYI PETROLEUM TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510175266.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-27
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

The existing gas well leak detection technology has problems such as difficulty in precise positioning, inability to distinguish different leak sources, low detection efficiency, inability to feedback dynamic changes in real time, and ignoring the risk of leakage of external structures.

Method used

The first ultrasonic measuring instrument, the second ultrasonic measuring instrument and the gyroscope are used to construct and supervise learning algorithms through three-dimensional model to achieve accurate measurement and real-time monitoring of gas well structural parameters, dynamically adjust the measurement parameters to optimize data acquisition, and combine curvature analysis and pixel value changes to accurately locate and quantify leakage points.

Benefits of technology

It improves the precise positioning accuracy and detection efficiency of leakage points, realizes real-time feedback on gas well structural changes, fully covers potential gas well leakage points, and improves the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119642126B_ABST
    Figure CN119642126B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting leakage points of a gas well, which relates to the technical field of gas well measurement. A method for detecting leakage points of a gas well is realized by using a first ultrasonic measuring instrument, a second ultrasonic measuring instrument and a gyroscope. The coordinates of the gas well structure parameters are determined by using the angle parameters of the gyroscope and the diving depth of the second ultrasonic measuring instrument. The gas well structure parameters are connected according to the coordinates by using supervised learning and a three-dimensional model is constructed; the paths of corrosion holes and / or leakage at threaded joints are calculated by using the three-dimensional model with pixel values, and their minimum cross-sections and instantaneous leakage amounts are calculated. The supervised learning constructs a three-dimensional model by using the structure parameters, and takes the increment of the gas well structure parameters as the loss parameter for dynamic simulation of the three-dimensional model. The positions and quantities of the corrosion holes and leakage at the threaded joints are accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas well measurement, and specifically provides a method for detecting gas well leakage points. Background Art

[0002] In the prior art, ultrasonic measuring instruments are mainly used to monitor the annular liquid level height, and whether the pipeline leaks is judged by the change in liquid volume. However, this method has limitations. It cannot accurately locate the specific position and quantity of leakage points, nor can it distinguish whether the leakage is caused by corrosion holes or threaded connections. In addition, although existing mathematical models can detect multiple leakage points, the positioning accuracy of the corrosion hole positions is low. Especially in the micro-leakage state, it is difficult to effectively identify the leakage at corrosion holes or threaded connections.

[0003] The prior art mainly relies on mathematical models in a two-dimensional coordinate system to establish the relationship between pressure and leakage rate through equivalent diameter and depth. This method requires processing a large amount of data and performing complex mathematical derivations, resulting in low detection efficiency and inability to provide real-time feedback on the dynamic changes of leakage points. Due to the complex gas well environment, the pressure, temperature, and structural parameters inside the pipeline change over time. The existing static mathematical models cannot update the positions and leakage amounts of leakage points in real time, resulting in detection results lagging behind the actual situation.

[0004] In addition, the prior art mainly focuses on the leakage monitoring inside the pipeline and ignores the leakage risks of external structures such as casing and cement layer. The gas well structure is complex, and the leakage of the casing and cement layer will also have a serious impact on the safety and production of the gas well. However, the existing methods do not comprehensively cover all potential leakage points of the gas well, restricting their effectiveness in practical applications.

[0005] The prior art has obvious deficiencies in terms of leakage detection accuracy, real-time performance, and comprehensiveness, and urgently needs to be improved to cope with the diverse leakage risks in the complex gas well environment.

[0006] In view of this, the present application is specifically proposed. Summary of the Invention

[0007] Aiming at the above problems existing in the prior art, a method for detecting gas well leakage points is provided, aiming to solve at least one of the above problems.

[0008] The technical solution for achieving the object of the present invention is as follows:

[0009] The present invention provides a method for detecting gas well leakage points, which is implemented by using a first ultrasonic measuring instrument, a second ultrasonic measuring instrument, and a gyroscope. The specific steps are as follows:

[0010] First step: First, calibrate the ultrasonic emission points of the first ultrasonic measuring instrument and the second ultrasonic measuring instrument to the same horizontal plane. Subsequently, the first ultrasonic measuring instrument is used to measure the depth of the annulus liquid level. At the same time, the second ultrasonic measuring instrument is equipped with an in-built gyroscope and is lowered into the pipeline to measure the structural parameters of the gas well. The second ultrasonic measuring instrument obtains an image cross-section parallel to the annulus liquid level, determines the liquid level position, and calibrates its lowering depth accordingly. By comparing the liquid level depth measured by the first ultrasonic measuring instrument with the lowering depth of the second ultrasonic measuring instrument, mutual calibration of the two is achieved. Next, the second ultrasonic measuring instrument measures the distances along the wellhead direction and its opposite direction to further calibrate its lowering depth. During this process, the measured structural parameters include the radius and curvature parameters of the pipeline, annulus, casing, and cement layer. Through the above steps, the accuracy and consistency of the measurement data are ensured, providing a reliable basis for subsequent leakage detection and positioning.

[0011] Second step: Using the angle parameters of the gyroscope and the lowering depth of the second ultrasonic measuring instrument, the coordinates of the gas well structural parameters can be accurately determined; through a supervised learning algorithm, the data of these coordinates are connected to construct a three-dimensional model of the gas well; the three-dimensional model can be dynamically adjusted according to the real-time acquired gas well structural parameters and generate a real-time feedback signal; the feedback signal is used to control the acquisition frequency and lowering speed of the second ultrasonic measuring instrument, thereby optimizing the data acquisition process and ensuring measurement accuracy and efficiency; it should be noted that the combination of the angle parameters provided by the gyroscope and the lowering depth of the second ultrasonic measuring instrument can accurately map the spatial coordinates of the internal structure of the gas well. The supervised learning algorithm constructs a high-precision three-dimensional model through the analysis and processing of these coordinate data. This model can reflect the changes in the gas well structure in real time and dynamically adjust the working parameters of the second ultrasonic measuring instrument according to these changes, such as the frequency of the acquired signal and the lowering speed, thereby achieving efficient and accurate data acquisition and monitoring. This method not only improves the measurement efficiency but also provides more reliable technical support for gas well leakage detection and structural analysis.

[0012] Third step: Use the three-dimensional model to calculate the curvature increment and predict the possible suspicious leakage points in the gas well. Specifically, by analyzing the change trend of the curvature in the three-dimensional model, identify the areas where the curvature increases significantly, and these areas may correspond to potential leakage points. After determining the suspicious leakage points, continuously collect the structural parameters of the gas well within the surrounding interval with the suspicious leakage point as the center. At the same time, ensure that the acquired image cross-sections are continuously distributed along the axial direction of the gas well to comprehensively cover the suspicious area and capture the detailed information of the leakage point. By combining the curvature analysis of the three-dimensional model and continuous data acquisition, the leakage points can be more accurately located and reliable data support can be provided for subsequent leakage detection and repair.

[0013] In the fourth step, using the three-dimensional model, by analyzing the change of pixel values, the leakage paths of corrosion holes and / or threaded joints are accurately calculated. Specifically, based on the high-resolution data of the three-dimensional model, the change characteristics of pixel values on the leakage path are identified, so as to determine the specific direction and scope of leakage. At the same time, by calculating the minimum cross-sectional area in the leakage path and combining with the principle of fluid dynamics, the instantaneous leakage volume is further estimated. By combining the pixel analysis of the three-dimensional model with the geometric characteristics of the leakage path, the severity of leakage can be more accurately quantified, and a scientific basis can be provided for the repair and risk assessment of the leakage point.

[0014] Compared with the prior art, the beneficial effects of the present invention include:

[0015] (1) Select the image cross-sectional parameters measured by the second ultrasonic measuring instrument as the parameters for three-dimensional modeling, improve the accuracy of three-dimensional modeling, reduce duplicate data, reduce the data volume, and improve the efficiency of three-dimensional modeling; at the same time, correct the non-cross-sectional parameters of the image measured by the second ultrasonic measuring instrument to its cross-sectional parameters. One is to improve the accuracy of the image cross-sectional parameters measured by the second ultrasonic measuring instrument, and the other is to improve the utilization rate of the non-cross-sectional parameters of the image measured by the second ultrasonic measuring instrument;

[0016] (2) The supervised learning receives the data of the second ultrasonic measuring instrument in real time to generate a three-dimensional model, and the three-dimensional model generates a real-time control signal to control the second ultrasonic measuring instrument to measure;

[0017] (3) Simulate the formation process of corrosion holes through loss parameters, predict the probability of corrosion holes appearing in the pipeline, and verify the geometric shape parameters of the corrosion holes measured in real time; and, according to the graphic distribution of pixel values, the area where corrosion holes or threaded joint leaks will form can be predicted;

[0018] (4) Accurately determine the positions and quantities of corrosion holes and threaded joint leaks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0020] Figure 1 is the overall schematic diagram of the gas well;

[0021] Figure 2 is the schematic diagram of the gas well provided with the first ultrasonic measuring instrument and the second ultrasonic measuring instrument;

[0022] Figure 3It is a schematic diagram of the area where the second ultrasonic measuring instrument measures the mechanism parameters of the gas well by ultrasonic waves;

[0023] Figure 4 It is a schematic diagram for judging the leakage direction in the three-dimensional model;

[0024] Among them, 101 - the first layer of casing, 102 - the second layer of casing, 103 - the third layer of casing, 104 - the fourth layer of casing, 105 - the fifth layer of casing, 201 - pipeline, 301 - annulus, 401 - packer, 501 - the first ultrasonic measuring instrument, 502 - the second ultrasonic measuring instrument, 601 - leakage channel. Detailed implementation manners

[0025] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some but not all of the embodiments of the present invention.

[0026] Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the claimed present invention, but merely represents some embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0027] It should be noted that, without conflict, the embodiments in the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0028] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0029] The present invention will be further described in detail below with reference to the embodiments.

[0030] As Figures 1 to 4 shown, the present invention provides a method for detecting leakage points of a gas well, which is implemented by using a first ultrasonic measuring instrument, a second ultrasonic measuring instrument and a gyroscope. The specific steps are as follows:

[0031] In the first step, using the angle parameter of the gyroscope and the diving depth of the second ultrasonic measuring instrument, the coordinates of the gas well structure parameters can be accurately determined. Through a supervised learning algorithm, these coordinate data are connected to construct a three-dimensional model of the gas well. The three-dimensional model can be dynamically adjusted according to the real-time obtained gas well structure parameters and generate a real-time feedback signal. The feedback signal is used to control the acquisition frequency and diving speed of the second ultrasonic measuring instrument, so as to optimize the data acquisition process and ensure the measurement accuracy and efficiency;

[0032] It should be noted that the measurement accuracy of the diving depth of the second ultrasonic measuring instrument directly determines the accuracy and precision of the three-dimensional modeling. If the measured value of the diving depth is too small, it will cause the overlap of the gas well structure parameters in the axial direction in the three-dimensional model, resulting in inaccurate modeling. As Figure 4 shown, collecting a set of gas well structure parameters is equivalent to collecting a picture. If the cross-sectional areas are not properly connected, the cross-sectional areas of the previous picture and the subsequent picture will overlap, resulting in the dislocation of the gas well structure parameters from the actual position of the gas well. On the contrary, if the measured value of the diving depth is too large, it will cause the discontinuity or separation of the gas well structure parameters in the axial direction in the three-dimensional model. In this case, the discontinuous area is usually filled with the gas well structure parameters of the previous or subsequent picture, which will also cause the dislocation of the gas well structure parameters from the actual position. To solve this problem, a method of mutual calibration between the first ultrasonic measuring instrument and the second ultrasonic measuring instrument is adopted to improve the measurement accuracy of both. Specifically, the first ultrasonic measuring instrument is used to measure the volume and instantaneous leakage of the annulus fluid, while the second ultrasonic measuring instrument is used to accurately measure the diving depth in the pipeline. Through two-way measurement calibration, that is, the second ultrasonic measuring instrument measures the distance along the wellhead direction and its opposite direction, the measurement accuracy of the diving depth is further improved. This method not only effectively avoids the problems of overlap or discontinuity of the gas well structure parameters, but also significantly improves the accuracy and reliability of the three-dimensional modeling, providing more accurate data support for gas well leakage detection and structural analysis;

[0033] In the second step, use the angular parameters of the gyroscope and the diving depth of the second ultrasonic measuring instrument to determine the coordinates of the gas well structure parameters, and use supervised learning to connect the gas well structure parameters according to the coordinates and construct a three-dimensional model; the three-dimensional model generates a real-time feedback signal according to the real-time gas well structure parameters to control the signal acquisition frequency and diving speed of the second ultrasonic measuring instrument; by using the angular parameters of the gyroscope and the diving depth of the second ultrasonic measuring instrument, the coordinates of the gas well structure parameters can be accurately determined; through the supervised learning algorithm, the data of the coordinates are connected to construct a three-dimensional model of the gas well; the three-dimensional model can be dynamically adjusted according to the real-time obtained gas well structure parameters and generate a real-time feedback signal; the feedback signal is used to control the acquisition frequency and diving speed of the second ultrasonic measuring instrument, so as to optimize the data acquisition process and ensure the measurement accuracy and efficiency;

[0034] It should be noted that when the second ultrasonic measuring instrument adjusts the connection between the measured image cross-sections, it uses the angular parameters of the gyroscope for adjustment and corrects them in combination with the curvature inside the gas well, and realizes precise adjustment by using the continuity of the curvature. It should be noted that since the second ultrasonic measuring instrument may rotate in the pipeline, its measurement of the gas well is carried out in segments, so the positional relationship between the data needs to be ensured consistent through connection. When the cross-sections of the images collected by the second ultrasonic measuring instrument are directly connected along the axial direction of the gas well, angular misalignment may occur. To solve this problem, the rotation angle of the second ultrasonic measuring instrument is measured by the gyroscope and the angular information is loaded into the measured image, so that the gas well structure parameters have angular information. This method not only helps to accurately locate and connect the gas well structure parameters in the three-dimensional model, but also improves the precise positioning ability of the leakage point position. In addition, the diving depth and rotation angle parameters of the second ultrasonic measuring instrument are loaded into the gas well structure parameters, and the gas well structure parameters are positioned and spliced by combining the diving depth and rotation angle, so as to construct a high-precision three-dimensional model. The supervised learning algorithm adopts real-time modeling technology, predicts its change trend according to the collected gas well structure parameters, and generates a real-time feedback signal to dynamically control the acquisition frequency and diving speed of the second ultrasonic measuring instrument. For example, when a significant change in radius or curvature (such as getting larger or smaller) and an area where corrosion holes or threaded connections may appear are detected, the diving speed of the second ultrasonic measuring instrument is reduced and the acquisition frequency is increased to obtain more data and improve the measurement accuracy; while in the normal area of the gas well, the diving speed is increased and the acquisition frequency is reduced to improve the measurement efficiency and reduce invalid data. Through the above methods, not only the accuracy and efficiency of three-dimensional modeling are optimized, but also more reliable technical support is provided for gas well leakage detection and structural analysis;

[0035] In the third step, the curvature increment is calculated by using the three-dimensional model to predict the possible suspicious leakage points in the gas well; after determining the suspicious leakage points, the structural parameters of the gas well are continuously collected in the surrounding interval with the suspicious leakage points as the center; at the same time, it is ensured that the cross-sections of the collected images are continuously distributed in the axial direction of the gas well to fully cover the suspicious area and capture the detailed information of the leakage points;

[0036] It should be noted that the leakage points may include tubing leakage points, gas pipe leakage points and casing leakage points. Such as Figure 4As shown, the ultrasonic waves of the second ultrasonic measuring instrument form a cross-sectional area in the area perpendicular to the axial direction of the gas well, and this area is the cross-section of the image obtained by measuring the gas well. It should be noted that the image cross-section has a certain thickness or height (for example, the thickness is 60 pixels or 300 pixels, and the height is 100 pixels or 200 pixels, and one pixel corresponds to a thickness or height of 1 cm or 5 cm), and the ultrasonic waves of the second ultrasonic measuring instrument have a certain divergence angle (such as 30° or 60°). Therefore, the area not perpendicular to the axial direction of the gas well includes the upper deviation angle area and the lower deviation angle area. The gas well structure parameters obtained in the upper deviation angle area and the lower deviation angle area need to be converted through trigonometric conversion to obtain the gas well structure parameters in the cross-sectional area. When selecting the gas well structure parameters in the cross-sectional area as the basis for 3D modeling, the gas well structure parameters obtained in the lower deviation angle area can be used as the data basis for generating real-time feedback signals, thus having a prediction function. At the same time, these data can also be used for calibration. The calibration method is based on the relationship between the sides and angles of a triangle, and the position of points on the cross-section of the gas well is determined by calculation, such as the position of points on the pipeline, annulus, and casing. In addition, the gas well structure parameters in the upper deviation angle area, the lower deviation angle area, and the cross-sectional area can be mutually verified to ensure the accuracy and correctness of the parameters. Through the above method, not only can the accuracy of 3D modeling be improved, but also more reliable data support can be provided for the detection and positioning of leakage points, while realizing real-time feedback and prediction functions, and optimizing the measurement efficiency and accuracy;

[0037] In the fourth step, using the 3D model, by analyzing the change of pixel values, accurately calculate the leakage path of the corrosion hole and / or the threaded connection; at the same time, by calculating the minimum cross-sectional area in the leakage path and combining with the principle of fluid dynamics, further estimate the instantaneous leakage volume;

[0038] It should be noted that the pixel values range from 0 to 255, and different regions (such as the pipe, annulus, casing, and the liquid in the annulus) have different pixel values. The characteristics of the corrosion holes can be calculated based on the differences in pixel values. For example, the region with pixel values between 245 and 248 is identified as the pixel values of the corrosion holes, and the supervised learning algorithm is used to analyze these pixel values to determine the size, location, and path of the corrosion holes. In particular, by identifying the continuity of the pixel values in the path of the corrosion holes, it is judged whether it may lead to liquid leakage. Similarly, at the threaded connection of the pipe, the size and location of the leakage path can also be determined by calculating the pixel values, and it is identified whether it may lead to liquid leakage. The pixel values of the leakage path at the threaded connection also need to meet the condition of continuous distribution. In addition, the minimum cross-sectional area of the corrosion holes and the leakage path at the threaded connection can be calculated through the number of pixel points, and the instantaneous leakage rate can be calculated in combination with the pressure difference. At the same time, based on the graphical distribution of the pixel values, the regions where corrosion holes or leaks at the threaded connections may form can be predicted. For example, the normal wall thickness of the pipe may correspond to 600 or 2000 pixel points, while in the region where corrosion holes are about to form, the number of pixel points may be significantly reduced to 10 or 15. This method can not only accurately identify the characteristics of corrosion holes and leaks at the threaded connections through the analysis and calculation of pixel values, but also predict potential leakage risks, providing a scientific basis for the safety monitoring and maintenance of gas wells.

[0039] In order to better achieve the object of the present invention, in some embodiments of the present invention, in the first step, preferably, the first pressure measuring device and the first temperature measuring device are used to measure the pressure and temperature parameters in the annulus, while the second pressure measuring device and the second temperature measuring device follow the second ultrasonic measuring instrument to measure the pressure and temperature parameters in the pipe. By measuring the pressure and temperature parameters in the annulus and the pipe respectively, the instantaneous leakage rate can be calculated more accurately, providing reliable data support for leakage detection and analysis.

[0040] In order to better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, as Figure 1As shown in the figure, taking a gas well with five layers of casing as an example, the casing includes the first layer of casing 101, the second layer of casing 102, the third layer of casing 103, the fourth layer of casing 104, and the fifth layer of casing 105. A cement layer is provided between each layer of casing, specifically as follows: A cement layer is provided between the first layer of casing 101 and the second layer of casing 102, and the area between them is a non-overlapping area. A cement layer is also provided on the outer layer of the first layer of casing 101; A cement layer is provided between the second layer of casing 102 and the third layer of casing 103, and the area between them is a non-overlapping area. A cement layer is also provided on the outer layer of the second layer of casing 102; A cement layer is provided between the third layer of casing 103 and the fourth layer of casing 104, and the area between them is a non-overlapping area. A cement layer is also provided on the outer layer of the third layer of casing 103; A cement layer is provided between the fourth layer of casing 104 and the fifth layer of casing 105, and the area between them is a non-overlapping area. A cement layer is also provided on the outer layer of the fourth layer of casing 104; A cement layer is also provided on the outer layer of the fifth layer of casing 105. Through the second ultrasonic measuring instrument, the radii and curvatures of the first layer of casing 101, the second layer of casing 102, the third layer of casing 103, the fourth layer of casing 104, and the fifth layer of casing 105 can be measured. At the same time, the radii and curvatures of the cement layer between each layer of casing and the outer cement layer are measured. Among them, the curvature includes the curvatures of the inner and outer walls of the pipeline, the curvature of the annulus interface, the curvatures of the inner and outer walls of the casing, and the curvature of the cement layer interface. It should be noted that the second ultrasonic measuring instrument constructs a three-dimensional model by measuring the radii and curvatures of the casing and the cement layer, and establishes a time axis for the measurement data. Loss parameters are obtained on the time axis. Through the dynamic simulation of the three-dimensional model, the points where the casing and the cement layer may leak can be predicted, and the leaked points that have occurred can be discovered in real time. This method not only improves the accuracy of leakage detection but also provides dynamic and real-time technical support for the safety monitoring and maintenance of gas wells.

[0041] To better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, as Figure 1 and Figure 2 shown, the second ultrasonic measuring instrument 502 descends into the pipeline 201 to measure the structural parameters of the gas well. The structural parameters will be used for three-dimensional modeling and real-time monitoring. A seal 401 is provided between the first layer of casing 101 and the pipeline 201, and at the same time, a liquid is injected into the annulus 301. The first ultrasonic measuring instrument 501 is used to measure the liquid level height in the annulus 301, thereby providing real-time data support for leakage detection and liquid level changes. This design combines ultrasonic measurement technology and the function of the seal, which can effectively improve the measurement accuracy of the structural parameters of the gas well and the real-time performance of leakage monitoring.

[0042] To better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, as Figure 3As shown, a fixed first ultrasonic measuring instrument is used to measure the liquid level depth of the annulus 301. The initial position of the second ultrasonic measuring instrument is at the same horizontal plane as the first ultrasonic measuring instrument. It should be noted that the starting point of the measurement of the first ultrasonic measuring instrument corresponds to the cross-section measured by the second ultrasonic measuring instrument, which serves as the initial position for measurement. The inclination angle of the pipeline 201 is α. Liquid is injected into the annulus 301. The liquid level line is measured by the first ultrasonic measuring instrument to obtain the liquid level height. At the same time, the second ultrasonic measuring instrument measures the cross-sectional image of the gas well and the liquid level line, and records the cable length when the second ultrasonic measuring instrument dives into the pipeline 201. Using the cosine function and combining the two known quantities of the liquid level height and the cable length, the inclination angle α of the pipeline 201 can be calculated. It should be emphasized that measuring the inclination angle α of the pipeline helps to accurately calculate the pressure parameters of the liquid, thereby more accurately calculating the leakage amount or instantaneous leakage amount of the liquid in the annulus 301. Through the trigonometric relationship between the inclination angle α and the cable length, the depth h of the pipeline 201 can be further calculated. This method not only improves the measurement accuracy but also provides reliable data support for the calculation and real-time monitoring of the leakage amount.

[0043] To better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, the diving position of the second ultrasonic measuring instrument is measured by its cable length, and correction is performed using the pipeline joint image collected by the second ultrasonic measuring instrument. It should be noted that since the unit length of the pipeline is determined, and the length of the unit pipeline connected by threads is usually also fixed (even if pipelines of different lengths are used, their radii are the same, and the length of the unit pipeline connected by threads can still be determined by recording the connection sequence). When the connection length between the unit pipelines exceeds its fixed length, it indicates that the threaded connection may be loose or detached, and there is a possibility of threaded leakage. Through the image measured by the second ultrasonic measuring instrument, the shape and state of the pipeline joint can be further confirmed, so as to accurately judge the integrity of the threaded connection and the leakage risk. This method combines cable length measurement and image correction, significantly improving the accuracy and reliability of threaded leakage detection.

[0044] To better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, the second pressure measurement device is equipped with a number of pressure measurement probes, and these probes are distributed on the same cross-section of the measurement image of the second ultrasonic measuring instrument and are symmetrically distributed. For example, 4 or 6 pressure measurement probes can be set: if 4 probes are used, the angular interval between each probe is 90°; if 6 probes are used, the angular interval between each probe is 60°. In addition, an odd number of probes, such as 7 or 9, can also be used, and the angular interval between each probe is equal. This symmetric distribution design aims to improve the accuracy of pressure measurement, and combined with the image recognition function of the three-dimensional model, through the parameter changes of the pressure measurement probes at various azimuth angles, the azimuth positioning of the leakage point is realized. Taking the symmetric point of the pipeline cross-section as the center, assuming that 4 pressure measurement probes are used as an example: if the pressure measurement probe at the 0° position detects a sudden change in the pressure parameter, and the pressure parameter increment of the probes at the 90° and 270° positions is the second, and the pressure parameter increment of the probe at the 180° position is the smallest, it can be determined that the pipeline leakage point is most likely located at the 0° position. This method can accurately distinguish the angular position of the leakage point through the comparative analysis of multi-angle pressure parameters, and significantly improve the efficiency and accuracy of leakage detection.

[0045] To better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, the second temperature measurement device is equipped with a number of temperature measurement probes, and the probes are distributed on the same cross-section of the measurement image of the second ultrasonic measuring instrument and are symmetrically distributed. For example, 4 or 6 temperature measurement probes can be set: if 4 probes are used, the angular interval between each probe is 90°; if 6 probes are used, the angular interval between each probe is 60°. In addition, an odd number of probes, such as 7 or 9, can also be used, and the angular interval between each probe is equal. This symmetric distribution design aims to improve the accuracy of temperature measurement, and combined with the image recognition function of the three-dimensional model, through the parameter changes of the temperature measurement probes at various azimuth angles, the azimuth positioning of the leakage point is realized. Taking the symmetric point of the pipeline cross-section as the center, assuming that 4 temperature measurement probes are used as an example: if the temperature measurement probe at the 0° position detects a sudden change in the temperature parameter, and the temperature parameter increment of the probes at the 90° and 270° positions is the second, and the temperature parameter increment of the probe at the 180° position is the smallest, it can be determined that the pipeline leakage point is most likely located at the 0° position. This method can accurately distinguish the angular position of the leakage point through the comparative analysis of multi-angle temperature parameters, and significantly improve the efficiency and accuracy of leakage detection.

[0046] In some embodiments of the present invention, to better achieve the object of the present invention, in the first step, further, a pressure measurement probe and a temperature measurement probe are paired and arranged at the same point. By mutually verifying the pressure parameter change and the temperature parameter change of the leakage point through the pressure measurement probe and the temperature measurement probe, a pressure model and a temperature model can be respectively established in the three-dimensional model, and the data of the two can be used for mutual correction. This method can not only improve the measurement accuracy but also enhance the reliability of the leakage point detection, providing more comprehensive data support for the safety monitoring and maintenance of gas wells.

[0047] In some embodiments of the present invention, to better achieve the object of the present invention, in the first step, further, a telescopic mechanism is provided on the second ultrasonic measuring instrument for driving the movement of the pressure measurement probe and the temperature measurement probe. It should be noted that since the second ultrasonic measuring instrument can move freely in the pipeline and the pipeline may have an inclination angle, the distances from each pressure measurement probe and temperature measurement probe to the inner wall of the pipeline are inconsistent, thus affecting the measurement accuracy. By locating the spatial positions of each pressure measurement probe and temperature measurement probe through the data of the three-dimensional model and precisely controlling the telescopic mechanism using the data of the three-dimensional model, each probe can be made to approach the inner wall of the pipeline, thereby improving the measurement accuracy of the pressure parameter and the temperature parameter. This method not only optimizes the measurement process but also significantly improves the accuracy and reliability of the data.

[0048] In some embodiments of the present invention, to better achieve the object of the present invention, in the first step, further, the image data measured by the second ultrasonic measuring instrument 502 is processed by vector addition and subtraction to adjust the center point of its measured image to the center point of the cross-section of the pipeline 201. It should be noted that due to the inclination angle of the pipeline 201, the center point measured by the second ultrasonic measuring instrument 502 is often difficult to be directly located at the center point of the pipeline cross-section. To improve the accuracy of three-dimensional modeling, the center point measured by the second ultrasonic measuring instrument 502 is corrected to the center point of the cross-section of the pipeline 201 by vector addition and subtraction. Taking the number axis as an example for illustration: Assume that the diameter of the pipeline 201 is 4 (expressed in dimensionless form), and the pipeline is located at the position from -2 to 2 on the number axis. If the central measurement point of the second ultrasonic measuring instrument 502 is located at the position of -1 on the number axis, then by adding 1 to the negative side and subtracting 1 from the positive side, the central measurement point is adjusted to the 0 point position on the number axis, that is, the center point of the pipeline cross-section. This method significantly improves the accuracy of three-dimensional modeling and the accuracy of measurement data through vector correction.

[0049] To better achieve the object of the present invention, in some embodiments of the present invention, in the first step, further, the cross-sectional parameters of the measurement image of the second ultrasonic measuring instrument 502 are used as the main parameters for three-dimensional modeling, and at the same time, its non-cross-sectional parameters are used to correct the cross-sectional parameters. It should be noted that the second ultrasonic measuring instrument 502 generates a large amount of measurement data. By using the cross-sectional parameters as the core parameters for three-dimensional modeling, the amount of data can be effectively reduced and the modeling process can be simplified. At the same time, using the non-cross-sectional parameters to correct the cross-sectional parameters can, on the one hand, improve the accuracy of the cross-sectional parameters, and on the other hand, also improve the utilization rate of the non-cross-sectional parameters. This method not only optimizes the data processing efficiency, but also significantly improves the accuracy and reliability of three-dimensional modeling.

[0050] To better achieve the object of the present invention, in some embodiments of the present invention, in the second step, preferably, in the supervised learning framework, the increment is calculated using the historical data and real-time data of the gas well structure parameters, and this increment is used as the loss parameter for the dynamic simulation of the three-dimensional model. Through this loss parameter, the formation process of the corrosion hole is simulated, and the probability of the corrosion hole appearing in the pipeline is predicted. At the same time, the geometric shape parameters of the corrosion hole measured in real time are verified to optimize the prediction accuracy of the model. This method can effectively improve the accuracy of corrosion hole prediction and provide a reliable basis for pipeline maintenance.

[0051] To better achieve the object of the present invention, in some embodiments of the present invention, in the second step, further, the supervised learning uses the structure parameters to construct a three-dimensional model, and the increment of the gas well structure parameters is used as the loss parameter for the dynamic simulation of the three-dimensional model. The specific steps are as follows:

[0052] Step A1: Collect the structure parameters, temperature parameters and pressure parameters, and preprocess these parameters

[0053] Collect data from the first ultrasonic measuring instrument, the second ultrasonic measuring instrument, the first pressure measuring device, the second pressure measuring device, the first temperature measuring device and the second temperature measuring device. The data includes but is not limited to the radius, curvature, annulus liquid level depth, pipeline inclination angle, pipeline internal pressure and temperature parameters, etc. According to the working conditions and environmental changes of the gas well, set the dynamic acquisition frequency to ensure the real-time and comprehensiveness of the data. Remove outliers (such as noise data caused by sensor failures) and redundant data to ensure the data quality. Normalize the collected data to unify data with different dimensions into the same numerical range, and avoid deviations caused by data dimension differences during the model training process. Introduce data augmentation techniques (such as rotation, scaling, noise addition, etc.) to increase the diversity of training data and improve the generalization ability of the model. For example, randomly rotate and scale the ultrasonic images to simulate the gas well structure under different perspectives.

[0054] Step A2: Structural Parameter Extraction

[0055] Obtain high - resolution images from the ultrasonic measuring instrument to capture the geometric features of the pipeline and the annulus. Use image - processing techniques (such as edge detection, contour extraction, etc.) to extract structural parameters such as the radius and curvature of the pipeline and the annulus. Calculate the inclination angle of the pipeline and the depth of the annulus liquid level through image - analysis algorithms (such as the Hough transform). Record the depth of the annulus liquid level and the inclination angle of the pipeline, which will serve as the basic data for 3D modeling. Verify the accuracy of the extracted structural parameters through multi - sensor data - fusion technology to ensure the reliability of subsequent modeling.

[0056] Step A3: Constructing and Training a 3D Model

[0057] Based on the extracted structural parameters, use supervised learning to construct a 3D model. The model should reflect the overall shape, size, and structural features of the pipeline as detailed as possible. Use regression models (such as linear regression, support vector regression) or deep - learning models (such as convolutional neural network CNN, long short - term memory network LSTM) to build the model. Combine the advantages of multiple models (such as using CNN for image feature extraction and LSTM for time - series prediction) for multi - model fusion to improve prediction accuracy and robustness. Take the extracted structural parameters, pressure, and temperature parameters as the input features of the model. Take the increment of the structural parameters as part of the loss function, that is, the difference between the model prediction value and the actual measurement value. Train the model using the historical dataset, and adjust the model parameters through optimization algorithms (such as gradient descent) until the preset convergence condition is reached or the loss function is minimized. Use an independent dataset to verify the generalization ability and performance of the model to ensure that the model performs well on unseen data. Introduce automated hyperparameter - tuning tools (such as Grid Search, Random Search, or Bayesian Optimization) to optimize the model hyperparameters, reduce the workload of manual hyperparameter - tuning, and improve the model performance.

[0058] Step A4: Dynamic Simulation

[0059] Conduct dynamic simulation using the trained 3D model. When new structural parameters, pressure, and temperature parameters are actually measured, input them into the model for prediction and update. The model dynamically adjusts according to the real - time data, generates feedback signals, controls the acquisition frequency and the diving speed of the second ultrasonic measuring instrument, and optimizes the data - acquisition process. The model will adjust the structural model of the pipeline and the annulus according to the changes in the input to ensure that it always matches the actual working conditions. Introduce a real - time feedback mechanism to adjust the data - acquisition strategy in real time according to the prediction results of the model, further improving the real - time performance and accuracy of the model. For example, when the model detects a significant change in curvature, automatically reduce the diving speed of the second ultrasonic measuring instrument and increase the acquisition frequency to obtain more detailed data.

[0060] Step A5: Model Evaluation and Optimization

[0061] Continuously monitor the prediction performance of the model and adjust the model parameters or model structure as needed to improve the model accuracy and stability. Detect and correct biases or errors in the model in a timely manner by monitoring the prediction errors of the model in real time. Use cross-validation for parameter tuning to ensure that the model performs consistently and reliably on different datasets. Combine automated parameter tuning tools and cross-validation to further optimize the model performance and ensure its applicability in complex gas well environments. Dynamically adjust the weights of the loss function according to the performance of the model to optimize the prediction accuracy of the model. For example, increase the weight for the corrosion hole area to improve the detection sensitivity for leakage points. Randomly rotate, scale, and add noise to the ultrasonic images to simulate the gas well structure under different working conditions and enhance the generalization ability of the model. Introduce synthetic data generation technology to generate additional training data by simulating gas well leakage scenarios and further improve the robustness of the model. Integrate the data from ultrasonic measuring instruments, pressure sensors, and temperature sensors to improve the accuracy of the model through multi-source data complementarity. Use the Kalman filter algorithm to fuse multi-sensor data, reduce measurement errors, and improve the reliability of the data. During the dynamic simulation process, introduce a real-time feedback mechanism to dynamically adjust the data acquisition strategy according to the prediction results of the model. For example, when the model detects a suspicious leakage point, automatically increase the acquisition frequency in that area to obtain more detailed data. Control the diving speed and acquisition frequency of the second ultrasonic measuring instrument through real-time feedback signals to optimize the data acquisition process and ensure the real-time and accuracy of the model. Use Bayesian Optimization for hyperparameter tuning to automatically search for the optimal combination of model parameters and reduce the workload of manual parameter tuning. Combine cross-validation and automated parameter tuning tools to further improve the generalization ability and prediction accuracy of the model. Through the above steps and technical details optimization, a three-dimensional model with high accuracy and high reliability can be constructed for the detection and prediction of gas well leakage points. The optimized solution not only improves the generalization ability and real-time performance of the model, but also further enhances the prediction accuracy and robustness of the model through multi-model fusion, automated parameter tuning, and real-time feedback mechanism, providing strong technical support for the safety monitoring and maintenance of gas wells.

[0062] To better achieve the object of the present invention, in some embodiments of the present invention, in step A3 of the second step, further, the specific steps of optimizing the three-dimensional model using supervised learning are as follows:

[0063] Step B1: Multi-source Data Integration, Label Annotation, Data Cleaning, and Data Augmentation

[0064] Collect images (obtained by ultrasonic measuring instruments), point clouds (laser scanning data), and voxel data (3D grid representation) of the 3D model, and synchronously record the real-time parameters of pressure and temperature sensors. Add structured labels to the training data, including pipeline bounding boxes, key points of corrosion holes, leakage path area annotations, etc., to ensure the accuracy of supervised learning. Remove sensor outliers (such as temperature / pressure data beyond the physical range) and image noise (processed by median filtering). Randomly rotate (±10°), scale (0.8 - 1.2 times), and translate (±5 pixels) the ultrasonic images to simulate different measurement perspectives. Add Gaussian noise (σ = 0.01) to improve the anti-interference ability of the model. Simulate leakage scenarios through hydrodynamic simulation to generate an annotated synthetic dataset covering extreme working conditions (such as high-pressure leakage and multiple leakage points coexisting). Use the Kalman filter algorithm to fuse ultrasonic, pressure, and temperature data to reduce the error of a single sensor and generate a high-confidence training set.

[0065] Step B2: Image feature extraction, point cloud feature extraction, and multimodal feature fusion

[0066] Use the pre-trained ResNet-50 as the basic architecture and fine-tune the model through transfer learning to adapt to the geometric features of the gas well structure. Introduce a channel attention module (SE Block) at the end of the convolutional neural network (CNN) to weight the importance of features in different channels and enhance the sensitivity to the corrosion hole area. Based on the original PointNet, add a local feature aggregation layer (extract neighborhood point features through the KNN algorithm) to improve the recognition ability of tiny corrosion holes. Use adaptive max pooling to dynamically adjust the pooling area size to adapt to leakage paths of different scales. Concatenate the image features extracted by CNN, the point cloud features extracted by PointNet, and the pressure and temperature parameters to form a multi-dimensional feature vector. For time series data (such as continuously collected pressure changes), use the LSTM network (Long Short-Term Memory) to extract time-dependent features and fuse them with spatial features.

[0067] Step B3: Construct a model with a spatio-temporal joint model and loss function calculation

[0068] Design a CNN-LSTM hybrid architecture. The CNN branch processes image / point cloud data, and the LSTM branch processes time series sensor data. Finally, fuse and output through a fully connected layer. Introduce learnable weight coefficients to automatically balance the contribution degrees of image features and sensor features. Combine the mean square error (MSE, used for structural parameter regression) and cross-entropy loss (used for leakage point classification), and dynamically adjust the weights of the two through the hyperparameter λ; for the increment of gas well structure parameters, design an increment-sensitive loss term to strengthen the model's ability to capture tiny changes.

[0069] Step B4: Model Training and Optimization

[0070] Train the model on the synthetic dataset to initially learn the general features of the gas well structure. Fine-tune the model using real gas well data to adapt to the actual working conditions. Embed a feedback loop during training to dynamically adjust the data sampling strategy according to the performance of the validation set (such as oversampling the leakage point area). Use Bayesian Optimization to search for the optimal hyperparameter combination, and define the parameter space including the learning rate (1e-5~1e-3), batch size (16~128), and λ (0.3~0.7). Monitor the validation set loss, and if it does not decrease for 5 consecutive epochs, terminate the training early to prevent overfitting. Use the leakage point detection accuracy (Accuracy), recall (Recall), and F1 score to comprehensively evaluate the model performance. Perform 5-fold cross-validation to ensure the stability of the model under different data distributions. By combining image, point cloud, and sensor data, significantly improve the leakage point localization accuracy. The CNN-LSTM hybrid model can respond to gas well structure changes in real time and support online updates (delay <50ms). Bayesian Optimization improves the hyperparameter search efficiency by 40% and accelerates the model convergence speed. Data augmentation and Kalman filtering enable the model to maintain a detection accuracy of over 90% in a noisy environment. Through the above optimizations, the 3D model constructed by supervised learning can not only accurately predict the leakage point location and leakage volume, but also provide dynamic decision-making support for gas well maintenance, significantly improving the real-time performance and reliability of safety monitoring.

[0071] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, further calculate the geometric shape parameters of the corrosion hole and calculate the instantaneous leakage volume of the corrosion hole through the 3D model; the specific steps are as follows:

[0072] Step C1: Measure the geometric shape parameters of the corrosion hole in real time and calculate the smallest cross-section in the corrosion hole channel; it should be noted that the smallest cross-section in the corrosion hole channel determines the instantaneous leakage volume. Specifically, measure the diameter of the corrosion hole, measure the depth of the corrosion hole, record the shape characteristics of the corrosion hole (such as irregular shape, circular, etc.), and determine the specific orientation and depth of the corrosion hole in the pipeline;

[0073] In the second step C2, the three-dimensional model corrects the geometric shape parameters of the corrosion holes through loss parameters. It should be noted that the geometric shape parameters of the corrosion holes obtained by the second ultrasonic measuring instrument are used as the loss parameters. The structural parameters in the three-dimensional model are adjusted through optimization algorithms (such as gradient descent, genetic algorithm, etc.), and the change process of the structural parameters in the three-dimensional model is supervised and learned dynamically to correct the geometric shape parameters of the corrosion holes measured in real time. At the same time, the geometric shape parameters of the corrosion holes are used to inversely correct the change process of the structural parameters in the three-dimensional model for supervised learning, so as to improve the accuracy of the geometric shape parameters of the corrosion holes. The specific structural parameters to be corrected are as follows: correct the radius of the pipeline, correct the radius of the annulus, correct the local curvature of the pipeline, correct the radius of the casing, and correct the local curvature of the casing.

[0074] In the third step C3, the instantaneous leakage rate of the liquid leaking from the annulus to the pipeline is estimated based on the pressure and temperature parameters in the pipeline and the annulus. The formula for calculating the instantaneous leakage rate of the corrosion hole is as follows:

[0075] Q 瞬时 =f(h 差 ,S,P 1 ,T 1 ,P 2 ,T 2 )

[0076] Q 瞬时 represents the instantaneous leakage rate of the corrosion hole, f represents the functional relationship, h 差 represents the height difference from the corrosion hole of the pipeline 201 to the liquid level in the annulus 301, S represents the smallest cross-section in the corrosion hole channel, P 1 represents the pressure value in the annulus 301, T 1 represents the temperature value in the annulus 301, P 2 represents the pressure value near the corrosion hole in the pipeline, T 2 represents the temperature value near the corrosion hole in the pipeline; it should be noted that the instantaneous leakage rate Q of the corrosion hole 瞬时 is calculated by using calculus based on the functional relationship f to improve the calculation accuracy of the instantaneous leakage rate of the corrosion hole. In order to simplify the calculation and measurement equipment, in the three-dimensional model, P 1 ,T 1 ,P 2 ,T 2 are replaced by proportionality coefficients, and their proportionality coefficients are calculated by supervised learning.

[0077] In order to better achieve the purpose of the present invention, in some embodiments of the present invention, in the third step, further, in the case where the pipeline 201 has no leakage, its temperature parameters are collected and marked in the three-dimensional model, and the three-dimensional model is used for simulation. The formula for the temperature parameter changing with the depth of the pipeline 201 is:

[0078] Th = T 0 + K × h

[0079] Wherein, T h is the temperature at the depth h of the pipeline, T 0 is the surface temperature, K is the geothermal temperature gradient (generally in the unit of °C / m), h is the depth (in the unit of m), + represents addition, and × represents multiplication;

[0080] It should be noted that in the case where the pipeline 201 has no leakage (which can be confirmed by measuring the liquid level height in the annulus 301 through the first ultrasonic measuring instrument 501), the parameters of the pipeline depth and temperature are collected, and the functional relationship between the pipeline depth and temperature is established, especially to verify the geothermal temperature gradient K; the above data are measured in the shut-in well state to improve the stability and repeatability of data measurement.

[0081] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, further, the temperature at the corrosion hole in the pipeline 201 is measured in real time, and the temperature increment is calculated according to its depth parameter and simulated by a three-dimensional model; the formula for calculating the temperature increment is:

[0082] ΔT = T h − T h实时

[0083] T h实时 is the real-time measured temperature at the pipeline depth h, and ΔT represents the temperature increment; it should be noted that when there is a leakage in the pipeline 201 and the liquid in the annulus 301 leaks into the pipeline 201, due to the temperature difference between the liquid in the annulus 301 and the natural gas in the pipeline 201, the heat absorption and release between the liquid and the natural gas are equal, and the instantaneous amount of leakage is reflected in the change of the temperature increment.

[0084] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, furthermore, a functional relationship between the instantaneous leakage amount and the temperature increment is established at the corrosion hole, and then the instantaneous leakage amount of the thread is deduced through the functional relationship from the temperature increment at the thread leakage; the functional relationship between the instantaneous leakage amount and the temperature increment established at the corrosion hole is as follows:

[0085] Q 瞬时 = f 1 (ΔT)

[0086] f 1 represents the functional relationship between the instantaneous leakage amount and the temperature increment; it should be noted that since it is difficult to detect thread leakage by ultrasonic waves, therefore, indirect measurement is carried out through the conservation of thermal energy and the establishment of a functional relationship. At the thread leakage, from the functional relationship f between the instantaneous leakage amount and the temperature increment 1The instantaneous leakage of the thread leakage is calculated with the increment ΔT of the temperature.

[0087] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, further, when the pipeline 201 has no leakage, its pressure parameters are collected and marked in the three-dimensional model, and simulated by the three-dimensional model; the formula for the pressure parameter varying with the depth of the pipeline 201 is:

[0088] P h =P 0 +ρ×g×h

[0089] Wherein, P h is the pressure at the pipeline depth h, P 0 is the surface pressure, ρ is the density of the formation fluid (usually the density of natural gas), g is the acceleration due to gravity (about 9.81 m / s²), h is the depth (in meters), + represents addition, and × represents multiplication;

[0090] It should be noted that when the pipeline 201 has no leakage (which can be confirmed by measuring the liquid level height in the annulus 301 with the first ultrasonic measuring instrument 501), the parameters of the pipeline depth and pressure are collected, and the functional relationship between the pipeline depth and pressure is established; the above data are measured in the shut-in state to improve the stability and repeatability of data measurement.

[0091] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, further, the pressure at the corrosion hole in the pipeline 201 is measured in real time, the pressure increment is calculated according to its depth parameter, and simulated by the three-dimensional model; the formula for calculating the pressure increment is:

[0092] ΔP=P h -P h实时

[0093] P h实时 is the real-time measured pressure at the pipeline depth h, and ΔP represents the pressure increment; it should be noted that when leakage occurs in the pipeline 201, the liquid in the annulus 301 leaks into the pipeline 201, and the instantaneous amount of leakage is reflected in the change of the pressure increment.

[0094] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, even further, the functional relationship between the instantaneous leakage amount and the pressure increment is established at the corrosion hole, and then the instantaneous leakage amount of the thread is deduced from the pressure increment at the thread leakage through the functional relationship; the functional relationship between the instantaneous leakage amount and the pressure increment established at the corrosion hole is as follows:

[0095] Q 瞬时 =f 2 (ΔP)

[0096] f 2 represents the functional relationship between the instantaneous leakage rate and the pressure increment; it should be noted that since it is difficult to detect thread leakage by ultrasonic waves, indirect measurement is carried out by establishing a functional relationship based on the pressure change. At the thread leakage point, the instantaneous leakage rate of the thread leakage is calculated from the functional relationship f 2 between the instantaneous leakage rate and the pressure increment ΔP.

[0097] To better achieve the object of the present invention, in some embodiments of the present invention, in the third step, further, at the position of the corrosion hole, the instantaneous leakage rate, the temperature increment, and the pressure increment are accurately calculated through mutual correction. It should be noted that these three variables are all caused by the leakage of the pipeline 201, and their changes are correlated. By mutually correcting the three different measurement methods (instantaneous leakage rate, temperature increment, and pressure increment), the accuracy and reliability of the leakage rate calculation can be effectively improved. This method of multi-variable collaborative correction not only enhances the credibility of the data but also provides a more accurate basis for leakage detection and positioning.

[0098] In order to better achieve the objectives of the present invention, in some embodiments of the present invention, in the fourth step, further, the second ultrasonic measuring instrument measures the geometric shape parameters of the corrosion holes in real time. The three-dimensional model corrects the geometric shape of the corrosion holes through the loss parameters, and combines the pressure and temperature parameters in the pipeline and the annulus to estimate the instantaneous leakage amount of the liquid leaking from the annulus into the pipeline. By calculating the increments of the temperature and pressure parameters in the pipeline, a one-to-one mapping relationship is established between the instantaneous leakage amount and the increments. The total instantaneous leakage amount is calculated based on the liquid level height in the annulus, and the sum of the leakage components at several leakage points in the pipeline is summarized. By comparing the difference between the total leakage amount and the sum of the leakage components, it is determined whether there is a leakage outside the annulus. The three-dimensional model uses the structural parameters of the casing and its inner and outer sides (including the radii and curvatures of the casing and the cement layer) to verify the leakage position and the instantaneous leakage amount outside the annulus, ensuring the accuracy of the model. The first ultrasonic measuring instrument is used to measure the liquid level depth of the liquid in the annulus, while the second ultrasonic measuring instrument descends into the pipeline and performs a three-dimensional measurement of the gas well by emitting ultrasonic waves in all directions, generating a large amount of data. To simplify the data volume and improve the measurement accuracy, and at the same time calibrate the initial measurement positions of the images obtained by the first and second ultrasonic measuring instruments, the cross-section of the image measured by the second ultrasonic measuring instrument is selected as the calibration plane. This cross-section is parallel to the liquid level in the annulus, ensuring that the initial measurement positions of the two measuring instruments are on the same horizontal plane, thereby improving the calculation accuracy of the pipeline inclination angle, further enhancing the calculation accuracy of the liquid level depth and the liquid volume in the annulus, and optimizing the calculation of the hydraulic pressure difference between the liquid level and the pipeline leakage point. When the inclination angle of the gas well and its pipeline reaches the critical value, the first ultrasonic measuring instrument may not be able to measure the liquid level depth in the annulus. At this time, by calculating the pipeline inclination angle, the second ultrasonic measuring instrument can replace the first ultrasonic measuring instrument to complete the measurement of the liquid level depth in the annulus. In addition, by recording the time difference when the cross-section of the image measured by the second ultrasonic measuring instrument is parallel to the liquid level in the annulus, the total leakage amount of the liquid in the annulus during this period can be calculated. This method significantly improves the accuracy and efficiency of leakage detection, providing a reliable guarantee for the safe operation of the pipeline.

[0099] It should be noted that through the accurate measurement of the first ultrasonic measuring instrument and the second ultrasonic measuring instrument, combined with the supervised learning technology, a highly accurate three-dimensional model of the pipeline and its annulus can be constructed. This model not only covers the geometric dimensions, curvature, and inclination angle of the pipeline and annulus, but also can be closer to the actual physical environment, significantly improving the accuracy and reliability of the model. By real-time monitoring the pressure, temperature, and geometric shape parameters of the corrosion holes in the pipeline and annulus, and using the supervised learning technology to dynamically adjust the three-dimensional model and the simulation process, the deviation or error in the model can be detected and corrected in a timely manner. Especially when a liquid leakage occurs in the pipeline, the model can be quickly adjusted to more accurately estimate the leakage volume and locate the leakage point. By calculating the mapping relationship between the instantaneous leakage volume and the increment of the temperature and pressure parameters in the pipeline, and combining with the liquid level height in the annulus to calculate the total instantaneous leakage volume, the leakage situation can be comprehensively evaluated. At the same time, according to the difference between the total leakage volume and the sum of the leakage components at each leakage point, it is possible to judge and locate whether there is a leakage outside the annulus, thereby improving the accuracy and efficiency of leakage detection and reducing potential safety risks. In addition, using the structural parameters of the three-dimensional model (such as the radius and curvature of the casing) can further verify whether the leakage occurs in the annulus area between the casing and the pipeline, ensuring the reliability and effectiveness of the model. Through the real-time monitoring and dynamic adjustment of the pipeline interior and annulus, potential leakage risks can be predicted and preventive maintenance measures can be taken, thereby reducing production losses and environmental hazards caused by leakage. This method not only improves the accuracy of leakage detection, but also provides a strong guarantee for the safe operation of the pipeline.

[0100] In order to better achieve the object of the present invention, in some embodiments of the present invention, in the fourth step, further, in the leakage channel 601, the method of pixel overflow is used to judge the flow direction of the liquid. Combining Figure 4 As shown, the liquid flows from Figure 4 the left side to the right side. When the pixel value of the liquid tends to be consistent with the pixel value in the leakage channel 601, a pixel overflow region that bulges outward will be formed. The shape of this bulging region can be regular (such as Figure 4 schematically shown as a regular semi-circle in

[0101] It should be particularly noted that for the technical features that are not fully explained, conventional technical means are adopted.

[0102] The above embodiments are only used to illustrate the present invention rather than limit the technical solutions described in the present invention. Although this specification has described the present invention in detail with reference to the above various embodiments, the present invention is not limited to the above specific implementation manners. Therefore, any modification or equivalent replacement made to the present invention; and all technical solutions and their improvements that do not depart from the spirit and scope of the invention are covered by the scope of the claims of the present invention.

Claims

1. A gas well leakage point detection method, which is implemented by using a first ultrasonic measuring instrument (501), a second ultrasonic measuring instrument (502) and a gyroscope, characterized in that: The specific steps are as follows: In a first step, a first ultrasonic measuring instrument (501) is used to measure the depth of the liquid surface of the annulus (301), and at the same time, a second ultrasonic measuring instrument (502) with a built-in gyroscope dives into the interior of the pipeline (201) to measure the structural parameters of the gas well; the second ultrasonic measuring instrument (502) obtains an image cross section parallel to the liquid surface of the annulus (301); The second step is to determine the coordinates of the gas well structural parameters using the angle parameters of the gyroscope and the diving depth value of the second ultrasonic measuring instrument (502); the data of the coordinates are linked together through a supervised learning algorithm to construct a three-dimensional model of the gas well; the three-dimensional model can be dynamically adjusted according to the gas well structural parameters acquired in real time, and the supervised learning algorithm adopts real-time modeling technology to predict the change trend of the gas well structural parameters acquired and generate a real-time feedback signal; the feedback signal is used to dynamically control the acquisition frequency and diving speed of the second ultrasonic measuring instrument (502); The third step is to calculate the curvature increment using the three-dimensional model to predict the suspected leakage point in the gas well. After the suspected leakage point is determined, the structural parameters of the gas well are continuously collected in the interval around the suspected leakage point. The fourth step is to use the three-dimensional model to accurately calculate the leakage path of the corrosion hole and / or the threaded connection by analyzing the change of pixel values, and further estimate the instantaneous leakage amount by calculating the minimum cross-sectional area in the leakage path; The measurement area of ​​the second ultrasonic measuring instrument includes an upper deflection angle area, a lower deflection angle area and a cross-sectional area, and the gas well structural parameters obtained from the upper deflection angle area, the lower deflection angle area and the cross-sectional area verify each other.

2. A gas well leakage point detection method according to claim 1, characterized in that: In the first step, the image data measured by the second ultrasonic measuring instrument (502) is adjusted to the center point of the cross section of the pipeline (201) by means of vector addition and subtraction.

3. A gas well leakage point detection method according to claim 1 or 2, characterized in that: In the first step, the cross-sectional parameters of the image measured by the second ultrasonic measuring instrument (502) are used as the main parameters for three-dimensional modeling, and the cross-sectional parameters are corrected using the non-cross-sectional parameters.

4. A gas well leakage point detection method according to claim 1, characterized in that: In the second step, the historical data and real-time data of the gas well structural parameters are used to calculate the gas well structural parameter increments, and the gas well structural parameter increments are used as loss parameters for dynamic simulation of the three-dimensional model.

5. A gas well leakage point detection method according to claim 1, characterized in that: In the third step, the geometric shape parameters of the corrosion hole are calculated, and the instantaneous leakage of the corrosion hole is calculated through the three-dimensional model.

6. A gas well leakage point detection method according to claim 1, characterized in that: In the fourth step, in the leakage channel (601), the pixel overflow method is used to determine the flow direction of the liquid.

Citation Information

Patent Citations

  • Three-dimension model base constructing method for chemical easily-leaked part

    CN102789651A

  • Deep learning methods for wellbore leak detection

    US11353617B1

  • Downhole Tubular Inspection Combining Partial Saturation And Remote Field Eddy Currents

    US20220390641A1

  • Fluid leak detection, localization, and quantification with confidence

    US20240110840A1