Formation pressure while drilling advanced prediction method and system based on parallel TCN-LSTM-attention and adaptive update

CN122365402BActive Publication Date: 2026-09-11CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610821340.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-09-11
Estimated Expiration
2046-06-09

AI Technical Summary

Technical Problem

然而,单一LSTM模型在处理长序列数据时存在计算效率低和局部特征提取能力弱的问题,单一TCN模型则缺乏对长期依赖关系的记忆能力

Benefits of technology

1、本发明采用并行TCN-LSTM-Attention架构,TCN和LSTM分支同时处理原始输入特征,避免了串联结构信息单向传递导致的特征损失,充分融合局部多尺度特征和长期时序依赖关系,预测精度显著提高。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365402B_ABST
    Figure CN122365402B_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for predicting formation pressure while drilling based on parallel TCN-LSTM-Attention and adaptive updates, belonging to the field of oil and gas drilling engineering technology. The method includes: Step 1: Acquiring multi-dimensional drilling data; smoothing and denoising the preprocessed multi-dimensional drilling data, calculating the dynamic d-exponent, and generating pressure gradient features; constructing a feature standardization and sliding window dataset; Step 2: Based on the parallel TCN-LSTM-Attention architecture, constructing a deep learning model for predicting formation pressure that integrates local multi-dimensional features and long-range temporal dependencies; Step 3: Pre-training based on historical data from the initial drilling phase, and combining the optimal sliding window mechanism, using the deep learning model for predicting formation pressure in Step 2 to perform online rolling multi-step prediction of formation pressure. This invention fully integrates local multi-scale features and long-term temporal dependencies, significantly improving prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas drilling engineering technology, specifically to a formation pressure prediction method based on deep learning, and more particularly to a formation pressure prediction method and system based on parallel TCN-LSTM-Attention and adaptive updates during drilling. Background Technology

[0002] Formation pressure refers to the pressure exerted on fluids within formation pores and is one of the most important geological parameters in drilling engineering. Accurate prediction of formation pressure is crucial for preventing blowouts, lost circulation, and other complex downhole conditions, ensuring drilling safety, and improving drilling efficiency. Inaccurate formation pressure prediction can lead to improper drilling fluid density design, potentially triggering serious accidents such as overflows, well kicks, or even blowouts, resulting in significant economic losses and safety hazards. Especially under complex geological conditions such as deep water, deep formations, and unconventional oil and gas, formation pressure exhibits strong heterogeneity and nonlinear evolution characteristics, placing higher demands on the accuracy, real-time performance, and predictive capabilities of prediction methods.

[0003] Traditional formation pressure prediction methods primarily rely on empirical formulas and physical models, such as the equivalent depth method, Eaton method, and Bowers method. These methods predict formation pressure by establishing empirical relationships between logging parameters and formation pressure, but they suffer from drawbacks such as reliance on human experience, the need for repeated calibration of empirical coefficients, poor adaptability to different geological conditions, and the inability to assess the current drilling formation, failing to achieve advanced prediction. With the development of machine learning technology, methods such as support vector machines, random forests, and shallow neural networks have been applied to formation pressure prediction. However, these methods treat prediction as a static regression problem, ignoring the temporal characteristics of drilling data and the dynamic evolution of the drilling process, making it difficult to capture long-term dependencies in the data. In recent years, deep learning technology has made significant progress in the field of time series prediction. Long Short-Term Memory (LSTM) networks are widely used because they can capture long-term dependencies, and Temporal Convolutional Networks (TCNs) can efficiently extract multi-scale temporal features through causal convolution and dilated convolution. However, single LSTM models suffer from low computational efficiency and weak local feature extraction capabilities when processing long-sequence data, while single TCN models lack the ability to remember long-term dependencies.

[0004] Existing deep learning methods often employ a cascaded structure, such as first extracting features through a TCN and then inputting them into an LSTM for prediction, or processing them through an LSTM and then inputting them into a TCN. This cascaded architecture suffers from drawbacks such as unidirectional information transmission, potential loss or attenuation of features extracted by the previous module in subsequent transmissions, and increased training difficulty due to excessively deep model layers, failing to fully leverage the respective advantages of TCN and LSTM. Furthermore, existing methods typically use fixed model parameters, lacking adaptability to changes in drilling conditions. In actual drilling, changing the drill bit leads to changes in the drill bit diameter, which in turn affects the distribution characteristics of key parameters such as the d-index and mechanical drilling rate. Fixed models struggle to quickly adapt to new conditions, resulting in a significant decrease in prediction accuracy. Simultaneously, existing methods generally only achieve synchronous prediction of the currently encountered formation, failing to predict future formation pressure changes over a certain distance, limiting the practical application value of the prediction results in on-site early warning and decision support. Therefore, there is an urgent need for an intelligent formation pressure prediction method that can integrate the complementary advantages of TCN and LSTM, achieve parallel feature extraction, possess advanced prediction capabilities, and adapt to dynamic changes in drilling conditions. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method for predicting formation pressure while drilling based on parallel TCN-LSTM-Attention and adaptive updates. This invention also provides a formation pressure prediction system based on parallel TCN-LSTM-Attention and adaptive updates.

[0006] The technical solution of this invention is as follows: A method for predicting formation pressure while drilling based on parallel TCN-LSTM-Attention and adaptive updates includes: Step 1: Obtain multidimensional drilling data; smooth and denoise the preprocessed multidimensional drilling data, calculate the dynamic d-exponent, and generate pressure gradient features; construct feature standardization and sliding window datasets; Step 2: Based on the parallel TCN-LSTM-Attention architecture, construct a deep learning model for predicting formation pressure in advance by integrating local multidimensional features and long-term temporal dependencies; Step 3: Based on historical data from the early stages of drilling, pre-training is completed. Combined with the optimal sliding window mechanism, the formation pressure advance prediction deep learning model from Step 2 is used to perform online rolling multi-step advance prediction of formation pressure.

[0007] According to a preferred embodiment of the present invention, step 1, acquiring multidimensional drilling data, includes: Multi-source data, including logging parameters, engineering parameters, and auxiliary parameters, are acquired through the logging-while-drilling (MWD / LWD) system. Well logging parameters include natural gamma ray (GR), neutron porosity (TNPH), density (RHOB), and sonic transit time (DT). Engineering parameters include mechanical drilling rate (ROP), drilling weight (WOB), rotational speed (RPM), torque (Torque), and pump pressure (SPP). Auxiliary parameters include well depth, lithology, and formation pressure.

