A method and system for intelligent prediction of a well trajectory

By preprocessing multi-source heterogeneous drilling data and using the dynamic scale adaptation mechanism and gated attention fusion of the improved iTransformer model, the problem of low drilling trajectory prediction accuracy in complex formations is solved, and efficient and stable well trajectory prediction in complex formations is achieved.

CN121502695BActive Publication Date: 2026-04-28XI'AN PETROLEUM UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XI'AN PETROLEUM UNIVERSITY
Filing Date
2026-01-13
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing drilling trajectory prediction methods have low accuracy and poor adaptability in complex formations, making it difficult to achieve real-time, adaptive, and accurate predictions. In particular, they cannot meet the requirements for trajectory prediction accuracy and drilling efficiency in deep, ultra-deep, low-permeability, and unconventional oil and gas reservoirs.

Method used

A drilling trajectory intelligent prediction method is adopted. By preprocessing multi-source heterogeneous drilling data, a dynamic scale adaptive mechanism is established. Combined with an improved iTransformer model and a gated attention fusion layer, multi-scale local features and global correlation features are extracted and weighted fusion is performed to generate wellbore trajectory prediction results.

Benefits of technology

It improves the accuracy and stability of trajectory prediction under complex formation conditions, strengthens the modeling of multi-parameter coupling relationships on a global scale, adapts to the extraction of features at different scales, enhances the prediction capability under complex working conditions, and achieves efficient wellbore trajectory prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502695B_ABST
    Figure CN121502695B_ABST
Patent Text Reader

Abstract

The application discloses a drilling trajectory intelligent prediction method and system, and belongs to the technical field of oil and gas drilling. First, multi-source heterogeneous drilling data is collected and preprocessed. Then, a dynamic scale adaptive mechanism is used to capture local detail features from transient anomalies to macro trends in parallel from multi-source heterogeneous data such as while-drilling parameters and formation information, and to extract local trajectory features of different space-time scales. Then, an improved iTransformer model is used to regard the above features as a whole sequence, learn global correlation features of the well section, and finally use a powerful self-attention mechanism to dynamically mine and fuse deep and global dependency relationships between different source features. Through a gated attention fusion layer, weighted fusion of local and global features is realized, and finally, accurate prediction of the drilling trajectory under complex formations is realized, thereby providing technical support for safe and efficient drilling of directional wells and horizontal wells.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of oil and gas drilling technology, and in particular to a method and system for intelligent prediction of drilling trajectory. Background Technology

[0002] In rotary steerable drilling, well trajectory prediction is a core technology for achieving precision drilling, and its accuracy directly determines the success rate, economic benefits, and safety of drilling operations. Accurate trajectory prediction can significantly improve reservoir encounter rates, not only providing support for precise control of the well trajectory but also ensuring the safety of drilling operations from a technical perspective.

[0003] Currently, global oil and gas exploration is moving towards deeper and ultra-deeper reservoirs, low-permeability areas, and unconventional methods, posing significant challenges to drilling trajectory prediction technology. With the oil and gas industry's increasing demands for recovery rates and drilling costs, the complexity and diversity of massive drilling data and formation parameters mean that traditional drilling trajectory prediction technologies can no longer meet the requirements of complex oil and gas reservoirs in terms of trajectory prediction accuracy and drilling efficiency. Breakthroughs in drilling trajectory tracking and control technology are urgently needed. Existing drilling trajectory prediction methods mainly rely on mechanistic modeling and statistical methods. Mechanism-based modeling methods depend on the mechanical modeling of the drill string-formation interaction system. These models are typically based on simplified assumptions such as formation homogeneity and isotropy, making it difficult to accurately represent the strong heterogeneity of actual formations, leading to a significant decrease in prediction accuracy under complex geological conditions. While experience-based statistical methods are used in practice, they heavily rely on engineers' subjective experience and historical data, lacking universality and adaptability to dynamically changing drilling conditions, thus failing to achieve real-time, adaptive, and accurate predictions. In recent years, although data-driven algorithms such as Long Short-Term Memory Networks and Decision Forests have been introduced into drilling trajectory prediction to improve the level of prediction intelligence, they still have inherent defects: First, the local feature extraction method is singular, relying on a fixed time window to extract time-series features, making it difficult to simultaneously and effectively capture high-frequency signals that characterize downhole instantaneous anomalies and low-frequency changes that reflect formation trends, resulting in a sluggish response to complex dynamic conditions; Second, the dynamic feature fusion mechanism is crude, with feature fusion mostly using simple vector concatenation or static weighted summation, failing to dynamically adjust the contribution weights of features from different sources according to actual working conditions. Summary of the Invention

[0004] This invention addresses the technical problem of low prediction accuracy and poor adaptability of drilling trajectory prediction models in rotary steerable drilling systems in complex formations. It proposes an intelligent drilling trajectory prediction method and system, which significantly improves the accuracy and stability of trajectory prediction under complex formation conditions, providing technical support for safe and efficient drilling of complex well types such as directional and horizontal wells.

[0005] To solve the technical problem, the technical solution of the present invention is as follows:

[0006] A drilling trajectory intelligent prediction method, the drilling trajectory intelligent prediction method comprising:

[0007] For the preprocessed standardized drilling sequence, a dynamic scale adaptive mechanism is established based on the formation complexity to adjust the temporal and spatial scales of the feature extraction window and extract multi-scale local features including information of different frequencies.

[0008] The standardized drilling sequence is input into a preset improved iTransformer model. During the attention calculation process, the model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features.

