Method and device for measuring distance between adjacent wells, storage medium and program product
Through the deep learning model combining feature processing layer and timing memory unit layer, the problem of low accuracy of inter-well distance prediction in traditional methods is solved, and more accurate and robust distance measurement is achieved to adapt to complex environmental factors.
Patent Information
- Application Number
- CN202411470036.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional methods analyze magnetic field data to predict the distance between wells with poor results, which is affected by a variety of factors, resulting in low prediction accuracy.
Using deep learning-based inter-well distance measurement model, including feature processing layer and timing memory unit layer, the complex relationship between magnetic induction data and inter-well distance is captured through multi-layer convolution processing and timing memory unit layer, and the historical data is used to reduce instantaneous change interference. , the adaptive error scaling loss function improves prediction accuracy.
It improves the accuracy and robustness of inter-well distance measurement, enhances the model's adaptability to interference factors, reduces errors, and achieves more accurate distance prediction.
Smart Images

Figure CN119122498A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drilling and exploration engineering, and in particular to a method, device, storage medium and program product for measuring the distance between adjacent wells. Background Art
[0002] Well distance measurement is crucial in petroleum engineering, especially when a serious blowout accident occurs in an oil and gas well. When drilling a rescue well, the relative distance between the rescue well and the accident well must be measured continuously using detection and positioning tools, and the rescue well is gradually guided to align with the accident well and finally connect through an iterative measurement process. Today, rescue well technology is still the last line of defense against uncontrolled blowout accidents, so predicting the distance between adjacent wells is crucial for rescue and preventing collision accidents.
[0003] The traditional method of measuring the distance between adjacent wells includes: generating an alternating magnetic field around the accident well through an active magnetic ranging tool to detect the magnetic field strength of each magnetic source in the accident well (such as a permanent magnetic nipple in the drilling well, an energized solenoid, or a charged pipe string in the drilled wellbore, etc.); by pre-establishing a mathematical relationship between the well exploration pipe angle, magnetic induction intensity and the distance between wells, analyzing the magnetic induction intensity of the well exploration pipe at different angles, and using a predetermined formula to deduce the actual distance between the well exploration pipe and the casing.
[0004] However, in traditional measurement methods, the magnetic field strength detected by the wellbore is not only related to the distance between wells, but is also affected by many factors such as the current intensity injected into the active magnetic ranging tool, the formation properties, and the structure of the accident well. This results in poor results when using traditional methods to analyze magnetic field data for distance prediction. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a method, device, storage medium and program product for measuring the distance between adjacent wells to eliminate or improve one or more defects in the prior art, and solve the problem that the traditional method of analyzing magnetic field data for distance prediction has poor effect.
[0006] One aspect of the present invention provides a method for measuring the distance between adjacent wells, the method comprising the following steps:
[0007] Acquire measurement data measured at the target measurement position, where the measurement data refers to data measured by a well exploration pipe; the well exploration pipe includes a magnetic induction sensor and a posture sensor; the measurement data includes magnetic induction data measured by the magnetic field sensor and posture data measured by the posture sensor; the magnetic induction data includes at least one set of magnetic induction intensities in three-axis directions corresponding to the target measurement position; the posture data includes roll angle data, azimuth angle data, tilt angle data and gravity acceleration data in three-axis directions corresponding to the target measurement position;
[0008] A pre-trained well-to-well distance measurement model is obtained, and the well-to-well distance measurement model includes a feature processing layer based on a spatial channel, a temporal memory unit layer, and a fully connected output layer; the feature processing layer is used to perform multi-layer convolution processing on the magnetic induction data and the posture data, respectively, to obtain a first data feature corresponding to the magnetic induction data and a second data feature corresponding to the posture data; the temporal memory unit layer is used to predict the well-to-well distance based on the first data feature and the second data feature, to obtain a well-to-well distance prediction result; the fully connected output layer is used to map the well-to-well distance prediction result to a scalar value;
[0009] The measurement data is input into the well distance measurement model to obtain the well distance measurement results.
[0010] In some embodiments of the present invention, multi-layer convolution processing is performed on the magnetic induction data and the posture data respectively to obtain a first data feature corresponding to the magnetic induction data and a second data feature corresponding to the posture data, including:
[0011] Processing the magnetic induction data through one-dimensional convolution, and performing scaling transformation on the one-dimensional convolution processing result of the magnetic induction data to obtain a first scaling transformation result;
[0012] Generate a first processing result corresponding to the magnetic induction data based on the one-dimensional convolution processing result of the magnetic induction data and the first scaling transformation result;
[0013] Processing the posture data through one-dimensional convolution, and performing scaling transformation on the one-dimensional convolution processing result of the posture data to obtain a second scaling transformation result;
[0014] Generate a second processing result corresponding to the posture data based on the one-dimensional convolution processing result of the posture data and the second scaling transformation result;
[0015] Processing the first processing result and the second processing result respectively through one-dimensional convolution to obtain a one-dimensional convolution processing result corresponding to the first processing result and a one-dimensional convolution processing result corresponding to the second processing result;
[0016] Based on the one-dimensional convolution processing result corresponding to the first processing result, the one-dimensional convolution processing result corresponding to the second processing result, the first processing result, and the second processing result, interactive processing is performed to obtain the first data feature and the second data feature.
[0017] In some embodiments of the present invention, the well-to-well distance measurement model also includes a first connection layer and a second connection layer; the first connection layer is used to splice the output of the feature processing layer with the measurement data and input the spliced result into the temporal memory unit layer; the second connection layer is used to splice the output of the temporal memory unit layer with the measurement data and input the spliced result into the fully connected output layer.
[0018] In some embodiments of the present invention, the measurement data includes several pieces of data; inputting the measurement data into the well-to-well distance measurement model includes:
[0019] According to a preset window size and a preset window sliding step length, the measurement data is subjected to window sliding processing to divide the measurement data into at least one group of data;
[0020] At least one set of data is sequentially input into the well distance measurement model.
[0021] In some embodiments of the present invention, the feature processing layer further includes a data segmentation sublayer, and the data segmentation sublayer is used to segment the measurement data according to the data type when the measurement data is received, into magnetic induction data and posture data.
[0022] In some embodiments of the present invention, obtaining a pre-trained well-to-well distance measurement model includes:
[0023] Acquire training data, the training data including: sample measurement data and real distances between wells corresponding to the sample measurement data;
[0024] The sample measurement data is input into the pre-created initial network model to obtain the training result; the model structure of the initial network model is the same as the model structure of the well distance measurement model;
[0025] Input the training results and the actual distance between wells into a preset error scaling loss function to obtain a loss function value;
[0026] Dynamically adjust the error scaling loss function based on the relative error between the training results and the true distance between wells;
[0027] Calculate the gradient of the error scaling loss function to the parameters of the initial network model through the back propagation algorithm;
[0028] The model parameters of the initial network model are updated and iterated based on the gradient and gradient descent method to obtain the well distance measurement model.
[0029] In some embodiments of the present invention, the training data includes data measured at at least one sample position; the distance between each sample position and an adjacent sample position is greater than or equal to a preset distance; acquiring the training data includes:
[0030] A preset number of sample magnetic induction data and sample attitude data respectively measured at different sample positions are obtained, and integrated with the pre-measured real distance between wells to obtain sample measurement data.
[0031] Another aspect of the present invention provides a device for measuring the distance between adjacent wells, including a processor, a memory, and a computer program / instruction stored in the memory, wherein the processor is used to execute the computer program / instruction, and when the computer program / instruction is executed, the device implements the steps of the method for measuring the distance between adjacent wells as described above.
[0032] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps of the method for measuring the distance between adjacent wells as described above.
[0033] Another aspect of the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the method for measuring the distance between adjacent wells as described above when executed by a processor.
[0034] The method, device, storage medium and program product for measuring the distance between adjacent wells of the present invention can solve the problem that the traditional method of analyzing magnetic field data for distance prediction has poor effect. The feature processing layer and the timing memory unit layer are integrated in the well distance measurement model. The feature processing layer can iteratively extract and exchange information at different time resolutions, capture the complex relationship between magnetic induction data and the distance between wells, and enhance the adaptability of the model to various interference factors, thereby solving the limitations of traditional methods in establishing mathematical relationships. Through the timing memory unit layer, distance prediction is regarded as a time task, and the information of historical data is used to more accurately predict the current distance between wells, reduce interference and errors caused by instantaneous changes, and improve the effect of distance prediction. At the same time, a deep learning method is adopted to consider multiple input features, so that the model can effectively capture the nonlinear relationship between data, while traditional methods often assume linear relationships. In this way, the model can better adapt to complex environmental factors.
[0035] In addition, during the model training process, the adaptive error scaling loss function is used to consider both relative error and absolute error, which reduces the probability of large errors and can further improve the accuracy of well distance measurement.
[0036] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0037] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0039] Figure 1 A flow chart of a method for measuring distance between adjacent wells provided in one embodiment of the present invention.
[0040] Figure 2 A schematic diagram of the structure of an inter-well distance measurement model provided in one embodiment of the present invention.
[0041] Figure 3 A schematic diagram of a feature processing layer processing magnetic induction data and posture data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0043] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0044] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0045] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0046] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0047] The following is a detailed introduction to the method for measuring the distance between adjacent wells provided in this application.
[0048] Optionally, the executor of the method for measuring the distance between adjacent wells provided in the present application is an electronic device, which may be a terminal such as a computer, a mobile phone, a tablet computer, a camera, or a server. This embodiment does not limit the implementation method of the electronic device.
[0049] This embodiment provides a method for measuring the distance between adjacent wells. Figure 1As shown, the method at least includes steps S101 to S103:
[0050] Step S101, obtaining measurement data obtained by measuring at a target measurement position.
[0051] Among them, the target measurement position refers to a specific point inside or around the mine, which is determined according to the measurement purpose, the equipment installation location and the actual mine structure; the number of target measurement positions is at least one. When there are multiple target measurement positions, adjacent target measurement positions are set according to a preset distance, for example, a target measurement position is set every two meters or three meters. This embodiment does not limit the number of target measurement positions and the positional relationship between the target measurement positions.
[0052] Measurement data refers to the data obtained through wellbore measurement, including magnetic induction data and non-magnetic induction data.
[0053] In some embodiments of the present invention, the measurement data includes several data records, and each data record includes several data. For example, the measurement data includes 1000 data records, and each data record includes 3 magnetic induction data and 6 non-magnetic induction data, or each data record includes 6 magnetic induction data and 6 non-magnetic induction data.
[0054] In some embodiments of the present invention, the non-magnetic induction data is attitude data; accordingly, the well exploration pipe includes a magnetic induction sensor and an attitude sensor; the measurement data includes the magnetic induction data measured by the magnetic field sensor and the attitude data measured by the attitude sensor.
[0055] The magnetic induction data includes at least one set of magnetic induction intensities in three-axis directions corresponding to the target measurement position, wherein the three-axis directions refer to the x-axis direction, the y-axis direction, and the z-axis direction of the spatial coordinate system constructed with the target measurement position as the origin.
[0056] Each group of magnetic induction intensity includes the magnetic induction intensity in the x-axis direction, the magnetic induction intensity in the y-axis direction, and the magnetic induction intensity in the z-axis direction measured at the target measurement position. Each group of magnetic induction intensity is measured by different magnetic field sensors set on the well exploration pipe, and the number of magnetic field sensors is the same as the number of groups of magnetic induction intensity.
[0057] For example, taking the magnetic induction sensor as a three-axis magnetometer, each three-axis magnetometer will measure the magnetic induction intensity in the three directions of x-axis, y-axis and z-axis at the target measurement position. When the number of target measurement positions is 1 and the number of three-axis magnetometers is 1, a set of magnetic induction intensity data in three directions will be measured at each target measurement position, for a total of 3 magnetic induction data; when the number of target measurement positions is 1 and the number of three-axis magnetometers is 2, two sets of magnetic induction intensity data in three directions will be measured at each target measurement position, for a total of 6 magnetic induction data.
[0058] The attitude data includes roll angle data (roll angle), azimuth angle data (azimuth angle), inclination angle data (inclination angle) and gravity acceleration data (Gx, Gy, Gz) in three-axis directions corresponding to the target measurement position. Accordingly, the attitude sensor includes but is not limited to devices such as a gyroscope, an inclinometer, a three-axis accelerometer or a combined sensor unit.
[0059] Among them, the roll angle data refers to the angle of rotation of the well exploration pipe around its longitudinal axis; the direction angle data refers to the azimuth of the well exploration pipe relative to the north of the ground; the inclination angle data refers to the inclination degree of the well exploration pipe relative to the theoretical vertical line; the gravity acceleration data in the three-axis direction includes the gravity acceleration Gx in the x-axis direction corresponding to the target measurement position, the gravity acceleration Gy in the y-axis direction and the gravity acceleration Gz in the z-axis direction.
[0060] In actual implementation, since the quality of magnetic induction intensity data is poor due to the influence of various noises during the measurement process, it is also necessary to filter and screen the noise through noise filtering methods, such as moving average, Kalman filtering or median filtering, to improve the quality of magnetic induction intensity data, thereby ensuring the accuracy and reliability of subsequent analysis. At the same time, in order to enhance the filtering effect and further improve the accuracy and reliability of the measurement, in some embodiments of the present invention, the magnetic induction data includes at least two groups of magnetic induction intensities in the three-axis directions corresponding to the target measurement position.
[0061] Step S102, obtaining a pre-trained well distance measurement model. Figure 2 The well distance measurement model is a temporal and interaction network model (TINet), which includes a spatial channel-based feature processing layer (Sample Convolution and Interaction Network, SCINet), a temporal memory unit layer (Long ShortTerm Memory, LSTM) and a fully connected output layer (Output layer).
[0062] In some embodiments of the present invention, the feature processing layer can iteratively extract and exchange information at different time resolutions to capture the complex relationship between magnetic induction data and the distance between wells, especially the interactive relationship between magnetic induction data and non-magnetic induction data. Specifically, the feature processing layer is used to perform multi-layer convolution processing on the magnetic induction data and the posture data, respectively, to obtain the first data feature corresponding to the magnetic induction data and the second data feature corresponding to the posture data. Figure 3 , Figure 3 It is a schematic diagram of the feature processing layer processing magnetic induction data and posture data.
[0063] like Figure 3 As shown, the feature processing layer processes the magnetic induction data M and the non-magnetic induction data N through one-dimensional convolution β and ψ operations respectively. Each data segment is projected into the hidden state space through a one-dimensional convolution module, and then the data is scaled and transformed through the Hadamard product exp (Hadamard product) to obtain the first scaling transformation result corresponding to the magnetic induction data M and the second scaling transformation result corresponding to the non-magnetic induction data N. After that, the input magnetic induction data M is point-multiplied with the result after the one-dimensional convolution and Hadamard product operation to generate the first processing result corresponding to the magnetic induction data M, and the magnetic induction data N is point-multiplied with the result after the one-dimensional convolution and Hadamard product operation to generate the second processing result corresponding to the non-magnetic induction data N. The specific implementation process can be expressed by the following formula:
[0064] M'=M⊙exp(ψ(N)),N'=N⊙exp(β(M))
[0065] In the formula, M' represents the first processing result corresponding to the magnetic induction data M; M represents the magnetic induction data; ψ represents the one-dimensional convolution; N represents the non-magnetic induction data; N' represents the second processing result corresponding to the non-magnetic induction data N; β represents the one-dimensional convolution.
[0066] Then, if Figure 3 As shown, the processed first processing result and the second processing result are further interacted to obtain the first data feature and the second data feature. The specific implementation process can be expressed by the following formula:
[0067] M”=M’+α(N’),N”=N’-η(M’)
[0068] In the formula, M" represents the first data feature corresponding to the magnetic induction data M; M' represents the first processing result corresponding to the magnetic induction data M; N" represents the second data feature corresponding to the non-magnetic induction data N; N' represents the second processing result corresponding to the non-magnetic induction data N; α represents a one-dimensional convolution module; η represents a one-dimensional convolution module.
[0069] In some embodiments of the present invention, through the multi-layer convolution operation of the feature processing layer, the features of the measurement data are extracted at different time scales to obtain the first data features corresponding to the magnetic induction data and the second data features corresponding to the non-magnetic induction data, which can capture short-term changes and long-term trends. The multi-scale feature extraction method helps the model understand the relationship between the features and the distance between wells while avoiding information loss.
[0070] Specifically, multi-layer convolution processing is performed on the magnetic induction data and the posture data respectively to obtain a first data feature corresponding to the magnetic induction data and a second data feature corresponding to the posture data, including: processing the magnetic induction data through one-dimensional convolution, and scaling the one-dimensional convolution processing result of the magnetic induction data to obtain a first scaling transformation result; generating a first processing result corresponding to the magnetic induction data based on the one-dimensional convolution processing result of the magnetic induction data and the first scaling transformation result; processing the posture data through one-dimensional convolution, and scaling the one-dimensional convolution processing result of the posture data to obtain a second scaling transformation result; generating a second processing result corresponding to the posture data based on the one-dimensional convolution processing result of the posture data and the second scaling transformation result; processing the first processing result and the second processing result through one-dimensional convolution respectively to obtain a one-dimensional convolution processing result corresponding to the first processing result and a one-dimensional convolution processing result corresponding to the second processing result; interactively processing the one-dimensional convolution processing result corresponding to the first processing result, the one-dimensional convolution processing result corresponding to the second processing result, the first processing result, and the second processing result to obtain the first data feature and the second data feature.
[0071] In addition, if Figure 3 As shown, the feature processing layer also includes a data segmentation sublayer (split), which is used to split the measurement data according to the data type when the measurement data is received, and divide it into magnetic induction data and non-magnetic induction data, or magnetic induction data and posture data.
[0072] In some embodiments of the present invention, the temporal memory unit layer is used to predict the distance between wells based on the first data feature and the second data feature to obtain the prediction result of the distance between wells.
[0073] The temporal memory unit layer processes the data representation after being processed by the feature processing layer, and selectively retains and processes historical information through its gating mechanism (including input gate, forget gate, and output gate), so that the model can extract the historical information most relevant to the current prediction, thereby generating accurate predictions. The recursive nature of the temporal memory unit layer allows the model to make continuous predictions by taking the prediction results of the previous moment as input. This helps to maintain the continuity and progressiveness of the prediction of the distance between wells.
[0074] In the process of processing data features, the temporal memory unit layer first has two important inputs at time step (t): the input feature x_t of the current time step and the output h_{t-1} of the previous time step (t-1). h_{t-1} contains the information of all previous time steps. The input feature x_t and the output h_{t-1} are combined, usually by splicing to form a new vector, that is, [x_t, h_{t-1}]. This spliced vector contains the features of the current time step and the information of the previous time step, providing context for subsequent calculations; then, the spliced vector is processed by an activation function (such as sigmoid) to determine how much previous information should be retained when updating the state. The activation function here maps the input to a value between 0 and 1, indicating the degree of "retention". The activation function sigmoid outputs a number between 0 and 1, which is multiplied by the state C_{t-1} at time t-1 to determine how much information to discard or retain. In addition, after the current input x_t is processed, a new candidate state C_{t} will also be generated. In an embodiment of the present invention, in the temporal memory unit layer, the data features processed by the feature processing layer and the well distance prediction results corresponding to the data features will be retained.
[0075] like Figure 2 As shown, the fully connected output layer is after the temporal memory unit layer and is used to map the high-dimensional output of the temporal memory unit layer to a scalar value, which is the final prediction result of the well spacing by the well spacing measurement model. Specifically, the fully connected output layer is used to map the well spacing prediction result to a scalar value.
[0076] Since the output dimension after processing by the temporal memory unit layer is not one-dimensional, and the distance prediction between wells only needs to output a distance result, based on this, in some embodiments of the present invention, a fully connected output layer is used to realize the one-dimensional output of the high-dimensional result output by the temporal memory unit layer to the final result.
[0077] refer to Figure 2 In some embodiments of the present invention, the well distance measurement model further includes a first connection layer and a second connection layer; the first connection layer is used to splice the output of the feature processing layer with the measurement data and input the spliced result into the temporal memory unit layer. The splicing is to add the output of the feature processing layer to the measurement data. Since the output dimension of the feature processing layer is the same as the dimension of the original input measurement data, the addition operation can be performed directly.
[0078] The second connection layer is used to concatenate the output of the temporal memory unit layer with the measurement data, and input the concatenated result into the fully connected output layer. The concatenation is to add the output of the temporal memory unit layer with the measurement data. Since the output dimension of the temporal memory unit layer is the same as the dimension of the original input measurement data, the addition operation can be performed directly.
[0079] In some embodiments of the present invention, the well distance measurement model is a pre-trained model, and the parameters of the initial network model are optimized and trained by the gradient descent method to obtain the well distance measurement model. At the same time, the error in the preset error scaling loss function is back-propagated, so that the model gradually improves the prediction accuracy of the well distance by adjusting the internal weights during the training process.
[0080] Specifically, a pre-trained well-to-well distance measurement model is obtained, including: obtaining training data, the training data including: sample measurement data and the true well-to-well distance corresponding to the sample measurement data; inputting the sample measurement data into a pre-created initial network model to obtain a training result; the model structure of the initial network model is the same as the model structure of the well-to-well distance measurement model; inputting the training result and the true well-to-well distance into a preset error scaling loss function to obtain a loss function value; dynamically adjusting the error scaling loss function based on the relative error between the training result and the true well-to-well distance; calculating the gradient of the error scaling loss function to the parameters of the initial network model through a back-propagation algorithm; iterating the model parameters of the initial network model based on the gradient and gradient descent method to obtain the well-to-well distance measurement model.
[0081] The training data may include sample measurement data collected in multiple scenarios, and the sample transmission measurement data collected in each scenario includes sample magnetic induction data and sample posture data. In each scenario, a preset number (e.g., 2000, 3000, or 4000 pieces) of measurement data may be collected at multiple sample positions, and the interval distances between adjacent sample positions may be the same or different, for example, the interval distance between adjacent sample positions may be 2 meters or 3 meters.
[0082] Specifically, the training data includes data measured at at least one sample position; the distance between each sample position and an adjacent sample position is greater than or equal to a preset distance; obtaining the training data includes: obtaining a preset number of sample magnetic induction data and sample attitude data respectively measured at different sample positions, and integrating them with the pre-measured true distance between wells to obtain sample measurement data.
[0083] The preset error scaling loss function (AESLoss) refers to a pre-set function for calculating the loss of the model. During the training process, after the predicted well-to-well distance is output, the error scaling loss function dynamically adjusts the relative error through the preset error threshold according to the absolute error between the training result and the actual distance between the wells to ensure that the model focuses on reducing large errors and improving the prediction accuracy in key scenarios. The error scaling loss function is expressed by the following formula:
[0084] L AESLoss (k t , k p )=L MSE (k p , k t )·(1+γ)
[0085] Where MSE is the mean square error, k t Indicates the actual distance between wells; k p represents the training result, i.e., the predicted well-to-well distance; γ refers to the scaling factor that is dynamically adjusted according to the proportion of the relative error exceeding the error threshold.
[0086] Step S103, inputting the measurement data into the well distance measurement model to obtain the well distance measurement result.
[0087] In some embodiments of the present invention, the measurement data includes several pieces of data; in the process of inputting the measurement data into the well-to-well distance measurement model, in order to fully consider the impact of historical data on current prediction data, it is necessary to use sliding window technology to divide the measurement data of the input model into sequence data according to a preset window size and window sliding step to retain spatial and temporal correlations.
[0088] For example, the measurement data includes 1000 data records, each of which includes 6 magnetic induction data features and 6 non-magnetic induction data features; the number of features of each data record is 12, and the original input dimension is expressed as (1000, 12); through the sliding window technology, each data record is converted into a sequence data, and the preset window size is 8, then the dimension of the input data can be expressed as (1000, 8, 12), and each data is composed of a dimension of (8, 12), where 12 represents the number of features and 8 represents the sequence length.
[0089] Specifically, the measurement data is input into the well distance measurement model, including: performing window sliding processing on the measurement data according to a preset window size and a preset window sliding step, dividing the measurement data into at least one group of data; and inputting at least one group of data into the well distance measurement model in sequence.
[0090] In summary, the method for measuring the distance between adjacent wells provided in an embodiment of the present invention obtains measurement data measured at a target measurement position, where the measurement data refers to data measured by a well exploration pipe; the well exploration pipe includes a magnetic induction sensor and a posture sensor; the measurement data includes magnetic induction data measured by the magnetic field sensor and posture data measured by the posture sensor; a pre-trained well distance measurement model is obtained, and the well distance measurement model includes a feature processing layer based on a spatial channel, a temporal memory unit layer, and a fully connected output layer; the feature processing layer is used to perform multi-layer convolution processing on the magnetic induction data and the posture data, respectively, to obtain a first data feature corresponding to the magnetic induction data and a second data feature corresponding to the posture data; the temporal memory unit layer is used to predict the well distance based on the first data feature and the second data feature, to obtain a well distance prediction result; the fully connected output layer is used to map the well distance prediction result to a scalar value; the measurement data is input into the well distance measurement model The well distance measurement result is obtained by using a temporal memory unit layer, and the distance prediction result can be obtained. The problem that the traditional method of analyzing magnetic field data for distance prediction is poor can be solved. The well distance measurement model integrates a feature processing layer and a temporal memory unit layer. The feature processing layer can iteratively extract and exchange information at different time resolutions, capture the complex relationship between magnetic induction data and the distance between wells, and enhance the model's adaptability to various interference factors, thereby solving the limitations of traditional methods in establishing mathematical relationships. Through the temporal memory unit layer, distance prediction is regarded as a time task, and the information of historical data is used to more accurately predict the current well distance, reduce interference and errors caused by instantaneous changes, and improve the distance prediction effect. At the same time, a deep learning method is adopted to consider a variety of input features, so that the model can effectively capture the nonlinear relationship between data, while traditional methods often assume linear relationships. In this way, the model can better adapt to complex environmental factors.
[0091] In addition, during the model training process, the adaptive error scaling loss function is used to consider both relative error and absolute error, which reduces the probability of large errors and can further improve the accuracy of well distance measurement.
[0092] Corresponding to the above method, the present invention also provides a device for measuring the distance between adjacent wells. The device / system includes a computer device, and the computer device includes a processor and a memory. The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device / system implements the steps of the method for measuring the distance between adjacent wells as described above.
[0093] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for measuring the distance between adjacent wells are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0094] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the method for measuring the distance between adjacent wells as described above when executed by a processor.
[0095] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0096] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0097] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for measuring the distance between adjacent wells, characterized in that: The method comprises the following steps: Acquire measurement data measured at the target measurement position, wherein the measurement data refers to data measured by a well exploration pipe; the well exploration pipe includes a magnetic induction sensor and a posture sensor; the measurement data includes magnetic induction data measured by the magnetic field sensor and posture data measured by the posture sensor; the magnetic induction data includes at least one set of magnetic induction intensities in the three-axis directions corresponding to the target measurement position; the posture data includes roll angle data, azimuth angle data, tilt angle data and gravity acceleration data in the three-axis directions corresponding to the target measurement position; A pre-trained well-to-well distance measurement model is obtained, wherein the well-to-well distance measurement model includes a feature processing layer based on a spatial channel, a temporal memory unit layer, and a fully connected output layer; the feature processing layer is used to perform multi-layer convolution processing on the magnetic induction data and the posture data, respectively, to obtain a first data feature corresponding to the magnetic induction data and a second data feature corresponding to the posture data; the temporal memory unit layer is used to predict the well-to-well distance based on the first data feature and the second data feature, to obtain a well-to-well distance prediction result; the fully connected output layer is used to map the well-to-well distance prediction result to a scalar value; The measurement data is input into the inter-well distance measurement model to obtain the inter-well distance measurement result.
2. The method according to claim 1, characterized in that The performing multi-layer convolution processing on the magnetic induction data and the posture data respectively to obtain a first data feature corresponding to the magnetic induction data and a second data feature corresponding to the posture data includes: Processing the magnetic induction data through one-dimensional convolution, and performing scaling transformation on the one-dimensional convolution processing result of the magnetic induction data to obtain a first scaling transformation result; Generate a first processing result corresponding to the magnetic induction data based on the one-dimensional convolution processing result of the magnetic induction data and the first scaling transformation result; Processing the posture data through one-dimensional convolution, and performing scaling transformation on the one-dimensional convolution processing result of the posture data to obtain a second scaling transformation result; Generate a second processing result corresponding to the posture data based on the one-dimensional convolution processing result of the posture data and the second scaling transformation result; Processing the first processing result and the second processing result respectively through one-dimensional convolution to obtain a one-dimensional convolution processing result corresponding to the first processing result and a one-dimensional convolution processing result corresponding to the second processing result; The first data feature and the second data feature are obtained by interactively processing the one-dimensional convolution processing result corresponding to the first processing result, the one-dimensional convolution processing result corresponding to the second processing result, the first processing result, and the second processing result.
3. The method according to claim 1, characterized in that The well-to-well distance measurement model also includes a first connection layer and a second connection layer; the first connection layer is used to splice the output of the feature processing layer with the measurement data and input the spliced result into the timing memory unit layer; the second connection layer is used to splice the output of the timing memory unit layer with the measurement data and input the spliced result into the fully connected output layer.
4. The method according to claim 1, characterized in that: The measurement data includes a plurality of pieces of data; the step of inputting the measurement data into the well-to-well distance measurement model includes: Performing window sliding processing on the measurement data according to a preset window size and a preset window sliding step length, and dividing the measurement data into at least one group of data; The at least one set of data is sequentially input into the well-to-well distance measurement model.
5. The method according to claim 1, characterized in that The feature processing layer also includes a data segmentation sublayer, and the data segmentation sublayer is used to segment the measurement data according to data type when the measurement data is received, into the magnetic induction data and the posture data.
6. The method according to claim 1, characterized in that The obtaining of a pre-trained well-to-well distance measurement model comprises: Acquire training data, the training data including: sample measurement data, and real distances between wells corresponding to the sample measurement data; Inputting the sample measurement data into a pre-created initial network model to obtain a training result; the model structure of the initial network model is the same as the model structure of the well-to-well distance measurement model; Inputting the training result and the actual distance between wells into a preset error scaling loss function to obtain a loss function value; dynamically adjusting the error scaling loss function based on a relative error between the training result and the true distance between the wells; Calculating the gradient of the error scaling loss function to the parameters of the initial network model by a back propagation algorithm; The model parameters of the initial network model are iteratively updated based on the gradient and gradient descent method to obtain the well-to-well distance measurement model.
7. The method according to claim 6, characterized in that The training data includes data measured at at least one sample position; the distance between each sample position and an adjacent sample position is greater than or equal to a preset distance; The obtaining of training data comprises: A preset number of sample magnetic induction data and sample attitude data respectively measured at different sample positions are obtained, and integrated with the pre-measured real distance between wells to obtain the sample measurement data.
8. A device for measuring the distance between adjacent wells, comprising a processor, a memory and a computer program / instruction stored in the memory, characterized in that: The processor is used to execute the computer program / instructions. When the computer program / instructions are executed, the device implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