[0008] According to a preferred embodiment of the present invention, step 1 involves smoothing and denoising the preprocessed multidimensional drilling data, calculating the dynamic d-exponent, and generating pressure gradient features; including: The six parameters GR, ROP, WOB, DT, Torque, and SPP are smoothed using a 5-point moving average algorithm. The calculation formula is as follows: (1); In the formula, This represents the smoothed data value of the i-th depth point; The original data value; i is the index of the current depth point; Calculating the dynamic d-exponent includes: First, determine the drill bit diameter D based on the current well depth using a piecewise function: (2); In the formula, D is the current drill bit diameter, in inches; The diameter of the upper drill bit; The diameter of the lower drill bit; The unit for changing drill bit depth is meters; Then, the d-exponent is calculated based on the dynamic drill bit diameter. : (3); In the formula, Mechanical drilling rate, m / h; conversion factor. ; Rotational speed, in r / min; Drilling pressure, kN; conversion factor ; Drill bit diameter, in meters; conversion factor. ; Finally, a pressure gradient is used. As the training target, the calculation formula is: (4); In the formula, For the first Formation pressure at each sampling point, MPa; For the corresponding depth, m; the training phase of the deep learning model for formation pressure advance prediction, which integrates local multidimensional features and long-range temporal dependencies, is based on... For learning objectives; The generated pressure gradient characteristic refers to the pressure gradient g i .

[0009] According to a preferred embodiment of the present invention, a feature normalization and sliding window dataset is constructed, comprising: The lithological data (Lithology) is converted into numerical features (Lithology_Enc) using a label encoding method. A 12-dimensional input feature matrix X is constructed, including Depth, GR, TNPH, RHOB, DT, ROP, WOB, RPM, Torque, SPP, Lithology_Enc, and Z-score standardization is performed on the input feature matrix X and the target variable respectively: (5); In the formula, X is the standardized input feature matrix; X is the original input feature matrix. The mean vector of the input features; The standard deviation vector of the input features; Y is the standardized pressure gradient; Y is the original pressure gradient. , These are the mean and standard deviation of the pressure gradient, respectively; the standardization parameters are saved as scaler_x and scaler_y, which are used for the inverse standardization of the prediction results; A sliding window method is used to construct the time series dataset. The input window length is set to `input_len`, and the output prediction step size is `output_len`. For depth index `i`, the input sequence is the 12-dimensional features of consecutive depth points `input_len`, with shape `[input_len, 12]`. The output sequence is the pressure gradient of future depth points `output_len`, with shape `[output_len]`. For a data sequence of total length `L`, the number of valid samples generated is... ; After the above processing, a standardized time series dataset is generated, with the input feature tensor dimension being [N, 120, 12] and the target pressure gradient tensor dimension being [N, output_len].

[0010] According to a preferred embodiment of the present invention, the deep learning model for predicting formation pressure includes a parallel dual-channel feature extraction architecture, an attention mechanism, and an output layer; The parallel dual-channel feature extraction architecture includes a TCN branch and an LSTM branch, which simultaneously receives raw input data for feature extraction. The TCN branch is used to extract multi-scale local temporal features; the TCN branch adopts a 2-layer TemporalBlock stacked structure, each TemporalBlock including causal convolution, dilated convolution and residual connection; the dilation rate of the i-th layer is set to i=0,1, meaning the dilation rate of the first layer is 1, the dilation rate of the second layer is 2, the kernel size of each layer is set to 3, and the number of output channels is hidden_size; The LSTM branch is used to capture long-term temporal dependencies; the LSTM branch processes temporal feature tensors. The LSTM branch consists of two stacked LSTM structures, with each LSTM structure having a hidden number of units of the specified size. Dropout regularization is applied between layers, and the dropout rate is 0.2. The input data is the standardized temporal feature tensor. That is, the input feature tensor has the shape [Batch, Length, Features], where Batch is the batch size, Length is the time step length, and Features is the feature dimension; The attention mechanism takes the high-dimensional features concatenated from the TCN and LSTM branches as input, calculates the scores of each depth point at each time step through the fully connected network layer, normalizes them into attention weights by the Softmax function, and finally outputs the context vector Context through weighted aggregation. The output layer is a fully connected network. The input is a context vector generated by the attention mechanism. The number of output nodes is the same as the prediction step size output_len. It directly outputs the standardized formation pressure gradient prediction sequence corresponding to the future step size.

[0011] According to a preferred embodiment of the present invention, the TCN branch extracts multi-scale local temporal features; including: The input tensor is the time sequence feature tensor. Perform a dimension transformation from [Batch, Length, Features] to [Batch, Features, Length]; The calculation process for TemporalBlock is as follows: (6); In the formula, This is the output of the i-th TemporalBlock; and The TCN branch consists of two convolutional layers with weight normalization; Chomp is a pruning operation that removes right-side padding from the convolutions; ReLU is the activation function; Dropout is a regularization layer with a dropout rate of 0.1; the residual connection is implemented by adding the input x to the convolutional output, and a 1×1 convolution is used for channel matching when the number of input and output channels is inconsistent; the final output of the TCN branch is denoted as H. TCN The shape is [Batch, Length, hidden_size]; The LSTM branch selectively retains and forgets historical information through gating mechanisms at the input, forget, and output gates. The computation process is as follows: (7); (8); (9); (10); (11); (12); In the formula, For the Gate of Oblivion For input gate, For output gate, In cellular state, In hidden state, For the first The input feature vector of each depth point This is the hidden state from the previous depth step. This represents the state of memory cells at the previous moment. This represents the current state of the candidate cells. It is the Sigmoid activation function. The hyperbolic tangent activation function is used. It represents the Hadamah accumulation. and Here are the weight matrices and bias vectors for each gate; the final output of the LSTM branch is denoted as H. LSTM The shape is [Batch, Length, hidden_size].

[0012] According to a preferred embodiment of the present invention, attention mechanism fusion includes: Output the TCN branch and LSTM branch output By concatenating the features along the feature dimension, we obtain the fused features: (13); In the formula, The shape is [Batch, Length, 2×hidden_size], and [] represents tensor concatenation operation; An attention mechanism is used to weight and aggregate the fused features; the formula for calculating the attention weights is: (14); (15); (16); In the formula, Let be the fused feature vector at the i-th time step; The attention weight matrix maps 2×hidden_size dimensional features to scalars; tanh is the hyperbolic tangent activation function. Let be the attention score at the i-th time step; The attention weights after Softmax normalization satisfy... ; It refers to the natural exponential function; Context is the weighted aggregated context vector with shape [Batch, 2×hidden_size].

[0013] According to a preferred embodiment of the present invention, output layer prediction includes: The weighted aggregated context vector is mapped to the final pressure gradient prediction value through a fully connected layer. : (17); In the formula, The shape is [Batch, output_len]; The output weight matrix has dimensions [2×hidden_size, output_len]. The output bias vector is _output_len, which is the prediction step size.

[0014] According to a preferred embodiment of the present invention, pre-training of a deep learning model for predicting formation pressure is completed based on historical data from the initial stage of drilling; including: Set the initial training depth threshold When the drilling depth reaches the initial training depth threshold Initiate pre-training of a deep learning model for predicting formation pressure; construct a training dataset; The training process employs mini-batch gradient descent, with forward propagation, loss calculation, backpropagation, and parameter updates performed in batches until the preset number of rounds is completed. After training, the parameters of the deep learning model for predicting formation pressure are saved.