[0009] The multi-scale local features and the global correlation features are input into the gated attention fusion layer. The gate weights are calculated based on the importance scores of the multi-scale local features, the trend consistency scores of the global correlation features, and the adaptive adjustment coefficients calculated based on the formation complexity. The multi-scale local features and the global correlation features are then weighted and fused to obtain fused features. Wellbore trajectory prediction results are generated based on the fused features.

[0010] A drilling trajectory intelligent prediction system, the system being used to perform any of the methods described above, the system comprising:

[0011] The data preprocessing module is used to clean, impute missing values, and normalize the acquired multi-source heterogeneous drilling data to obtain a preprocessed standardized drilling sequence.

[0012] The multi-scale local feature extraction module is used to extract multi-scale local features including information of different frequencies by establishing a dynamic scale adaptive mechanism based on the formation complexity of the preprocessed standardized drilling sequence, adjusting the temporal and spatial scales of the feature extraction window, and extracting the multi-scale local features.

[0013] An improved iTransformer global learning module is used to input the standardized drilling sequence into a preset improved iTransformer model. During the attention calculation process, the model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features.

[0014] The gated attention fusion module is used to input the multi-scale local features and the global correlation features into the gated attention fusion layer, calculate the gate weight based on the importance score of the multi-scale local features, the trend consistency score of the global correlation features, and the adaptive adjustment coefficient calculated based on the formation complexity, and perform weighted fusion of the multi-scale local features and the global correlation features to obtain fused features, and generate wellbore trajectory prediction results based on the fused features.

[0015] The trajectory prediction output module is used to evaluate the deviation of the well trajectory prediction results. If the deviation exceeds a preset threshold, the parameters of the improved iTransformer model are adaptively adjusted according to the update strategy.

[0016] This application has the following advantages:

[0017] (1) Strong multi-parameter coupling modeling capability; integrates geological parameters and drilling engineering parameters to construct an integrated "engineering-geology" prediction model, which overcomes the limitation of traditional models that rely solely on engineering parameters and strengthens the modeling of multi-parameter coupling relationships on a global scale.

[0018] (2) Excellent multi-scale feature adaptability; based on the stratigraphic complexity, the feature extraction scale is adaptively selected, the small-scale window captures high-frequency anomalies, and the large-scale window captures low-frequency trends, so as to achieve accurate extraction of features at different scales.

[0019] (3) Global correlation is controllable; a drilling engineering prior knowledge matrix is ​​introduced into the iTransformer model and a segmented attention strategy is adopted to enhance the long-range dependence across segments and the dominant role of key parameters, thereby improving the modeling accuracy of the trajectory trend of the entire well segment.

[0020] (4) Adaptive intelligence of fusion method: Design a gating attention fusion mechanism to dynamically adjust the weights of local and global features according to the working conditions, reduce feature conflicts and redundancy, and enable the model to pay attention to details and take into account the overall trend under complex working conditions.

[0021] (5) Improved prediction accuracy and stability: By combining loss function and model update mechanism, the prediction accuracy of the model under complex formations is guaranteed, and the prediction stability is maintained within the long well section.

[0022] (6) Strong scalability; key components such as scale decision rules, prior matrix construction, segment length and fusion measurement method can be replaced or extended according to different scenarios, which facilitates the application of the model in actual engineering and subsequent upgrades and optimizations. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating an intelligent prediction method for drilling trajectory provided in an embodiment of the present invention;

[0025] Figure 2 A block diagram of the module composition of an intelligent drilling trajectory prediction system provided in an embodiment of the present invention;

[0026] Figure 3 A comparison chart of MD-X direction prediction curves provided in the embodiments of the present invention;

[0027] Figure 4 A comparison diagram of MD-Y direction prediction curves provided in the embodiments of the present invention;

[0028] Figure 5 The formation complexity C and adaptive adjustment coefficient provided for embodiments of the present invention The change curve. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] Example 1:

[0031] like Figure 1 As shown, this embodiment provides a method for intelligent prediction of drilling trajectories, which includes:

[0032] Step 1: For the preprocessed standardized drilling sequence, establish a dynamic scale adaptive mechanism based on the formation complexity to adjust the temporal and spatial scales of the feature extraction window and extract multi-scale local features including information of different frequencies;

[0033] Furthermore, after acquiring multi-source heterogeneous drilling data, data cleaning, missing value imputation, and normalization are performed to obtain a preprocessed standardized drilling sequence. The multi-source heterogeneous drilling data includes: measurement-while-drilling data, drilling engineering parameters, geological parameters, and historical trajectory data.

[0034] For example, multi-source heterogeneous drilling data is acquired and preprocessed to form a preprocessed standardized drilling sequence. The multi-source heterogeneous drilling data includes: measurement-while-drilling (MWD) data, drilling engineering parameters, geological parameters, and historical trajectory data. The MWD data includes real-time acquisition data of wellbore inclination angle, azimuth angle, tool face angle, drill pressure, rotational speed, torque, mud density, and formation pressure. Geological parameters include formation lithology, porosity, permeability, formation dip angle, and formation pressure gradient. Historical trajectory data includes the measured wellbore trajectory coordinates of adjacent wells and their trajectory prediction error records. Based on the above multi-source heterogeneous drilling data, a drilling trajectory prediction dataset is constructed, and the data undergoes systematic cleaning, completion, and standardization to ensure the completeness, accuracy, and consistency of the data input to the model, resulting in the preprocessed standardized drilling sequence.

[0035] Preprocessing of multi-source heterogeneous drilling data includes the following steps:

[0036] Data cleaning: The 3σ principle is used to identify and remove outliers. For numerical continuous parameters, this specifically means calculating the overall mean and standard deviation, and outliers that exceed the mean ± 3σ range are identified as outliers and removed. For duplicate records, such as multiple records with the same measured depth (MD) and true vertical depth (TVD) at the same time, the record with the earlier time is retained.

[0037] Missing value imputation: For all continuous parameters, K-nearest neighbor interpolation is used for interpolation imputation, with the nearest neighbor coefficient K set to 5; If porosity data is missing at a certain time point, the porosity values ​​at 5 sampling points before and after that time point are taken, and the distance-weighted average is used as the porosity estimate for that time point.

[0038] Data standardization; Min-Max normalization is used to map all parameters to the [0,1] interval; the normalization formula is:

[0039]

[0040] in, and These are the maximum and minimum values ​​of the historical data for the corresponding parameters; The normalized value. This is the original value.

[0041] After completing the above data cleaning, deduplication, missing data imputation, and normalization processes, the preprocessed standardized drilling sequence is obtained, represented in matrix form. ,in It is a time step sequence. D For parameter dimensions.

[0042] Furthermore, based on the dynamic scale adaptive mechanism of formation complexity, the size and expansion rate of the convolution window are adjusted, and multi-scale convolution feature extraction is performed on the data in the preprocessed standardized drilling sequence. A multi-branch convolution structure is used to extract local features in different frequency ranges, and the multi-scale local features are obtained by weighted fusion of static and dynamic weights.

[0043] For example, calculating formation complexity based on the rate of change of torque and the rate of change of porosity includes: introducing formation complexity in this step. As an auxiliary feature, it is used to quantify the complexity of the formation environment in the current well section. Using torque variation rate and porosity variation rate calculations, the difference between the maximum and minimum torque (Torque / kN·m) within each 10-meter well section is calculated. As the rate of change of torque (Unit: kN·m / 10m); Similarly, calculate the difference in porosity within this well section. As the porosity change rate (Unit: % / 10m). The stratigraphic complexity is... for:

[0044]

[0045] If the torque increases from 30 kNm to 45 kNm within a 10m well section, then =(45-30) / 10=1.5kN·m / 10m, the porosity in this well section decreases from 10% to 5%, then P=(10 5) / 10=0.5% / 10m, C=0.5×1.5+0.5×0.5=1.0. A preset complex stratum threshold C0=0.35 is used to distinguish complex strata from homogeneous strata. This stratum complexity C is used as an adaptive adjustment factor in the subsequent multi-scale feature extraction and fusion process.

[0046] For example, the implementation of a dynamic scale adaptation mechanism includes:

[0047] First, this method implements a dynamic scale adaptation mechanism. This mechanism calculates the formation complexity C in real time. Based on the value of formation complexity C, the window size of the convolution operation, i.e., the kernel size k and the dilation rate d, is adaptively adjusted to match the signal characteristics under different formation conditions.

[0048] Complex formations: Automatically employ smaller convolution windows and smaller dilation rates;

[0049] Homogeneous layers: Automatically use larger convolution windows and larger dilation rates.

[0050] For example, the specific design of a multi-branch convolutional structure includes:

[0051] To systematically extract features at different frequencies, a multi-branch convolutional neural network structure is employed for multi-scale convolutional feature extraction. This structure includes multiple parallel convolutional branches, each configured with a different kernel size k and dilation rate d, for extracting features within a specific frequency range.

[0052] Branch configuration: Five parallel branches are set up, and the branch configuration parameters (k,d) are (3,1), (5,1), (7,2), (9,2), and (11,3), respectively, which correspond to the extraction of local features of high frequency, mid-high frequency, mid-low frequency, low frequency, and ultra-low frequency.

[0053] Internal structure of each branch: Each branch adopts a normalized structure including residual connections: Convolutional Layer → Group Normalization → GELU activation function (GaussianError Linear Unit) → Regularization → Convolutional Layer → Group Normalization → GELU activation. The convolution stride is fixed at 1, and the length of the input and output sequences is kept constant through padding settings.

[0054] For example, the weighted fusion of static and dynamic weights includes: the heterogeneous features extracted from each branch need to be fused into a unified feature representation, which is achieved through the weighted fusion of static and dynamic weights.

[0055] Weight definition:

[0056] Static weights : Predefined learnable parameters for each branch, normalized by the Softmax function, representing the inherent importance of each branch on the global training data.

[0057] Dynamic weights : Calculated based on the real-time statistical features of the current input data sequence, reflecting the immediate needs of the current sample for the features of each branch.

[0058] Fusion Computation: Final Fusion Weights The static and dynamic weights are determined according to a preset ratio. Weighted summation yields:

[0059]

[0060] The output characteristics of all branches are as follows: Perform a weighted summation.

[0061] Output processing: The weighted fused features undergo layer normalization and regularization, and the final output is a unified multi-scale local feature set. Its dimensions are ; It is a time step sequence. For feature dimensions.

[0062] Obtained through the above mechanism It effectively captures the short-term dynamic changes of a single parameter and also initially implies the coupling and correlation patterns across parameters, providing rich and adaptive underlying feature support for subsequent global dependency modeling.

[0063] Step 2: Input the standardized drilling sequence into the preset improved iTransformer model. During the attention calculation process, the improved iTransformer model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features.

[0064] Furthermore, an engineering prior knowledge matrix is ​​introduced into the attention calculation process to constrain the attention distribution among parameters, and a segmented global attention structure is adopted to perform hierarchical modeling of local and global features, thereby establishing long-term dependencies of multiple parameters within the well section and generating the global association features that characterize the dynamic coupling characteristics of the entire well section.

