Petroleum drilling underground passive anti-collision method based on deep learning

By applying deep learning technology in the underground drilling environment, a multi-objective oil casing recognition transfer learning model is constructed, which solves the shortcomings of traditional technology in multi-objective positioning and general mathematical model establishment, and realizes efficient and accurate prediction of downhole passive collision prevention.

CN120046735AActive Publication Date: 2025-05-27XIDIAN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional downhole passive anti-collision technology has shortcomings in multi-objective positioning and the establishment of general mathematical models, making it difficult to achieve accurate position prediction in complex production environments.

Method used

Using a deep learning-based method, data preprocessing, screening and interpolation are carried out by measuring background magnetic field data and casing magnetic field data of different specifications in the reference well, and a multi-objective petroleum casing identification transfer learning model is constructed to realize the downhole passive collision prevention.

Benefits of technology

Multi-objective position prediction under complex operating conditions is achieved, which improves the accuracy and robustness of downhole collision prevention, and can quickly and accurately predict the position information of the casing, reducing the investment cost in other operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120046735A_ABST
    Figure CN120046735A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of deep learning, and discloses an oil drilling underground passive anti-collision method based on deep learning, which comprises the following steps: selecting reference wells, measuring background magnetic field data of each reference well, putting casing pipes with different specifications into each reference well, and measuring magnetic field data of the casing pipes with different specifications in adjacent wells; preprocessing the background magnetic field data of each reference well and the magnetic field data of the casing pipes with different specifications to obtain preprocessed data; screening the preprocessed data to obtain stable data; and finally obtaining background magnetic field data of each well by using an interpolation method based on the stable data. Subtracting the background magnetic field data from the magnetic field data of each well after the casing is put into the well to obtain abnormal magnetic field data of the casing; performing continuous interpolation on the abnormal magnetic field data of the sleeve to construct a data set; and constructing a reasoning model, carrying out iterative training on the reasoning model by using the data set, and finally obtaining and deploying the trained reasoning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of deep learning technology, and particularly to a passive downhole anti-collision method for oil drilling based on deep learning. Background Art

[0002] China is a large energy country. Among various types of energy, oil occupies a large proportion and is a very important strategic resource. According to the data in 2023, the proportion of China's oil demand is approximately 20% to 25%. Oil drilling in China is mainly based on large well clusters, and the number of adjustment and infill wells in old areas is increasing. During the process of new well drilling, due to the small well spacing and large number of wells in the cluster well group, it is very difficult to prevent collisions between wells, and there are high requirements for warning of the drilling trajectory and the position of adjacent wells. Once a collision accident occurs, it will cause heavy casualties and property losses. For example, the oil spill accident in the Gulf of Mexico in 2010 accidentally caused more than 20 casualties and a total economic loss of more than $60 billion. Therefore, downhole anti-collision technology is of great significance for efficient and safe production.

[0003] Currently, the most mature technology applied in downhole anti-collision at home and abroad is the magnetic guidance detection technology. This technology uses specific equipment to detect the magnetic field signal intensity of the magnetic source, so as to achieve the accurate positioning of two wells with a small spacing. The magnetic guidance detection technology is divided into active detection technology and passive detection technology. The active detection technology is a technology that realizes guidance control by actively applying an external magnetic field or controlling the direction of the magnetic field intensity. This technology has high reliability and good accuracy, but has low production efficiency, takes a long time and is cumbersome to operate. The passive detection technology is a technology that realizes guidance control by using the magnetic characteristic structure of an object itself to affect the magnetic field and does not require the application of an external magnetic field. The oil casing (hereinafter simply referred to as the casing) is a ferromagnetic material. After being magnetized by the geomagnetic field, an induced magnetic field will be formed around it. A magnetic sensor can detect the abnormal casing magnetic characteristics different from the geomagnetic field. The implementation of this passive detection technology solution is simple and can greatly improve the efficiency in production. However, because the magnetic field signal intensity attenuates cubically with distance, its reliability is poor when the distance is far.

[0004] The traditional passive downhole anti-collision technology first establishes a mathematical model of the casing magnetic field, and then uses the mathematical model to invert the position information of the casing. However, the traditional method has at least the following problems.

[0005] First, most of the traditional passive downhole anti-collision technologies use numerical simulation and experimental methods to describe the magnetic field distribution law around the vertical casing, and the forward model conditions are too ideal, while the target signal is a small signal, usually in the range of dozens to hundreds of nanotesla (nT). However, the actual production environment is much more complex than the idealized model. For example, unknown interference noises and electromagnetic interferences from other engineering equipment will submerge the target signal, so it has limited guidance for actual production.

[0006] Second, in actual production, cluster wells (multi-target wells) are usually the main type. For predicting well spacing and well azimuth of multi-target wells, domestic and foreign research teams have not yet proposed a mature theoretical method, and thus cannot accurately predict the position information.

