A marine drilling working condition identification method and device

By constructing a pre-defined drilling condition identification model and utilizing local optimal condition representation and real-time state transition equations, the local probability path of the condition is optimized, solving the problems of accuracy and timeliness in marine drilling condition identification, and achieving a clearer interpretation of condition relationships and model update capabilities.

CN122153494APending Publication Date: 2026-06-05CHINA NAT PETROLEUM CORP +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA NAT PETROLEUM CORP
Filing Date
2024-12-03
Publication Date
2026-06-05

Smart Images

  • Figure CN122153494A_ABST
    Figure CN122153494A_ABST
Patent Text Reader

Abstract

The application provides a marine drilling working condition recognition method and device, and relates to the technical field of oil and gas drilling. The method comprises the following steps: obtaining drilling working condition data to be recognized; recognizing the drilling working condition data to be recognized based on a preset drilling working condition recognition model to obtain a drilling working condition recognition result; wherein the preset drilling working condition recognition model aggregates normal working condition characteristics and risk working condition characteristics, and is obtained according to a real-time state transition equation combined with a comprehensive loss function of normal working conditions and risk working conditions; the real-time state transition equation is the sum of the probability of transition to the corresponding working condition state at the current time and the sum of the working condition local probability paths from the initial state to the working condition state at the current time. The device executes the above method. The marine drilling working condition recognition method and device provided in the application embodiment can improve the timeliness and accuracy of drilling working condition recognition.
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 technology, specifically to a method and apparatus for identifying offshore drilling conditions. Background Technology

[0002] Drilling, including offshore drilling, faces complex geological conditions and a high downhole safety risk factor, including various complex operating conditions such as well kicks and blowouts. The time window for identifying these conditions is short, and the operational procedures are complex. Failure to address these complex conditions promptly can lead to personal injury, economic losses, and environmental pollution.

[0003] Currently, most methods for identifying offshore drilling conditions still rely on the experience of field experts. Some methods use machine learning to directly identify risky conditions. However, direct identification methods cannot effectively integrate the relationships between conditions and the temporal and spatial correlations between drilling data and conditions. They are easily affected by drilling parameter disturbances, have poor interpretability, and low accuracy in condition identification and risk prediction. Summary of the Invention

[0004] To address the problems in the prior art, embodiments of the present invention provide a method and apparatus for identifying marine drilling conditions, which can at least partially solve the problems existing in the prior art.

[0005] On the one hand, this invention proposes a method for identifying marine drilling conditions, including:

[0006] Acquire drilling condition data to be identified;

[0007] The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result.

[0008] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0009] The establishment of the preset drilling condition identification model includes:

[0010] Obtain drilling data samples, perform local optimal operating condition representation on the drilling data samples, and obtain a local optimal operating condition representation matrix;

[0011] Determine the normal operating condition feature matrix and the risk operating condition feature matrix, respectively, represented by the local optimal operating condition representation matrix, and obtain the probability of transitioning to the corresponding operating condition state at the current time based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network;

[0012] Calculate the sum of the local probability paths of the working condition from the initial state to the current working condition state, and use the sum of the probability of transitioning to the corresponding working condition state at the current time and the sum of the local probability paths of the working condition as the real-time state transition equation.

[0013] The comprehensive loss function is constructed based on the real-time state transition equation, and the comprehensive loss function is trained until convergence to obtain the preset drilling condition identification model.

[0014] The acquisition of drilling data samples includes:

[0015] Use the model training dataset corresponding to the adjacent wells of the drilling well as the initial drilling data sample;

[0016] The initial drilling data sample is preprocessed to obtain the drilling data sample.

[0017] The step of representing the drilling data samples as locally optimal operating conditions to obtain a locally optimal operating condition representation matrix includes:

[0018] Local features are extracted from the drilling data samples using a self-attention weighted method, and then the local features are concatenated to obtain the local optimal working condition representation matrix.

[0019] The step of obtaining the probability of transitioning to the corresponding operating state at the current moment based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network includes:

[0020] The probability of transitioning to the corresponding operating state at the current moment is calculated using the following expression:

[0021] A con (t,s1)=f1(MultiHead con )

[0022] A risk (t,s2)=f2(λMultiHead risk +(1-λ)MultiHead con )

[0023] Among them, A con (t,s1) represents the probability of transitioning to the corresponding normal operating condition at the current moment; MultiHead con The normal operating condition feature matrix is ​​represented by f1, which represents the first pre-trained neural network, and A is represented by f1. risk (t,s2) represents the probability of transitioning to the corresponding risky operating condition at the current moment; MultiHead riskLet f1 represent the risk condition feature matrix, f2 represent the pre-trained second neural network, λ represent the training weights of the second neural network, t represent the current time as time t, s1 represent the normal operating condition, and s2 represent the risk operating condition.

[0024] The calculation of the sum of local probability paths of the operating condition from the initial state to the current operating condition includes:

[0025] The sum of the local probability paths from the initial state to the current operating state is calculated using the following expression:

[0026]

[0027]