[0065] For example, an engineering prior knowledge matrix is ​​introduced into the attention calculation process to constrain the attention distribution among parameters, including:

[0066] Standardized drilling sequence, dimension: First, it passes through a linear projection layer, which uniformly maps it to the feature dimensions of the model. , forming encoder input .

[0067] In the multi-head self-attention mechanism of iTransformer, a learnable drilling engineering prior knowledge matrix M is introduced:

[0068]

[0069] The matrix is Dimension, element Indicates parameters For parameters The prior upper bound of attention weights, with a range of values. ,Right now This represents the upper bound of the attention weight of parameter 1 with respect to itself. : indicates parameter 1 to parameter The prior upper bound of attention weights; It is the dimension of the parameters in the model.

[0070] This matrix is ​​initialized based on drilling engineering knowledge:

[0071] The upper limit of the weights between direct trajectory parameters is relatively high;

[0072] The upper limit of the weight among important engineering parameters is set to medium.

[0073] The upper limit of the weight of indirectly related parameters is lower;

[0074] In attention calculation, the query (Query) Key The original attention weight matrix obtained by dot product , , and prior knowledge matrix Perform element-wise multiplication to obtain the constrained attention weights. :

[0075]

[0076] in, This indicates element-wise multiplication. For transpose, The dimension of the key.

[0077] For example, a segmented global attention structure is used for hierarchical modeling of local and global features, including: employing a segmented global attention structure; and treating the entire input sequence as a segment. Classified by well depth or time dimension The well is divided into several continuous segments. For each segment's features, intra-segment self-attention is first performed to learn the fine coupling relationships between parameters in that local well segment.

[0078] To establish connections between segments, the improved iTransformer model learns or pools a segment representation vector for each segment; performs inter-segment attention on the segment representation vectors to capture macro-trends and pattern evolution across multiple well segments; and propagates the learned inter-segment dependency information back to the original features of each segment.

[0079] By stacking multiple encoder layers that integrate engineering prior constraints and segmented attention, the improved iTransformer model hierarchically fuses local interactions and global dependencies; the output of the encoder layer is the global correlation feature. Its dimensions are , It is a time step sequence. For feature dimensions; It characterizes the complex dynamic coupling relationship between drilling parameters and the long-term evolution trend of the trajectory throughout the entire well section.

[0080] Step 3: Input the multi-scale local features and the global correlation features into the gated attention fusion layer. Calculate the gate weights based on the importance scores of the multi-scale local features, the trend consistency scores of the global correlation features, and the adaptive adjustment coefficients calculated based on the formation complexity. Then, perform weighted fusion of the multi-scale local features and the global correlation features to obtain the fused features. Generate wellbore trajectory prediction results based on the fused features.

[0081] Furthermore, using the acquired multi-scale local features and the global correlation features as input, the two input features are dimensionally aligned. Based on the aligned input features, the importance score of the multi-scale local features, the trend consistency score of the global correlation features, and the adaptive adjustment coefficient calculated according to the stratigraphic complexity are calculated. Based on the importance score, trend consistency score, and adaptive adjustment coefficient, a fusion weight is dynamically generated, which controls the proportion of the multi-scale local features and the global correlation features in the fusion. The multi-scale local features and the global correlation features are weighted and fused according to the fusion weight. After normalization processing, the final fused feature is generated, which includes information on high-frequency local changes and integrated overall trend information.

[0082] Furthermore, generating wellbore trajectory prediction results based on the fused features specifically includes: establishing a prediction network consisting of two fully connected layers at the output of the improved iTransformer model; the prediction network takes the fused features as input, maps the fused features to the prediction increment of the wellbore trajectory, and outputs a multi-step trajectory prediction sequence at once, wherein the prediction increment includes: north-south displacement, east-west displacement, and vertical depth change; during the training of the improved iTransformer model, a comprehensive loss function is set, the loss function including a coordinate prediction loss term and a trajectory dynamics consistency loss term; after training, the optimal model parameters are saved for online trajectory prediction to obtain wellbore trajectory prediction results in the time or depth direction.

[0083] For example, obtaining multi-scale local features , dimension , This represents the channel dimension of local features extracted by a multi-scale convolutional neural network in the feature space, reflecting structural information within the local time window and its relation to global features. , dimension , This represents the global temporal feature dimension output by the improved iTransformer encoder, used to characterize long-term dependencies. An adaptive weighted fusion layer is used to fuse these two features, outputting a unified fused feature. .

[0084] S301: Fusion weight calculation;

[0085] For each feature dimension fusion weight Score based on the importance of local features Global feature trend consistency score and adaptive adjustment coefficient The decision was made jointly, and the calculation formula is as follows:

[0086]

[0087] The calculation methods for the three core parameters are as follows:

[0088] Local feature importance score Based on multi-scale local features No. The information entropy of a dimensional feature sequence is calculated. The lower the entropy value, the stronger the discriminative power of that dimensional feature and the higher its importance.

[0089]

[0090] In the formula, The information entropy of this dimension feature. To discretize the eigenvalues ​​into the number of categories, , Represents the information entropy function;

[0091] Global Feature Trend Consistency Score : Through calculation No. The current feature vector and the nearest The mean cosine similarity of the global feature vectors of a segment is obtained and used to evaluate the degree of agreement between the current features and historical trends.

[0092]

[0093] In the formula, Indicates the first The first phase of the overall characteristics of history dimension, The higher the value, the stronger the consistency. This refers to cosine similarity.

[0094] Adaptive adjustment coefficient Due to geological complexity The decision is used to dynamically adjust the bias of the fusion towards local or global features.