[0015] According to a preferred embodiment of the present invention, online rolling multi-step advance prediction includes: After pre-training, the deep learning model for formation pressure prediction enters the online prediction stage, using a sliding window approach to achieve advance prediction; the specific process is as follows: Initialize the current prediction depth index Execute the cyclic prediction process: First step, determine the termination condition: if If the prediction fails, the prediction ends; otherwise, continue. The second step is to extract the input data: trace back several meters from the current depth index and extract standardized feature data as the input sequence. ; The third step involves inference using a deep learning model for advanced prediction of formation pressure: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Input a trained deep learning model for formation pressure advance prediction, and perform forward propagation to obtain standardized pressure gradient predictions. The shape is [1, output_len]; Step 4, inverse standardization: Use the scaler_y saved in step 1 to perform an inverse transformation on the predicted pressure gradient value to obtain the true pressure gradient value. The specific calculation process of the inverse transform: using the saved mean pressure gradient μ Y and standard deviation σ Y That is, the scaler_y undergoes an inverse transformation, and the calculation formula is: This allows the pressure gradient value to be restored to its actual physical dimensions. Step 5, calculate the final pressure: extract the depth values ​​of the future output_len depth points. The final formation pressure is calculated by multiplying the pressure gradient by the depth. (18); In the formula, This represents the predicted formation pressure at future depths, in MPa. This represents the pressure gradient value, in MPa / m. This is the corresponding depth value vector, in meters; Step 6, Store the prediction results: Save the predicted pressure value and corresponding depth value to the results list; the predicted pressure value refers to... The corresponding depth value refers to Depth. future ; Step 7, Slide the window forward: Update the current depth index This advances the window by one prediction step. Step 8: Return to step 1 and continue the next round of predictions until the entire drilling depth range is covered.

[0016] According to a preferred embodiment of the present invention, an adaptive update strategy, including oscillation zone determination and data oversampling, is established based on the switching of working conditions during drilling, to perform real-time enhancement and fine-tuning of the parameters of the deep learning model for formation pressure advance prediction in step 2; including: Oscillation Zone Detection: By monitoring the distance between the current depth and the drill bit change depth, the system automatically determines whether the system has entered an oscillation zone. Set drill bit change depth to The oscillation zone has an impact range of 100%. For the current predicted depth, calculate the distance between the predicted depth and the drill bit replacement depth. When satisfied When the market is in a consolidation zone, an enhanced fine-tuning strategy is initiated. Data oversampling enhancement: After each advance prediction is completed, historical data is extracted to construct a fine-tuning dataset; Filter the dataset with a depth greater than or equal to [the specified value]. The data points are copied several times and then merged with the original fine-tuned dataset to form an enhanced training dataset; Layered fine-tuning parameter configuration mechanism: The training parameters are dynamically adjusted based on whether the system is in an oscillation zone. When the region is within the normal range (i.e., not in the oscillation zone): lightweight parameter updates are achieved; When the market is in a fluctuating range: increase the number of training rounds and increase the learning rate; Online fine-tuning execution: Fine-tuning of the formation pressure advance prediction deep learning model is performed immediately after each advance prediction is completed.

[0017] A formation pressure prediction system based on parallel TCN-LSTM-Attention and adaptive updates, including: The multidimensional drilling data acquisition module is configured to: smooth and denoise the preprocessed multidimensional drilling data, calculate the dynamic d-exponent, and generate pressure gradient features; and construct a feature standardization and sliding window dataset. The deep learning model building module for predicting formation pressure ahead is configured to: build a deep learning model for predicting formation pressure ahead based on a parallel TCN-LSTM-Attention architecture, which integrates local multidimensional features and long-term temporal dependencies. The multi-step advance prediction module is configured to: complete pre-training based on historical data from the early stages of drilling, and combine the optimal sliding window mechanism to use a deep learning model for formation pressure advance prediction to perform online rolling multi-step advance prediction of formation pressure.

