A method and device for identifying and warning the safe position of a wellhead drill pipe joint
By combining binocular cameras and the YoloV5 model with a fusion algorithm to identify the position of the wellhead drill pipe joint, the problem of rapid and accurate identification at the drilling site is solved, the risk of uncontrolled blowout accidents is reduced, and the intelligence level of the well control system is improved.
Patent Information
- Application Number
- CN202311550302.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-11-20
AI Technical Summary
Existing technologies are unable to quickly and accurately identify the location of the drill pipe joint at the wellhead in emergency situations, resulting in frequent blowout accidents. In addition, traditional image recognition algorithms lack real-time performance and cannot meet the needs of the complex environment of the drilling site.
A binocular camera is used to acquire image and depth map data, and the YoloV5 model and fusion algorithm are combined to identify the drill pipe joint. By calculating the distance between the drill pipe joint and the wellhead, its position is determined autonomously and an early warning signal is issued.
It achieves rapid and accurate identification of the drill pipe joint position under high pressure, reduces the risk of misoperation, improves the intelligence level and identification success rate of the well control system, and ensures the safety of drilling operations.
Smart Images

Figure CN117422769B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of oil drilling control technology and image processing technology, and in particular to a method and device for identifying and warning the safe position of a wellhead drill pipe joint. Background Art
[0002] With the continuous improvement of onshore oil and gas field drilling technology, the workload of deep and ultra-deep wells has increased significantly, and the number of high-pressure and high-yield wells has increased year by year. The risk of drilling operations has also increased. Studies have found that most uncontrolled blowouts are caused by operational errors.
[0003] When a blowout or kick occurs, the wellhead must be quickly controlled by closing the BOP. Operators must be especially careful to avoid the drill pipe joint. If a semi-sealed BOP or shear BOP gets stuck in the drill pipe joint, the well will fail to shut down, resulting in a major accident and loss. This places extremely high demands on the operator's professional skills and judgment under high pressure.
[0004] To ensure safe drilling operations and prevent uncontrolled blowouts caused by improper operation during well inrush and overflow incidents, each oilfield has established detailed shut-in procedures in its well control regulations. However, in actual operations, operators are likely to become extremely nervous and fail to observe carefully, leading to misjudgments or incorrect operations.
[0005] In the future, intelligent well shut-in systems will become crucial for ensuring the safety of deep and ultra-deep well drilling operations. Key to these systems is a ram-type blowout preventer (BOP) shut-in warning system based on image recognition of the wellhead drill pipe joint. This system determines whether the current drill pipe position is suitable for shut-in operations. Developing rapid and accurate drill pipe identification during emergency shut-in operations and determining whether the current drill pipe condition meets the requirements for shut-in operations are pressing technical challenges.
[0006] Currently, there is limited research on the application of image recognition for intelligent well control and automated production at drilling sites. Ye Xinwei et al. proposed that non-real-time drill pipe image recognition could be achieved by coupling traditional template matching algorithms with image recognition techniques based on MCD distance correlation matching. In 2022, Zhu Changjun et al. proposed using SURF feature matching to identify drill pipe joints. In this study, the research team used static drill pipe photos and artificially added Gaussian and salt-and-pepper noise to simulate high-noise drill pipe images collected under complex wellsite conditions. Using the SURF feature matching algorithm, they achieved recognition of drill pipe joints under the influence of varying noise densities, achieving a recognition success rate of at least 80%. However, SURF's real-time performance is limited, making it unsuitable for dynamic image recognition. It also requires grayscale processing of the image for feature extraction and recognition, which increases the number of computational steps. Furthermore, due to the complex conditions at drilling sites, drill pipe background noise includes not only vibration noise and noise caused by insufficient illumination, but also a large amount of background imagery that can obscure drill pipe joint features. Research is needed to improve algorithms for rapid recognition of drill pipe joint features.
[0007] Chinese Patent Publication No. CN202011030416 provides an intelligent monitoring and management method, system, and device for well control equipment. In the method disclosed in this application, the operating status data transmitted by the well control equipment can be received, and the warning level of the well control equipment can be determined based on the operating status data. The intelligent monitoring and management method of this application enables equipment management personnel to understand the equipment operation status in a timely manner and ensure the reliability of the use of the well control equipment. This application can only monitor the operating data of the blowout preventer control device, and can only release alarm signals according to the initially set alarm limit. It itself cannot monitor the position of the drill pipe of the drilling rig and its actual status, and cannot actually provide the most direct data guidance for the execution of intelligent well control. At the same time, its control program is a limited amount of automatic control under PLC control, which cannot realize intelligent reasoning and cannot solve the technical problem of quickly and intelligently identifying the working condition of the wellhead drill pipe in an emergency.
[0008] Chinese Patent Publication No. CN201020246080.6 provides an intelligent centralized monitoring well control system. The system includes a choke manifold, a kill manifold, a blowout preventer manifold, a blowout preventer assembly, a blowout preventer control device, pressure sensors, and a computer control system. The system can remotely monitor and control well control equipment such as annular blowout preventers, ram blowout preventers, and the choke manifold from the driller's control panel in the monitoring room or the driller's room. It can also manually or automatically remotely control the opening and closing of the blowout preventer, providing timely wellhead control. However, this application does not enable intelligent and autonomous identification and determination of drill pipe joint position; it can only monitor the operating status of well control equipment, failing to address the difficulty of intelligently and autonomously determining wellhead operating conditions during intelligent well control system operation. Summary of the Invention
[0009] The present application aims to solve at least one of the technical problems in the above-mentioned technologies to a certain extent. To this end, the present application proposes a method for identifying and warning the safe position of a wellhead drill pipe joint, comprising:
[0010] Obtain dual-channel image and depth map data from the binocular camera;
[0011] Identify the drill pipe and wellhead in the image based on the image recognition model and record the detection frame coordinates;
[0012] Calculating the position of the drill pipe joint according to the detection frame coordinates and the depth map data;
[0013] Whether to send an early warning signal is determined based on the drill pipe joint position.
[0014] Preferably, the image recognition model is a YoloV5 model, and the training method of the YoloV5 model includes:
[0015] Use binocular cameras to collect drill pipe image data under different working conditions;
[0016] Annotate the acquired drill pipe image data and select the drill pipe joint and wellhead;
[0017] The labeled drill pipe image data is used as a training set to train the YoloV5 model;
[0018] The trained model is inferred and packaged through TensorRT.
[0019] Preferably, calculating the drill rod joint position according to the detection frame coordinates and the depth map data includes: calculating the drill rod joint position based on multiple algorithms respectively, and averaging the multiple calculation results.
[0020] Preferably, the drill rod joint position is calculated based on the detection frame coordinates and the depth map data, using a formula including:
[0021]
[0022] Wherein, BH represents the actual distance between the drill rod joint and the hole; BT represents the actual length of the drill rod joint, which is a known value; bt represents the pixel length of the drill rod joint; and bh represents the pixel distance between the drill rod joint and the hole.
[0023] Preferably, the drill rod joint position is calculated based on the detection frame coordinates and the depth map data, using a formula including:
[0024]
[0025] Where BH represents the actual distance between the drill pipe joint hole end and the hole; SH represents the distance from the camera to the hole; SA represents the vertical distance from the camera to the drill pipe; and SB represents the distance from the camera to the drill pipe joint hole end.
[0026] Preferably, the drill rod joint position is calculated based on the detection frame coordinates and the depth map data, using a formula including:
[0027]
[0028]
[0029] Where BH is the actual distance between the hole end of the drill pipe joint and the hole; SH is the distance from the camera to the hole; SB is the distance from the camera to the hole end of the drill pipe joint; BT is the actual length of the drill pipe joint; ST is the distance between the camera and the drill bit end of the drill pipe joint.
[0030] Preferably, determining whether to send a warning signal based on the drill pipe joint position includes: calculating the position of the current drill pipe lower joint in the blowout preventer group based on the calculated drill pipe joint position, and sending a warning signal if the lower joint position is at the gate blowout preventer valve core position, and not sending a warning signal if the lower joint position is not at the gate blowout preventer valve core position.
[0031] This application also proposes a wellhead drill pipe joint safety position identification and early warning system, comprising:
[0032] Image acquisition module, used to obtain dual-channel images and depth map data of the binocular camera;
[0033] An image recognition module is used to identify the drill pipe and wellhead in the image based on the image recognition model and record the detection frame coordinates;
[0034] A position calculation module, configured to calculate the position of the drill pipe joint based on the detection frame coordinates and the depth map data;
[0035] The early warning judgment module is used to determine whether to send an early warning signal according to the position of the drill pipe joint.
[0036] The present application also proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program or instructions, and when the computer program or instructions are executed by the processor, they are at least used to implement the above method.
[0037] The present application also proposes a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, it is used to at least implement the above method.
[0038] Compared with the prior art, the present invention has the following advantages:
[0039] This application uses a novel fusion algorithm to calculate the distance between the drill pipe joint and the wellhead, and autonomously determines the relative position of the lower joint and the gate core of the gate blowout preventer to achieve a safety warning. This invention can fill the gap in my country's intelligent well control technology for autonomously identifying the position of the drill pipe joint and issuing an alarm. It solves the problems of traditional well control shut-in operations that require manual observation of the drill pipe joint position, resulting in low operational efficiency and the susceptibility of manual operation to errors under high pressure. It forms a highly intelligent, autonomously learning, and highly successful recognition strategy for the intelligent identification and early warning of the wellhead drill pipe joint position.
[0040] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0041] The technical solution of the present application is further described in detail below through the accompanying drawings and examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings:
[0043] Figure 1 A schematic diagram of a method for identifying and warning the safe position of a wellhead drill pipe joint;
[0044] Figure 2 A flow chart of drill rod position detection based on a fusion algorithm is provided in an embodiment;
[0045] Figure 3 A schematic diagram of the drill rod and camera positions provided in an embodiment;
[0046] Figure 4 This is a schematic diagram of the wellhead drill pipe joint safety position identification and early warning system;
[0047] Figure 5 A schematic diagram of an electronic device provided in this application;
[0048] Figure 6 A schematic diagram of a computer-readable storage medium provided in this application. DETAILED DESCRIPTION
[0049] The present application is described below in conjunction with the accompanying drawings. The preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application.
[0050] Figure 1The method for identifying and warning the safe position of a wellhead drill pipe joint provided in this application includes:
[0051] S101. Obtain dual-channel image and depth map data from the binocular camera;
[0052] S102. Identify the drill pipe and wellhead in the image based on the image recognition model and record the detection frame coordinates;
[0053] S103. Calculate the drill pipe joint position based on the detection frame coordinates and the depth map data;
[0054] S104. Determine whether to send an early warning signal based on the drill pipe joint position.
[0055] According to some embodiments of the present application, the YoloV5 model is used to implement image recognition, such as Figure 2 As shown, the overall technical solution includes the following steps:
[0056] (1) First, use a binocular camera with a fixed and known relative position to the wellhead to shoot a video of the wellhead drill pipe joint (the position of the drill pipe and the camera is as follows) Figure 3 As shown in the figure, the drill pipe image data under different working conditions obtained by the binocular camera are manually annotated, and pictures containing the drill pipe joint and the wellhead are manually intercepted from the video. At the same time, the position labels of the drill pipe joint and the wellhead are annotated to obtain the training set for training the YoloV5 model.
[0057] (2) Based on the training set obtained in the above process, the YoloV5 model is trained on the server, the trained model is inferred through TensorRT, and then the model is packaged.
[0058] (3) Obtain the dual-channel image data and depth map data of the binocular camera, use the trained YoloV5 model to identify the drill rod and wellhead in the image, and record the coordinates of the detection frames corresponding to the drill rod and wellhead.
[0059] (4) By using the detection frame coordinates and depth map data, a fusion algorithm is used to calculate the distance from the drill pipe joint to the wellhead, thereby determining whether the drill pipe is at the hole. The drill pipe joint position recognition fusion algorithm used in this application includes three sub-algorithms:
[0060] The first sub-algorithm takes image data as input and calibrates it based on the calibration reference in the image. For example, based on the known length of the drill pipe joint (BT), its pixel length (bt) is calculated, and the ratio between the pixels in the image and the actual length is obtained. The actual distance (BH) is then obtained by calculating the pixel distance from the drill pipe joint to the hole. The formula is as follows:
[0061]
[0062] Wherein, BH represents the actual distance between the drill rod joint and the hole; BT represents the actual length of the drill rod joint, which is a known value; bt represents the pixel length of the drill rod joint; and bh represents the pixel distance between the drill rod joint and the hole.
[0063] Second sub-algorithm: Input depth map data and image data, locate the endpoints of the drill pipe joint (B, H), obtain the distance from the camera to the two points (SB, SH), and then locate the horizontal point (A) based on the depth data on the drill pipe object. In the right triangle formed by "camera (S)-horizontal point (A)-hole opening (H)" and "camera (S)-horizontal point (A)-bottom end of the drill pipe joint (B)", the third side can be calculated if two sides are known. Ultimately, the actual distance from the drill pipe joint to the hole opening (BH) is obtained by subtracting the two sides. The formula is as follows:
[0064]
[0065] The third sub-algorithm: Input the depth map data and image data, locate the positions of the upper and lower ends of the drill pipe joint (T, B) and the position of the hole (H), and calculate the distances (ST, SB, SH) between the camera (S) and these points. First, in the triangle "camera (S) - lower end of drill pipe joint (T) - lower end of drill pipe joint (B)", calculate the angle SBT (θ). Then, in the triangle formed by "camera (S) - hole (H) - lower end of drill pipe joint (B)", calculate the distance (BH) between the drill pipe joint and the hole. The formula is as follows:
[0066]
[0067]
[0068] Through the above algorithm, we can obtain three preliminary detection results, which are BH1, BH2, and BH3. Set the threshold to remove outliers to eliminate accidental errors, and average the remaining values to reduce random errors. The formula is as follows:
[0069]
[0070] Where avg() is the average value function, is the threshold activation function.
[0071] (5) Based on the calculated distance from the drill pipe joint to the wellhead, the current position of the drill pipe lower joint is calculated, and the relative position of the lower joint and the gate blowout preventer valve core is determined autonomously based on the position of the blowout preventer group valve core. If the lower joint is located at the gate blowout preventer valve core position, an early warning signal is issued. If the lower joint is not located at the gate blowout preventer valve core position, no early warning signal is issued. For example, based on the calculated distance from the drill pipe joint to the wellhead, the current position of the drill pipe lower joint L1 can be inferred, and based on the current combination configuration of the blowout preventer group, the gate blowout preventer rubber core positions L2, L3, L4, etc. are calculated. If L1 is not included in (L2, L3, L4) ± 0.3m, the algorithm determines that it is in a safe position and no early warning information is issued. If L1 is included in (L2, L3, L4) ± 0.3m, the algorithm determines that it is in a risky position and an early warning information is issued.
[0072] (6) Complete the algorithm deployment on the industrial computer.
[0073] Based on the same concept, Figure 4 As shown, the present application provides a wellhead drill pipe joint safety position identification and warning system, including: an image acquisition module 201, used to obtain a binocular camera dual-channel image and depth map data; an image recognition module 202, used to identify the drill pipe and wellhead in the image based on the image recognition model and record the detection frame coordinates; a position calculation module 203, used to calculate the drill pipe joint position according to the detection frame coordinates and the depth map data; an early warning judgment module 204, used to decide whether to send an early warning signal according to the drill pipe joint position.
[0074] like Figure 5 As shown, the present application provides an electronic device 1000, including a memory 1002 and a processor 1001, wherein the memory 1002 stores a computer program or instruction, and when the computer program or instruction is executed by the processor 1001, it is used to implement the above method at least. Figure 6 As shown, the present application provides a computer-readable storage medium 1100 , in which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, it is at least used to implement the above method.
[0075] The working principle and beneficial effects of the above technical solution are as follows: The drill pipe position detection system proposed in this application includes a binocular camera and an industrial computer. The industrial computer deploys a YoloV5 detection model and a fusion algorithm. When the system is in operation, the industrial computer must be started and the drill pipe position detection algorithm must be executed. The algorithm uses the binocular camera to capture images of the drill pipe and, using the YoloV5 model and the fusion detection algorithm, outputs the distance of the drill pipe joint from the wellhead. Abnormal images of undetected drill pipe joints are saved and periodically sent to a server via the network. The parameters of the YoloV5 detection model are updated in a timely manner, enabling it to detect drill pipe joint positions in a wider range of operating conditions. The current position of the drill pipe lower joint is calculated based on the distance from the wellhead and compared with the position of the gate blowout preventer rubber core to provide a safe shut-in warning. On a drilling platform, when an emergency well shut-in operation is required, this application can autonomously and intelligently identify the real-time position of the drill pipe joint near the wellhead and autonomously determine whether the lower joint is located in the gate blowout preventer valve core position, providing a safe shut-in warning. If the current drill pipe joint position is suitable for shut-in operation, the operator will be prompted to perform the shut-in operation; if the current drill pipe joint position is not suitable for shut-in operation, an alarm will be issued and operational suggestions for raising or lowering the winch will be given, greatly reducing the risk of incorrect shut-in operation and contributing intelligent well control technology support to deep and ultra-deep oil and gas drilling.
[0076] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A method for identifying and warning the safe position of a wellhead drill pipe joint, characterized in that: include: Obtain dual-channel image and depth map data from the binocular camera; Identify the drill pipe and wellhead in the image based on the image recognition model and record the detection frame coordinates; Calculating the position of the drill pipe joint according to the detection frame coordinates and the depth map data; Determine whether to send an early warning signal based on the drill pipe joint position; Calculating the position of the drill rod joint according to the detection frame coordinates and the depth map data, including: calculating the position of the drill rod joint based on multiple algorithms respectively, and averaging the multiple calculation results; The position of the drill pipe joint is calculated based on the detection frame coordinates and the depth map data, using the following formula: in, Indicates the actual distance between the drill pipe joint and the hole; Indicates the actual length of the drill tool joint, which is a known value; Indicates the pixel length of the drill pipe joint; Indicates the pixel distance between the drill pipe joint and the hole; The position of the drill pipe joint is calculated based on the detection frame coordinates and the depth map data, using the following formula: in, Indicates the actual distance between the hole end of the drill pipe joint and the hole; Indicates the distance from the camera to the hole; Indicates the vertical distance from the camera to the drill pipe; Indicates the distance from the camera to the hole end of the drill pipe joint; The position of the drill pipe joint is calculated based on the detection frame coordinates and the depth map data, using the following formula: in, Indicates the actual distance between the hole end of the drill pipe joint and the hole; Indicates the distance from the camera to the hole; Indicates the distance from the camera to the hole end of the drill pipe joint; Indicates the actual length of the drill pipe joint; Indicates the distance between the camera and the drill bit end of the drill tool joint.
2. The method according to claim 1, wherein The image recognition model is a YoloV5 model, and the training method of the YoloV5 model includes: Use binocular cameras to collect drill pipe image data under different working conditions; Annotate the acquired drill pipe image data and select the drill pipe joint and wellhead; The labeled drill pipe image data is used as a training set to train the YoloV5 model; The trained model is inferred and packaged through TensorRT.
3. The method according to claim 1, wherein Determining whether to send an early warning signal according to the position of the drill pipe joint includes: calculating the position of the current drill pipe lower joint in the blowout preventer group according to the calculated drill pipe joint position, sending an early warning signal if the lower joint position is at the gate blowout preventer valve core position, and not sending an early warning signal if the lower joint position is not at the gate blowout preventer valve core position.
4. A wellhead drill pipe joint safety position identification and warning system, characterized in that: include: Image acquisition module, used to obtain dual-channel images and depth map data of the binocular camera; An image recognition module is used to identify the drill pipe and wellhead in the image based on the image recognition model and record the detection frame coordinates; A position calculation module, configured to calculate the position of the drill pipe joint based on the detection frame coordinates and the depth map data; An early warning judgment module is used to determine whether to send an early warning signal based on the position of the drill pipe joint; Calculating the position of the drill rod joint according to the detection frame coordinates and the depth map data, including: calculating the position of the drill rod joint based on multiple algorithms respectively, and averaging the multiple calculation results; The position of the drill pipe joint is calculated based on the detection frame coordinates and the depth map data, using the following formula: in, Indicates the actual distance between the drill pipe joint and the hole; Indicates the actual length of the drill tool joint, which is a known value; Indicates the pixel length of the drill pipe joint; Indicates the pixel distance between the drill pipe joint and the hole; The position of the drill pipe joint is calculated based on the detection frame coordinates and the depth map data, using the following formula: in, Indicates the actual distance between the hole end of the drill pipe joint and the hole; Indicates the distance from the camera to the hole; Indicates the vertical distance from the camera to the drill pipe; Indicates the distance from the camera to the hole end of the drill pipe joint; The position of the drill pipe joint is calculated based on the detection frame coordinates and the depth map data, using the following formula: in, Indicates the actual distance between the hole end of the drill pipe joint and the hole; Indicates the distance from the camera to the hole; Indicates the distance from the camera to the hole end of the drill pipe joint; Indicates the actual length of the drill pipe joint; Indicates the distance between the camera and the drill bit end of the drill tool joint.
5. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program or instructions, and when the computer program or instructions are executed by the processor, it is used to implement at least the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program or instructions, which, when executed by a processor, are used to at least implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Intelligent monitoring management method, system and device for well control equipment
CN112116163A
Well control system capable of intelligently and collectively monitoring
CN201696021U