[0028] Among them, B con (t,s1) represents the sum of local probability paths from the initial state to the current normal operating condition, indicating the probabilistic influence of the past state sequence on the current state. P con (s3,s1) represents the probability of transitioning from the normal operating condition s3 at time t-1 to the normal operating condition s1 at time t, F con (t-1,s3) represents the global state probability corresponding to the normal operating condition from the initial time to the previous time t-1. risk (t,s2) represents the sum of local probability paths from the initial state to the current risky working state, P risk (s4,s2) represents the probability of transitioning from risk condition s4 at time t-1 to risk condition s2 at time t, F risk (t-1,s4) represents the global state probability of the risky working condition from the initial time to the previous time t-1, and S represents the set of working conditions.

[0029] The global probability of the operating state from the initial state to the current state is calculated using the following expression:

[0030] F con (t,s1)=A con (t,s1)+B con (t,s1)

[0031] F risk (t,s2)=A risk (t,s2)+B risk (t,s2).

[0032] The method for identifying marine drilling conditions also includes:

[0033] During the training of the preset drilling condition identification model, the sensor time-series dependency and the working condition time-series dependency are distinguished, the working condition local probability path is optimized, and the optimized working condition local probability path is used to replace the original working condition local probability path in the training process calculation. The dynamic programming method is used to find the optimal working condition sequence path under dual dependency.

[0034] On one hand, the present invention proposes a marine drilling condition identification device, comprising:

[0035] The acquisition unit is used to acquire drilling condition data to be identified.

[0036] The identification unit is used to identify the drilling condition data to be identified based on a preset drilling condition identification model, and obtain the drilling condition identification result.

[0037] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0038] In another aspect, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following method:

[0039] Acquire drilling condition data to be identified;

[0040] The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result.

[0041] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0042] This invention provides a computer-readable storage medium, comprising:

[0043] The computer-readable storage medium stores a computer program that, when executed by a processor, implements the following method:

[0044] Acquire drilling condition data to be identified;

[0045] The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result.

[0046] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0047] The offshore drilling condition identification method and apparatus provided in this invention acquire drilling condition data to be identified; identify the drilling condition data based on a preset drilling condition identification model to obtain drilling condition identification results; wherein, the preset drilling condition identification model aggregates normal operating condition features and risk operating condition features, and is obtained by training a comprehensive loss function combining normal and risk operating conditions based on a real-time state transition equation; the real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current moment and the sum of the local probability paths of the operating condition from the initial state to the current operating condition state, which can improve the timeliness and accuracy of drilling condition identification. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0049] Figure 1 This is a flowchart illustrating a method for identifying marine drilling conditions according to an embodiment of the present invention.

[0050] Figure 2 This is a schematic diagram of the structure of a marine drilling condition identification device provided in an embodiment of the present invention.

[0051] Figure 3 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.

[0053] Figure 1 This is a flowchart illustrating a method for identifying marine drilling conditions according to an embodiment of the present invention, as shown below. Figure 1 As shown, the marine drilling condition identification method provided in this embodiment of the invention includes:

[0054] Step S1: Obtain drilling condition data to be identified.

[0055] Step S2: Identify the drilling condition data to be identified based on the preset drilling condition identification model to obtain the drilling condition identification result;

[0056] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0057] In step S1 above, the device acquires drilling condition data to be identified. The device can be a computer device, such as a server, that performs the method. The acquisition, storage, use, and processing of data in this application comply with relevant regulations. The drilling condition data to be identified can specifically be offshore drilling condition data to be identified.

[0058] In step S2 above, the device identifies the drilling condition data to be identified based on a preset drilling condition identification model to obtain the drilling condition identification result; the drilling condition data to be identified can be input into the preset drilling condition identification model, and the output result of the preset drilling condition identification model can be used as the drilling condition identification result, which can include normal operating conditions and risk operating conditions.

[0059] The preset drilling condition identification model aggregates normal operating condition features and risky operating condition features, and is obtained by training a comprehensive loss function combining normal and risky operating conditions based on a real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current moment and the sum of the local probability paths from the initial state to the current operating condition state. Establishing the preset drilling condition identification model includes:

[0060] Obtain drilling data samples, perform local optimal operating condition representation on the drilling data samples, and obtain a local optimal operating condition representation matrix;

[0061] Determine the normal operating condition feature matrix and the risk operating condition feature matrix, respectively, represented by the local optimal operating condition representation matrix, and obtain the probability of transitioning to the corresponding operating condition state at the current time based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network;

[0062] Calculate the sum of the local probability paths of the working condition from the initial state to the current working condition state, and use the sum of the probability of transitioning to the corresponding working condition state at the current time and the sum of the local probability paths of the working condition as the real-time state transition equation.

[0063] The comprehensive loss function is constructed based on the real-time state transition equation, and the comprehensive loss function is trained until convergence to obtain the preset drilling condition identification model.

[0064] The method of this invention can be implemented through modeling, for example, by including a coarse formation representation model, a data preprocessing model, a local optimal operating condition representation model, a global optimal operating condition prediction model, and an operating condition sequence decoding model in sequence. Data is input into the coarse formation representation model to form a representation matrix, and similarity is measured with the representation matrices of each pre-stored formation to obtain a set of pre-trained models of neighboring wells that are close to the input data (i.e., the model training dataset).

[0065] The input data is processed by the data preprocessing model of the corresponding adjacent wells to remove noise, resulting in drilling data samples.

[0066] Load the corresponding local optimal working condition representation model to process the drilling data sample and obtain the representation matrix of the single hidden state at that moment.