[0095]

[0096]

[0097] In the formula, Threshold for determining complex strata. For intermediate operators, when When it is large, As the size increases, the model focuses more on local details; when When smaller, The model becomes more reliant on global trends as the number of cases decreases.

[0098] S302: Feature Alignment and Weighted Fusion;

[0099] First, through a linear projection layer Dimensions from Down to ,make Dimensions and Dimensional alignment.

[0100] Subsequently, according to the calculated dimensional fusion weight vector Dimensional fusion weight vector Dimensions Then, perform a point-by-point weighted summation of the aligned local and global features:

[0101]

[0102] in, For time steps, Indexed by feature dimensions, Global features The dimension is represented by the linearly mapped dimension.

[0103] S303: Output normalization;

[0104] Finally, the features after weighted fusion Perform layer normalization processing to output the final fused features. , dimension The final fusion features Including high-frequency local details and long-term global trends, it provides core inputs for trajectory prediction.

[0105] S304: Prediction Network;

[0106] The fusion features obtained based on the aforementioned steps Wellbore trajectory prediction results are generated through a prediction network; features are fused. Dimensions The network consists of two fully connected layers:

[0107] The first linear layer will The 3D features are mapped to 32-dimensional latent features; after passing through the GELU activation function, the second linear layer maps the 32-dimensional features to the final output dimension; the output result is the future... The sequence of wellbore trajectory coordinate increments at each time step: ; This represents the increment of north-south displacement. It represents the increment of east-west displacement. This indicates the increment of vertical depth change.

[0108] S305: Loss function;

[0109] During the training phase, a comprehensive loss function is used for optimization. Defined as:

[0110]

[0111] Typically for horizontal displacement Using mean square error (MSE) for vertical depth Use SmoothL1 loss to enhance robustness to outliers.

[0112] Among them, coordinate prediction loss Measure the error between predicted coordinates and actual values; trajectory dynamics consistency loss. Constraints on the smoothness and physical plausibility of predicted trajectories; The weighting coefficients are used to balance the two losses.

[0113] S305: Training configuration;

[0114] The model is trained using the AdamW optimizer and employs a grouped learning rate strategy. The learning rate scheduling uses a cosine annealing restart strategy, combined with gradient pruning to stabilize the training process. An early stopping mechanism is enabled during training; training terminates when the validation set loss no longer decreases over multiple consecutive epochs, and the optimal model parameters are saved for online prediction. Specifically, during the model training phase, the improved iTransformer model is iteratively trained using a parameter update method based on the AdamW optimizer. A grouped learning rate strategy is used to set differentiated learning rates for different network modules to improve the overall convergence efficiency of the model. During training, the learning rate is dynamically adjusted according to a preset cosine annealing restart scheduling strategy, and a gradient pruning mechanism is introduced during backpropagation to prevent abnormal gradient fluctuations from adversely affecting model stability. Simultaneously, an early stopping mechanism monitors the training process; when the validation set loss no longer decreases over multiple consecutive training epochs, training automatically terminates, and the optimal model parameters are saved as the final prediction model.

[0115] During the model deployment and prediction phase, the saved optimal model parameters are used to predict the wellbore trajectory in real time or near real time. When the deviation between the predicted result and the actual measured trajectory exceeds a preset threshold, an adaptive adjustment process for the model parameters is triggered. This process updates the feature fusion weights and output layer-related parameters to enhance the model's adaptability to changes in current formation conditions and operating conditions, thereby improving the stability and accuracy of subsequent trajectory predictions.

[0116] Step 4: Evaluate the deviation of the well trajectory prediction results. If the deviation exceeds the preset threshold, adaptively adjust the parameters of the improved iTransformer model according to the update strategy.

[0117] Specifically, after evaluating the prediction deviation of the well trajectory prediction results, if the prediction deviation exceeds a preset threshold, an adaptive adjustment process for model parameters is triggered. This adaptive adjustment includes updating the feature fusion weight parameters based on the current prediction error, or making local fine-tuning adjustments to the model output layer parameters to enhance the model's adaptability to changes in current downhole conditions. After adjustment, the updated model parameters are used in subsequent trajectory prediction processes.

[0118] Example 2:

[0119] This embodiment provides an application scenario where the aforementioned intelligent drilling trajectory prediction method is applied. Specifically, the implementation process includes the following:

[0120] First, the experimental environment and benchmark settings were established. The experiment used drilling data from five completed directional wells in Norway, and a dataset containing approximately 11,000 standardized samples was constructed. The dataset covered a variety of geological conditions to ensure the comprehensiveness of the test. The dataset was randomly divided into training, validation and test sets in a ratio of 7:2:1 to ensure the fairness of the model evaluation.

[0121] To demonstrate the superiority of this application, the following classic and cutting-edge methods were selected as the baseline for comparison: minimum curvature method, CNN, Random Forest, LSTM and standard Transformer model. The overall performance comparison results are shown in Table 1.

[0122] The following industry-standard quantitative indicators are used for evaluation:

[0123] Mean Absolute Error (MAE): Unit: meters; the smaller the value, the better.

[0124] Root mean square error (RMSE): Unit: meters. It is more sensitive to large errors, and the smaller the value, the better.

[0125] Trajectory endpoint error (EPE): The straight-line distance between the predicted trajectory endpoint and the actual endpoint in space, in meters. The smaller the value, the better.

[0126] Table 1 - Overall Performance Comparison Results

[0127]