[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention adopts a parallel TCN-LSTM-Attention architecture, where the TCN and LSTM branches process the original input features simultaneously, avoiding feature loss caused by the one-way transmission of information in a serial structure. It fully integrates local multi-scale features and long-term temporal dependencies, significantly improving prediction accuracy.

[0019] 2. This invention enables multi-step advance prediction of 10-30 meters, predicting the formation pressure change trend in advance before reaching the target drilling depth, providing a sufficient time window for on-site adjustment of drilling fluid density and well control decisions, and effectively preventing overflow and well leakage accidents.

[0020] 3. This invention establishes a triple adaptive update mechanism of oscillation zone determination, data oversampling, and hierarchical parameter configuration. After the operating conditions are switched, the model quickly adapts to the new data distribution, the prediction error of the oscillation zone is reduced by 31.9%, and the prediction performance of the entire well section is stable.

[0021] 4. This invention uses pressure gradient as the training target to eliminate the influence of absolute depth value, improve the model's generalization ability across depth ranges, and only requires 400 meters of initial data to start online prediction. Attached Figure Description

[0022] Figure 1 This is a block diagram of the formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive update in this invention. Figure 2 This is a schematic diagram showing the changes in drilling parameters and formation pressure with depth. Figure 3 This is a diagram illustrating the overall architecture of the deep learning model for predicting formation pressure in this invention. Figure 4 Comparison of predicted and actual formation pressure curves with different lead times; Figure 5 The diagram shows the effect of validating the adaptive update strategy. Detailed Implementation

[0023] The present invention will be further defined below with reference to the accompanying drawings and embodiments, but is not limited thereto.

[0024] Terminology Explanation: Logging while drilling (MWD / LWD) refers to a technical system that uses downhole instruments installed at the bottom of the drill string to measure wellbore trajectory parameters, formation physical parameters, and drilling engineering parameters in real time during the drilling process, and transmits the data to the surface in real time.

[0025] Example 1 A method for predicting formation pressure while drilling based on parallel TCN-LSTM-Attention and adaptive updates, such as Figure 1As shown, it includes: Step 1: Obtain multidimensional drilling data; smooth and denoise the preprocessed multidimensional drilling data, calculate the dynamic d-exponent, and generate pressure gradient features; construct feature standardization and sliding window datasets; Step 2: Based on the parallel TCN-LSTM-Attention architecture, construct a deep learning model for predicting formation pressure in advance by integrating local multidimensional features and long-term temporal dependencies; Step 3: Based on historical data from the early stages of drilling, pre-training is completed. Combined with the optimal sliding window mechanism, the formation pressure advance prediction deep learning model from Step 2 is used to perform online rolling multi-step advance prediction of formation pressure.

[0026] Example 2 The difference between the formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating described in Example 1 and the method described in Example 1 is as follows: Step 1 involves acquiring multidimensional drilling data, including: Multi-source data, including logging parameters, engineering parameters, and auxiliary parameters, are acquired through the logging-while-drilling (MWD / LWD) system. Well logging parameters include natural gamma ray (GR), neutron porosity (TNPH), density (RHOB), and sonic transit time (DT). Engineering parameters include mechanical drilling rate (ROP), drilling weight (WOB), rotational speed (RPM), torque (Torque), and pump pressure (SPP). Auxiliary parameters include well depth, lithology, and formation pressure.

[0027] The sampling interval was 1 meter. In one well example, the sampling depth ranged from 3110m to 4380m, with a total of 1270 sampling points. The drill bit was replaced at a depth of 4102m. The upper drill bit had a diameter of 16.0 inches, and the lower drill bit had a diameter of 12.25 inches.

[0028] In step 1, the preprocessed multidimensional drilling data is smoothed and denoised, the dynamic d-exponent is calculated, and pressure gradient features are generated; including: To eliminate high-frequency noise in the drilling data, a 5-point moving average algorithm was used to smooth the six parameters GR, ROP, WOB, DT, Torque, and SPP. The calculation formula is as follows: (1); In the formula, This represents the smoothed data value of the i-th depth point; `i` represents the original data value; `i` is the index of the current depth point; the summation range is two points before and after the current point, for a total of five points. For boundary data points, the average value is calculated using the actual existing data points.

[0029] Calculating the dynamic d-exponent includes: The d-index is an important parameter reflecting formation drillability and pressure characteristics, and its calculation needs to consider the dynamic changes in drill bit diameter. First, the drill bit diameter D is determined based on the current well depth using a piecewise function:

[0030] (2); In the formula, D is the current drill bit diameter, in inches; The diameter of the upper drill bit; The diameter of the lower drill bit; The depth for changing the drill bit is measured in meters; in a specific well example, inch, inch, rice.

[0031] Then, the d-exponent is calculated based on the dynamic drill bit diameter. : (3); In the formula, Mechanical drilling rate, m / h; conversion factor. ; Rotational speed, in r / min; Drilling pressure, kN; conversion factor ; Drill bit diameter, in meters; conversion factor. The infinite values ​​and non-numerical values ​​generated during the calculation process are replaced with the mean of the d-index of the well section, and the results are smoothed by a 3-point moving average.

[0032] Finally, to improve the model's generalization ability across depths, this invention employs a pressure gradient. Instead of using absolute stress as the training target, the calculation formula is: (4); In the formula, For the first Formation pressure at each sampling point, MPa; For the corresponding depth, m; the training phase of the deep learning model for formation pressure advance prediction, which integrates local multidimensional features and long-range temporal dependencies, is based on... The learning objective is pressure gradient; it eliminates the influence of absolute depth and allows the model to focus on pressure changes caused by geological factors.

[0033] The generated pressure gradient characteristic refers to the pressure gradient g i It reflects the rate of change of formation pressure per unit depth and is used to replace the absolute value of formation pressure as the learning target variable of the model.

[0034] Construct a feature-normalized and sliding window dataset; including: A label encoding method is used to convert lithological data (Lithology) into numerical features (Lithology_Enc). The specific conversion process involves assigning a unique integer index (e.g., mudstone, sandstone, siltstone, etc.) to each discrete lithological category (e.g., mudstone is coded as 1, sandstone as 2). The final converted numerical feature (Lithology_Enc) is a one-dimensional integer sequence representing the specific lithological category corresponding to each depth point. A 12-dimensional input feature matrix X is constructed, including Depth, GR, TNPH, RHOB, DT, ROP, WOB, RPM, Torque, SPP, Lithology_Enc, and... To eliminate differences in the dimensions of different features, the input feature matrix X and the target variable (i.e., the pressure gradient g) are compared. i Perform Z-score standardization separately:

[0035] (5); In the formula, X is the standardized input feature matrix; X is the original input feature matrix. The mean vector of the input features; The standard deviation vector of the input features; Y is the standardized pressure gradient; Y is the original pressure gradient. , These are the mean and standard deviation of the pressure gradient, respectively; the standardized parameter (referring to the mean vector μ of the input features calculated during the standardization process)... X , standard deviation vector σ X and the mean value of the pressure gradient μ Y Standard deviation σ Y Save them as scaler_x and scaler_y for destandardization of the prediction results; A sliding window method is used to construct the time series dataset. The input window length is set to `input_len` (in meters), and the output prediction step size is set to `output_len` (in meters). For depth index `i`, the input sequence is a 12-dimensional feature of consecutive depth points `input_len`, with shape `[input_len, 12]`. The output sequence is the pressure gradient of future depth points `output_len`, with shape `[output_len]`. In a certain well embodiment, `input_len` is set to 120 meters, and `output_len` can be selected as 10 meters, 20 meters, or 30 meters, corresponding to different lead prediction distances. For a data sequence of total length `L`, the number of valid samples generated is... ;

[0036] After the above processing, a standardized time-series dataset is generated, with the input feature tensor dimension [N, 120, 12] and the target pressure gradient tensor dimension [N, output_len]. This meets the input format requirements of deep learning models, providing a data foundation for subsequent model training and online prediction.

[0037] like Figure 3 As shown, (a) is the overall architecture diagram of the parallel TCN-LSTM-Attention model, (b) is the internal structure diagram of the Temporal Block, and (c) is the structure diagram of the Long Short-Term Memory (LSTM) unit. The deep learning model for predicting formation pressure includes a parallel dual-channel feature extraction architecture, an attention mechanism, and an output layer. The parallel dual-channel feature extraction architecture adopts a parallel architecture instead of the traditional serial structure, including TCN branch and LSTM branch, and simultaneously receives the original input data for feature extraction; thus avoiding the feature loss problem caused by the one-way information transmission in the serial architecture.

[0038] The TCN branch is used to extract multi-scale local temporal features. The TCN branch employs a stacked structure of two TemporalBlock layers (an existing architecture where TemporalBlock is a classic foundational module of existing Temporal Convolutional Networks (TCNs)). Each TemporalBlock layer includes causal convolutions, dilated convolutions, and residual connections. The dilation rate of the i-th layer is set to... i=0,1, meaning the dilation rate of the first layer is 1 and the dilation rate of the second layer is 2, allowing the network to have receptive fields of different scales. The kernel size of each layer is set to 3, and the number of output channels is hidden_size (64 in a certain implementation).

[0039] The LSTM branch is used to capture long-term temporal dependencies; the LSTM branch processes temporal feature tensors. The LSTM branch includes a 2-layer stacked LSTM structure (an existing architecture, which is the basic structure of the existing Long Short-Term Memory network). The number of hidden units in each LSTM structure is hidden_size. Dropout regularization is set between layers, and the dropout rate is 0.2. The input data is the standardized temporal feature tensor. The input feature tensor has the shape [Batch, Length, Features], where Batch is the batch size, Length is the time step length (120 meters), and Features is the feature dimension (12 dimensions). The attention mechanism takes high-dimensional features concatenated from TCN and LSTM branches as input, calculates the scores of each depth point at each time step through a fully connected network layer, and normalizes them into attention weights by the Softmax function. Finally, it outputs the context vector Context through weighted aggregation. The attention mechanism can adaptively evaluate the importance of different depth data in the historical window to future predictions, give higher weights to key strata mutation points, and improve the model's sensitivity to abnormal strata pressure.

[0040] The output layer is a fully connected network (linear mapping layer). The input is the context vector Context generated by the attention mechanism. The number of output nodes is the same as the prediction step size output_len. It maps and restores the high-dimensional abstract features to the specific physical target space and directly outputs the standardized formation pressure gradient prediction sequence corresponding to the future step size (10 meters, 20 meters or 30 meters).

[0041] TCN branch extracts multi-scale local temporal features; including: The input tensor is the time sequence feature tensor. Perform a dimensionality transformation from [Batch, Length, Features] to [Batch, Features, Length] to accommodate convolution operations.

[0042] The calculation process for TemporalBlock is as follows: (6); In the formula, This is the output of the i-th TemporalBlock; and The TCN branch consists of two convolutional layers with weight normalization. Chomp is used to remove right-side padding from the convolutions to ensure causality. ReLU is the activation function. Dropout is a regularization layer with a dropout rate of 0.1. Residual connections are implemented by adding the input x to the convolutional output; when the number of input and output channels is inconsistent, a 1×1 convolution is used for channel matching. The final output of the TCN branch is denoted as H. TCN The shape is [Batch, Length, hidden_size]; The LSTM branch selectively retains and forgets historical information through gating mechanisms at the input, forget, and output gates. The computation process is as follows: (7); (8); (9); (10); (11); (12); In the formula, For the Gate of Oblivion For input gate, For output gate, In cellular state, In hidden state, For the first The input feature vector of each depth point This is the hidden state from the previous depth step. This represents the state of memory cells at the previous moment. This represents the current state of the candidate cells. It is the Sigmoid activation function. The hyperbolic tangent activation function is used. It represents the Hadamah accumulation. and Here are the weight matrices and bias vectors for each gate; the final output of the LSTM branch is denoted as H. LSTM The shape is [Batch, Length, hidden_size].

[0043] Attention mechanism fusion; including: Output the TCN branch and LSTM branch output By concatenating the features along the feature dimension, we obtain the fused features: (13); In the formula, The shape is [Batch, Length, 2×hidden_size], and [] represents tensor concatenation operation; To adaptively assign importance weights to features at different time steps, an attention mechanism is used to weighted aggregate the fused features; the formula for calculating the attention weight is: (14); (15); (16); In the formula, Let be the fused feature vector at the i-th time step; is the attention weight matrix, which maps 2×hidden_size dimensional features to scalars; tanh is the hyperbolic tangent activation function; and is a commonly used nonlinear function in deep learning.

[0044] Let be the attention score at the i-th time step; The attention weights after Softmax normalization satisfy... ; This refers to the natural exponential function; that is, an exponential function with the natural constant e (≈2.71828) as its base. Context is a weighted aggregated context vector with the shape [Batch, 2×hidden_size].

[0045] Output layer prediction; including: The weighted aggregated context vector is mapped to the final pressure gradient prediction value through a fully connected layer. : (17); In the formula, The shape is [Batch, output_len]; The output weight matrix has dimensions [2×hidden_size, output_len]. This is the output bias vector; output_len is the prediction step size. It can be 10, 20, or 30, corresponding to the pressure gradient prediction over the next 10, 20, or 30 meters.

[0046] The deep learning model for predicting formation pressure uses Mean Squared Error (MSE) as the loss function, the Adam algorithm as the optimizer, and a learning rate of 0.001. Model parameters are updated via backpropagation. For parameter initialization, convolutional layer weights are initialized using a normal distribution with a mean of 0 and a standard deviation of 0.01, while LSTM layers use the default Xavier initialization.

[0047] Pre-training of a deep learning model for predicting formation pressure was completed based on historical data from the early stages of drilling; including: Set the initial training depth threshold When the drilling depth reaches the initial training depth threshold Initiate pre-training of a deep learning model for predicting formation pressure at the specified time; in a certain well embodiment, The training dataset is constructed using data from a depth range of 3110m to 3510m. The standardized data from this depth range is used to construct the training dataset according to the method in step 1; the input window length is 120 meters, and the output prediction step size is selected as 10 meters, 20 meters, or 30 meters.

[0048] The model was trained using mini-batch gradient descent with a batch size of 32 and 60 training epochs. The Adam algorithm was used as the optimizer with a learning rate of 0.001. The training process involved batch-wise forward propagation, loss calculation, backpropagation, and parameter updates until the preset number of epochs was completed. Specifically, historical data was divided into multiple batches. In each training epoch, forward propagation was used to calculate the predicted pressure gradient for the current batch. The MSE loss function was used to calculate the error between the predicted value and the actual pressure gradient label. Then, the error gradient was calculated using backpropagation, and the Adam optimizer updated the network layer weights. This process was repeated batch-wise and epoch-wise until the preset 60 epochs were reached, allowing the model to fully converge on the data from the initial drilling phase and saving the parameters. After training, the parameters of the deep learning model for formation pressure prediction were saved for subsequent online prediction.

[0049] Online rolling multi-step forward prediction; including: After pre-training, the deep learning model for formation pressure prediction enters the online prediction stage, using a sliding window approach to achieve advance prediction; the specific process is as follows: Initialize the current prediction depth index (400 meters), perform a cyclic prediction process: First step, determine the termination condition: if If the total data length reaches 1270 meters, the prediction ends; otherwise, continue. The second step is to extract the input data: backtrack several meters (120 meters) from the current depth index and extract standardized feature data as the input sequence. The shape is [1, 120, 12].

[0050] The third step involves inference using a deep learning model for advanced prediction of formation pressure: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Input a trained deep learning model for formation pressure advance prediction, and perform forward propagation to obtain standardized pressure gradient predictions. The shape is [1, output_len]; Step 4, inverse standardization: Use the scaler_y saved in step 1 to perform an inverse transformation on the predicted pressure gradient value to obtain the true pressure gradient value. The specific calculation process of the inverse transform: using the saved mean pressure gradient μ Y and standard deviation σ Y That is, the scaler_y undergoes an inverse transformation, and the calculation formula is: This allows us to reconstruct the actual pressure gradient value with real physical dimensions (MPa / m); Step 5, calculate the final pressure: extract the depth values ​​of the future output_len depth points. Depthfuture This refers to the known depth data corresponding to the predicted target location. When constructing the sliding window dataset, each input sequence X corresponds to a target sequence Y with future depths of `output_len`, and the corresponding depth value sequence is known (from the `Depth` column of the original data). During online prediction, when the input sequence X... pred Once determined, the depth values ​​(Depth) for the corresponding future output_len depth points. future It is also simultaneously identified and extracted, and the final formation pressure is calculated by multiplying the pressure gradient by the depth:

[0051] (18); In the formula, This represents the predicted formation pressure at future depths, in MPa. This represents the pressure gradient value, in MPa / m. This is the corresponding depth value vector, in meters; Step 6, Store the prediction results: Save the predicted pressure value and corresponding depth value to the results list; the predicted pressure value refers to... The corresponding depth value refers to Depth. future ; Step 7, Slide the window forward: Update the current depth index This advances the window by one prediction step. Step 8: Return to step 1 and continue the next round of predictions until the entire drilling depth range is covered.

[0052] Through the aforementioned rolling prediction mechanism, the model starts from the initial training depth and predicts the formation pressure at the next 10, 20, or 30 meters each time. Then, the window advances by the corresponding distance to achieve advanced prediction of unexplored depths, providing early warning time for on-site decision-making.

[0053] The sliding window length is a key parameter affecting prediction performance. This invention experimentally determined recommended window lengths for different prediction step sizes: a 90-meter window is recommended for a 10-meter prediction step size, a 120-meter window for a 20-meter prediction step size, and a 150-meter window for a 30-meter prediction step size. In a specific well implementation case, a 120-meter window was uniformly used for all three prediction step sizes. This configuration ensures both prediction accuracy and computational efficiency.

[0054] After online prediction is completed, the prediction results are compared with the actual formation pressure, and the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination are calculated. Evaluate predictive performance: (19); (20); (twenty one); In the formula, To assess the sample size, and The first The actual formation pressure and the predicted formation pressure at each sampling point This represents the average of the actual pressure.

[0055] Based on the changing working conditions during drilling, an adaptive update strategy including oscillation zone identification and data oversampling is established to perform real-time enhancement and fine-tuning of the parameters of the deep learning model for formation pressure advance prediction in step 2; including: Oscillation Zone Determination: Changing drill bits alters the drill bit diameter, affecting the distribution characteristics of key parameters such as the d-index and mechanical drilling speed. This invention automatically determines whether an area has entered an oscillation zone by monitoring the distance between the current depth and the depth at which the drill bit was changed.

[0056] Set drill bit change depth to The oscillation zone has an impact range of 100%. For the current predicted depth, calculate the distance between the predicted depth and the drill bit replacement depth. When satisfied When the well is in a oscillation zone, an enhanced fine-tuning strategy is initiated; in a certain well embodiment, rice, Meters, that is, performing enhanced adaptive updates within the depth range of 4102m to 4252m.

[0057] Data oversampling enhancement: After each forward prediction, historical data is extracted to construct a fine-tuning dataset; a fixed backtracking distance of 350 meters is set, and data is extracted by backtracking this distance from the current prediction position. When the model is determined to be in an oscillation zone, in order to enhance the model's ability to learn new operating conditions, the data of the new operating conditions after changing the drill bit are oversampled.

[0058] Filter the dataset with a depth greater than or equal to [the specified value]. The data points (4102m) were copied several times (5 times) and merged with the original fine-tuning dataset to form an enhanced training dataset. This oversampling strategy significantly increased the number of times the model learned from new working condition samples during the fine-tuning process, accelerating the model's adaptation speed to changes in drill bit diameter.

[0059] Layered fine-tuning parameter configuration mechanism: The training parameters are dynamically adjusted based on whether the system is in an oscillation zone. When the region is in the normal range (not in the oscillation zone): the number of training rounds is set to 5, and the learning rate is set to 0.001, consistent with the initial training, to achieve lightweight parameter updates; When the range is oscillating (4102-4252m): increase the number of training rounds and increase the learning rate; The number of training epochs was increased to 50, and the learning rate was increased to 0.004. The number of training epochs was increased by 10 times, the learning rate by 4 times, and the overall training intensity was increased by approximately 40 times, enabling the model to make more thorough parameter adjustments within the oscillation zone and quickly adapt to changes in data distribution.

[0060] Dynamic adjustment of the learning rate is achieved by modifying the optimizer parameter set. Before each fine-tuning, the appropriate training parameter configuration is selected based on the current region (normal region or oscillation region).

[0061] Online fine-tuning execution: Fine-tuning of the deep learning model for formation pressure forecasting is performed immediately after each forecast. A sliding window of training samples is constructed based on the fine-tuning dataset, with the input window length maintained at 120 meters. To adapt to changes in the size of the fine-tuning dataset, the batch size is dynamically adjusted: set to 16 when the number of samples is greater than 16, and 4 otherwise. Fine-tuning training executes forward propagation, loss calculation, backpropagation, and parameter updates batch by batch, completing after a preset number of iterations. The updated model parameters are immediately used for the next forecast, achieving real-time online parameter updates.

[0062] The data summary of this embodiment is as follows: This invention is fully verified using a certain well as an example. The well depth ranges from 3110m to 4380m, with an effective data length of 1270 meters and a sampling interval of 1 meter. The drill bit was replaced at a depth of 4102m, with a 16.0-inch drill bit used in the upper section and a 12.25-inch drill bit used in the lower section. Figure 2 The data show the changes in drilling parameters and formation pressure with depth. The data exhibits obvious nonlinear characteristics and time-series correlation, with significant step changes in engineering parameters at the depth where the drill bit is changed.

[0063] The multi-step look-ahead prediction results are as follows: The model was initially trained using the first 400 meters of data (3110-3510m), and online look-ahead prediction was performed starting from a depth of 400 meters. The performance of prediction step sizes of 10 meters, 20 meters, and 30 meters was verified. The training parameters were set as follows: batch size 32, number of training epochs 60, learning rate 0.001, and input window 120 meters.

[0064] The prediction results are shown in Table 1. Table 1. Comparison of prediction performance with different lead steps; As shown in Table 1, the determination coefficients of the three prediction step sizes are all greater than 0.94, and the root mean square error is less than 1.45 MPa, which meets the accuracy requirements for engineering applications. Figure 4 The results of three different prediction step sizes are compared with the actual pressure curves. Figure 4(a) in the figure is a comparison chart of prediction results 10 meters ahead. Figure 4 (b) in the figure is a comparison chart of prediction results 20 meters ahead. Figure 4 (c) in the figure is a comparison of the prediction results 30 meters ahead; the prediction curve can accurately track the changing trend of the actual pressure and can also capture pressure anomalies well at the point of sudden change in pressure gradient.

[0065] Validation of the adaptive update strategy: To verify the effectiveness of the adaptive update strategy, a control experiment was set up: the control group used fixed model parameters and did not perform online fine-tuning, while the experimental group used the complete adaptive update strategy.

[0066] Taking a 30-meter advance prediction as an example, within the oscillation zone (4102-4252m) after drill bit replacement, the control group's... MPa; experimental group MPa, the root mean square error was reduced by 31.9%.

[0067] Figure 5 The study compared the prediction performance before and after a drill bit change with and without an adaptive strategy. In the control group, the predicted curve deviated significantly from the actual curve after the drill bit change at a depth of 4102m, and the error increased sharply. In contrast, the experimental group quickly adapted to the new working conditions using an adaptive update strategy, and the predicted curve remained closely aligned with the actual curve even within the oscillation zone, verifying the effectiveness of the adaptive strategy during working condition switching.

[0068] Example 3 A formation pressure prediction system based on parallel TCN-LSTM-Attention and adaptive updates, including: The multidimensional drilling data acquisition module is configured to: smooth and denoise the preprocessed multidimensional drilling data, calculate the dynamic d-exponent, and generate pressure gradient features; and construct a feature standardization and sliding window dataset. The deep learning model building module for predicting formation pressure ahead is configured to: build a deep learning model for predicting formation pressure ahead based on a parallel TCN-LSTM-Attention architecture, which integrates local multidimensional features and long-term temporal dependencies. The multi-step advance prediction module is configured to: complete pre-training based on historical data from the early stage of drilling, combine with the optimal sliding window mechanism, and use the formation pressure advance prediction deep learning model in step 2 to perform online rolling multi-step advance prediction of formation pressure.

Claims

1. A method for predicting formation pressure while drilling based on parallel TCN-LSTM-Attention and adaptive updating, characterized in that, include: Step 1: Obtain multidimensional drilling data; The preprocessed multidimensional drilling data is smoothed and denoised, the dynamic d-exponent is calculated, and pressure gradient features are generated; a feature standardization and sliding window dataset is constructed; the pressure gradient feature is the pressure gradient. Step 2: Based on the parallel TCN-LSTM-Attention architecture, construct a deep learning model for predicting formation pressure in advance, which integrates local multidimensional features and long-term temporal dependencies; the training phase of the deep learning model for predicting formation pressure in advance, which integrates local multidimensional features and long-term temporal dependencies, takes the pressure gradient as the learning objective. The deep learning model for predicting formation pressure includes a parallel dual-channel feature extraction architecture, an attention mechanism, and an output layer. The parallel dual-channel feature extraction architecture includes a TCN branch and an LSTM branch, which simultaneously receives raw input data for feature extraction. The TCN branch is used to extract multi-scale local temporal features; The TCN branch uses a two-layer TemporalBlock stacked structure. Each TemporalBlock layer includes causal convolution, dilated convolution, and residual connections; the dilation rate of the i-th layer is set to... i=0,1, meaning the dilation rate of the first layer is 1, the dilation rate of the second layer is 2, the kernel size of each layer is set to 3, and the number of output channels is hidden_size; The LSTM branch is used to capture long-term temporal dependencies; the LSTM branch processes temporal feature tensors. The LSTM branch consists of two stacked LSTM structures, with each LSTM structure having a hidden number of units of the specified size. Dropout regularization is applied between layers, and the dropout rate is 0.

2. The input data is the standardized temporal feature tensor. That is, the input feature tensor has the shape [Batch, Length, Features], where Batch is the batch size, Length is the time step length, and Features is the feature dimension; The attention mechanism takes the high-dimensional features concatenated from the TCN and LSTM branches as input, calculates the scores of each depth point at each time step through the fully connected network layer, normalizes them into attention weights by the Softmax function, and finally outputs the context vector Context through weighted aggregation. The output layer is a fully connected network. The input is a context vector generated by the attention mechanism. The number of output nodes is the same as the prediction step size output_len. It directly outputs the standardized formation pressure gradient prediction sequence corresponding to the future step size. Step 3: Based on historical data from the early stages of drilling, pre-training is completed. Combined with the optimal sliding window mechanism, the formation pressure advance prediction deep learning model from Step 2 is used to perform online rolling multi-step advance prediction of formation pressure. The method further includes: establishing an adaptive update strategy that includes oscillation zone determination and data oversampling based on the working condition switching during drilling, and performing real-time enhancement and fine-tuning of the parameters of the deep learning model for formation pressure advance prediction in step 2; including: Oscillation Zone Detection: By monitoring the distance between the current depth and the drill bit change depth, the system automatically determines whether the system has entered an oscillation zone. Set drill bit change depth to The oscillation zone affects the following area: For the current predicted depth, calculate the distance between the predicted depth and the drill bit replacement depth. When satisfied When the market is in a consolidation zone, an enhanced fine-tuning strategy is initiated. Data oversampling enhancement: After each advance prediction is completed, historical data is extracted to construct a fine-tuning dataset; Filter the dataset with a depth greater than or equal to [the specified value]. The data points are copied several times and then merged with the original fine-tuned dataset to form an enhanced training dataset; Layered fine-tuning parameter configuration mechanism: The training parameters are dynamically adjusted based on whether the system is in an oscillation zone. When the area is within the normal range (i.e., not in the oscillation zone): lightweight parameter updates are achieved; When the market is in a fluctuating range: increase the number of training rounds and increase the learning rate; Online fine-tuning execution: Fine-tuning of the formation pressure advance prediction deep learning model is performed immediately after each advance prediction is completed.

2. The formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in claim 1, characterized in that, Step 1 involves acquiring multidimensional drilling data, including: Multi-source data, including logging parameters, engineering parameters, and auxiliary parameters, are acquired through the logging-while-drilling (MWD / LWD) system. Well logging parameters include natural gamma ray (GR), neutron porosity (TNPH), density (RHOB), and sonic transit time (DT). Engineering parameters include mechanical drilling rate (ROP), drilling weight (WOB), rotational speed (RPM), torque (Torque), and pump pressure (SPP). Auxiliary parameters include well depth, lithology, and formation pressure. In step 1, the preprocessed multidimensional drilling data is smoothed and denoised, the dynamic d-exponent is calculated, and pressure gradient features are generated; including: The six parameters GR, ROP, WOB, DT, Torque, and SPP are smoothed using a 5-point moving average algorithm. The calculation formula is as follows: (1); In the formula, This represents the smoothed data value of the i-th depth point; The original data value; i is the index of the current depth point; Calculating the dynamic d-exponent includes: First, determine the drill bit diameter D based on the current well depth using a piecewise function: (2); In the formula, D is the current drill bit diameter, in inches; The diameter of the upper drill bit; The diameter of the lower drill bit; The unit for changing drill bit depth is meters; Then, the d-exponent is calculated based on the dynamic drill bit diameter. : (3); In the formula, Mechanical drilling rate, m / h; conversion factor. ; Rotational speed, in r / min; Drilling pressure, kN; conversion factor ; Drill bit diameter, in meters; conversion factor. ; Finally, a pressure gradient is used. As the training target, the calculation formula is: (4); In the formula, For the first Formation pressure at each sampling point, MPa; For the corresponding depth, m; the training phase of the deep learning model for formation pressure advance prediction, which integrates local multidimensional features and long-range temporal dependencies, is based on... For learning objectives; The generated pressure gradient characteristic refers to the pressure gradient g i .

3. The formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in claim 2, characterized in that, Construct a feature-normalized and sliding window dataset; including: The lithological data (Lithology) is converted into numerical features (Lithology_Enc) using a label encoding method. A 12-dimensional input feature matrix X is constructed, including Depth, GR, TNPH, RHOB, DT, ROP, WOB, RPM, Torque, SPP, Lithology_Enc, and Z-score standardization is performed on the input feature matrix X and the target variable respectively: (5); In the formula, X is the standardized input feature matrix; X is the original input feature matrix. The mean vector of the input features; The standard deviation vector of the input features; Y is the standardized pressure gradient; Y is the original pressure gradient. , These are the mean and standard deviation of the pressure gradient, respectively; the standardization parameters are saved as scaler_x and scaler_y, which are used for the inverse standardization of the prediction results; A sliding window method is used to construct the time series dataset. The input window length is set to `input_len`, and the output prediction step size is `output_len`. For depth index `i`, the input sequence is the 12-dimensional features of consecutive depth points `input_len`, with shape `[input_len, 12]`. The output sequence is the pressure gradient of future depth points `output_len`, with shape `[output_len]`. For a data sequence of total length `L`, the number of valid samples generated is... ; After the above processing, a standardized time series dataset is generated, with the input feature tensor dimension being [N, 120, 12] and the target pressure gradient tensor dimension being [N, output_len].

4. The formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in claim 3, characterized in that, TCN branch extracts multi-scale local temporal features; including: The input tensor is the time sequence feature tensor. Perform a dimension transformation, converting from [Batch, Length, Features] to [Batch, Features, Length]; The calculation process for TemporalBlock is as follows: (6); In the formula, This is the output of the i-th TemporalBlock; and The TCN branch consists of two convolutional layers with weight normalization; Chomp is a pruning operation that removes right-side padding from the convolutions; ReLU is the activation function; Dropout is a regularization layer with a dropout rate of 0.1; the residual connection is implemented by adding the input x to the convolutional output, and a 1×1 convolution is used for channel matching when the number of input and output channels is inconsistent; the final output of the TCN branch is denoted as H. TCN The shape is [Batch, Length, hidden_size]; The LSTM branch selectively retains and forgets historical information through gating mechanisms at the input, forget, and output gates. The computation process is as follows: (7); (8); (9); (10); (11); (12); In the formula, For the Gate of Oblivion For input gate, For output gate, In cellular state, In hidden state, For the first The input feature vector of each depth point This is the hidden state from the previous depth step. This represents the state of memory cells from the previous moment. This represents the current state of the candidate cells. It is the Sigmoid activation function. The hyperbolic tangent activation function is used. It represents the Hadamah accumulation. and Here are the weight matrices and bias vectors for each gate; the final output of the LSTM branch is denoted as H. LSTM The shape is [Batch, Length, hidden_size].

5. The formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in claim 3, characterized in that, Attention mechanism fusion; including: Output the TCN branch and LSTM branch output By concatenating the features along the feature dimension, we obtain the fused features: (13); In the formula, The shape is [Batch, Length, 2×hidden_size], and [] represents tensor concatenation operation; An attention mechanism is used to weight and aggregate the fused features; the formula for calculating the attention weights is: (14); (15); (16); In the formula, Let be the fused feature vector at the i-th time step; The attention weight matrix maps 2×hidden_size dimensional features to scalars; tanh is the hyperbolic tangent activation function. Let be the attention score at the i-th time step; The attention weights after Softmax normalization satisfy... ; This refers to the natural exponential function; Context is the weighted aggregated context vector with shape [Batch, 2×hidden_size]; Output layer prediction; including: The weighted aggregated context vector is mapped to the final pressure gradient prediction value through a fully connected layer. : (17); In the formula, The shape is [Batch, output_len]; The output weight matrix has dimensions [2×hidden_size, output_len]. The output bias vector is _output_len, which is the prediction step size.

6. The formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in claim 1, characterized in that, Pre-training of a deep learning model for predicting formation pressure was completed based on historical data from the early stages of drilling; including: Set the initial training depth threshold When the drilling depth reaches the initial training depth threshold Initiate pre-training of a deep learning model for predicting formation pressure; construct a training dataset; The training process employs mini-batch gradient descent, with forward propagation, loss calculation, backpropagation, and parameter updates performed in batches until the preset number of rounds is completed. After training, the parameters of the deep learning model for predicting formation pressure are saved.

7. The formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in claim 3, characterized in that, Online rolling multi-step forward prediction; including: After pre-training, the deep learning model for formation pressure prediction enters the online prediction stage, using a sliding window approach to achieve advance prediction; the specific process is as follows: Initialize the current prediction depth index Execute the cyclic prediction process: First step, determine the termination condition: if If the prediction fails, the prediction ends; otherwise, continue. The second step is to extract the input data: trace back several meters from the current depth index and extract standardized feature data as the input sequence. ; The third step involves inference using a deep learning model for advanced prediction of formation pressure: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Input a trained deep learning model for formation pressure advance prediction, and perform forward propagation to obtain standardized pressure gradient predictions. The shape is [1, output_len]; Step 4, inverse standardization: Use the scaler_y saved in step 1 to perform an inverse transformation on the predicted pressure gradient value to obtain the true pressure gradient value. The specific calculation process of the inverse transform: using the saved mean pressure gradient μ Y and standard deviation σ Y That is, the scaler_y undergoes an inverse transformation, and the calculation formula is: This allows the pressure gradient value to be restored to its actual physical dimensions. Step 5, calculate the final pressure: extract the depth values ​​of the future output_len depth points. The final formation pressure is calculated by multiplying the pressure gradient by the depth. (18); In the formula, This represents the predicted formation pressure at future depths, in MPa. This represents the pressure gradient value, in MPa / m. This is the corresponding depth value vector, in meters; Step 6, Store the prediction results: Save the predicted pressure value and corresponding depth value to the results list; the predicted pressure value refers to... The corresponding depth value refers to Depth. future ; Step 7, Slide the window forward: Update the current depth index This advances the window by one prediction step. Step 8: Return to step 1 and continue the next round of predictions until the entire drilling depth range is covered.

8. A formation pressure prediction system based on parallel TCN-LSTM-Attention and adaptive updating, used to implement the formation pressure prediction method based on parallel TCN-LSTM-Attention and adaptive updating as described in any one of claims 1-7, characterized in that, include: The multidimensional drilling data acquisition module is configured to: smooth and denoise the preprocessed multidimensional drilling data, calculate the dynamic d-exponent, and generate pressure gradient features; and construct a feature standardization and sliding window dataset. The deep learning model building module for predicting formation pressure ahead is configured to: build a deep learning model for predicting formation pressure ahead based on a parallel TCN-LSTM-Attention architecture, which integrates local multidimensional features and long-term temporal dependencies. The multi-step advance prediction module is configured to: complete pre-training based on historical data from the early stages of drilling, and combine the optimal sliding window mechanism to use a deep learning model for formation pressure advance prediction to perform online rolling multi-step advance prediction of formation pressure.

Citation Information

Patent Citations

  • Drilling overflow prediction combination model based on deep learning and model timely silent updating and transfer learning method

    CN117171700A

  • Unsupervised GAN-based intrusion detection system using temporal convolutional networks, self-attention, and transformers

    WO2022259125A1