[0067] The global optimal working condition prediction model is loaded to consider the relationship between the current and historical hidden states, the hidden states and working conditions, and the hidden layer states corresponding to different labeled working conditions, so as to obtain the global working condition probability from the beginning to the current moment; the working condition sequence decoding model is used to solve the working condition probability of the time series, so as to achieve effective identification of working conditions.

[0068] The acquisition of drilling data samples includes:

[0069] Use the model training dataset corresponding to the adjacent wells of the drilling well as the initial drilling data sample;

[0070] The initial drilling data sample is preprocessed to obtain the drilling data sample. The modeling method is explained below:

[0071] The process involves acquiring statistical data from drilling samples of adjacent wells and the weights of a pre-trained coarse formation representation model. The coarse formation representation module is then invoked to transform input data, such as formation parameters and wellbore trajectory, into a representation matrix, which is then compared for similarity with pre-stored formation representation matrices. Specifically, the coarse formation representation module includes an embedding layer, three sets of standard residual convolutional blocks, and a pooling layer. Input data includes formation lithology information, formation category information, wellhead geographic coordinates, and well depth. The formation category information is transformed into a continuous low-dimensional vector through the embedding layer, and this low-dimensional formation vector is concatenated with the wellbore trajectory, wellhead geographic coordinates, and well depth. Key information is extracted through three sets of continuous standard residual convolutional blocks, and after downsampling by the pooling layer, a coarse formation representation matrix of the input data is obtained. This matrix is ​​then compared for similarity with pre-stored formation representation matrices. Several adjacent well formations with relatively close distances to the input data representation matrix are obtained. The final adjacent wells are selected based on the actual geophysical geological distance between wellheads.

[0072] The system retrieves statistical data from valid drilling samples from adjacent wells and uses a unified data preprocessing model to obtain the cumulative and trend values ​​of the input data, removing noise and outliers. The data preprocessing model includes overall outlier removal, block noise removal, Fourier high-frequency noise removal, and data standardization. Box plots are used to analyze the overall distribution characteristics of the statistical data and identify outlier samples to remove. Block thresholding divides the data into multiple time windows, and the dispersion of all data points within each window relative to the overall data distribution is calculated individually. The 3-sigma rule is used to identify and separate noise in the data. The three standard deviations of the overall data mean are used as the reasonable data range, and points exceeding the threshold are considered noise. Interpolation is used to supplement the data for noise points, updating the data mean and standard deviation. Fast Fourier Transform (FFT) is used to transform the data from the time domain to the frequency domain to remove high-frequency noise from the signal. Z-score standardization is used to ensure the comparability and consistency of data across different adjacent well time windows.

[0073] The step of representing the drilling data samples as local optimal operating conditions to obtain a local optimal operating condition representation matrix includes:

[0074] Local features are extracted from the drilling data samples using a self-attention weighted approach, and then these local features are concatenated to obtain the locally optimal operating condition representation matrix. The modeling method is explained below:

[0075] The local optimal operating condition representation model includes a time partitioning module, a feature extraction module, a self-attention weighted module, and a feature concatenation module. The dataset is partitioned using a time window method, selecting multiple time segments to extract temporal features of different formations and operating conditions. The network structure extracts temporal features of drilling parameters through a multi-scale convolutional network and a self-attention mechanism to identify different operating conditions and risks.

[0076] Time segmentation module: cuts the input drilling data sample sequence into multiple time segments with different small time windows;

[0077] Feature Extraction Module: Multiple time segments with different small time windows are processed by the feature extraction layer to obtain continuous features within different time periods. The outputs of multiple single feature layers are concatenated in parallel to obtain a comprehensive representation matrix with general temporal features. This module includes multiple single feature layers, which are linked together through residual connections to achieve a chained model structure, enabling the simultaneous learning of features at different scales and obtaining richer data information. Each single feature layer includes multiple convolutional layers, pooling layers, batch normalization layers, and activation function layers. Each convolutional layer is configured with convolutional kernels of different scales to extract features at different levels in the data. These kernels include small-scale, medium-scale, and large-scale kernels to capture various temporal features from subtle to macroscopic. Pooling layers downsample data features, reducing the spatial dimensionality of features while retaining important feature information. Batch normalization layers normalize the features output from each convolutional layer in batches to accelerate network training and improve stability. Activation function layers are applied after each convolutional and pooling layer to introduce non-linear activation, enhancing the network's ability to learn complex features.

[0078] The self-attention weighted module utilizes comprehensive temporally generalized features and employs a self-attention mechanism to extract feature matrices relevant to the task's operational and risk characteristics. Specifically, it aggregates all information within the field of attention, dynamically focusing on the relevance of local information to the global and task objectives, thus enhancing the weight of the input data within the overall data while reducing the importance of other parts. This facilitates the discovery of more important information and crucial connections. The attention mechanism is input to three matrices: the Q matrix, the K matrix, and the V matrix. The Q matrix represents the query value, K represents the key value, and the V matrix represents the current value. The feature matrix calculates the similarity between the query Q of the current value and the key K of all other values ​​in the receptive field. This calculated result, after normalization, serves as the weight matrix for the current value and other values. This weight matrix represents the importance of the feature within the selected receptive field. Weighting the feature importance yields a feature matrix with contextual information.