[0128] The test set results show that the proposed method outperforms the comparative method in several key error metrics. In terms of RMSE, the proposed method achieves 0.5261m, compared to the best-performing comparative method, the standard Transformer (0.5362m), representing an overall error reduction of approximately 1.88%. Regarding the trajectory endpoint error (EPE), the proposed method reduces the EPE from 0.7245m to 0.7045m, a reduction of approximately 2.76%. Simultaneously, the proposed method reduces the MAE_Y metric by approximately 11.50% compared to the best comparative method, and reduces it by approximately 1.35% and 1.47% in MAE_X and MAE_TVD metrics, respectively. These results demonstrate that the proposed method achieves continuous and stable accuracy improvements in both key direction and endpoint errors while maintaining overall stability, fully proving the effectiveness, feasibility, and engineering applicability of the overall architecture of this application.

[0129] To verify the necessity of each innovative module (dynamic adaptation, engineering prior matrix, and gated fusion) in this application, ablation experiments were conducted, and the experimental results are shown in Table 2.

[0130] Table 2 - Comparison of Ablation Experiment Data

[0131]

[0132] Let's take the RMSE indicator as an example for analysis:

[0133] (1) Comparison between A and B (removal of dynamic scale adaptation mechanism): After removing the dynamic scale adaptation mechanism, the model RMSE increased from 0.5163m to 0.5310m, and the error increased by about 2.85%. This result shows that under the condition of complex geological changes, the dynamic scale adaptation mechanism can dynamically adjust the feature perception range according to the geological complexity, which plays an important role in characterizing local non-stationary features and is a key component in improving the overall prediction accuracy of the model.

[0134] (2) Comparison between A and C (removal of engineering prior knowledge matrix): After removing the engineering prior knowledge matrix, the RMSE of the model slightly increased to 0.5162m. Although the overall degradation was relatively small, different degrees of deterioration were observed in directional error indices such as MAE_X and MAE_Y. This indicates that the engineering prior knowledge matrix can effectively constrain the attention distribution and guide the model to focus on key features that are more in line with the drilling engineering mechanism, thereby improving the rationality and stability of the prediction results.

[0135] (3) Comparison between A and D (removal of adaptive gating fusion layer): After removing the adaptive gating fusion layer, the RMSE of the model increased significantly to 0.5534m, and the error increased by about 7.16%, showing the most significant performance degradation. This result indicates that it is difficult to effectively fuse local multi-scale features and global temporal dependency information using only simple feature concatenation, while the adaptive gating fusion mechanism can dynamically allocate weights according to feature importance, achieving better information integration.

[0136] (4) Comprehensive analysis shows that the complete model achieves optimal or near-optimal results on all evaluation indicators, indicating that there is a good synergistic effect among the various innovative modules. The dynamic scale adaptive mechanism, the engineering prior knowledge matrix, and the adaptive gating fusion layer work together to enable the model to simultaneously take into account local detail characterization and global trend modeling under complex formation conditions, which significantly improves the accuracy and robustness of drilling trajectory prediction.

[0137] In summary, the ablation experiment results fully verify the necessity and effectiveness of the key modules proposed in this application, and further prove the feasibility and practical value of the overall technical solution of this application in engineering applications.