[0007] Third, there are differences in the remanent magnetism of different casings, and unified measurement cannot be carried out at the production site. This results in the inability to establish a highly general mathematical model, so the inversion accuracy of the ideal model in actual production is poor.

[0008] In summary, the traditional passive downhole anti-collision technology still lacks theoretical guidance for multi-target positioning and it is difficult to establish a general mathematical model for casings. There is an urgent need for advanced theories of downhole anti-collision. Summary of the Invention

[0009] In view of this, the embodiments of the present application propose a passive downhole anti-collision method for oil drilling based on deep learning, which has good performance for multi-target position prediction. The constructed inference model has high accuracy and robustness and can be applied to passive downhole anti-collision under various working conditions.

[0010] To achieve the above object, the embodiments of the present application propose a passive downhole anti-collision method for oil drilling based on deep learning. The method includes: selecting some wells from all wells as reference wells, using a magnetic gradient tensor sensor to measure the background magnetic field data of each reference well, then placing casings of different specifications in each reference well, and using a magnetic gradient tensor sensor to measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well; performing preprocessing including data cleaning and data calibration on the background magnetic field data of each reference well and the magnetic field data of the casings of different specifications to obtain preprocessed data; screening the preprocessed data based on a preset jump threshold and an adaptive window to obtain stable data; based on the stable data, using the interpolation method to obtain the background magnetic field data of each well except the reference wells; subtracting the background magnetic field data from the magnetic field data of each well after placing the casing to obtain the abnormal magnetic field data of the casing; performing continuous interpolation on the abnormal magnetic field data of the casing to construct a data set; constructing an inference model based on a deep learning neural network, and using the constructed data set to iteratively train the inference model until convergence to obtain a trained inference model; deploying the trained inference model, thereby realizing passive downhole anti-collision for oil drilling.

[0011] To achieve the above object, an embodiment of the present application further provides a passive anti-collision system for downhole oil drilling based on deep learning. The system includes: a reference module, configured to select some wells from all wells as reference wells, measure the background magnetic field data of each reference well using a magnetic gradient tensor sensor, then place casings of different specifications in each reference well, and measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well using the magnetic gradient tensor sensor; a preprocessing module, configured to perform preprocessing including data cleaning and data calibration on the background magnetic field data of each reference well and the magnetic field data of the casings of different specifications to obtain preprocessed data; a stable data screening module, configured to screen the preprocessed data based on a preset jump threshold and an adaptive window to obtain stable data; an interpolation processing module, configured to obtain the background magnetic field data of each well except the reference wells by using the interpolation method based on the stable data; an anomaly calculation module, configured to subtract the background magnetic field data from the magnetic field data of each well after placing the casing to obtain the abnormal magnetic field data of the casing; a construction module, configured to perform continuous interpolation on the abnormal magnetic field data of the casing to construct a data set, and construct an inference model based on a deep learning neural network; a training module, configured to iteratively train the inference model using the constructed data set until convergence, obtain a trained inference model, and deploy the trained inference model, so as to achieve passive anti-collision for downhole oil drilling.

[0012] To achieve the above object, an embodiment of the present application further provides an electronic device. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute a passive anti-collision method for downhole oil drilling based on deep learning as described above.

[0013] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it can implement a passive anti-collision method for downhole oil drilling based on deep learning as described above.

[0014] A passive anti-collision method for oil drilling underground based on deep learning proposed in this application. First, select some wells as reference wells among all wells, measure the background magnetic field data of each reference well, then place casings of different specifications in each reference well, and measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well. After data cleaning and data calibration, based on a preset jump threshold and an adaptive window for screening, stable data is obtained. Then, the interpolation method is used to obtain the background magnetic field data of each well except the reference wells. Subtract the background magnetic field data from the magnetic field data of the casings in each well to obtain the abnormal magnetic field data of the casings. Finally, continuous interpolation is performed on the abnormal magnetic field data of the casings, and a real and rich dataset can be constructed. Such a dataset can better serve model training. Next, this application constructs a multi-objective oil casing recognition transfer learning model (inference model) based on the magnetic field data in different engineering environments, uses the constructed dataset to iteratively train the inference model until convergence, and obtains a trained inference model. When deployed to the required scenarios, passive anti-collision for oil drilling underground can be achieved. The inference model trained in this way has strong generality, strong robustness, and high accuracy, can be well applied to different underground drilling working conditions, effectively reduces the input cost in other working conditions, has good performance for multi-objective position prediction, can quickly and accurately predict the position information of the casings, and is of great significance for underground anti-collision and underground rescue.

[0015] In some alternative embodiments, the preprocessing of the background magnetic field data of each reference well and the magnetic field data of casings of different specifications, including data cleaning and data calibration, to obtain preprocessed data, includes:

[0016] Convert the background magnetic field data of each reference well and the magnetic field data of casings of different specifications into a table form, and perform data cleaning on the converted table;

[0017] Rotate the magnetic gradient tensor sensor at different angles in a uniform magnetic field to calculate the calibration matrix, and use the calibration matrix to calibrate the table after data cleaning to obtain preprocessed data;