[0079] The expression for the attention mechanism is standard technical content, and is represented as follows:

[0080]

[0081] Using multiple different feature transformation matrices allows the model to focus on different contextual data, resulting in different attention representations. Furthermore, each attention can be computed in parallel using different attention matrices. The specific form is shown in the formula below, where `head` represents different attention heads, each with a unique Q, K, and V matrix, and `Concat` represents the matrix concatenation operation.

[0082] MultiHead=Concat(head1,...,head h )

[0083] Feature concatenation module: The feature matrices obtained from multiple time segments with different small time windows through the feature extraction module and the self-attention weighting module are concatenated in sequence to obtain the local optimal working condition representation matrix.

[0084] The global optimal operating condition prediction model includes a feature crossover module and a state transition module; where:

[0085] Feature Cross-Module: Risk conditions and normal conditions are closely related. For example, during tripping in, as the drill bit and drill string move upwards, viscosity causes the drilling fluid to rise, resulting in a decrease in bottom hole pressure and a risk of overflow. The feature matrices of normal and risk conditions are aggregated to obtain a representation matrix of the risk state. f() represents a single-layer neural network, with f1() and f2() corresponding to the normal and risk states, respectively.

[0086] The step of obtaining the probability of transitioning to the corresponding operating state at the current moment based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network includes:

[0087] The probability of transitioning to the corresponding operating state at the current moment is calculated using the following expression:

[0088] A con (t,s1)=f1(MultiHead con )

[0089] A risk (t,s2)=f2(λMultiHead risk +(1-λ)MultiHead con )

[0090] Among them, A con (t,s1) represents the probability of transitioning to the corresponding normal operating condition at the current moment; MultiHead con The normal operating condition feature matrix is ​​represented by f1, which represents the first pre-trained neural network, and A is represented by f1. risk (t,s2) represents the probability of transitioning to the corresponding risky operating condition at the current moment; MultiHead risk Let f1 represent the risk condition feature matrix, f2 represent the pre-trained second neural network, λ represent the training weights of the second neural network, t represent the current time, s1 represent the normal operating condition, and s2 represent the risk condition. Through A... riskThe expression (t,s2) shows that the risky working conditions and the normal working conditions are closely related. The degree of this relationship is represented by λ, which is a dynamic weight value obtained through continuous optimization during training.

[0091] The state transition module is primarily responsible for calculating the sum of local probability paths from the initial state to the current operating state, including:

[0092] The sum of the local probability paths from the initial state to the current operating state is calculated using the following expression:

[0093]

[0094] Among them, B con (t,s1) represents the sum of local probability paths from the initial state to the current normal operating condition, indicating the probabilistic influence of the past state sequence on the current state. P con (s3,s1) represents the probability of transitioning from the normal operating condition s3 at time t-1 to the normal operating condition s1 at time t, F con (t-1,s3) represents the global state probability corresponding to the normal operating condition from the initial time to the previous time t-1. risk (t,s2) represents the sum of local probability paths from the initial state to the current risky working state, P risk (s4,s2) represents the probability of transitioning from risk condition s4 at time t-1 to risk condition s2 at time t, F risk (t-1,s4) represents the global state probability of the risky working condition from the initial time to the previous time t-1, and S represents the set of working conditions.

[0095] The global probability of the operating state from the initial state to the current state is calculated using the following expression:

[0096] Among them, P con (s3,s1) and P risk The calculation method for (s4,s2) can be a conventional calculation method, such as first constructing a learnable normal state transition probability matrix Pcon based on the characteristics of normal operating conditions, and constructing a learnable risk state transition probability matrix Prisk based on the characteristics of risky operating conditions.

[0097] The optimization process uses a recursive iteration to minimize the log-likelihood estimate, resulting in a loss function for the probability of a single state:

[0098]

[0099] Where state can be con or risk, s can be s1 or s2, representing the predicted value, and y represents the actual value corresponding to con or risk.

[0100] The overall model is solved using the losses from normal drilling operations and the losses from abnormal potential risk conditions, i.e.:

[0101] loss = loss con +μloss risk

[0102] The above expression is the comprehensive loss function that combines normal and risky operating conditions, where μ is the weighting coefficient.

[0103] The method for identifying marine drilling conditions also includes:

[0104] During the training of the preset drilling condition identification model, sensor temporal dependencies and drilling condition temporal dependencies are distinguished. The local probability paths for each drilling condition are optimized, and the optimized local probability paths replace the original local probability paths in the training process. A dynamic programming method is then used to find the optimal drilling condition sequence path under dual dependencies. The modeling method is explained below:

[0105] Operating condition sequence decoding model: Using dynamic programming, it models the relationship between the current operating condition and a series of past operating conditions, searches for the optimal current state sequence in reverse chronological order, solves for the probability of operating conditions in the time series, and achieves effective identification of operating conditions. The initial state is:

[0106]

[0107] Where T is the moment when the probability of the optimal working condition is calculated, which is the initial moment of the working condition sequence decoding. The search for the optimal working condition sequence begins from this moment. con (T,s) is the maximum probability value of all nodes s in the normal operating condition at the current time T. risk (T,s) is the maximum probability value of all nodes s in the current time-T risk condition. con (T,s) is the node in the highest probability normal state corresponding to the current time T, bt risk (T,s) is the node with the highest probability of an abnormal state at the current time T, corresponding to:

[0108] The posterior probability from time t to time t-1 is:

[0109]

[0110] Among them, P con (s t-1 |s t) is the known normal operating condition s at time t-1. t-1 After the event, the normal operating condition s t-1 The prior probability of P. con (s t |s t-1 ) is a known s t-1 The conditional probability of the normal operating state occurring t-1 after the initial state is given by the state transition matrix P from the initial state at time t-1 to the normal operating state at time t. con (s t-1 |s t ).

[0111] P risk (s t-1 |s t ) is the known risk condition state s at time t-1. t-1 After it occurs, the risk condition status s t-1 The prior probability of P. risk (s t |s t-1 P is the conditional probability of a risky operating condition occurring after a known risky operating condition occurs at time t-1, which is the transition matrix P from the risky operating condition at time t-1 to the risky operating condition at time t. risk (s t-1 |s t ).

[0112]

[0113] Among them, v con (t-1,s t-1 () represents the normal operating state s at time t-1, which is the result of reversing the time sequence. t-1 The maximum probability value of all nodes in the bt. con (t-1,s t-1 (This represents the time sequence in reverse order from time t-1 to s) t-1 The node visited in the previous time step of the path with the highest probability in a state is the node visited by the shortest path: v risk (t-1,s t-1 () represents the risk condition state s at time t-1, which is the result of reversing the time sequence. t-1 The maximum probability value of all nodes in the bt. risk (t-1,s t-1 (This represents the time sequence in reverse order from time t-1 to s) t-1 The node visited by the path with the highest probability in the risk state at the previous time step is the node visited by the shortest path.

[0114] The probability of obtaining the optimal path is:

[0115]

[0116] When complex drilling conditions occur, drilling operations and risk situations combine. In a specific embodiment, the set of normal drilling operation conditions includes drilling, tripping, and circulation, specifically categorized as drilling, tripping, tripping, single connection, empty well, and circulation. Abnormal potential risk conditions include five risk scenarios: overflow, lost circulation, well collapse, stuck pipe, and normal. Drilling sensor data related to complex conditions in the block and adjacent wells is collected, including logging data, formation parameter data, and wellbore trajectory data. Sensor data is labeled with the required identification conditions to ensure data quality and diversity, covering all possible drilling conditions.

[0117] The training process for the coarse-grained stratigraphic representation model includes training the representation network, adaptively determining the number of stratigraphic layers, and determining the cluster set. The specific training process is as follows:

[0118] Network Training: In this embodiment, triplet loss is used to train the network parameters, and Euclidean distance is used to calculate the similarity of the embedding matrices. The network structure of the coarse-grained representation model includes an embedding layer, three sets of standard residual convolutional blocks, and a pooling layer. The parameters of each layer in the initialization module are initialized, and the training dataset is divided into multiple batches, each containing a certain number of samples. Positive and negative samples are separated based on stratigraphic labels and spatial physical distance. The Euclidean distance between the coarse-grained representation matrix of the anchor point sample and the coarse-grained representation matrix of the positive sample, as well as the Euclidean distance between the anchor point sample and the coarse-grained representation matrix of the negative sample, are calculated. Backpropagation and gradient descent are used to update the parameters of the embedding layer, standard residual convolutional blocks, and pooling layers based on the calculated loss function.

[0119] An adaptive method for determining the number of formations is employed: the elbow method is used to calculate the total sum of squared errors under different numbers of clusters, thereby determining the optimal number of clusters in the clustering algorithm. Specifically, this embodiment uses K-means as the clustering algorithm. For different cluster centers (K = 20-30), the sum of squared distances from all points within each cluster to the cluster center is calculated and compared under different K values. The trend of the sum of squared distances as the K value increases is observed to obtain specific elbow points. Three-quarters of the K value corresponding to the elbow point is taken as the optimal number of formations.

[0120] Cluster set determination: Set the K value to the optimal number of formations, calculate and record the center point of each cluster. Calculate the distance between each data point in the dataset and each cluster center, and record the cluster represented by the nearest cluster center. Update and record the drilling information closest to the cluster center.

[0121] Based on the coarse formation representation model, clusters are formed. A corresponding number of locally optimal working condition representation models and globally optimal working condition prediction models are trained. Data samples from each cluster are used as training data, and the model weight files are obtained and recorded. Samples include drilling sensor data related to complex working conditions, including logging data, formation parameter data, and wellbore trajectory data. The specific training scheme is as follows:

[0122] Determining the time window length parameter: Multiple time window lengths are selected as candidates, such as 2 minutes, 5 minutes, 10 minutes, half an hour, 1 hour, and 2 hours. For each candidate time window, the coefficient of variation of the data within it is calculated. The coefficients of variation of the data under different window lengths are compared, and the data fluctuations of each window length are recorded. The top five window lengths with the highest coefficients of variation are selected as candidate window lengths for further analysis. These windows contain more information on stratigraphic and working condition changes. For the five initially selected window lengths, the K-fold cross-validation method is used to calculate the accuracy of the model and evaluate its performance. Based on the cross-validation results, the window length with the highest accuracy is selected as the optimal time window length for the backbone network model used for the key stratigraphic and working condition analysis of this block.

[0123] Network hyperparameter determination: Using a grid search technique, the model is trained for multiple hyperparameter combinations (including the depth of the feature extraction layer, etc.) using the optimal time window length determined above. The model performance under each hyperparameter combination is evaluated, and the combination with the best performance is selected as the final hyperparameters of the model.

[0124] The coarse formation representation model identification process includes similar cluster selection and nearest neighbor well selection. This embodiment uses K-nearest neighbors as the distance calculation method for nearest neighbor well selection. Specifically:

[0125] Similar cluster selection: The pre-trained coarse stratum representation model is called to obtain the representation model of the test data. The distance between the cluster center and the storage cluster center is calculated. The cluster center closest to the cluster center is selected as the similar cluster. The parameters of the local optimal working condition representation model and the global optimal working condition prediction model are initialized to the pre-trained model parameters of the corresponding cluster center.

[0126] Nearest neighbor well selection: Calculate the embedding matrix of all wells in the cluster data and the K nearest neighbor wells in the test data. Select the well with the closest physical distance as the nearest neighbor well.

[0127] This embodiment uses the Viterbi algorithm as the dynamic programming decoding algorithm, and the specific recognition scheme is as follows:

[0128] After denoising and standardizing the collected data using the pre-trained model and data features from the nearest well, the dataset is divided into time windows, and multiple time segments are selected to extract temporal features for different formations and operating conditions. A multi-scale convolutional network is used to extract time-domain and frequency-domain information from drilling parameters, obtaining general basic features of the time-series information. A self-attention mechanism is used to extract feature matrices related to operating conditions and risk characteristics. By dynamically focusing on local information to weight the relevance of the global and task objectives, a feature matrix with contextual information is obtained. The operating condition feature matrix and the risk feature matrix are aggregated to generate a risk state representation matrix, and a learnable state transition probability matrix is ​​established. The overall model is optimized by minimizing log-likelihood estimation, and the Viterbi algorithm is used for reverse decoding to find the current optimal state sequence in reverse time, achieving accurate identification of complex operating conditions.

[0129] The method for identifying marine drilling conditions provided in this invention has the following beneficial technical effects:

[0130] (1) There is less risk data, and the distribution of drilling operation data and risk data is uneven, which can balance the dataset well and avoid the model being overly biased towards a certain type of data;

[0131] (2) The general feature extraction network utilizes a multi-scale convolutional network, selecting multiple time segments to consider the temporal correlation of drilling parameters. The different transmission times required for different formations and working conditions are represented by a multi-segment temporal feature extraction method;

[0132] (3) Compared with the technique of predicting complex working conditions separately, this method reduces the complexity of the model, and can see the transition and prediction probability at each time step, which helps to interpret the prediction results of each process more clearly and helps engineers understand the relationship between different states.

[0133] (4) The separate loss function allows risk and normal drilling operations to be optimized and updated independently. If the pattern of a certain type of state changes (e.g. due to the introduction of new drilling technology or new risk states), only the corresponding sub-model needs to be updated.

[0134] (5) It takes into account different time characteristics and frequency resolution, and can adaptively carry out real-time monitoring.

[0135] The offshore drilling condition identification method provided in this invention acquires drilling condition data to be identified; identifies the drilling condition data based on a preset drilling condition identification model to obtain drilling condition identification results; wherein, the preset drilling condition identification model aggregates normal operating condition features and risk operating condition features, and is obtained by training a comprehensive loss function combining normal and risk operating conditions based on a real-time state transition equation; the real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current moment and the sum of the local probability paths of the operating condition from the initial state to the current operating condition state, which can improve the timeliness and accuracy of drilling condition identification.

[0136] Furthermore, the preset drilling condition identification model is established, including:

[0137] Obtain drilling data samples, and represent the drilling data samples with local optimal operating conditions to obtain a local optimal operating condition representation matrix; the above embodiments can be referred to for explanation, and will not be repeated here.

[0138] Determine the normal operating condition feature matrix and the risk operating condition feature matrix, respectively represented by the local optimal operating condition representation matrix, and obtain the probability of transitioning to the corresponding operating condition state at the current time based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network; the above embodiments can be referred to for explanation, and will not be repeated here.

[0139] Calculate the sum of the local probability paths of the operating condition from the initial state to the current operating condition state, and use the sum of the probability of transitioning to the corresponding operating condition state at the current time and the sum of the local probability paths of the operating condition as the real-time state transition equation; refer to the above embodiments for explanation, and will not be repeated here.

[0140] The comprehensive loss function is constructed based on the real-time state transition equation, and trained until convergence, thus obtaining the preset drilling condition identification model. This can be referred to the above embodiments for further explanation and will not be repeated here.

[0141] Furthermore, the acquisition of drilling data samples includes:

[0142] The model training dataset corresponding to the adjacent wells of the drilling well is used as the initial drilling data sample; this can be referred to the above embodiment for explanation, and will not be repeated here.

[0143] The initial drilling data sample is preprocessed to obtain the drilling data sample. This can be described with reference to the above embodiments and will not be repeated here.

[0144] Further, the step of representing the drilling data sample with local optimal operating conditions to obtain a local optimal operating condition representation matrix includes:

[0145] Local features are extracted from the drilling data samples using a self-attention weighted method, and then these local features are concatenated to obtain the locally optimal operating condition representation matrix. This can be referred to the above embodiments for further explanation and will not be repeated here.

[0146] Further, the step of obtaining the probability of transitioning to the corresponding operating state at the current moment based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network includes:

[0147] The probability of transitioning to the corresponding operating state at the current moment is calculated using the following expression:

[0148] A con (t,s1)=f1(MultiHead con )

[0149] A risk (t,s2)=f2(λMultiHead risk +(1-λ)MultiHead con )

[0150] Among them, A con (t,s1) represents the probability of transitioning to the corresponding normal operating condition at the current moment; MultiHead con The normal operating condition feature matrix is ​​represented by f1, which represents the first pre-trained neural network, and A is represented by f1. risk (t,s2) represents the probability of transitioning to the corresponding risky operating condition at the current moment; MultiHead risk Let f1 represent the risk condition feature matrix, f2 represent the pre-trained second neural network, λ represent the training weights of the second neural network, t represent the current time t, s1 represent the normal operating condition, and s2 represent the risk condition. Refer to the above embodiments for further explanation; further details are omitted.

[0151] Furthermore, the calculation of the sum of local probability paths of the operating condition from the initial state to the current operating condition includes:

[0152] The sum of the local probability paths from the initial state to the current operating state is calculated using the following expression:

[0153]

[0154] Among them, B con (t,s1) represents the sum of local probability paths from the initial state to the current normal operating condition, indicating the probabilistic influence of the past state sequence on the current state. P con (s3,s1) represents the probability of transitioning from the normal operating condition s3 at time t-1 to the normal operating condition s1 at time t, Fcon (t-1,s3) represents the global state probability corresponding to the normal operating condition from the initial time to the previous time t-1. risk (t,s2) represents the sum of local probability paths from the initial state to the current risky working state, P risk (s4,s2) represents the probability of transitioning from risk condition s4 at time t-1 to risk condition s2 at time t, F risk (t-1,s4) represents the global state probability of the risky working condition from the initial time to the previous time t-1, and S represents the set of working conditions.

[0155] The global probability of the operating state from the initial state to the current state is calculated using the following expression:

[0156] The above embodiments can be referred to for explanation, and will not be repeated here.

[0157] Furthermore, the method for identifying marine drilling conditions also includes:

[0158] During the training of the preset drilling condition identification model, sensor temporal dependencies and drilling condition temporal dependencies are distinguished. The local probability paths for the drilling conditions are optimized, and the optimized local probability paths replace the original local probability paths for the training process. A dynamic programming method is then used to find the optimal drilling condition sequence path under dual dependencies. This can be referred to the above embodiments for further explanation and will not be repeated here.

[0159] Figure 2 This is a schematic diagram of the structure of a marine drilling condition identification device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the marine drilling condition identification device provided in this embodiment of the invention includes an acquisition unit 201 and an identification unit 202, wherein:

[0160] The acquisition unit 201 is used to acquire drilling condition data to be identified; the identification unit 202 is used to identify the drilling condition data to be identified based on a preset drilling condition identification model to obtain drilling condition identification results; wherein, the preset drilling condition identification model aggregates normal operating condition features and risk operating condition features, and is obtained by training a comprehensive loss function combining normal operating conditions and risk operating conditions based on a real-time state transition equation; the real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current time and the sum of the local probability paths of the operating condition from the initial state to the operating condition state at the current time.

[0161] Specifically, the acquisition unit 201 in the device is used to acquire drilling condition data to be identified; the identification unit 202 is used to identify the drilling condition data to be identified based on a preset drilling condition identification model to obtain the drilling condition identification result; wherein, the preset drilling condition identification model aggregates normal operating condition features and risk operating condition features, and is obtained by training a comprehensive loss function combining normal operating condition and risk operating condition based on a real-time state transition equation; the real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current time and the sum of the local probability paths of the operating condition from the initial state to the operating condition state at the current time.

[0162] The marine drilling condition identification device provided in this embodiment of the invention acquires drilling condition data to be identified; identifies the drilling condition data based on a preset drilling condition identification model to obtain drilling condition identification results; wherein, the preset drilling condition identification model aggregates normal operating condition features and risk operating condition features, and is obtained by training a comprehensive loss function combining normal and risk operating conditions based on a real-time state transition equation; the real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current moment and the sum of the local probability paths of the operating condition from the initial state to the current operating condition state, which can improve the timeliness and accuracy of drilling condition identification.

[0163] The embodiments of the present invention provide an offshore drilling condition identification device that can be used to execute the processing flow of the above-described method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above-described method embodiments.

[0164] Figure 3 This is a schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention, such as... Figure 3 As shown, the computer device includes: a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302. When the processor 302 executes the computer program, it implements the following method:

[0165] Acquire drilling condition data to be identified;

[0166] The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result.

[0167] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0168] This embodiment discloses a computer program product, which includes a computer program that, when executed by a processor, implements the following method:

[0169] Acquire drilling condition data to be identified;

[0170] The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result.

[0171] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0172] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the following method:

[0173] Acquire drilling condition data to be identified;

[0174] The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result.

[0175] The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

[0176] Compared with existing technologies, the offshore drilling condition identification method provided in this invention acquires drilling condition data to be identified; identifies the drilling condition data based on a preset drilling condition identification model to obtain drilling condition identification results; wherein, the preset drilling condition identification model aggregates normal operating condition features and risk operating condition features, and is obtained by training a comprehensive loss function combining normal and risk operating conditions based on a real-time state transition equation; the real-time state transition equation is the sum of the probability of transitioning to the corresponding operating condition state at the current moment and the sum of the local probability paths of the operating condition from the initial state to the current operating condition state, which can improve the timeliness and accuracy of drilling condition identification.

[0177] 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.

[0178] 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.

[0179] 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.

[0180] 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.

[0181] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0182] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for identifying marine drilling conditions, characterized in that, include: Acquire drilling condition data to be identified; The drilling condition data to be identified is identified based on a preset drilling condition identification model to obtain the drilling condition identification result. The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

2. The method for identifying marine drilling conditions according to claim 1, characterized in that, Establishing the preset drilling condition identification model includes: Obtain drilling data samples, perform local optimal operating condition representation on the drilling data samples, and obtain a local optimal operating condition representation matrix; Determine the normal operating condition feature matrix and the risk operating condition feature matrix, respectively, represented by the local optimal operating condition representation matrix, and obtain the probability of transitioning to the corresponding operating condition state at the current time based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network; Calculate the sum of the local probability paths of the working condition from the initial state to the current working condition state, and use the sum of the probability of transitioning to the corresponding working condition state at the current time and the sum of the local probability paths of the working condition as the real-time state transition equation. The comprehensive loss function is constructed based on the real-time state transition equation, and the comprehensive loss function is trained until convergence to obtain the preset drilling condition identification model.

3. The method for identifying marine drilling conditions according to claim 2, characterized in that, The acquisition of drilling data samples includes: Use the model training dataset corresponding to the adjacent wells of the drilling well as the initial drilling data sample; The initial drilling data sample is preprocessed to obtain the drilling data sample.

4. The method for identifying marine drilling conditions according to claim 2, characterized in that, The step of representing the drilling data samples as local optimal operating conditions to obtain a local optimal operating condition representation matrix includes: Local features are extracted from the drilling data samples using a self-attention weighted method, and then the local features are concatenated to obtain the local optimal working condition representation matrix.

5. The method for identifying marine drilling conditions according to claim 2, characterized in that, The step of obtaining the probability of transitioning to the corresponding operating state at the current moment based on the normal operating condition feature matrix, the risk operating condition feature matrix, and the pre-trained neural network includes: The probability of transitioning to the corresponding operating state at the current moment is calculated using the following expression: A con (t,s1)=f1(MultiHead con ) A risk (t,s2)=f2(λMultiHead risk +(1-λ)MultiHead con ) Among them, A con (t,s1) represents the probability of transitioning to the corresponding normal operating condition at the current moment; MultiHead con The normal operating condition feature matrix is ​​represented by f1, which represents the first pre-trained neural network, and A is represented by f1. risk (t,s2) represents the probability of transitioning to the corresponding risky operating condition at the current moment; MultiHead risk Let f1 represent the risk condition feature matrix, f2 represent the pre-trained second neural network, λ represent the training weights of the second neural network, t represent the current time as time t, s1 represent the normal operating condition, and s2 represent the risk operating condition.

6. The method for identifying marine drilling conditions according to claim 5, characterized in that, The calculation of the sum of local probability paths of the operating condition from the initial state to the current operating condition includes: The sum of the local probability paths from the initial state to the current operating state is calculated using the following expression: Among them, B con (t,s1) represents the sum of local probability paths from the initial state to the current normal operating condition, indicating the probabilistic influence of the past state sequence on the current state. P con (s3,s1) represents the probability of transitioning from the normal operating condition s3 at time t-1 to the normal operating condition s1 at time t, F con (t-1,s3) represents the global state probability corresponding to the normal operating condition from the initial time to the previous time t-1. risk (t,s2) represents the sum of local probability paths from the initial state to the current risky working state, P risk (s4,s2) represents the probability of transitioning from risk condition s4 at time t-1 to risk condition s2 at time t, F risk (t-1,s4) represents the global state probability of the risky working condition from the initial time to the previous time t-1, and S represents the set of working conditions. The global probability of the operating state from the initial state to the current state is calculated using the following expression: F con (t,s1)=A con (t,s1)+B con (t,s1) F risk (t,s2)=A risk (t,s2)+B risk (t,s2)。 7. The method for identifying marine drilling conditions according to claim 6, characterized in that, The method for identifying marine drilling conditions also includes: During the training of the preset drilling condition identification model, the sensor time-series dependency and the working condition time-series dependency are distinguished, the working condition local probability path is optimized, and the optimized working condition local probability path is used to replace the original working condition local probability path in the training process calculation. The dynamic programming method is used to find the optimal working condition sequence path under dual dependency.

8. A device for identifying marine drilling conditions, characterized in that, include: The acquisition unit is used to acquire drilling condition data to be identified. The identification unit is used to identify the drilling condition data to be identified based on a preset drilling condition identification model, and obtain the drilling condition identification result. The preset drilling condition identification model aggregates normal condition features and risk condition features, and is obtained by training a comprehensive loss function combining normal and risk conditions based on the real-time state transition equation. The real-time state transition equation is the sum of the probability of transitioning to the corresponding condition state at the current moment and the sum of the local probability paths of the condition from the initial state to the current condition state.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.