[0138] This embodiment also presents a typical case and a visualization analysis process for the mechanism. Taking a continuous well section as an example, it provides the MD–X direction ( Figure 3 ) and MD–Y direction ( Figure 4 The results show a comparison between the actual and predicted trajectories on the surface. The black curve represents the actual drilling trajectory, the red curve represents the predicted trajectory using the method of this invention, and the blue and green curves represent the predicted trajectories using the LSTM method and the standard Transformer method, respectively.

[0139] from Figure 3 As can be seen, in the MD–X direction, the predicted trajectory of the method in this application is highly consistent with the actual trajectory. In the section where the local curvature changes significantly, the predicted curve can closely follow the changes in the actual trajectory. In contrast, the LSTM method has a certain degree of deviation in some sections, and the standard Transformer method shows a slight lag in some local positions.

[0140] from Figure 4 It can be seen that in the MD–Y direction, the overall trends of the various methods are basically consistent. However, in the local turning sections, the predicted trajectory of the method in this application is more consistent with the actual trajectory, and the predicted curve is smoother and more stable. In contrast, the LSTM method has a certain offset error in local sections, and the standard Transformer method has a slight deviation in some positions.

[0141] comprehensive Figure 3 and Figure 4It can be seen that the method of this application can maintain good overall trend consistency and local change tracking ability in typical well sections. In terms of spatial trajectory prediction accuracy, it is superior to the comparative method, which intuitively verifies the effectiveness and practicality of the method of this invention in drilling trajectory prediction tasks.

[0142] Finally, the adaptive mechanism was verified. Figure 5 The curves showing the relationship between formation complexity C and the adaptive adjustment coefficient α are presented. Data and image results indicate that as the formation complexity index C gradually increases from 0.47 to 0.55, the adaptive adjustment coefficient α correspondingly increases from 0.60 to 0.74, exhibiting a consistent trend. This result directly verifies, in quantitative data form, that the feature fusion adjustment mechanism proposed in this application can adaptively adjust the fusion weights of different feature branches according to changes in formation complexity, thereby ensuring that the feature utilization strategy of the model under different working conditions possesses good logical consistency and engineering rationality.

[0143] On a server equipped with an NVIDIA RTX4060 GPU, the model proposed in this application predicts the next 60 steps for a sequence with a length of 200 time steps, with an average inference time of approximately 100 milliseconds per inference. This time is far lower than the sampling interval of conventional drilling parameters, fully meeting the engineering requirements for real-time prediction in the field, and demonstrating the industrial application feasibility of this application.

[0144] Example 3:

[0145] like Figure 2 As shown, this embodiment proposes a drilling trajectory intelligent prediction system. The system is used to execute the aforementioned drilling trajectory intelligent prediction method. The system includes:

[0146] The data preprocessing module is used to clean, impute missing values, and normalize the acquired multi-source heterogeneous drilling data to obtain a preprocessed standardized drilling sequence.

[0147] The multi-scale local feature extraction module is used to extract multi-scale local features including information of different frequencies by establishing a dynamic scale adaptive mechanism based on the formation complexity of the preprocessed standardized drilling sequence, adjusting the temporal and spatial scales of the feature extraction window, and extracting the multi-scale local features of different frequencies.

[0148] An improved iTransformer global learning module is used to input the standardized drilling sequence into a preset improved iTransformer model. During the attention calculation process, the model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features.

[0149] The gated attention fusion module is used to input the multi-scale local features and the global correlation features into the gated attention fusion layer, calculate the gate weight based on the importance score of the multi-scale local features, the trend consistency score of the global correlation features, and the adaptive adjustment coefficient calculated based on the formation complexity, and perform weighted fusion of the multi-scale local features and the global correlation features to obtain fused features, and generate wellbore trajectory prediction results based on the fused features.

[0150] The trajectory prediction output module is used to evaluate the deviation of the well trajectory prediction results. If the deviation exceeds a preset threshold, the parameters of the improved iTransformer model are adaptively adjusted according to the update strategy.

[0151] Example 4:

[0152] This embodiment provides a terminal device, which includes a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used in the operation of a drilling trajectory intelligent prediction method, including the following steps:

[0153] For the preprocessed standardized drilling sequence, a dynamic scale adaptive mechanism is established based on the formation complexity to adjust the temporal and spatial scales of the feature extraction window and extract multi-scale local features including information of different frequencies.

[0154] The standardized drilling sequence is input into a preset improved iTransformer model. During the attention calculation process, the model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features.

[0155] The multi-scale local features and the global correlation features are input into the gated attention fusion layer. The gate weights are calculated based on the importance scores of the multi-scale local features, the trend consistency scores of the global correlation features, and the adaptive adjustment coefficients calculated based on the formation complexity. The multi-scale local features and the global correlation features are then weighted and fused to obtain fused features. Wellbore trajectory prediction results are generated based on the fused features.

[0156] Example 5:

[0157] This embodiment provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device.

[0158] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the intelligent prediction method for drilling trajectory in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor in the following steps:

[0159] For the preprocessed standardized drilling sequence, a dynamic scale adaptive mechanism is established based on the formation complexity to adjust the temporal and spatial scales of the feature extraction window and extract multi-scale local features including information of different frequencies.

[0160] The standardized drilling sequence is input into a preset improved iTransformer model. During the attention calculation process, the model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features.

[0161] The multi-scale local features and the global correlation features are input into the gated attention fusion layer. The gate weights are calculated based on the importance scores of the multi-scale local features, the trend consistency scores of the global correlation features, and the adaptive adjustment coefficients calculated based on the formation complexity. The multi-scale local features and the global correlation features are then weighted and fused to obtain fused features. Wellbore trajectory prediction results are generated based on the fused features.

[0162] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied 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.

[0163] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0164] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0165] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0166] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0167] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for intelligent prediction of drilling trajectory, characterized in that, The intelligent prediction method for drilling trajectory includes: For the preprocessed standardized drilling sequence, a dynamic scale adaptive mechanism is established based on the formation complexity to adjust the temporal and spatial scales of the feature extraction window and extract multi-scale local features including information of different frequencies. The standardized drilling sequence is input into a preset improved iTransformer model. The model establishes long-term dependencies within the well section and generates global correlation features by introducing engineering prior knowledge matrix to constrain the attention distribution and segmented attention structure to segment the input sequence and perform intra-segment and inter-segment attention modeling respectively. The multi-scale local features and the global correlation features are input into the gated attention fusion layer. Based on the importance score used to measure the distinguishing ability of local features, the trend consistency score used to measure the degree of conformity between global features and historical trends, and the adaptive adjustment coefficient calculated based on formation complexity to control the fusion bias, the gate weight is calculated and the multi-scale local features and the global correlation features are weighted and fused to obtain the fused features. The wellbore trajectory prediction result is generated based on the fused features. Based on the dynamic scale adaptive mechanism of the formation complexity, the size of the convolution window and the expansion rate are adjusted to perform multi-scale convolution feature extraction on the data in the standardized drilling sequence. A multi-branch convolution structure is used to extract local features in different frequency ranges, and the multi-scale local features are obtained by weighted fusion of static and dynamic weights. The formation complexity is calculated based on the torque change rate and porosity change rate. Based on the fusion features, wellbore trajectory prediction results are generated, specifically including: At the output of the improved iTransformer model, a prediction network consisting of two fully connected layers is established. The prediction network takes the fused features as input, maps the fused features to the prediction increment of the wellbore trajectory, and outputs a multi-step trajectory prediction sequence at one time. The prediction increment includes: north-south displacement, east-west displacement, and vertical depth change. During the training of the improved iTransformer model, a comprehensive loss function is set, which includes a coordinate prediction loss term and a trajectory dynamics consistency loss term. After training, the optimal model parameters are saved for online trajectory prediction to obtain wellbore trajectory prediction results in the time or depth direction; An engineering prior knowledge matrix is ​​introduced into the attention calculation process to constrain the attention distribution among parameters, including: Standardized drilling sequence, dimension: First, it passes through a linear projection layer, which uniformly maps it to the feature dimensions of the model. , forming encoder input ; In the multi-head self-attention mechanism of iTransformer, a learnable drilling engineering prior knowledge matrix M is introduced: The matrix is Dimension, element Indicates parameters For parameters The prior upper bound of attention weights, with a range of values. ,Right now This represents the upper bound of the attention weight of parameter 1 with respect to itself. : indicates parameter 1 to parameter The prior upper bound of attention weights; It is the dimension of the parameters in the model.