[0018] The preprocessed data is represented by the formula:

[0019] B * =C(B - B 0 );

[0020] C=A -1 K -1 ;

[0021]

[0022] where C represents the calibration matrix, B is the actual measurement value, B0 is the temperature drift and zero drift value of the magnetic gradient tensor sensor, B * represents the preprocessed data, A is the non-orthogonal error matrix, θ and ψ are three different angles, K is the sensitivity inconsistency error matrix, and Kx, Ky, and Kz are the components of the sensitivity inconsistency error matrix K in the x-axis direction, y-axis direction, and z-axis direction, respectively.

[0023] In some alternative embodiments, denoting the preset jump threshold as jump_threshold, screening the preprocessed data based on the preset jump threshold and the adaptive window to obtain stable data includes:

[0024] Taking the preprocessed data as the original data, differentiating the original data to obtain the change rate val of the original data;

[0025] Setting a step width threshold width_threshold, initializing the start index start_idx, end index end_idx, and flag of the step;

[0026] Traversing all the original data, if the val of the current original data i is less than jump_threshold, setting flag to 0, and if the val of the current original data i is greater than or equal to jump_threshold, setting flag to 1;

[0027] When the rising edge of flag occurs, assigning the i value to start_idx, and when the falling edge of flag occurs, assigning i to end_idx;

[0028] Subtracting start_idx from end_idx to obtain the step length, calculating the mean step_means of this step, if the step length is less than width_threshold, deleting the current step_means, and if the step length is greater than or equal to width_threshold, saving the current step_means as the valid stable data.

[0029] In some alternative embodiments, based on the stable data, using the interpolation method to obtain the background magnetic field data of each well except the reference well includes:

[0030] Based on the stable data, performing two-dimensional interpolation in the coordinate system formed by all wells using Newton interpolation method, and constructing an interpolation polynomial P(x i ,y i ,f(x i ,y i )} according to a set of discrete stable data {x i ,y i), P(x i , y i ) is expressed by the formula:

[0031]

[0032] The coefficients of each interpolation term are calculated using two-dimensional divided differences, and the two-dimensional divided differences are expressed by the formula:

[0033] f[x i , y i = f(x i , y i );

[0034]

[0035] Based on the constructed interpolation polynomial, each term in the stable data is calculated sequentially using two-dimensional divided differences and stored in the divided difference table array. The divided difference table array is initialized. For each column, the divided differences of different orders are calculated step by step, and the divided differences of the previous column are obtained by subtraction each time. Finally, the background magnetic field data of each well except the reference well is interpolated.

[0036] In some alternative embodiments, subtracting the background magnetic field data from the magnetic field data of each well after being placed in the casing to obtain the abnormal magnetic field data of the casing includes: measuring the elevation of the wellhead of each well through real-time dynamic differential positioning technology; subtracting the well depth from the elevation of the wellhead to obtain the absolute height of each well; based on the absolute height of each well, subtracting the background magnetic field data from the magnetic field data of each well after being placed in the casing to obtain the abnormal magnetic field data of the casing.

[0037] In some alternative embodiments, the constructed dataset is expressed as:

[0038] [Bx 1 , By 1 , Bz 1 , Bt 1 , Bx 2 , By 2 , Bz 2 , Bt 2 , Bx 3 , By 3 , Bz 3 , Bt 3 , Bx 4 , By 4 , Bz 4 , Bt 4 ;

[0039] Among them, 16 values form one-dimensional data, Bx j , By j , Bz j , Btj respectively represent the x-axis component, y-axis component, z-axis component, and total amount of the j-th probe, where j = 1, 2, 3, 4 represent the first probe, the second probe, the third probe, and the fourth probe respectively; the constructed dataset is divided into a training set, a test set, and a validation set according to a ratio of 8:1:1, and the labels are set as the distance and angle between the observation well and the target.

[0040] In some alternative embodiments, constructing the inference model based on a deep learning neural network includes: regarding the inversion of the casing position as a non-linear regression problem and constructing the inference model based on a multi-layer perceptron model; deploying the trained inference model to achieve passive anti-collision in oil drilling downhole, including: converting the trained inference model into an onnx format inference file, writing server-side and client-side codes and packaging them into an executable file, and running the executable file to achieve passive anti-collision in oil drilling downhole. Brief Description of the Drawings

[0041] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings, and these exemplary illustrations do not constitute limitations on the embodiments.

[0042] Figure 1 is a flowchart of a method for passive anti-collision in oil drilling downhole based on deep learning provided in an embodiment of the present application;

[0043] Figure 2 is a schematic diagram of the wellhead distribution provided in an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of a magnetic gradient tensor sensor provided in an embodiment of the present application;

[0045] Figure 4 is a real scene picture of the experimental site provided in an embodiment of the present application;

[0046] Figure 5 is a comparison diagram of the data before and after calibration provided in an embodiment of the present application;

[0047] Figure 6 is a schematic diagram of the numerical values after differentiating the original data provided in an embodiment of the present application;

[0048] Figure 7 is a schematic diagram of finding stable data with an adaptive window provided in an embodiment of the present application;

[0049] Figure 8 is a schematic diagram of the working principle of the adaptive window provided in an embodiment of the present application;

[0050] Figure 9Schematic diagram of stable data provided in an embodiment of the present application;

[0051] Figure 10 Schematic diagram of the cross-section of a shallow well provided in an embodiment of the present application;

[0052] Figure 11 Comparison chart before and after subtracting the background field magnetic anomaly signal provided in an embodiment of the present application;

[0053] Figure 12 Schematic diagram of magnetic anomaly signal interpolation provided in an embodiment of the present application;

[0054] Figure 13 Schematic diagram of the network structure of the inference model provided in an embodiment of the present application;

[0055] Figure 14 Result curve graph of model training provided in an embodiment of the present application;

[0056] Figure 15 Schematic diagram of the client running the model file provided in an embodiment of the present application;

[0057] Figure 16 Single-target and multi-target prediction result graphs provided in an embodiment of the present application;

[0058] Figure 17 Schematic diagram of the prediction error of the inference model provided in an embodiment of the present application;

[0059] Figure 18 Schematic diagram of the structure of an oil drilling downhole passive anti-collision system based on deep learning provided in another embodiment of the present application;

[0060] Figure 19 Schematic diagram of the structure of an electronic device provided in another embodiment of the present application. Detailed implementation manners

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will elaborate on each embodiment of the present application with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are provided to help readers better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can still be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation to the specific implementation manner of the present application. The various embodiments can be combined and cross-referenced with each other on the premise of not being contradictory.

[0062] An embodiment of the present application proposes a passive anti-collision method for downhole oil drilling based on deep learning, which is applied to an electronic device. Herein, the electronic device can be a terminal or a server. In this embodiment and the following embodiments, the electronic device is taken as an example of a server for illustration. The following details the implementation details of a passive anti-collision method for downhole oil drilling based on deep learning proposed in this embodiment. The following content is only the implementation details provided for convenient understanding and is not necessary for implementing this solution.

[0063] The specific process of a passive anti-collision method for downhole oil drilling based on deep learning proposed in this embodiment can be as Figure 1 shown, including:

[0064] Step 101: Select some wells as reference wells among all wells, use a magnetic gradient tensor sensor to measure the background magnetic field data of each reference well, then place casings of different specifications in each reference well, and use the magnetic gradient tensor sensor to measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well.

[0065] In specific implementation, the server first needs to select some wells as reference wells among all wells at the experimental site, then use the developed special magnetic gradient tensor sensor to measure the background magnetic field data of each reference well, then place multiple casings of different specifications in each reference well, and use the magnetic gradient tensor sensor to measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well.

[0066] In an example, a total of 7 shallow wells are set at the experimental site. The wellhead distribution of these 7 shallow wells can be as Figure 2 shown. The 7 shallow wells are named Well 1#, Well 2#, Well 3#, Well 4#, Well 5#, Well 6#, and Well 7# in sequence. Select Well 1#, Well 2#, Well 4#, and Well 6# as reference wells, use the special magnetic gradient tensor sensor as Figure 3 shown to measure the background magnetic field data of Well 1#, Well 2#, Well 4#, and Well 6#. Then place casings of different specifications in each reference well, and use the magnetic gradient tensor sensor to measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well. The specific situation at the experimental site is as Figure 4 shown.

[0067] Step 102: Perform preprocessing on the background magnetic field data of each reference well and the magnetic field data of the casings of different specifications, including data cleaning and data calibration, to obtain the preprocessed data.

[0068] In the specific implementation, after the server measures the background magnetic field data of each reference well and the magnetic field data of casings of different specifications, it is necessary to preprocess the background magnetic field data of each reference well and the magnetic field data of casings of different specifications, including data cleaning and data calibration, to obtain preprocessed data.

[0069] In one example, the server first converts the background magnetic field data of each reference well and the magnetic field data of casings of different specifications into a table format, and cleans the converted table to remove erroneous data. Next, the server rotates the magnetic gradient tensor sensor at different angles in a uniform magnetic field to calculate the calibration matrix, and uses the calibration matrix to calibrate the cleaned table to obtain preprocessed data. The comparison before and after data calibration is shown in Figure 1. Figure 5 shown.

[0070] In one example, the preprocessed data is represented by the formula:

[0071] B * =C(BB 0 );

[0072] C=A -1 K -1 ;

[0073]

[0074] Where C represents the calibration matrix, B is the actual measurement value, and B 0 is the temperature drift and zero drift value of the magnetic gradient tensor sensor, B * represents the preprocessed data, A is the non-orthogonal error matrix, θ and ψ are three different angles, K is the sensitivity inconsistency error matrix, and Kx, Ky, and Kz are the components of the sensitivity inconsistency error matrix K in the x-axis direction, the y-axis direction, and the z-axis direction, respectively.

[0075] Step 103, screening the preprocessed data based on a preset jump threshold and an adaptive window to obtain stable data.

[0076] In a specific implementation, after completing the preprocessing, the server needs to filter the preprocessed data based on a preset jump threshold and adaptive window to obtain stable data.

[0077] In one example, the preset jump threshold is denoted as jump_threshold, the preprocessed data is used as the original data, the original data is derived, and the change rate val of the original data is obtained. The value of the original data after the derivative (i.e., the change rate val of the original data) is as follows: Figure 6As shown below. Next, the server needs to perform screening in combination with the jump_threshold and the adaptive window. The operating mechanism of the adaptive window is as shown in Figure 7 As shown below, and the working principle is as shown in Figure 8 As shown below. The server sets a step width threshold width_threshold, then initializes the start index start_idx, end index end_idx, and flag of the step. Subsequently, the server traverses all the original data. If the val of the current original data i is less than the jump_threshold, the flag is set to 0. If the val of the current original data i is greater than or equal to the jump_threshold, the flag is set to 1. When the flag rises, the server needs to assign the value of i to start_idx. When the flag falls, the server needs to assign i to end_idx. Finally, the server subtracts start_idx from end_idx to obtain the step length, calculates the mean step_means of this step. If the step length is less than the step width threshold width_threshold, the current step_means is deleted. If the step length is greater than or equal to the step width threshold width_threshold, the current step_means is saved as valid stable data. The finally screened valid stable data can be as shown in Figure 9 As shown below.

[0078] Step 104: Based on the stable data, use the interpolation method to obtain the background magnetic field data of each well except the reference well.

[0079] In a specific implementation, after the server screens out the stable data, it needs to obtain the background magnetic field data of each well except the reference well based on the stable data using the interpolation method.

[0080] In an example, the server only measures the background magnetic field data of Well 1#, Well 2#, Well 4#, and Well 6#. To obtain the background magnetic field data of Well 3#, Well 5#, and Well 6#, interpolation needs to be performed. The server performs two-dimensional interpolation in the coordinate system composed of all wells (as shown in Figure 2 As shown below) based on the stable data using the Newton interpolation method. According to a set of discrete stable data {x i , y i , f(x i , y i )}, an interpolation polynomial P(x i , y i ) is constructed. P(x i , y i ) is expressed by the formula:

[0081]

[0082] Next, the server uses two-dimensional divided differences to calculate the coefficients of each interpolation term, and the two-dimensional divided differences can be expressed by the formula as:

[0083] f[x i ,y i =f(x i ,y i );

[0084]

[0085] Finally, based on the constructed interpolation polynomial, the server needs to use two-dimensional divided differences to calculate each term in the stable data in turn and store it in the divided difference table array. Initialize the divided difference table array. For each column, gradually calculate the divided differences of different orders, and each time obtain the divided differences of the previous column through subtraction. Finally, interpolate to obtain the background magnetic field data of each well except the reference well (that is, obtain the interpolation result corresponding to the target point).

[0086] Step 105: Subtract the background magnetic field data from the magnetic field data of each well after putting it into the casing to obtain the abnormal magnetic field data of the casing.

[0087] In a specific implementation, the server has obtained the background magnetic field data of all wells. Next, it is necessary to subtract the background magnetic field data corresponding to each well from the magnetic field data of each well after putting it into the casing to obtain the abnormal magnetic field data of the casing.

[0088] In an example, the wellhead heights of 7 shallow wells at the experimental site are inconsistent. It is necessary to measure the elevation of the wellhead of each well through RTK (Real-Time Kinematic) technology, record the well depth with the wellhead as the zero point of the relative coordinate system. As Figure 10 shown, the server subtracts the well depth from the elevation of the wellhead to obtain the absolute height of each well. Finally, based on the absolute height of each well, subtract the background magnetic field data from the magnetic field data of each well after putting it into the casing to obtain the abnormal magnetic field data of the casing. The abnormal magnetic field data of the casing is as Figure 11 shown.

[0089] Step 106: Continuously interpolate the abnormal magnetic field data of the casing to construct a data set.

[0090] In a specific implementation, after the server obtains the abnormal magnetic field data of the casing, it is necessary to continuously interpolate the abnormal magnetic field data of the casing to construct a data set.

[0091] In an example, the data set constructed by the server can be expressed as:

[0092] [Bx 1 ,By 1 ,Bz 1 ,Bt1 , Bx 2 , By 2 , Bz 2 , Bt 2 , Bx 3 , By 3 , Bz 3 , Bt 3 , Bx 4 , By 4 , Bz 4 , Bt 4 ;

[0093] Among them, 16 values form one-dimensional data, where Bx j , By j , Bz j , Bt j respectively represent the x-axis component, y-axis component, z-axis component, and total amount of the jth probe, and j = 1, 2, 3, 4 represent the first probe, the second probe, the third probe, and the fourth probe respectively.

[0094] In one example, the server needs to divide the constructed dataset into a training set, a test set, and a validation set according to a ratio of 8:1:1, and set the labels as the distance and angle between the observation well and the target.

[0095] In one example, during the experiment, 5-inch casings, 9-inch casings, and 5-inch casings were placed in Well 1#, Well 2#, and Well 7# respectively, and were denoted as 5-inch 1, 9-inch 2, and 5-inch 7 in sequence. The data format of the labels can be as follows:

[0096] [5-inch 1_Dis, 5-inch 1_Angle, 9-inch 2_Dis, 9-inch 2_Angle, 5-inch 7_Dis, 5-inch 7_Angle];

[0097] Among them, Dis represents the distance between the observation well and the target, and Angle represents the angle between the observation well and the target.

[0098] In one example, the longitudinal interpolation result of 5-inch 1 can be as Figure 12 shown.

[0099] Step 107: Construct an inference model based on a deep learning neural network, and use the constructed dataset to iteratively train the inference model until convergence to obtain a trained inference model.

[0100] In a specific implementation, after obtaining the dataset, the server needs to construct an inference model based on a deep learning neural network, and then use the constructed dataset to iteratively train the inference model until convergence to obtain a trained inference model.

[0101] In one example, the server regards the inversion of the casing position as a non-linear regression problem and constructs an inference model based on a multi-layer perceptron model. The characteristics of the multi-layer perceptron model are very suitable for non-linear regression tasks and have powerful non-linear modeling capabilities. The model structure of the inference model constructed by the server is as shown in Figure 13 shown. The loss curve and accuracy curve after training are as shown in Figure 14 shown.

[0102] Step 108: Deploy the trained inference model to achieve passive anti-collision in the oil drilling wellbore.

[0103] In a specific implementation, after the server obtains the trained inference model, it can deploy the trained inference model to the required scenario to achieve passive anti-collision in the oil drilling wellbore.

[0104] In one example, for the convenience of users, the server needs to convert the trained model into an onnx format inference file, write server-side and client-side codes and package them into an executable file, and run the executable file to achieve passive anti-collision in the oil drilling wellbore. The final running effect is as shown in Figure 15 shown, and the prediction effects of single and multi-target models are as shown in Figure 16 shown, and the prediction error is as shown in Figure 17 shown. The relative error is within 5%, meeting the requirements of actual production.

[0105] A passive anti-collision method for downhole oil drilling based on deep learning proposed in this embodiment first selects some wells as reference wells among all wells, measures the background magnetic field data of each reference well, then places casings of different specifications in each reference well, and measures the magnetic field data of the casings of different specifications in the adjacent wells of each reference well. After data cleaning and data calibration, screening is performed based on a preset jump threshold and an adaptive window to obtain stable data. Then, the interpolation method is used to obtain the background magnetic field data of each well except the reference wells. Subtract the background magnetic field data from the magnetic field data of each well after placing the casing to obtain the abnormal magnetic field data of the casing. Finally, continuous interpolation is performed on the abnormal magnetic field data of the casing to construct a real and rich dataset. Such a dataset can better serve model training. Next, based on the magnetic field data in different engineering environments, this embodiment constructs a multi-target oil casing recognition transfer learning model (also called an inference model), uses the constructed dataset to iteratively train the inference model until convergence to obtain a trained inference model, and when deployed to the required scenario, passive anti-collision for downhole oil drilling can be achieved. The inference model trained in this way has strong generality, strong robustness, and high accuracy, can be well applied to different downhole drilling working conditions, effectively reduces the input cost in other working conditions, has good performance for multi-target position prediction, can quickly and accurately predict the position information of the casing, and is of great significance for downhole anti-collision and downhole rescue.

[0106] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split into multiple steps. As long as the same logical relationship is included, it is within the protection scope of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of its algorithm and process, are all within the protection scope of this application.

[0107] Correspondingly, another embodiment of this application proposes a passive anti-collision system for downhole oil drilling based on deep learning. The implementation details of the passive anti-collision system for downhole oil drilling based on deep learning proposed in this embodiment will be specifically described below. The following content is only implementation details provided for convenient understanding and is not necessary for implementing this solution. The specific structure of the passive anti-collision system for downhole oil drilling based on deep learning proposed in this embodiment can be as Figure 18 shown, including:

[0108] A reference module 201, configured to select some wells as reference wells among all wells, measure the background magnetic field data of each reference well using a magnetic gradient tensor sensor, then place casings of different specifications in each reference well, and measure the magnetic field data of the casings of different specifications in the adjacent wells of each reference well using a magnetic gradient tensor sensor.

[0109] A preprocessing module 202, configured to perform preprocessing including data cleaning and data calibration on the background magnetic field data of each reference well and the magnetic field data of casings of different specifications, to obtain preprocessed data.

[0110] A stable data screening module 203, configured to screen the preprocessed data based on a preset jump threshold and an adaptive window, to obtain stable data.

[0111] An interpolation processing module 204, configured to obtain the background magnetic field data of each well except the reference well by using an interpolation method based on the stable data.

[0112] An anomaly calculation module 205, configured to subtract the background magnetic field data from the magnetic field data of each well after the casing is placed, to obtain the anomalous magnetic field data of the casing.

[0113] A construction module 206, configured to perform continuous interpolation on the anomalous magnetic field data of the casing, construct a data set, and construct an inference model based on a deep learning neural network.

[0114] A training module 207, configured to iteratively train the inference model using the constructed data set until convergence, to obtain a trained inference model, and deploy the trained inference model, so as to implement passive anti-collision in an oil drilling wellbore.

[0115] It should be noted that each module involved in this embodiment is a logical module. In practical applications, a logical unit may be a physical unit, or a part of a physical unit, or may be implemented by a combination of multiple physical units. In addition, to highlight the innovative part of this application, units not closely related to solving the technical problems proposed in this application are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.

[0116] Correspondingly, another embodiment of this application provides an electronic device, as Figure 19 shown, including: at least one processor 301; and a memory 302 communicatively connected to the at least one processor 301; wherein, the memory 302 stores instructions executable by the at least one processor 301, and the instructions are executed by the at least one processor 301, so that the at least one processor 301 can execute a method for passive anti-collision in an oil drilling wellbore based on deep learning as described in each of the above method embodiments.

[0117] Among them, the memory and the processor are connected in a bus manner. The bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and the memory together. The bus also connects various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and thus will not be further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be a single component or multiple components, such as multiple receivers and transmitters, and provides a unit for communicating with various other devices on the transmission medium.

[0118] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor when performing operations.

[0119] Another embodiment of the present application proposes a computer-readable storage medium storing a computer program, which when executed by a processor, can implement a passive anti-collision method for downhole oil drilling based on deep learning as described in the above method embodiments.

[0120] That is, those skilled in the art can understand that all or part of the steps in implementing the above embodiment methods can be completed by instructing relevant hardware through a program. This program is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disks, or optical discs and other various media that can store program codes.

[0121] Those of ordinary skill in the art can understand that the above embodiments are specific embodiments for implementing the present application, and in practical applications, various changes can be made in form and details without departing from the spirit and scope of the present application.

Claims

1. A deep learning-based passive anti-collision method for oil drilling downhole, characterized in that: include: Select some wells from all the wells as reference wells, use magnetic gradient tensor sensors to measure the background magnetic field data of each reference well, then put casings of different specifications in each reference well, and use magnetic gradient tensor sensors to measure the magnetic field data of casings of different specifications in adjacent wells of each reference well; Preprocessing the background magnetic field data of each reference well and the magnetic field data of casings of different specifications, including data cleaning and data calibration, is performed to obtain preprocessed data; The pre-processed data is screened based on the preset jump threshold and adaptive window to obtain stable data; Based on the stable data, the background magnetic field data of each well except the reference well is obtained by using the interpolation method; The background magnetic field data is subtracted from the magnetic field data of each well after the casing is placed to obtain the abnormal magnetic field data of the casing; The abnormal magnetic field data of the casing is continuously interpolated to construct a data set; Build an inference model based on a deep learning neural network, and use the constructed data set to iteratively train the inference model until convergence to obtain a trained inference model; Deploy trained inference models to achieve passive collision avoidance in oil drilling wells.

2. According to claim 1, a deep learning-based passive anti-collision method for oil drilling downhole, characterized in that: The background magnetic field data of each reference well and the magnetic field data of casings of different specifications are preprocessed including data cleaning and data calibration to obtain preprocessed data, including: The background magnetic field data of each reference well and the magnetic field data of casings of different specifications are converted into a table form, and the converted table is cleaned; The magnetic gradient tensor sensor is rotated at different angles in a uniform magnetic field to calculate a calibration matrix, and the calibration matrix is ​​used to calibrate the data table after data cleaning to obtain preprocessed data; The preprocessed data is expressed by the formula: B * =C(B-B0); C=A -1 K -1 ; Where C represents the calibration matrix, B is the actual measurement value, B0 is the temperature drift zero drift value of the magnetic gradient tensor sensor, and B * represents the preprocessed data, A is the non-orthogonal error matrix, θ and ψ are three different angles, K is the sensitivity inconsistency error matrix, and Kx, Ky, and Kz are the components of the sensitivity inconsistency error matrix K in the x-axis direction, the y-axis direction, and the z-axis direction, respectively.

3. The deep learning-based passive anti-collision method for oil drilling downhole according to claim 2 is characterized in that: The preset jump threshold is jump_threshold, and the pre-processed data is screened based on the preset jump threshold and the adaptive window to obtain stable data, including: The preprocessed data is used as the original data, and the original data is differentiated to obtain the change rate val of the original data; Set a step width threshold width_threshold, initialize the step start index start_idx, end index end_idx, and flag flag; Traverse all the original data. If the val of the current original data i is less than jump_threshold, set the flag to 0. If the val of the current original data i is greater than or equal to jump_threshold, set the flag to 1. When flag rises, assign i value to start_idx, and when flag falls, assign i value to end_idx; Subtract start_idx from end_idx to get the step length, and calculate the mean step_means of this step. If the step length is less than width_threshold, delete the current step_means. If the step length is greater than or equal to width_threshold, save the current step_means as valid stable data.

4. The deep learning-based passive anti-collision method for oil drilling downhole according to claim 3 is characterized in that: The method of obtaining background magnetic field data of each well except the reference well based on the stable data by using an interpolation method includes: Based on stable data, Newton interpolation method is used to perform two-dimensional interpolation in the coordinate system of all wells. i ,y i ,f(x i ,y i )}, construct an interpolation polynomial P(x i ,y i ), P(x i ,y i ) is expressed by the formula: The coefficient of each interpolation term is calculated using the two-dimensional difference quotient, which is expressed by the formula: f[x i ,y i ]=f(x i ,y i ); Based on the constructed interpolation polynomial, the two-dimensional difference quotient is used to calculate each item in the stable data in turn and store it in the difference quotient table array. The difference quotient table array is initialized, and for each column, the difference quotients of different orders are calculated step by step. Each time, the difference quotient of the previous column is obtained by subtraction, and finally the background magnetic field data of each well except the reference well is interpolated.

5. The deep learning-based passive anti-collision method for oil drilling downhole according to claim 4 is characterized in that: The method of subtracting the background magnetic field data from the magnetic field data of each well after the casing is placed to obtain the abnormal magnetic field data of the casing includes: The altitude of each wellhead is measured through real-time dynamic differential positioning technology; Subtract the well depth from the wellhead altitude to obtain the absolute height of each well; Based on the absolute height of each well, the background magnetic field data is subtracted from the magnetic field data of each well after casing is placed to obtain the abnormal magnetic field data of the casing.

6. The deep learning-based passive anti-collision method for oil drilling downhole according to claim 5, characterized in that: The constructed data set is expressed as: [Bx1,By1,Bz1,Bt1,Bx2,By2,Bz2,Bt2,Bx3,By3,Bz3,Bt3,Bx4,By4,Bz4,Bt4]; Among them, 16 values ​​constitute one-dimensional data, Bx j 、By j , Bz j , Bt j They represent the x-axis component, y-axis component, z-axis component and total amount of the j-th probe respectively, and j=1, 2, 3, 4 represent the first probe, the second probe, the third probe and the fourth probe respectively; The constructed dataset is divided into training set, test set and validation set in a ratio of 8:1:1, and the labels are set as the distance and angle between the observation well and the target.

7. The deep learning-based passive anti-collision method for oil drilling downhole according to claim 6 is characterized in that: The inference model is constructed based on the deep learning neural network, including: The casing position inversion is regarded as a nonlinear regression problem, and an inference model is constructed based on a multi-layer perceptron model. The deployed trained inference model is used to implement passive collision avoidance in oil drilling wells, including: Convert the trained inference model into an onnx format inference file, write the server and client codes and package them into executable files, and run the executable files to achieve passive collision avoidance in oil drilling wells.

8. A deep learning-based passive anti-collision system for oil drilling underground, characterized in that: include: The reference module is used to select some wells from all the wells as reference wells, use the magnetic gradient tensor sensor to measure the background magnetic field data of each reference well, then put casings of different specifications in each reference well, and use the magnetic gradient tensor sensor to measure the magnetic field data of casings of different specifications in the adjacent wells of each reference well; A preprocessing module is used to perform preprocessing including data cleaning and data calibration on the background magnetic field data of each reference well and the magnetic field data of casings of different specifications to obtain preprocessed data; A stable data screening module is used to screen the pre-processed data based on a preset jump threshold and an adaptive window to obtain stable data; An interpolation processing module is used to obtain background magnetic field data of each well except the reference well by using an interpolation method based on stable data; The abnormality calculation module is used to subtract the background magnetic field data from the magnetic field data after the casing is placed in each well to obtain the abnormal magnetic field data of the casing; A construction module is used to continuously interpolate the abnormal magnetic field data of the casing to construct a data set and build an inference model based on a deep learning neural network; The training module is used to iteratively train the inference model using the constructed data set until convergence, obtain the trained inference model, and deploy the trained inference model to achieve passive collision avoidance in oil drilling wells.

9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a deep learning-based passive collision avoidance method for oil drilling downhole as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a deep learning-based passive collision avoidance method for oil drilling downhole is implemented as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Petroleum drilling anti-collision passive detection device and method based on magnetic core coil

    CN111188614A

  • Passive magnetic ranging anti-collision method and device

    CN116104469A

  • Cluster well borehole anti-collision short section and anti-collision system

    CN211038622U

  • Magnetization of target well casing strings tubulars for enhanced passive ranging

    US20060131013A1

  • Anti-collision method for drilling wells

    US20100271232A1