Stuck pipe risk joint prediction method and system and storage medium
By collecting drill string vibration signals and surface energy consumption parameters during drilling, and utilizing lightweight prediction models and improved neural network technology, a joint prediction system for stuck drill risk was constructed. This system solves the lag problem of traditional methods and achieves early prediction and high-accuracy early warning of stuck drill risk.
Patent Information
- Application Number
- CN202511336830.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-09-18
AI Technical Summary
Traditional methods for predicting stuck pipe risks in drilling mainly rely on real-time logging data, which has a time lag and cannot predict stuck pipe risks in advance, thus failing to effectively avoid stuck pipe accidents.
The system collects drill string vibration signals at the drill bit and energy consumption parameters of the ground drilling rig. It then conducts comprehensive analysis using a lightweight prediction model and a stuck drill intelligent prediction model. Combining an improved long short-term memory neural network and knowledge distillation technology, it constructs a joint prediction system for stuck drill risk and outputs the probability of stuck drill risk in real time.
Early detection of stuck drill risk reduces the probability of stuck drill accidents, improves the alarm accuracy of prediction models, solves the lag problem of traditional methods, and ensures the reliability of prediction results.
Smart Images

Figure CN120832596B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of oil and gas well drilling, in particular to a joint prediction method and system for a stuck drill pipe risk and a storage medium. BACKGROUND
[0002] In recent years, with the continuous development of oil and gas drilling technology, drilling engineering is constantly shifting to complex well types such as ultra-deep wells and large displacement wells. However, the drilled strata are variable, and the well trajectory is complex, resulting in excessive drill string friction torque and frequent stuck drill pipe risks. This may increase non-production time, or even lead to serious accidents such as wellbore abandonment, which seriously restricts safe and efficient drilling.
[0003] Traditional stuck drill pipe risk prediction methods mainly analyze real-time logging parameters measured on the ground, which mainly include three types. The first type is to train an artificial intelligence model using historical logging data during the stuck drill pipe risk period to achieve real-time intelligent prediction of the stuck drill pipe risk. The second type is to establish a pipe string mechanics model to achieve real-time solution of drill string friction and characterization of stuck drill pipe trends. The third type is to establish a rule judgment model for logging data based on expert experience and domain knowledge to achieve real-time diagnosis of the stuck drill pipe risk.
[0004] However, the above three methods are only based on real-time measured logging data, which has a certain lag in characterizing the stuck drill pipe trend. When the logging data shows a significant stuck drill pipe trend, the stuck drill pipe risk has often occurred downhole. Therefore, the above three methods are mostly real-time diagnosis when the stuck drill pipe occurs, and cannot predict in advance, thereby failing to assist in avoiding the stuck drill pipe risk. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a joint prediction method, system and storage medium for a stuck drill pipe risk.
[0006] To achieve the above purpose, the first aspect of the present application provides a joint prediction method for a stuck drill pipe risk, comprising:
[0007] Collecting drill string vibration signals at a drill bit and energy consumption parameters of a surface drilling rig;
[0008] Performing feature extraction on a plurality of continuous drill string vibration signals in a preset time period according to windows divided according to different time scales to determine vibration feature vectors of the drill string vibration signals in the preset time period;
[0009] Obtaining drilling parameters and time feature data of drilling in the preset time period, and inputting drilling parameter vectors corresponding to the drilling parameters in the preset time period, time encoding vectors corresponding to the time feature data, and vibration feature vectors into a lightweight prediction model installed downhole;
[0010] output a first prediction probability of a pipe sticking based on input data through the lightweight prediction model;
[0011] input the energy consumption parameter and the drilling parameter to a pipe sticking intelligent prediction model installed on a well, and output a second prediction probability of a pipe sticking through the pipe sticking intelligent prediction model;
[0012] comprehensively analyze the first prediction probability and the second prediction probability according to a preset joint prediction rule, and determine a final risk probability of a pipe sticking.
[0013] In the embodiments of the present application, the method further comprises: adding a memory reset gate on the basis of a long short-term memory network structure to construct an improved long short-term memory neural network model; constructing a training data set based on drilling data, drill string vibration signals, time feature data and occurrence conditions of pipe sticking events in a historical time period to train the improved long short-term memory neural network model to obtain a trained memory model; starting a knowledge distillation operation on the basis of the trained memory model to gradually reduce model parameters of the trained memory model; determining a function value of a loss function of an adjusted model after each adjustment of the model parameters; and in the case where the function value of the loss function converges, determining a model corresponding to the function value as the lightweight prediction model.
[0014] In the embodiments of the present application, the expression of the loss function L is shown in formula (1):
[0015] (1)
[0016] wherein, , , are weight coefficients, is a cross-entropy loss value, representing a deviation between an actual pipe sticking probability of test data and a predicted pipe sticking probability output by the student model, y is the actual pipe sticking probability corresponding to the test data, and q is the predicted pipe sticking probability output by the student model based on input test data, the student model being a model corresponding to the trained memory model after a certain number of model parameters are reduced; is a distillation loss value, representing a deviation between output values of the teacher model and the student model, p is a pipe sticking prediction probability output by the teacher model based on input test data, the teacher model being the trained memory model; is a regularization loss value, used to constrain the number of model parameters of the student model, is the model parameter of the student model.
[0017] In the embodiment of the present application, the method further comprises: in the process of starting the knowledge distillation operation on the basis of the trained memory model, introducing a dynamic temperature scaling mechanism to adjust the output softening degree of the teacher model; wherein the temperature parameter T of the dynamic temperature scaling mechanism is adaptively adjusted according to formula (2):
[0018] (2)
[0019] wherein is an initial temperature, the initial temperature refers to the number of model parameters deleted each time in the process of the knowledge distillation operation, is an adjustment coefficient, H(p), H(q) are the cross-entropy probabilities of the outputs of the teacher model and the student model respectively.
[0020] In the embodiment of the present application, the intelligent prediction model of the stuck drill is a model constructed by introducing an energy consumption feature attention mechanism on the basis of a time series GRU model, wherein the reset gate of the gate unit of the intelligent prediction model of the stuck drill The calculation formula is formula (3):
[0021] (3)
[0022] wherein, is an attention weight, , is an activation function, is a weight matrix, is a hidden state at the previous moment, is a current input, is a bias vector, is an attention influence coefficient.
[0023] In the embodiment of the present application, the hybrid loss function adopted by the intelligent prediction model of the stuck drill The expression is formula (4):
[0024] (4)
[0025] wherein, , are function weights respectively, is a cross-entropy loss function, and its expression is formula (5), is a time series consistency loss function, and its expression is formula (6):
[0026] (5)
[0027] (6)
[0028] Wherein, T refers to the total number of training data, t is the current sample serial number, is the real label of the stuck drill at time t, is the stuck drill prediction probability output by the stuck drill intelligent prediction model for the tth input data, is the time sequence weight, is the stuck drill prediction probability output by the stuck drill intelligent prediction model for the t-1th input data, is the power change influence factor, used to constrain the rationality of the prediction results of adjacent time points and avoid sudden changes, is the energy consumption fluctuation at time t.
[0029] In the embodiments of the present application, the stuck drill intelligent prediction model uses a function as shown in formula (7) to adjust the adaptive learning rate:
[0030] (7)
[0031] Wherein, is the learning rate of the tth training data, is the initial learning rate, k is the adjustment coefficient, is the fluctuation coefficient of the tth training data, is the historical maximum fluctuation coefficient.
[0032] In the embodiments of the present application, the first prediction probability and the second prediction probability are comprehensively analyzed according to a preset joint prediction rule to determine the final risk probability of the stuck drill, including determining the final risk probability according to formula (8) :
[0033] (8)
[0034] Wherein, is the weight, , , are the first prediction probability and the second prediction probability, respectively.
[0035] The second aspect of the present application provides a stuck drill risk joint prediction system, comprising:
[0036] A signal acquisition and processing device is installed within a preset range from the drill bit, used to acquire the drill string vibration signals at the drill bit in real time; a window divided according to different time scales is used to extract features of a plurality of continuous drill string vibration signals in a preset time period, to determine the vibration feature vector of the drill string vibration signals in the preset time period, and to input the drilling parameter vector corresponding to the drilling parameters in the preset time period, the time coding vector corresponding to the time feature data, and the vibration feature vector to a lightweight prediction model installed in the wellbore;
[0037] A downhole prediction device installed downhole includes a lightweight prediction model for outputting a first prediction probability for a stuck pipe based on input data;
[0038] An energy consumption data acquisition device is configured to acquire energy consumption parameters of a surface drilling machine in real time, and input the energy consumption parameters and the drilling parameters to a stuck pipe intelligent prediction model installed on a well;
[0039] A surface prediction device installed on a well includes a stuck pipe intelligent prediction model for outputting a second prediction probability for a stuck pipe based on input data;
[0040] A joint prediction device is configured to comprehensively analyze the first prediction probability and the second prediction probability according to a preset joint prediction rule, and determine a final risk probability of a stuck pipe.
[0041] The third aspect of the present application provides a machine-readable storage medium, which stores instructions configured to cause a processor to be configured to perform the above-mentioned stuck pipe risk joint prediction method when the instructions are executed by the processor.
[0042] The method makes use of the potential abnormal trend of downhole drill string vibration signals before the occurrence of a stuck pipe risk and the reflection of surface drilling machine energy consumption data on the running state of the drill string, making up for the lag defect of traditional prediction based on logging data only, and enabling the stuck pipe risk to be discovered earlier, so as to give the drilling operation personnel more processing time and effectively reduce the probability of occurrence of a stuck pipe accident. Moreover, the prediction results output by the prediction model installed downhole are directly uploaded through mud pulses, which avoids the problem of lag in transmission of a large amount of original vibration signal data, and the comprehensive prediction in combination with the surface drilling machine energy consumption data not only solves the problem of limited memory and computing power in the downhole device, but also avoids the high false alarm and missed alarm of the lightweight model, further improves the alarm accuracy of the stuck pipe risk prediction model, and ensures the reliability of the prediction results.
[0043] Other features and advantages of the embodiments of the present application will be described in detail in the following specific implementation part. BRIEF DESCRIPTION OF DRAWINGS
[0044] The accompanying drawings are included to provide a further understanding of the embodiments of the present application, and constitute a part of the specification, and are used together with the following specific implementation to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the drawings:
[0045] Figure 1 An application environment schematic diagram of the stuck pipe risk joint prediction method according to the embodiments of the present application is schematically shown;
[0046] Figure 2 A structural block diagram of the stuck pipe risk joint prediction system according to the embodiments of the present application is schematically shown;
[0047] Figure 3 A system application environment schematic diagram according to an embodiment of the present application is schematically shown.
[0048] Figure 4 An internal structure diagram of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0049] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the specific embodiments described herein are merely intended to illustrate and explain the embodiments of the present application, and are not intended to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0050] Figure 1 A flowchart of a stuck drill risk joint prediction method according to an embodiment of the present application is schematically shown. As shown in the figure, Figure 1 in an embodiment of the present application, a stuck drill risk joint prediction method is provided, and the embodiment mainly takes the method applied to a processor as an example to illustrate, which includes the following steps:
[0051] Step 102, collecting drill string vibration signals at a drill bit and energy consumption parameters of a surface drilling rig;
[0052] Step 104, performing feature extraction on continuous multiple drill string vibration signals in a preset time period according to windows divided according to different time scales, to determine vibration feature vectors of the drill string vibration signals in the preset time period;
[0053] Step 106, obtaining drilling parameters and time feature data of drilling in the preset time period, and inputting drilling parameter vectors corresponding to the drilling parameters in the preset time period, time encoding vectors corresponding to the time feature data, and the vibration feature vectors to a lightweight prediction model installed downhole;
[0054] Step 108, outputting a first prediction probability for a stuck drill by the lightweight prediction model based on the input data;
[0055] Step 110, inputting the energy consumption parameters and the drilling parameters to a stuck drill intelligent prediction model installed uphole, and outputting a second prediction probability for the stuck drill by the stuck drill intelligent prediction model;
[0056] Step 112, comprehensively analyzing the first prediction probability and the second prediction probability according to a preset joint prediction rule, to determine a final risk probability of the stuck drill.
[0057] The drill string vibration signal at the drill bit is the downhole drill string vibration signal, which reflects the mechanical state of the drill string. Furthermore, the vibration transmission speed is faster than the mechanical response (such as axial load and torque). Before a stuck pipe risk occurs, the high-frequency vibration signal of the downhole drill string will show potential abnormal trends in advance. However, current methods for transmitting downhole signals to the surface, including mud pulses, have drawbacks such as low speed and significant lag, making it impossible to efficiently utilize the large amount of high-frequency vibration signals from downhole. Therefore, in this embodiment, the drill string vibration signal at the drill bit will be collected to predict the downhole stuck pipe risk.
[0058] Specifically, a triaxial vibration sensor is installed near the drill bit to collect vibration signals from the drill bit in the axial, radial, and tangential directions, thus obtaining the vibration acceleration of the drill bit in these three directions. The sampling frequency can be set to 100Hz. The continuous acquisition time covers the entire drilling cycle, including full data from the normal drilling phase and the stuck pipe risk phase. After acquiring the drill string vibration signal at the drill bit, it can be denoised. Specifically, wavelet packet decomposition can be used to process the original vibration signal. The reconstruction formula of this method is as follows: Let the original vibration signal be S(t), and after j-level wavelet packet decomposition, it is expressed as:
[0059]
[0060] in For the wavelet packet coefficients of the k-th frequency band in the j-th layer, For wavelet packet basis functions, The sampling interval is denoted by , n is the translation factor that controls the time translation of the wavelet packet basis function, j represents the number of wavelet packet decomposition layers, and t represents the time variable.
[0061] After decomposing the signal into sub-signals of different frequency bands using wavelet packet decomposition, wavelet coefficients corresponding to noise are removed by setting a soft threshold. The formula is as follows, and the decomposed coefficients are thresholded:
[0062]
[0063] threshold Stein unbiased estimator ,in Where is the noise standard deviation and N is the signal length.
[0064] By using a soft threshold to retain the effective vibration signal components and then reconstructing them, the denoised vibration signal can be obtained. This can eliminate irrelevant signals such as mud interference and sensor noise in the downhole environment.
[0065] After the collected vibration signal is denoised, the continuous vibration signal can be divided into windows according to two time scales, so as to extract features of continuous drill string vibration signals in a preset time period, and determine the vibration feature vector of the drill string vibration signal in the preset time period. The vibration feature vector can be 32-dimensional, including the time domain, frequency domain and time-frequency domain features described above. The preset time period is set by the technician and can be set according to the drilling period. For example, a short-time window can be set to 5 seconds to capture the instantaneous characteristics of high-frequency vibration; a long-time window can be set to 60 seconds to extract the vibration trend change characteristics, and the sliding step length between windows is 1 second to ensure the continuity and integrity of the data. Then the signal can be extracted for feature extraction, and features can be extracted from three dimensions of time domain, frequency domain and time-frequency domain. The time domain features include the root mean square value , peak factor , kurtosis and the like, reflecting the energy and impact characteristics of the signal. The root mean square value formula and the calculation formula of the peak factor are as follows:
[0066]
[0067]
[0068] wherein is the vibration acceleration sampling value in the window, and N is the number of sampling points in the time window. The frequency domain features are obtained by Fourier transform, including power spectral density, center frequency, energy proportion of each frequency band and the like, which reflect the frequency distribution characteristics of the vibration. The time-frequency domain features extract marginal spectrum characteristics by using Hilbert-Huang transform, which represent the joint distribution characteristics of the signal in time and frequency.
[0069] In the scheme, drilling parameters and time characteristic data of the drilling within a preset time period also need to be obtained. The drilling parameters refer to real-time data generated during the drilling process, including real-time drilling parameters such as drilling pressure, rotation speed, torque, hook load, displacement, etc. that are aligned with the vibration data timestamp, which are used to assist feature correlation analysis. The time characteristic data includes time data such as workday type, drilling stage, day and night period, etc. After processing the drilling parameters, an 8-dimensional feature vector corresponding thereto can be obtained. Similarly, after processing the time characteristic data, a 4-dimensional time coding vector corresponding thereto can also be obtained. Then, the 8-dimensional drilling parameter vector corresponding to the drilling parameters within the preset time period, the 4-dimensional time coding vector corresponding to the time characteristic data, and the 32-dimensional vibration feature vector can be input into the lightweight prediction model installed in the downhole. The lightweight prediction model is installed in the downhole, which is to avoid the problem of low prediction efficiency caused by the time delay of data transmission from the downhole to the uphole. The lightweight prediction model can output a first prediction probability P1 for the pipe sticking based on the input data. Then the first prediction probability output by the lightweight prediction model in the downhole can be directly transmitted to the processor through mud pulse, avoiding the problem of transmission lag of a large amount of original vibration signal data.
[0070] Meanwhile, in the scheme, the energy consumption parameters of the surface drilling rig are also obtained. The energy consumption data of the surface drilling rig reflect the motion state of the drill string. The drill string and the top drive rig are connected as a whole by the hook and the oil car, and the pipe sticking can be regarded as a failure of the top drive rig. The drilling rig energy consumption data can reflect the working state of the drilling rig (the motion state of the drill string), and once a failure such as pipe sticking occurs, the drilling rig energy consumption will show a potential abnormal trend. After obtaining the energy consumption parameters of the surface drilling rig, the energy consumption parameters and the drilling parameters can be input into the pipe sticking intelligent prediction model installed in the well. The pipe sticking intelligent prediction model can output a second prediction probability P2 for the pipe sticking based on the input data. Subsequently, the first prediction probability and the second prediction probability can be comprehensively analyzed according to a preset joint prediction rule to determine the final risk probability of the pipe sticking.
[0071] The method utilizes the potential abnormal trend of the downhole drill string vibration signal before the occurrence of the pipe sticking risk and the reflection of the surface drilling rig energy consumption data on the running state of the drill string, which makes up for the lag defect of the traditional prediction based on only the mud logging data, can discover the pipe sticking risk earlier, and effectively reduces the probability of occurrence of the pipe sticking accident. Moreover, the way of directly uploading the prediction result output by the prediction model in the well through mud pulse avoids the problem of transmission lag of a large amount of original vibration signal data, and the comprehensive prediction combining the surface drilling rig energy consumption data solves the problem of limited memory and computing power in the downhole device, avoids the high false alarm and missed alarm of the lightweight model, further improves the alarm accuracy of the pipe sticking risk prediction model, and ensures the reliability of the prediction result.
[0072] The light-weight prediction model is obtained by reducing some model parameters on the basis of the improved improved long short-term memory neural network model. And it can be ensured that the output accuracy of the model is basically equivalent to that of the original improved improved long short-term memory neural network model after reducing the number of model parameters, that is, the precision is guaranteed while reducing the parameter amount of the model. That is, the light-weight model refers to a model with fewer model parameters, which is because the model is installed downhole, and a smaller "volume" model is needed.
[0073] In one embodiment, the method further comprises: adding a memory reset gate on the basis of a long short-term memory network structure to construct an improved long short-term memory neural network model; constructing a training data set based on drilling data, drill string vibration signals, time feature data and occurrence of a stuck pipe event in a historical time period to train the improved long short-term memory neural network model to obtain a trained memory model; starting a knowledge distillation operation on the basis of the trained memory model to gradually reduce model parameters of the trained memory model; determining a function value of a loss function of the adjusted model after each adjustment of the model parameters; and in the case where the function value of the loss function converges, determining the model corresponding to the function value convergence as a light-weight prediction model.
[0074] First, for the existing long short-term memory network, a memory reset gate can be added on the basis of the structure of the network to construct an improved long short-term memory neural network model. The memory reset gate is used to dynamically adjust the influence weight of the historical state on the current prediction. When an abnormal fluctuation of the vibration feature is detected, the memory reset gate reduces the proportion of the weight of the historical state, and enhances the response sensitivity of the model to new features. The memory reset gate function is as follows, assuming that the cell state is , the hidden state is , and the memory reset gate output is defined as:
[0075]
[0076] wherein is a weight matrix, is a bias term, is a Sigmoid activation function, and the value range is (0, 1). When the vibration feature is abnormal, tends to 0 to reduce the influence of the historical state.
[0077] The improved model can then be trained to obtain a trained memory model. When training the model, the training data includes drilling data, drill string vibration signals, time feature data, and the occurrence of a pipe sticking event in the historical time period. During training, a pipe sticking risk log can be obtained, which structurally records the specific time of pipe sticking occurrence, the depth position, the pipe sticking type (such as sticking due to sticking, mechanical sticking, etc.), the risk development process, and the final treatment result. The label data corresponding to the data at each time point can be determined according to the data recorded in the log. The occurrence of a pipe sticking event includes whether a pipe sticking event occurs, and in the absence of a pipe sticking event, the possibility of a pipe sticking risk based on the data at the time point is also determined according to other data, so that the pipe sticking label of each training data set can be obtained. For example, a pipe sticking event occurred at t3. Then, for the previous two time points t1 and t2 of t3, the data at t1 and t2 should be based on the data at the time point to believe that there will be a pipe sticking risk. Other more specific and accurate ways can also be used to calculate, which is not limited here. Alternatively, a "pipe sticking pre-window period" (such as a signal segment 30 minutes to 1 hour before pipe sticking occurs) can be defined as a positive sample, and normal operating condition data as a negative sample. Before pipe sticking occurs, the time domain features of the drill string vibration signal (such as amplitude mutation, periodic abnormality), the frequency domain features (such as energy distribution deviation, characteristic frequency appearance), and the time-frequency domain coupling features (such as time-varying energy concentration) will show abnormal changes. The drill will produce energy consumption due to the resistance encountered by the pipe string, and the speed will decrease. By training the machine learning model with historical pipe sticking case data, the mapping relationship between the two types of features and the pipe sticking risk can be captured, the nonlinear modeling from "data features" to "risk probability" can be achieved, and finally the corresponding two pipe sticking risk intelligent prediction models can be obtained. The pipe sticking label is used to identify whether there is a pipe sticking risk. For example, 1 indicates a pipe sticking risk, and 0 indicates normal, i.e., no pipe sticking risk.
[0078] After obtaining the trained memory model, a knowledge distillation operation can be started on the basis of the trained memory model. The knowledge distillation operation refers to gradually reducing the model parameters of the trained memory model until a lightweight model with the accuracy of the output tending to the accuracy of the original model and the least model parameters is found. The present method adopts a teacher-student model architecture to realize lightweight. Among them, the teacher model refers to the trained memory model trained by full historical data and has high risk recognition accuracy. The student model is a shallow network, which refers to the trained memory model with reduced model parameters, and the goal is to reduce the parameter amount while maintaining the accuracy. For the teacher model (i.e. the trained memory model), m model parameters can be reduced each time, so the adjusted model is obtained. After obtaining the adjusted model each time, the function value of the loss function of the adjusted model can be determined. If the loss function value of a certain model converges, it means that the model has reached the least parameter amount while maintaining the accuracy, i.e. the lightweight prediction model desired in the present method is obtained.
[0079] In a specific embodiment, the expression of the loss function L used by the memory model is shown in formula (1):
[0080] (1)
[0081] Among them, , , are weight coefficients, is a cross-entropy loss value, representing the deviation between the actual drilling probability of the test data and the predicted drilling probability output by the student model, y is the actual drilling probability corresponding to the test data, q is the predicted drilling probability output by the student model based on the input test data, and the student model refers to the model corresponding to the trained memory model after reducing a certain model parameter. is a distillation loss value, representing the deviation between the output values of the teacher model and the student model, p is the drilling prediction probability output by the teacher model based on the input test data, and the teacher model refers to the trained memory model. is a regularization loss value, used to constrain the number of model parameters of the student model, is the model parameter of the student model.
[0082] It can be seen that the above loss function is composed of three parts: cross-entropy loss, distillation loss and regularization loss. Among them, the cross-entropy loss is used to ensure the consistency of the student model and the true label, the distillation loss is used to make the student model output approximate the softened output of the teacher model, and the regularization loss adopts an elastic network to constrain the parameter size of the student model, balancing the model complexity and accuracy. Among them, the expression of the cross-entropy loss is as follows:
[0083]
[0084] where y is the true label vector and q is the student model output.
[0085] Distillation loss The expression is as follows:
[0086]
[0087] where p is the output of the teacher model.
[0088] Regularization lossThe expression is as follows (elastic net):
[0089] where
[0090] is the student model parameter, is the L1 norm, is the L2 norm. Through joint optimization of the loss function by the above three functions, effective transfer of knowledge from the teacher model to the student model can be achieved. In terms of network structure compression of the memory model, deep separable convolution can be used to replace traditional fully connected layers, and feature extraction and feature fusion can be performed in two steps to reduce the number of parameters. At the same time, a channel attention mechanism is introduced to automatically strengthen the feature channel weight sensitive to the stuck risk, further improving the recognition efficiency of the lightweight model.
[0091] Further, in the present embodiment, the above method further comprises: in the process of starting the knowledge distillation operation on the basis of the trained memory model, a dynamic temperature scaling mechanism is introduced to adjust the softening degree of the output of the teacher model. Wherein the temperature parameter T of the dynamic temperature scaling mechanism is adaptively adjusted according to formula (2):
[0092]
[0093] (2)
[0094] where is the initial temperature, which refers to the number of model parameters deleted each time in the process of knowledge distillation operation, is the adjustment coefficient, H(p), H(q) are the stuck probabilities of the outputs of the teacher model and the student model, respectively.
[0095] The temperature parameter T can be adaptively changed according to the entropy difference of the outputs of the teacher and student models. When the difference is large, the temperature parameter is increased to make the output of the teacher model smoother and enhance the robustness of knowledge transfer; when the difference is small, the temperature parameter is reduced to focus on key features.
[0096] In one embodiment, after obtaining the energy consumption parameters of the land drilling rig, the obtained data can also be processed for missing value processing and outlier detection. Specifically, the interpolation method based on space-time correlation can be used for missing value processing, and the formula is as follows. Let the time series P(t) have missing values at time t, and the previous 3 time points (t-3, t-2, t-1) and the same block adjacent well data at the same period are weighted and interpolated as follows:
[0097]
[0098] is the well spacing, . In this way, the problem of single-well data missing can be solved.
[0099] Next, outlier detection can be performed. Specifically, the improved Z-score method combined with energy consumption mutation characteristics can be used for detection, and the formula is as follows:
[0100]
[0101] 、 is the mean and standard deviation in the sliding window (such as 60s), is the power change amount, , is the power at time t. When , it is determined as an outlier, and it is replaced by the mean value of adjacent time points, i.e. . is the dynamic outlier determination threshold, is the standardization deviation of the current power relative to the normal power in the sliding window.
[0102] After the data is processed for missing value processing and outlier detection, a multi-scale energy consumption feature matrix can be constructed, which includes short-term features and long-term features. The short-term features (such as 10s window) include power fluctuation coefficient , peak value , wherein is the number of points exceeding , is the total number of power sampling points in the 10s window. The long-term features (such as 5min window) include trend slope and energy consumption cumulative amount 。
[0103] In one specific embodiment, the energy consumption parameters of the ground drilling rig include the three-phase current of the top drive motor ( The sampling frequency can be set to 50Hz with an accuracy of ±0.5%FS), bus voltage U (sampling frequency can be set to 10Hz with a range of 0-1000V), and active power P. P can be calculated in real time. ,in This is the average of the three-phase currents. For power factor, This refers to the average value of the three-phase current of the top drive motor.
[0104] In one embodiment, the stuck drill intelligent prediction model is a model constructed by introducing an energy consumption feature attention mechanism on top of a time-series GRU model. Specifically, the gate of the gate control unit in the stuck drill intelligent prediction model is a reset gate. The calculation formula is as shown in formula (3):
[0105] (3)
[0106] in, For attention weights, , It is an activation function. It is a weight matrix. This refers to the hidden state at the previous moment. This refers to the current input. It refers to the bias vector. This refers to the attention influence coefficient.
[0107] In one embodiment, the update gate of the smart prediction model for stuck drills The formula is as follows:
[0108]
[0109] Introducing current features Compared with the normal average Deviation term To enhance the model's sensitivity to energy consumption anomalies, Refers to the current feature Compared with the normal average The weighting coefficients of the deviation term, specifically... It can be set to 0.5. It refers to the Sigmoid activation function. This refers to updating the gate weight matrix. This refers to the hidden state at time t-1). This refers to updating the bias vector of the gate.
[0110] Its candidate state With hidden turntable represents the following, respectively:
[0111]
[0112]
[0113] wherein is a volatility coefficient influence factor, represents element-wise multiplication, making the candidate state pay more attention to the energy consumption characteristics of the high volatility period, refers to the hidden state at time t, refers to the weight matrix of the candidate state, refers to the reset gate output, refers to the bias vector of the candidate state, refers to the current volatility coefficient, refers to the update gate output, and refer to the hidden state at time t and the hidden state at time t-1, respectively.
[0114] Further, in the present embodiment, the stuck string intelligent prediction model outputs a stuck string risk probability , which is realized by a double-layer fully connected network:
[0115]
[0116] wherein, is a weight matrix of the second layer fully connected network, is a linear rectifier activation function, is a weight matrix of the first layer fully connected network, is a hidden state at time t, and are a bias term of the first layer fully connected and a bias term of the second layer fully connected, respectively.
[0117] In one embodiment, the hybrid loss function adopted by the stuck string intelligent prediction model has an expression as formula (4):
[0118] (4)
[0119] wherein, , are function weights, respectively, is a cross-entropy loss function, which has an expression as formula (5), is a time sequence consistency loss function, which has an expression as formula (6):
[0120] (5)
[0121] (6)
[0122] wherein, T refers to the total number of training data, t refers to the time step index of training data (corresponding to the tth input data), is the true tripping label of the tth data, refers to the tripping prediction probability output by the tripping intelligent prediction model for the tth input data, refers to the time sequence weight, refers to the tripping prediction probability output by the tripping intelligent prediction model for the t-1th input data, refers to the power change influence factor, which is used to constrain the rationality of the prediction results of adjacent time points and avoid sudden changes, refers to the energy consumption fluctuation at t time.
[0123] In an embodiment, the tripping intelligent prediction model adopts a function as shown in formula (7) for adaptive learning rate adjustment:
[0124] (7)
[0125] wherein, is the learning rate of the tth training data, is the initial learning rate, and k is the adjustment coefficient, is the fluctuation coefficient of the tth training data, is the historical maximum fluctuation coefficient.
[0126] Further, in the present embodiment, the tripping intelligent prediction model adopts segmented training. For example, in the pre-training stage, the historical well data of the same block (containing 80% normal samples + 20% tripping samples) can be used, the Adam optimizer is adopted, the initial learning rate is , and the training is performed for 50 rounds. In the fine-tuning stage, the real drilling data of the first 1000m of the current well is introduced, and online hard sample mining is enabled, such as for and samples with a deviation of >0.6, the weight is doubled. Through this way, the tripping intelligent prediction model is trained for 20 rounds.
[0127] In an embodiment, the final risk probability of tripping is determined according to the comprehensive analysis of the first prediction probability and the second prediction probability according to the preset joint prediction rule, which includes determining the final risk probability according to formula (8) :
[0128] (8)
[0129] wherein, is the weight, , , respectively, are a first prediction probability and a second prediction probability. , The value range after the membership function is [0, 0.5], so the two elements in the stuck string fuzzy set can be simply linearly added as the final stuck string comprehensive evaluation index. To reduce the false negative rate, the threshold of the stuck string comprehensive index evaluation can be set to 0.4, that is, when the final risk probability is less than 0.4, it is considered that there is basically no stuck string risk. It can be seen that the smaller the value of the final risk probability , the smaller the possibility of stuck string occurrence.
[0130] Figure 1 is a flowchart of the stuck string risk joint prediction method in an embodiment. It should be understood that although each step in the flowchart of Figure 1 is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless explicitly stated in this article, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, Figure 1 at least part of the steps in may include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0131] Figure 2 In an embodiment, as shown in , a stuck string risk joint prediction system 200 is provided, the system comprising:
[0132] a signal acquisition and processing device 202 installed within a preset range from the drill bit, for real-time acquisition of drill string vibration signals at the drill bit; performing feature extraction on a plurality of continuous drill string vibration signals in a preset time period according to windows divided according to different time scales, determining vibration feature vectors of the drill string vibration signals in the preset time period, and inputting drilling parameter vectors corresponding to drilling parameters in the preset time period, time encoding vectors corresponding to time feature data, and vibration feature vectors to a lightweight prediction model installed downhole;
[0133] a downhole prediction device 204 installed downhole, comprising a lightweight prediction model, for outputting a first prediction probability for stuck string based on the input data;
[0134] an energy consumption data acquisition device 206 for real-time acquisition of energy consumption parameters of a surface drilling machine, and inputting the energy consumption parameters and drilling parameters to a stuck string intelligent prediction model installed on the well;
[0135] The surface prediction device 208, installed on the well, includes a stuck pipe intelligent prediction model for outputting a second prediction probability for stuck pipe based on the input data;
[0136] The joint prediction device 210 is used to perform a comprehensive analysis of the first prediction probability and the second prediction probability according to the preset joint prediction rules to determine the final risk probability of the drill bit getting stuck.
[0137] like Figure 3 The schematic diagram shows that the downhole system is equipped with a drill string vibration signal acquisition and processing device, namely signal acquisition and processing device 202 and downhole prediction device 204. After the downhole prediction device 204 obtains the first predicted probability of stuck pipe, it can transmit the prediction result to the surface joint prediction device 210 via mud pulses. Simultaneously, the surface system is equipped with surface drilling rig energy consumption data acquisition and processing equipment, namely energy consumption data acquisition device 206 and surface prediction device 208. After the surface prediction device 208 outputs the second predicted probability of stuck pipe, it can also transmit the prediction result to the joint prediction device 210. The joint prediction device 210 can then perform a comprehensive analysis of the first and second predicted probabilities according to preset joint prediction rules to determine the final risk probability of stuck pipe. This final risk probability can then guide drilling operations.
[0138] This application provides a storage medium storing a program that, when executed by a processor, implements the aforementioned joint prediction method for stuck drill risk.
[0139] This application provides a processor for running a program, wherein the program executes the above-described joint prediction method for stuck drill risk.
[0140] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor A01, a network interface A02, memory (not shown), and a database (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02, and a database (not shown). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A04. The network interface A02 is used for communication with external terminals via a network connection. When executed by the processor A01, the computer program B02 implements a joint prediction method for stuck drill risk.
[0141] Those skilled in the art can understand that Figure 4 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0142] The embodiment of the present application provides a computer (electronic) device. The device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of the joint drilling risk prediction method of any one of the above are implemented.
[0143] The present application also provides a computer program product adapted to execute the program for initializing the steps of the joint drilling risk prediction method when executed on a data processing device.
[0144] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can be in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device implemented in the flowcharts and / or block diagrams. Figure 1 The device that implements the function specified in one flow or multiple flows and / or blocks. Figure 1 The device that implements the function specified in one flow or multiple flows and / or blocks.
[0146] These computer program instructions can also be stored in a computer-readable storage medium that can guide the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable storage medium produce a manufactured product including instruction devices that implement the flowcharts and / or block diagrams. Figure 1 The device that implements the function specified in one flow or multiple flows and / or blocks. Figure 1 The device that implements the function specified in one flow or multiple flows and / or blocks.
[0147] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1
[0148] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0149] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technologies, about which the processor can execute instructions. The memory is an example of computer readable media.
[0150] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0151] It should also be noted that the terms "comprising", "comprises", "including", "includes" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0152] The above merely provides an example of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of claims of the present application.
Claims
1. A joint prediction method for stuck drill risk, characterized in that, The method includes: The drill string vibration signal at the drill bit and the energy consumption parameters of the ground drilling rig are collected. The energy consumption parameters of the ground drilling rig include the three-phase current of the top drive motor, the bus voltage, and the active power. Feature extraction is performed on multiple consecutive drill string vibration signals within a preset time period by dividing the window according to different time scales, and the vibration feature vector of the drill string vibration signal within the preset time period is determined. Obtain drilling parameters and time feature data within the preset time period, and input the drilling parameter vector corresponding to the drilling parameters, the time encoding vector corresponding to the time feature data, and the vibration feature vector within the preset time period into the lightweight prediction model installed downhole; The lightweight prediction model outputs a first predicted probability for stuck drills based on the input data. The energy consumption parameters and drilling parameters are input into the stuck pipe intelligent prediction model installed on the well, and the stuck pipe intelligent prediction model outputs a second prediction probability for stuck pipe. The first prediction probability and the second prediction probability are comprehensively analyzed according to the preset joint prediction rules to determine the final risk probability of the drill getting stuck. The lightweight prediction model includes: An improved long short-term memory neural network model is constructed by adding a memory reset gate to the existing long short-term memory network structure. A training dataset is constructed based on drilling data, drill string vibration signals, time feature data, and the occurrence of stuck pipe events within a historical time period, in order to train the improved long short-term memory neural network model and obtain a trained memory model. Based on the trained memory model, a knowledge distillation operation is initiated to gradually reduce the model parameters of the trained memory model; After each adjustment of the model parameters, determine the value of the loss function of the adjusted model; If the loss function converges, the model corresponding to the convergence of the function value is determined as the lightweight prediction model. In the process of initiating the knowledge distillation operation based on the trained memory model, a dynamic temperature scaling mechanism is introduced to adjust the softening degree of the teacher model's output; wherein, the temperature parameter T of the dynamic temperature scaling mechanism is adaptively adjusted according to formula (2), including: (2) in, The initial temperature refers to the number of model parameters removed in each step of the knowledge distillation process. To adjust the coefficients, H(p) and H(q) are the drilling jam probabilities output by the teacher model and student model, respectively.
2. The joint prediction method for stuck drill risk according to claim 1, characterized in that, The expression for the loss function L is shown in formula (1): (1) in, , , All are weighting coefficients. y refers to the cross-entropy loss value, which represents the deviation between the actual jamming probability of the test data and the predicted jamming probability output by the student model. y refers to the actual jamming probability corresponding to the test data, and q is the predicted jamming probability output by the student model based on the input test data. The student model refers to the model corresponding to the trained memory model after reducing certain model parameters. , refers to the distillation loss value, which characterizes the deviation between the output values of the teacher model and the student model; p refers to the jamming prediction probability output by the teacher model based on the input test data; the teacher model refers to the trained memory model. This refers to the regularization loss value, used to constrain the number of model parameters in the student model. This refers to the model parameters of the student model.
3. The joint prediction method for stuck drill risk according to claim 1, characterized in that, The stuck drill intelligent prediction model is a model constructed by introducing an energy consumption feature attention mechanism on the basis of the time-series GRU model. The reset gate of the gate control unit in the stuck drill intelligent prediction model... The calculation formula is as shown in formula (3): (3) in, For attention weights, , It is an activation function. It is a weight matrix. This refers to the hidden state at the previous moment. This refers to the current input. It refers to the bias vector. This refers to the attention influence coefficient.
4. The joint prediction method for stuck drill risk according to claim 1, characterized in that, The intelligent prediction model for stuck drills uses a hybrid loss function. The expression is as shown in formula (4): (4) in, , These are the function weights, The cross-entropy loss function is expressed as in formula (5). The time consistency loss function is expressed as formula (6): (5) (6) Where T refers to the total number of training data, and t is the current sample number. The true label for the diamond at time t. This refers to the stuck drill prediction probability output by the intelligent prediction model for the t-th input data. This refers to time-series weights. This refers to the stuck drill prediction probability output by the intelligent prediction model for the (t-1)th input data. This refers to the power change influence factor, used to constrain the reasonableness of prediction results at adjacent time points and avoid abrupt changes. It refers to the energy consumption fluctuation at time t.
5. The joint prediction method for stuck drill risk according to claim 1, characterized in that, The intelligent prediction model for stuck drills uses the function shown in formula (7) to adjust the learning rate adaptively: (7) in, This refers to the learning rate of the t-th training data. This refers to the initial learning rate, where k is the adjustment coefficient. This refers to the fluctuation coefficient of the t-th training data. It refers to the historical maximum volatility coefficient.
6. The joint prediction method for stuck drill risk according to claim 1, characterized in that, The first predicted probability and the second predicted probability are comprehensively analyzed according to the preset joint prediction rules to determine the final risk probability of stuck drill bit, including determining the final risk probability according to formula (8). : (8) in, As weight, , , These are the first prediction probability and the second prediction probability, respectively.
7. A joint prediction system for stuck drill risk, characterized in that, The system includes: The signal acquisition and processing device is installed within a preset range from the drill bit to acquire drill string vibration signals at the drill bit in real time. It extracts features from multiple consecutive drill string vibration signals within a preset time period according to windows divided by different time scales, determines the vibration feature vector of the drill string vibration signals within the preset time period, and inputs the drilling parameter vector corresponding to the drilling parameters, the time encoding vector corresponding to the time feature data, and the vibration feature vector into the lightweight prediction model installed downhole. A downhole prediction device, installed downhole, includes a lightweight prediction model for outputting a first prediction probability for stuck pipe based on input data; wherein the lightweight prediction model includes: An improved long short-term memory neural network model is constructed by adding a memory reset gate to the existing long short-term memory network structure. A training dataset is constructed based on drilling data, drill string vibration signals, time feature data, and the occurrence of stuck pipe events within a historical time period, in order to train the improved long short-term memory neural network model and obtain a trained memory model. Based on the trained memory model, a knowledge distillation operation is initiated to gradually reduce the model parameters of the trained memory model; After each adjustment of the model parameters, determine the value of the loss function of the adjusted model; If the loss function converges, the model corresponding to the convergence of the function value is determined as the lightweight prediction model. In the process of initiating the knowledge distillation operation based on the trained memory model, a dynamic temperature scaling mechanism is introduced to adjust the softening degree of the teacher model's output; wherein, the temperature parameter T of the dynamic temperature scaling mechanism is adaptively adjusted according to formula (2), including: (2) in, The initial temperature refers to the number of model parameters removed in each step of the knowledge distillation process. To adjust the coefficients, H(p) and H(q) are the probabilities of getting stuck in the drill output by the teacher model and the student model, respectively; An energy consumption data acquisition device is used to collect energy consumption parameters of a ground drilling rig in real time and input the energy consumption parameters and drilling parameters into a stuck drill intelligent prediction model installed on the well. The energy consumption parameters of the ground drilling rig include the three-phase current of the top drive motor, the bus voltage, and the active power. A surface prediction device, installed above the well, includes a stuck pipe intelligent prediction model for outputting a second prediction probability for stuck pipe based on input data; The joint prediction device is used to perform a comprehensive analysis of the first prediction probability and the second prediction probability according to a preset joint prediction rule to determine the final risk probability of the drill bit getting stuck.
8. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the joint prediction method for stuck drill risk according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for predicting drill string stuck pipe event
CN104024572A
Method, device and equipment for determining working conditions of drilling operation and storage medium
CN120031176A