2. The intelligent prediction method for drilling trajectory according to claim 1, characterized in that, The method further includes: evaluating the deviation of the wellbore trajectory prediction results; if the deviation exceeds a preset threshold, adaptively adjusting the parameters of the improved iTransformer model according to the update strategy.

3. The intelligent prediction method for drilling trajectory according to claim 1, characterized in that, After acquiring multi-source heterogeneous drilling data, data cleaning, missing value imputation, and normalization are performed to obtain the preprocessed standardized drilling sequence. The multi-source heterogeneous drilling data includes: measurement while drilling data, drilling engineering parameters, geological parameters, and historical trajectory data.

4. The intelligent prediction method for drilling trajectory according to claim 1, characterized in that, In the attention calculation process, an engineering prior knowledge matrix is ​​introduced to constrain the attention distribution among parameters, and a segmented global attention structure is adopted to perform hierarchical modeling of local and global features, thereby establishing long-term dependencies of multiple parameters within the well section and generating the global association features that characterize the dynamic coupling characteristics of the entire well section. In the attention calculation process, an engineering prior knowledge matrix is ​​introduced to constrain the attention distribution among parameters, including: a standardized drilling sequence with dimensions of [missing information]. First, it passes through a linear projection layer, which uniformly maps it to the feature dimensions of the model. , forming encoder input In the multi-head self-attention mechanism of iTransformer, a learnable drilling engineering prior knowledge matrix M is introduced: The matrix is Dimension, element Indicates parameters For parameters The prior upper bound of attention weights, with a range of values. ,Right now This represents the upper bound of the attention weight of parameter 1 with respect to itself. : indicates parameter 1 to parameter The prior upper bound of attention weights; It is the dimension of the parameters in the model; A segmented global attention structure is employed for hierarchical modeling of local and global features, including: using a segmented global attention structure; and treating the entire input sequence as a segment. Classified by well depth or time dimension A series of continuous segments; for the features within each segment, self-attention within the segment is first performed to learn the fine coupling relationship between parameters in that local well segment; To establish connections between segments, the improved iTransformer model learns or pools a segment representation vector for each segment; performs inter-segment attention on the segment representation vectors to capture macro-trends and pattern evolution across multiple well segments; and propagates the learned inter-segment dependency information back to the original features of each segment. By stacking multiple encoder layers that integrate engineering prior constraints and segmented attention, the improved iTransformer model hierarchically fuses local interactions and global dependencies; the output of the encoder layer is the global correlation feature. Its dimensions are , It is a time step sequence. For feature dimensions; It characterizes the complex dynamic coupling relationship between drilling parameters and the long-term evolution trend of the trajectory throughout the entire well section.

5. The intelligent prediction method for drilling trajectory according to claim 1, characterized in that, Using the acquired multi-scale local features and the global correlation features as input, the two input features are dimensionally aligned. Based on the aligned input features, the importance score of the multi-scale local features, the trend consistency score of the global correlation features, and the adaptive adjustment coefficient calculated according to the stratigraphic complexity are calculated. Based on the importance score, trend consistency score, and adaptive adjustment coefficient, a fusion weight is dynamically generated, which controls the proportion of the multi-scale local features and the global correlation features in the fusion. The multi-scale local features and the global correlation features are weighted and fused according to the fusion weight. After normalization, the final fused feature is generated, which includes information on high-frequency local changes and integrated overall trend information.

6. A drilling trajectory intelligent prediction system, characterized in that, The system is used to perform the method according to any one of claims 1-5, the system comprising: The data preprocessing module is used to clean, impute missing values, and normalize the acquired multi-source heterogeneous drilling data to obtain a preprocessed standardized drilling sequence. The multi-scale local feature extraction module is used to extract multi-scale local features including information of different frequencies by establishing a dynamic scale adaptive mechanism based on the formation complexity of the preprocessed standardized drilling sequence, adjusting the temporal and spatial scales of the feature extraction window, and extracting the multi-scale local features. An improved iTransformer global learning module is used to input the standardized drilling sequence into a preset improved iTransformer model. During the attention calculation process, the model combines engineering prior constraints and a segmented attention structure to establish long-term dependencies within the well section and generate global correlation features. The gated attention fusion module is used to input the multi-scale local features and the global correlation features into the gated attention fusion layer, calculate the gate weight based on the importance score of the multi-scale local features, the trend consistency score of the global correlation features, and the adaptive adjustment coefficient calculated based on the formation complexity, and perform weighted fusion of the multi-scale local features and the global correlation features to obtain fused features, and generate wellbore trajectory prediction results based on the fused features. The trajectory prediction output module is used to evaluate the deviation of the well trajectory prediction results. If the deviation exceeds a preset threshold, the parameters of the improved iTransformer model are adaptively adjusted according to the update strategy.

7. A computer device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a drilling trajectory intelligent prediction method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements a drilling trajectory intelligent prediction method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Mine drilling group track intelligent comparative analysis method based on multi-source data fusion

    CN120705597A

  • Point-of-interest recommendation method based on temporal knowledge graph

    US12254420B1