Method and device for detecting drilling risks based on equipment energy consumption

By constructing a collaborative energy consumption map of equipment and drilling construction time sequence characteristics, and using graph neural networks and Transformer models to fuse features for drilling risk prediction, the problem that existing technologies cannot adapt to complex drilling scenarios is solved, and accurate drilling risk detection and safety alerts are achieved.

CN121563192BActive Publication Date: 2026-06-23CHINA UNIV OF PETROLEUM (BEIJING)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (BEIJING)
Filing Date
2025-10-21
Publication Date
2026-06-23

Smart Images

  • Figure CN121563192B_ABST
    Figure CN121563192B_ABST
Patent Text Reader

Abstract

The present specification provides a drilling risk detection method and device based on equipment energy consumption, which can be used in the field of drilling exploration technology. Based on the method, by first acquiring the equipment energy consumption data and drilling engineering parameters of the target well, and respectively using different structure models to process the equipment energy consumption data and drilling engineering parameters of the target well, the equipment energy consumption space coupling characteristics of the target well and the drilling construction time sequence evolution characteristics of the target well based on the working condition are extracted. Then by using the above equipment energy consumption space coupling characteristics and drilling construction time sequence evolution characteristics, the mutual influence of various factors in the drilling construction process can be considered, and a more comprehensive and detailed drilling risk detection can be performed based on time and space dimensions, so that it can be better applied to complex drilling construction scenes and accurately detect and identify drilling risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual belongs to the field of drilling exploration technology, and in particular relates to methods and devices for detecting drilling risks based on equipment energy consumption. Background Technology

[0002] Drilling operations in areas with complex geological formations often involve complex and variable working conditions, leading to numerous uncertainties during the drilling process. Existing drilling risk prediction methods can only perform simple, surface-level risk predictions and are not well adapted to complex drilling scenarios, thus failing to accurately identify drilling risks.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This manual provides a method and apparatus for detecting drilling risks based on equipment energy consumption, which is well applicable to complex drilling operation scenarios and can accurately detect and identify drilling risks.

[0005] This manual provides a method for detecting drilling risks based on equipment energy consumption, including:

[0006] Acquire equipment energy consumption data and drilling engineering parameters during the drilling process of the target well;

[0007] Based on the equipment energy consumption data, construct a collaborative energy consumption map of key drilling equipment for the target well;

[0008] The equipment collaborative energy consumption map is processed using a preset first model to extract the spatial coupling features of equipment energy consumption for the target well; the drilling engineering parameters are processed using a preset second model to extract the drilling construction time sequence evolution features of the target well based on its operating conditions; wherein, the preset first model is a graph neural network-based model and the preset second model is a Transformer-based model.

[0009] By integrating the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation, a target fusion characteristic for the target well is obtained;

[0010] Based on the target fusion characteristics, determine whether the target well has drilling risks.

[0011] In one embodiment, the equipment energy consumption data includes at least one of the following: top drive power, mud pump load, winch power, and motor current.

[0012] In one embodiment, constructing a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data includes:

[0013] Obtain the correlation relationships of key drilling equipment; wherein, the correlation relationships include at least one of the following: physical connection relationship, collaborative operation relationship, and data-driven relationship;

[0014] Based on the equipment identification of key drilling equipment, nodes corresponding to the key drilling equipment are set up; and based on the equipment energy consumption data, the corresponding energy consumption characteristics are marked on the corresponding nodes to obtain the initial energy consumption map.

[0015] Based on the relationships between key drilling equipment, related nodes in the initial energy consumption map are connected using matching edges; and corresponding relationship features are marked on the edges to obtain the equipment collaborative energy consumption map of the key drilling equipment for the target well.

[0016] In one embodiment, the drilling engineering parameters include at least one of the following: drilling pressure, drilling speed, rotational speed, and pump displacement.

[0017] In one embodiment, the preset second model includes at least: a working condition identification sub-model, and multiple time-series evolution feature extraction sub-models connected to the working condition identification sub-model;

[0018] The multiple temporal evolution feature extraction sub-models correspond to different working conditions, and the temporal evolution feature extraction sub-models are feature extraction network models built based on the Transformer structure.

[0019] In one embodiment, the drilling engineering parameters are processed using a preset second model to extract the drilling construction time-series evolution characteristics of the target well based on its operating conditions, including:

[0020] The working condition identification sub-model is used to determine the working condition of the target well and the relevant working condition embedding vector based on drilling engineering parameters.

[0021] Based on the operating conditions of the target well, a matching target time-series evolution feature extraction sub-model is determined from multiple time-series evolution feature extraction sub-models;

[0022] The drilling engineering parameters are processed using a target temporal evolution feature extraction sub-model to extract initial temporal evolution features;

[0023] By splicing the working condition embedding vector and the initial temporal evolution features, the drilling construction temporal evolution features of the target well based on its working condition are obtained.

[0024] In one embodiment, the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation are fused to obtain target fused characteristics for the target well, including:

[0025] By using a fusion layer based on a cross-modal attention mechanism, the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation are cross-operated and spliced ​​to obtain the target fusion characteristics of the target well.

[0026] In one embodiment, determining whether a target well has drilling risk based on the target fusion characteristics includes:

[0027] The target fusion features are processed using a preset third model to obtain a risk prediction value and a confidence parameter for the risk prediction value; wherein the preset third model is a model based on a deep ensemble network.

[0028] Based on the predicted risk value and confidence parameters, determine whether the target well has drilling risks.

[0029] This manual also provides a drilling risk detection device based on equipment energy consumption, including:

[0030] The acquisition module is used to acquire equipment energy consumption data and drilling engineering parameters during the drilling process of the target well;

[0031] The construction module is used to construct a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data.

[0032] The extraction module is used to process the equipment collaborative energy consumption map using a preset first model to extract the spatial coupling features of equipment energy consumption for the target well; and to process the drilling engineering parameters using a preset second model to extract the drilling construction time sequence evolution features of the target well based on its operating conditions; wherein the preset first model is a graph neural network-based model and the preset second model is a Transformer-based model.

[0033] The fusion module is used to fuse the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation to obtain the target fusion characteristics of the target well;

[0034] The determination module is used to determine whether there is a drilling risk in the target well based on the target fusion characteristics.

[0035] This specification also provides a computer program product comprising a computer program that, when executed by a processor, implements the relevant steps of the drilling risk detection method based on equipment energy consumption.

[0036] Based on the drilling risk detection method and apparatus based on equipment energy consumption provided in this specification, the following steps are taken: First, equipment energy consumption data and drilling engineering parameters of the target well drilling process are acquired. Then, based on the equipment energy consumption data, a collaborative energy consumption map of key drilling equipment for the target well is constructed. The collaborative energy consumption map is processed using a preset first model to extract spatial coupling features of equipment energy consumption for the target well. Simultaneously, the drilling engineering parameters are processed using a preset second model to extract the drilling construction time-series evolution features of the target well based on its operating conditions. The preset first model is a graph neural network-based model, and the preset second model is a Transformer-based model. The spatial coupling features of equipment energy consumption and the drilling construction time-series evolution features are then fused to obtain target fusion features for the target well. Based on the target fusion features, it is determined whether the target well has drilling risks. By processing the equipment energy consumption data and drilling engineering parameters of the target well using models with different structures, spatial coupling characteristics of equipment energy consumption and temporal evolution characteristics of drilling operations based on the target well's operating conditions are extracted. Furthermore, by integrating these spatial coupling characteristics and temporal evolution characteristics, the interaction of multiple factors during drilling operations can be considered simultaneously. This allows for comprehensive and detailed drilling risk detection based on both time and space dimensions, making it well-suited for complex drilling scenarios. It accurately detects and identifies drilling risks and provides timely alerts to ensure drilling safety. Attached Figure Description

[0037] To more clearly illustrate the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic flowchart of a drilling risk detection method based on equipment energy consumption provided in one embodiment of this specification;

[0039] Figure 2 This is a schematic diagram of one embodiment of the drilling risk detection method based on equipment energy consumption provided in the embodiments of this specification, applied in a scenario example.

[0040] Figure 3 This is a schematic diagram of one embodiment of the drilling risk detection method based on equipment energy consumption provided in the embodiments of this specification, applied in a scenario example.

[0041] Figure 4This is a schematic diagram of one embodiment of the drilling risk detection method based on equipment energy consumption provided in the embodiments of this specification, applied in a scenario example.

[0042] Figure 5 This is a schematic diagram of the structural composition of a computer device provided in one embodiment of this specification;

[0043] Figure 6 This is a schematic diagram of the structural composition of a drilling risk detection device based on equipment energy consumption, provided in one embodiment of this specification.

[0044] Figure 7 This is a schematic diagram illustrating one embodiment of the drilling risk detection method based on equipment energy consumption provided in the embodiments of this specification, applied in a scenario example. Detailed Implementation

[0045] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0046] It should be noted that the information and data related to users involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by the relevant parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, and necessary confidentiality measures have been taken. They do not violate public order and good morals, and corresponding operation entry points are provided for users or relevant parties to choose to authorize or refuse.

[0047] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0048] See Figure 1 As shown in the embodiments of this specification, a method for detecting drilling risks based on equipment energy consumption is provided. Specifically, this method may include the following:

[0049] S101: Obtain equipment energy consumption data and drilling engineering parameters during the drilling process of the target well;

[0050] S102: Based on the equipment energy consumption data, construct a collaborative energy consumption diagram of the key drilling equipment for the target well;

[0051] S103: Process the equipment collaborative energy consumption map using a preset first model to extract the spatial coupling features of equipment energy consumption for the target well; process the drilling engineering parameters using a preset second model to extract the drilling construction time sequence evolution features of the target well based on its operating conditions; wherein, the preset first model is a graph neural network-based model, and the preset second model is a Transformer-based model.

[0052] S104: By integrating the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation, a target fusion characteristic for the target well is obtained;

[0053] S105: Based on the target fusion characteristics, determine whether the target well has drilling risks.

[0054] Specifically, the aforementioned target wells can be understood as oil and gas wells that are currently being drilled and whose drilling risks need to be monitored.

[0055] The aforementioned equipment energy consumption data can be understood as data that directly or indirectly reflects the operating energy consumption of key drilling equipment used in the drilling process of the target well.

[0056] Specifically, the aforementioned key drilling equipment may include at least one of the following: top drive, mud pump, winch, motor, etc. The energy consumption data for the aforementioned equipment may include at least one of the following: top drive power, mud pump load, winch power, motor current, etc.

[0057] It should be noted that the aforementioned equipment energy consumption data is characterized by multiple channels, complex responses, and coupling relationships between devices. Based on this equipment energy consumption data, by describing the operating energy consumption of key drilling equipment during the target well drilling process, the behavioral characteristics of the key drilling equipment during the target well drilling process can be reflected. Furthermore, through the individual behavioral characteristics of these key drilling equipment, as well as the behavioral characteristics between key drilling equipment, the operating conditions during the target well drilling process can be indirectly reflected, so as to analyze drilling risks from the perspective of drilling equipment.

[0058] The aforementioned drilling parameters can be understood as data reflecting the specific operations and conditions of drilling the target well. Based on these drilling parameters, drilling risks can be analyzed directly from the perspective of drilling operations.

[0059] Specifically, the aforementioned drilling parameters may include at least one of the following: drilling pressure, drilling speed, rotational speed, and pump displacement.

[0060] Of course, it should be noted that the equipment energy consumption data and drilling parameters listed above are only illustrative. In actual implementation, depending on the specific circumstances and processing requirements, the above equipment energy consumption data and drilling parameters may also include other suitable parameter data besides those listed above. This manual does not limit this.

[0061] The aforementioned equipment collaborative energy consumption map can be specifically a map constructed based on equipment energy consumption data, which reflects the individual behavior of key drilling equipment based on energy consumption during the drilling operation of the target well, as well as the influence of their behavior on each other.

[0062] The aforementioned spatial coupling characteristics of equipment energy consumption can be understood as a type of equipment characteristic based on spatial dimensions, used to describe key drilling equipment and the interaction between key equipment, and related to the drilling construction of the target well.

[0063] The aforementioned drilling construction time sequence evolution characteristics can be understood as an engineering feature based on the time dimension, used to describe the current drilling construction, as well as the time sequence changes in conjunction with previous drilling construction.

[0064] The aforementioned first model can be understood as an algorithm model based on a graph neural network structure that can extract and output the corresponding spatial coupling features of device energy consumption from a spatial dimension by processing the device collaborative energy consumption map.

[0065] The aforementioned second model can be understood as an algorithm model based on the Transformer structure, which can extract and output the corresponding drilling construction time sequence evolution features by processing drilling engineering parameters from the time dimension.

[0066] In practical implementation, the fusion layer can be integrated with the aforementioned equipment energy consumption spatial coupling characteristics and drilling construction temporal evolution characteristics to obtain a more comprehensive target fusion feature of the target well that simultaneously covers both the perspective of the drilling equipment and the perspective of drilling construction. Furthermore, based on the aforementioned target fusion feature, the current risk prediction value of the target well regarding drilling risk can be predicted; then, based on this risk prediction value, it can be determined whether the target well faces drilling risk.

[0067] Based on the above embodiments, by first processing the equipment energy consumption data and drilling engineering parameters of the target well using models with different structures, spatial coupling characteristics of equipment energy consumption and temporal evolution characteristics of drilling operations based on the target well's operating conditions are extracted. Then, by integrating the above-mentioned spatial coupling characteristics of equipment energy consumption and temporal evolution characteristics of drilling operations, the interaction effects of multiple factors can be considered simultaneously. Furthermore, based on both time and space dimensions, the spatial interaction effects of key drilling equipment and the temporal changes of drilling operations during the target well drilling process can be analyzed in detail, enabling more comprehensive and detailed drilling risk prediction. This approach is well applicable to complex drilling scenarios and accurately detects and identifies drilling risks.

[0068] In some embodiments, the equipment energy consumption data may specifically include at least one of the following: top drive power, mud pump load, winch power, motor current, etc.

[0069] In some embodiments, the drilling engineering parameters may specifically include at least one of the following: drilling pressure, drilling speed, rotational speed, and pump displacement, etc.

[0070] In some embodiments, after acquiring the equipment energy consumption data and drilling engineering parameters of the target well drilling process, the equipment energy consumption data and drilling engineering parameters can be preprocessed; wherein, the preprocessing may specifically include: normalization processing, time window division operation, anomaly detection and correction, etc.

[0071] In some embodiments, see Figure 2 As shown, the above-mentioned equipment collaborative energy consumption map for key drilling equipment in the target well is constructed based on the equipment energy consumption data. In specific implementation, it may include the following:

[0072] S21: Obtain the correlation relationships of key drilling equipment; wherein, the correlation relationships include at least one of the following: physical connection relationship, cooperative operation relationship, and data-driven relationship;

[0073] S22: Based on the equipment identification of the key drilling equipment, set up nodes corresponding to the key drilling equipment; and based on the equipment energy consumption data, mark the corresponding energy consumption characteristics on the corresponding nodes to obtain the initial energy consumption map;

[0074] S23: Based on the correlation of key drilling equipment, connect the related nodes in the initial energy consumption map using matching edges; and mark the corresponding relationship features on the edges to obtain the equipment collaborative energy consumption map of the key drilling equipment for the target well.

[0075] The aforementioned data-driven relationships may include: interaction information between devices, and / or, Pearson correlation coefficient, etc.

[0076] In practice, the following steps can be taken: First, obtain a list of drilling equipment used during the drilling of the target well. Based on this list and the drilling plan for the target well, determine the usage method, duration, purpose, and connection method of each drilling rig. Then, conduct a correlation analysis between the usage duration, purpose, and method of the drilling equipment and drilling risk. Based on the correlation analysis results, select several drilling rigs whose correlation with drilling risk exceeds a preset threshold and designate them as key drilling rigs. Finally, determine the relationships between the key drilling rigs based on their connection method, purpose, and time of use.

[0077] Specifically, the physical connection relationship of key drilling equipment can be determined based on the connection method of key wells; then, based on the purpose and time of use of key drilling equipment, combined with the drilling construction plan of the target well, the collaborative operation relationship and data-driven relationship of key drilling equipment can be determined.

[0078] Based on the above embodiments, an equipment collaborative energy consumption map can be constructed using equipment energy consumption data. This map comprehensively reflects the individual behavior of key drilling equipment based on energy consumption during the drilling process of the target well, as well as the influence of their behavior on each other, based on spatial dimensions.

[0079] In some embodiments, the above-mentioned use of a preset second model to process the drilling engineering parameters and extract the drilling construction time-series evolution characteristics of the target well based on its operating conditions may specifically include the following:

[0080] S1: Based on the time information, the drilling engineering parameters are divided into multiple engineering parameter groups; where different engineering parameter groups correspond to different time ranges;

[0081] S2: According to the preset coding rules, the drilling engineering parameters contained in each engineering parameter group are mapped to the corresponding parameter codes respectively;

[0082] S3: Fill the parameter codes in each engineering parameter group into the corresponding data positions in the preset array template to obtain multiple arrays; when filling the preset array template, missing data positions can be filled with 0;

[0083] S4: Based on the time information, arrange and concatenate multiple arrays in order to obtain the corresponding multidimensional time series sequence;

[0084] S5: Use the preset second model to process the multidimensional time series to obtain the required drilling construction time series evolution characteristics.

[0085] Based on the above embodiments, the pre-set second model, based on the time dimension, can be used to effectively process drilling engineering parameters in order to extract drilling construction time sequence evolution characteristics that meet the requirements.

[0086] In some embodiments, the aforementioned preset first model may specifically be an algorithmic model based on Graph Attention Network (GAT) and / or Edge Conditional Graph Convolutional Network (EGCN).

[0087] Specifically, the Graph Attention Network (GAT) mentioned above refers to the introduction of attention mechanisms into spatial domain-based graph neural networks. By introducing attention mechanisms, better aggregation of neighbor nodes can be achieved, which is not only more robust to noisy neighbor nodes, but also makes the model more interpretable.

[0088] The aforementioned Edge Conditional Graph Convolutional Network (EGCN) can specifically refer to a deep learning model structure used to process graph-structured data. Its core is to update node representations by aggregating information from neighboring nodes.

[0089] Based on the above embodiments, when processing the energy consumption map of the device system using a preset first model based on graph attention network and / or edge condition graph convolutional network structure, the interaction influence of energy consumption between key devices corresponding to adjacent nodes in behavior can be considered more fully and comprehensively. In this way, the spatial coupling features of device energy consumption of the target well with relatively higher reference value can be extracted.

[0090] In some embodiments, the preset second model may include at least: a working condition identification sub-model, and a plurality of time-series evolution feature extraction sub-models connected to the working condition identification sub-model;

[0091] Among them, the above-mentioned multiple temporal evolution feature extraction sub-models correspond to different working conditions, and the temporal evolution feature extraction sub-models are feature extraction network models built based on the Transformer structure.

[0092] The aforementioned Transformer structure can specifically refer to a neural network structure that uses a Self-Attention structure to replace the RNN network structure commonly used in NLP tasks.

[0093] Specifically, the aforementioned multiple temporal evolution feature extraction sub-models are connected in parallel; the aforementioned working condition identification sub-model is connected in series with multiple temporal evolution feature extraction sub-models.

[0094] The aforementioned working condition identification sub-model can automatically identify the current working condition based on the input drilling engineering parameters. At the same time, it can also determine the current working condition characteristics reflected by the drilling engineering parameters based on the current working condition, and then output a corresponding working condition embedding vector that is adapted to the working condition identification sub-model based on the current working condition characteristics.

[0095] The specific operating conditions may include one of the following: drilling, circulation, reaming, tripping out of the hole, and running in. It should be noted that the operating conditions listed above are only illustrative. In actual implementation, other types of operating conditions may be included depending on the specific circumstances and processing requirements. This manual does not limit this.

[0096] The aforementioned multiple temporal evolution feature extraction sub-models correspond to different working conditions, and are specifically constructed by targeted training and learning using sample data from different working conditions.

[0097] The aforementioned sub-model for extracting temporal evolution features can utilize the dynamic evolution patterns and stage characteristics of the corresponding working conditions learned through previous training to perform time-based temporal analysis based on the input drilling engineering parameters, thereby obtaining and outputting the temporal evolution features of drilling operations under the corresponding working conditions.

[0098] Based on the above embodiments, by using the preset second model of the above structure, the drilling engineering parameters of the target well can be analyzed and processed more precisely by combining the specific laws and characteristics of the current working conditions of the target well, so as to obtain drilling construction time sequence evolution characteristics with relatively higher reference value and relatively smaller error.

[0099] In some embodiments, see Figure 3 As shown, the above-mentioned process of drilling engineering parameters using a preset second model to extract the drilling construction time-series evolution characteristics of the target well based on its operating conditions may include the following in specific implementation:

[0100] S31: Using the working condition identification sub-model, determine the working condition of the target well and the relevant working condition embedding vector based on the drilling engineering parameters;

[0101] S32: Based on the working conditions of the target well, determine the matching target time-series evolution feature extraction sub-model from multiple time-series evolution feature extraction sub-models;

[0102] S33: The drilling engineering parameters are processed using the target temporal evolution feature extraction sub-model to extract the initial temporal evolution features;

[0103] S34: Concatenate the working condition embedding vector and the initial temporal evolution features to obtain the drilling construction temporal evolution features of the target well based on its working condition.

[0104] The specific process of extracting the initial time-series evolution features using the target time-series evolution feature extraction sub-model can be found in the previous embodiment on using a preset second model to process the drilling engineering parameters and extract the drilling construction time-series evolution features of the target well based on its operating conditions. This specification will not repeat the details here.

[0105] Based on the above embodiments, the structural characteristics of the preset second model can be fully utilized to effectively process drilling engineering parameters and obtain drilling construction time sequence evolution characteristics that are closely coupled with the current working conditions of the target well and have relatively richer information.

[0106] In some embodiments, the above-described fusion of the equipment energy consumption spatial coupling characteristics and the drilling operation time sequence evolution characteristics yields target fusion characteristics for the target well. In specific implementations, this may include the following:

[0107] By using a fusion layer based on a cross-modal attention mechanism, the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation are cross-operated and spliced ​​to obtain the target fusion characteristics of the target well.

[0108] Specifically, when using the fusion layer to perform fusion operations on the spatial coupling characteristics of equipment energy consumption and the temporal evolution characteristics of drilling operations, an attention mechanism is also used to perform corresponding weighted operations on different types of features to obtain the final target fusion features.

[0109] Based on the above embodiments, the fusion layer can effectively integrate the spatial coupling characteristics of equipment energy consumption and the temporal evolution characteristics of drilling construction. These two characteristics are based on different dimensions and target different objects, but both reflect the drilling construction situation of the target well. In this way, a more comprehensive target fusion characteristic with high reference value can be obtained.

[0110] In some embodiments, see Figure 4 As shown, the above-mentioned determination of whether a target well has drilling risk based on the target fusion characteristics may include the following in specific implementation:

[0111] S41: The target fusion features are processed using a preset third model to obtain a risk prediction value and a confidence parameter for the risk prediction value; wherein the preset third model is a model based on a deep ensemble network.

[0112] S42: Based on the risk prediction value and confidence parameters, determine whether there is drilling risk in the target well.

[0113] The aforementioned third model may include at least: a feature processing network based on a deep ensemble network, and a risk identifier based on a multilayer perceptron (MLP) connected to the feature processing network.

[0114] The output of the aforementioned feature processing network is connected to the input of the risk identifier.

[0115] The aforementioned deep ensemble network can specifically refer to a network structure that improves the overall generalization ability and uncertainty estimation of the network by combining the predictions of multiple neural network structures.

[0116] In practical implementation, the feature processing network based on the above structure can better adapt to complex drilling construction scenarios. By fully and comprehensively considering and analyzing different factors in the target fusion features, as well as the role and impact of different factors on drilling risks, matching feature processing is performed to obtain and output potential drilling risk features that are more targeted and effective for drilling risk prediction.

[0117] The aforementioned Multilayer Perceptron (MLP) can specifically refer to a feedforward artificial neural network, which consists of multiple neurons (neural nodes). These neurons are arranged in a hierarchical structure, including an input layer, a hidden layer, and an output layer. The neurons between layers are connected by weights, and information is propagated sequentially from the input layer to the output layer without feedback connections.

[0118] In practical implementation, the risk identification based on the above structure, through analysis and calculation of the input potential characteristics of drilling risks, outputs the corresponding risk prediction value, and also outputs a confidence parameter related to the risk prediction value. This confidence parameter characterizes the reliability of the risk prediction value output by the preset third model.

[0119] Based on the above embodiments, the structural characteristics of the preset third model can be fully utilized to accurately and efficiently process the target fusion features, and obtain and output accurate and relatively high risk prediction values ​​and confidence parameters.

[0120] In some embodiments, the aforementioned preset first model, preset second model, fusion layer, and preset third model can be integrated into a preset comprehensive model. This preset comprehensive model can then be used to process equipment energy consumption data and drilling engineering parameters during the target well drilling process, thereby more efficiently obtaining the corresponding risk prediction values ​​and confidence parameters.

[0121] In some embodiments, determining whether a target well has drilling risk based on the risk prediction value and confidence parameter may include the following:

[0122] S1: Detect whether the predicted risk value is greater than a preset risk threshold;

[0123] S2: When the predicted risk value is greater than the preset risk threshold, check whether the confidence parameter is greater than the preset confidence parameter threshold.

[0124] S3: When the confidence parameter is greater than the preset confidence parameter threshold, it is determined that there is a drilling risk in the target well.

[0125] In practice, when the predicted risk value is greater than the preset risk threshold and the confidence parameter is less than or equal to the preset confidence parameter threshold, an anomaly alert is generated and sent to technical personnel for manual judgment.

[0126] Furthermore, it can also receive judgment results from technical personnel; based on the judgment results, when the deviation between the predetermined risk prediction value and the actual value is greater than the predetermined tolerance threshold, it can generate pseudo-labels for the energy consumption data and drilling engineering parameters of that group of equipment; and determine the energy consumption data and drilling engineering parameters of that group of equipment carrying pseudo-labels as incremental samples; and store the incremental samples in the incremental sample set so that the incremental sample set can be used to incrementally learn the predetermined first model, predetermined second model, and predetermined third model in order to continuously improve the model accuracy.

[0127] In some embodiments, considering that for complex drilling scenarios, the amount of labeled sample data with valid labels is relatively small, and the labeling process for sample data in such scenarios is relatively complex and costly, the aforementioned preset first model, preset second model, and preset third model can be specifically trained according to preset training rules, combining a small amount of labeled sample data with a large amount of unlabeled sample data, through pseudo-label-based semi-supervised learning.

[0128] When training the preset first model, the preset second model, and the preset third model, you can first construct an initial first model based on a graph neural network, an initial second model based on a Transformer structure, and an initial third model based on a deep ensemble network according to the preset training rules; construct an initial training set using labeled sample data; and use this initial training set to jointly train the initial first model, the initial second model, and the initial third model to obtain the initially trained intermediate first model, intermediate second model, and intermediate third model.

[0129] The unlabeled sample data is then processed using the intermediate first model, second model, and third model to obtain corresponding risk prediction values ​​and confidence parameters. Unlabeled sample data with confidence parameters greater than a preset confidence parameter threshold are selected from the unlabeled sample data as candidate sample data. Based on the risk prediction values ​​of the candidate sample data, corresponding pseudo-labels are generated. These pseudo-labels are then used to label the candidate sample data, resulting in pseudo-labeled sample data. The pseudo-labeled sample data is then mixed into the initial training set to update the training set. The updated training set is then used to further jointly train the intermediate first model, second model, and third model to enhance their generalization ability, resulting in updated first, second, and third models. The preset confidence parameter threshold can be flexibly set according to the situation.

[0130] The system checks whether the accuracy of the updated first model, the updated second model, and the updated third model meets the preset accuracy requirements. When it is determined that the accuracy of the updated first model, the updated second model, and the updated third model all meet the preset accuracy requirements, the current round of model training ends, and the current updated first model, the updated second model, and the updated third model are identified as the preset first model, the preset second model, and the preset third model that meet the requirements.

[0131] Conversely, if it is determined that at least one of the updated first model, updated second model, and updated third model does not meet the preset accuracy requirement, the current updated first model, updated second model, and updated third model can be designated as the initial first model, initial second model, and initial third model, respectively. The above process is repeated to continue the next round of model training until the model accuracy meets the preset accuracy requirement.

[0132] To avoid excessive interference from historical pseudo-labels during model training, a time decay factor mechanism is introduced. Specifically, for each round of model training, the generation and update status of the pseudo-labels carried by the pseudo-labeled sample data can be distinguished. For example, are they newly generated or updated in the current round, or were they generated in a previous round without being updated? Then, based on the generation and update status of the pseudo-labels, the training weights of the pseudo-labeled sample data in the updated training set for the current round are dynamically adjusted. Specifically, a preset exponential decay function can be used to dynamically adjust the training weights of the pseudo-labeled sample data according to their generation and update status. Generally, the training weights of newly generated or updated pseudo-labeled sample data in the current round are relatively the largest; the longer the generation time or the time since the last update of pseudo-labeled sample data generated in a previous round without being updated, the smaller the training weights. Then, the updated training set with adjusted weights is used to jointly train the first, second, and third models in the middle of the current round. This allows the models to focus more on the recently generated or updated sample data with pseudo-labels during the training and updating process, thus enabling them to adapt to and learn changes in the drilling environment or formation conditions more quickly and intelligently, achieving adaptive learning.

[0133] Based on the above embodiments, sample data can be fully utilized at a relatively low cost to obtain a preset first model, a preset second model, and a preset third model with high accuracy and good performance through multiple rounds of joint training.

[0134] In some embodiments, after training and obtaining a preset first model, a preset second model, and a preset third model, incremental samples can be continuously accumulated while using the above models to continuously process the energy consumption data of the target well equipment and drilling engineering parameters and monitor the drilling risk of the target well. Furthermore, at each preset time period, according to preset training rules, the current incremental sample set is used to distinguish between the preset first model, the preset second model, and the preset third model, and a differentiated online fine-tuning strategy is adopted to incrementally learn different core structures in different models in order to continuously train and update the models.

[0135] The aforementioned differentiated online fine-tuning strategy incrementally learns different core structures in different models. Specifically, this includes: according to preset training rules, using the current incremental sample set, online fine-tuning is performed on the back-end encoding layer of the Transformer-based feature extraction network model in the preset second model, and the risk identifier in the preset third model, thereby enabling dynamic learning of new temporal features and risk trends; according to preset training rules, for the preset first model, considering that the GNN structure in the graph neural network relies on the structural stability of the equipment system energy consumption map, it can be kept frozen, and the preset first model is trained using the current incremental sample set, with overall updates and adjustments made when the topological relationship of the key drilling equipment in the target well changes; according to preset training rules, using the current incremental sample set, the working condition identification sub-model in the preset second model can be selectively fine-tuned according to actual needs, combined with the degree of deviation between pseudo-labels and true values.

[0136] Based on the above embodiments, according to the preset training rules, incremental sample sets can be used to distinguish different models for differentiated incremental learning. This allows for more precise and effective model learning by combining the structural and functional characteristics of different models, thereby continuously improving the model accuracy of the three models and making them more suitable for complex drilling construction scenarios.

[0137] As can be seen from the above, the drilling risk detection method based on equipment energy consumption provided in the embodiments of this specification first acquires the equipment energy consumption data and drilling engineering parameters of the target well drilling process; then, based on the equipment energy consumption data, a collaborative energy consumption map of the key drilling equipment of the target well is constructed; the collaborative energy consumption map is processed using a preset first model to extract the spatial coupling features of equipment energy consumption of the target well; the drilling engineering parameters are processed using a preset second model to extract the drilling construction time-series evolution features of the target well based on its operating conditions; wherein, the preset first model is a model based on a graph neural network, and the preset second model is a model based on a Transformer structure; the spatial coupling features of equipment energy consumption and the drilling construction time-series evolution features are fused to obtain the target fusion features of the target well; based on the target fusion features, it is determined whether the target well has drilling risks. By processing the equipment energy consumption data and drilling engineering parameters of the target well using models with different structures, spatial coupling characteristics of equipment energy consumption and temporal evolution characteristics of drilling operations based on the target well's operating conditions are extracted. By integrating these spatial coupling characteristics and temporal evolution characteristics, the interaction of multiple factors during drilling operations can be considered simultaneously. Furthermore, based on both time and space dimensions, a more comprehensive and detailed drilling risk detection can be performed. This approach is well-suited for complex drilling scenarios and can accurately detect and identify drilling risks.

[0138] This specification provides an embodiment of a computer device, see below. Figure 5 As shown. The computer device includes a network communication port 501, a processor 502, and a memory 503. These structures are connected by internal cables so that they can perform specific data interaction.

[0139] Specifically, the network communication port 501 can be used to acquire equipment energy consumption data and drilling engineering parameters during the drilling process of the target well.

[0140] The processor 502 can be specifically used to construct a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data; process the collaborative energy consumption map using a preset first model to extract spatial coupling features of equipment energy consumption for the target well; process the drilling engineering parameters using a preset second model to extract the drilling construction time-series evolution features of the target well based on its operating conditions; wherein the preset first model is a graph neural network-based model and the preset second model is a Transformer-based model; fuse the spatial coupling features of equipment energy consumption and the drilling construction time-series evolution features to obtain target fusion features for the target well; and determine whether the target well has drilling risks based on the target fusion features.

[0141] The memory 503 can be used to store corresponding instruction programs, as well as related data such as equipment system energy consumption diagrams, equipment energy consumption data, and drilling engineering parameters.

[0142] Based on the above method, the relevant structural performance of computer equipment can be effectively utilized to improve the data processing speed of electronic equipment and efficiently realize the data processing for drilling risk detection.

[0143] In this embodiment, the network communication port 501 can be a virtual port bound to different communication protocols, thereby enabling the sending or receiving of different data. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. Furthermore, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM or CDMA; it can also be a Wi-Fi chip; or it can be a Bluetooth chip.

[0144] In this embodiment, the processor 502 can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. This specification is not limiting.

[0145] In this embodiment, the memory 503 may include multiple layers. In a digital system, anything that can store binary data can be a memory. In an integrated circuit, a circuit with storage function but no physical form is also called a memory, such as RAM, FIFO, etc. In a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0146] This specification also provides a computer-readable storage medium based on the above-described method for detecting drilling risks based on equipment energy consumption. The computer-readable storage medium stores computer program instructions that, when executed, implement the following: acquiring equipment energy consumption data and drilling engineering parameters during the drilling process of a target well; constructing a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data; processing the collaborative energy consumption map using a preset first model to extract spatial coupling features of equipment energy consumption for the target well; processing the drilling engineering parameters using a preset second model to extract the drilling construction time-series evolution features of the target well based on its operating conditions; wherein the preset first model is a graph neural network-based model, and the preset second model is a Transformer-based model; fusing the spatial coupling features of equipment energy consumption and the drilling construction time-series evolution features to obtain target fusion features for the target well; and determining whether the target well has drilling risks based on the target fusion features.

[0147] In this embodiment, the storage medium includes, but is not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Cache, Hard Disk Drive (HDD), or Memory Card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.

[0148] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other embodiments, and will not be repeated here.

[0149] This specification also provides a computer program product, comprising at least a computer program, which, when executed by a processor, implements the following method steps: acquiring equipment energy consumption data and drilling engineering parameters of the target well drilling process; constructing an equipment collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data; processing the equipment collaborative energy consumption map using a preset first model to extract spatial coupling features of equipment energy consumption for the target well; processing the drilling engineering parameters using a preset second model to extract the drilling construction time-series evolution features of the target well based on its operating conditions; wherein the preset first model is a graph neural network-based model, and the preset second model is a Transformer-based model; fusing the equipment energy consumption spatial coupling features and the drilling construction time-series evolution features to obtain target fusion features for the target well; and determining whether the target well has drilling risks based on the target fusion features.

[0150] See Figure 6 As shown in the embodiments of this specification, a drilling risk detection device based on equipment energy consumption is also provided. This device may specifically include the following structural modules:

[0151] The acquisition module 601 can be used to acquire equipment energy consumption data and drilling engineering parameters during the drilling process of the target well.

[0152] Module 602 can be specifically used to construct a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data.

[0153] The extraction module 603 can be specifically used to process the equipment collaborative energy consumption map using a preset first model to extract the spatial coupling features of equipment energy consumption for the target well; and to process the drilling engineering parameters using a preset second model to extract the drilling construction time sequence evolution features of the target well based on its operating conditions; wherein, the preset first model is a graph neural network-based model and the preset second model is a Transformer-based model.

[0154] The fusion module 604 can be used to fuse the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation to obtain the target fusion characteristics of the target well.

[0155] The determination module 605 can be used to determine whether there is a drilling risk in the target well based on the target fusion characteristics.

[0156] In some embodiments, the equipment energy consumption data may specifically include at least one of the following: top drive power, mud pump load, winch power, motor current, etc.

[0157] In some embodiments, when the above-described construction module 602 is specifically implemented, it can construct an equipment collaborative energy consumption map of the key drilling equipment for the target well based on the equipment energy consumption data in the following manner: obtaining the association relationship of the key drilling equipment; wherein, the association relationship includes at least one of the following: physical connection relationship, collaborative operation relationship, and data-driven relationship; setting nodes corresponding to the key drilling equipment according to the equipment identifier of the key drilling equipment; and marking the corresponding energy consumption features on the corresponding nodes according to the equipment energy consumption data to obtain an initial energy consumption map; connecting the associated nodes in the initial energy consumption map using matching edges according to the association relationship of the key drilling equipment; and marking the corresponding relationship features on the edges to obtain an equipment collaborative energy consumption map of the key drilling equipment for the target well.

[0158] In some embodiments, the drilling engineering parameters may specifically include at least one of the following: drilling pressure, drilling speed, rotational speed, and pump displacement.

[0159] In some embodiments, the preset second model may include at least: a working condition identification sub-model, and a plurality of time-series evolution feature extraction sub-models connected to the working condition identification sub-model;

[0160] The multiple temporal evolution feature extraction sub-models correspond to different working conditions, and the temporal evolution feature extraction sub-models are feature extraction network models built based on the Transformer structure.

[0161] In some embodiments, when the extraction module 603 is specifically implemented, it can process the drilling engineering parameters using a preset second model in the following manner to extract the drilling construction time-series evolution features of the target well based on its operating conditions: using the operating condition identification sub-model to determine the operating condition of the target well and the relevant operating condition embedding vector based on the drilling engineering parameters; determining the matching target time-series evolution feature extraction sub-model from multiple time-series evolution feature extraction sub-models based on the operating condition of the target well; processing the drilling engineering parameters using the target time-series evolution feature extraction sub-model to extract the initial time-series evolution features; and concatenating the operating condition embedding vector and the initial time-series evolution features to obtain the drilling construction time-series evolution features of the target well based on its operating conditions.

[0162] In some embodiments, when the above-mentioned fusion module 604 is specifically implemented, the equipment energy consumption spatial coupling characteristics and the drilling construction time sequence evolution characteristics can be fused in the following manner to obtain target fusion characteristics about the target well: the equipment energy consumption spatial coupling characteristics and the drilling construction time sequence evolution characteristics are cross-operated and spliced ​​using a fusion layer based on a cross-modal attention mechanism to obtain target fusion characteristics about the target well.

[0163] In some embodiments, when the determination module 605 is specifically implemented, it can determine whether there is drilling risk in the target well based on the target fusion features in the following manner: processing the target fusion features using a preset third model to obtain a risk prediction value and a confidence parameter for the risk prediction value; wherein, the preset third model is a model based on a deep integrated network; and determining whether there is drilling risk in the target well based on the risk prediction value and the confidence parameter.

[0164] It should be noted that the units, devices, or modules described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. For ease of description, the above devices are described by dividing them into various modules according to their functions. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware, or the module that implements the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection between the devices or units shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0165] As can be seen from the above, the drilling risk detection device based on equipment energy consumption provided in the embodiments of this specification first processes the equipment energy consumption data and drilling engineering parameters of the target well using models with different structures, and extracts the spatial coupling characteristics of equipment energy consumption of the target well and the drilling construction time-series evolution characteristics of the target well based on its operating conditions. Then, by integrating the above-mentioned spatial coupling characteristics of equipment energy consumption and drilling construction time-series evolution characteristics, the interaction and influence of multiple factors can be considered simultaneously, and a more comprehensive and detailed drilling risk detection can be performed based on two different dimensions, time and space. Therefore, it can be well applied to complex drilling construction scenarios and accurately detect and identify drilling risks.

[0166] In a specific scenario example, the drilling risk detection method based on equipment energy consumption provided in this manual can be applied to achieve intelligent monitoring of drilling risks by incorporating energy consumption data. For detailed implementation procedures, please refer to [the manual's documentation / reference]. Figure 7 As shown.

[0167] In this scenario example, existing methods mostly focus on acquiring and using drilling parameters (e.g., drilling engineering parameters) for pattern recognition and risk detection, neglecting indirect signals that reflect equipment operating status, namely, energy consumption data (e.g., equipment energy consumption data), such as motor current and hydraulic load. This type of data, as a representation of equipment "behavioral feedback," has potential value in reflecting changes in downhole conditions. However, the aforementioned energy consumption data itself is characterized by multiple channels, complex responses, and coupling relationships between equipment. Modeling it solely with traditional time series methods makes it difficult to effectively uncover its structured correlations. Furthermore, the aforementioned parameter data also exhibits different characteristic distributions at different drilling stages (e.g., drilling, tripping, circulation), making it difficult to balance accuracy and generalization in a unified model.

[0168] To address the aforementioned issues and related circumstances, this scenario example proposes a drilling complexity risk early warning method based on the fusion modeling of energy consumption graph neural networks and engineering parameters using Transformer. This method constructs an equipment signal graph (e.g., an equipment collaborative energy consumption graph) and uses a graph neural network (e.g., a pre-defined first model) to extract spatial coupling features from multi-channel energy consumption data. Simultaneously, it constructs a time-series sequence with stage label embeddings based on engineering parameters (e.g., drilling engineering parameters) and uses a Transformer model (e.g., a pre-defined second model) to capture its dynamic evolution. Furthermore, for different drilling conditions such as drilling, circulation, reaming, tripping, and running, staged sub-models are set to achieve accurate risk identification based on the drilling conditions. The features output from the two models (e.g., spatial coupling features of equipment energy consumption and time-series evolution features of drilling operations) are then fused to construct and utilize a hybrid risk identification model (e.g., a pre-defined third model), outputting risk scores and confidence indicators (e.g., risk prediction values ​​and confidence parameters). In addition, semi-supervised online fine-tuning is performed using human feedback, forming a human-machine closed-loop optimization mechanism to continuously optimize and update the model. In practice, the implementation may include the following parts.

[0169] 1. Data Acquisition and Preprocessing: Real-time acquisition of multi-channel energy consumption data (such as top drive power, motor current, hydraulic pressure, mud pump load) and engineering parameters (such as drilling pressure, rotational speed, pump displacement, drilling speed, etc.), and processing such as normalization, time window division, and outlier correction.

[0170] 2. GNN module construction: The energy consumption data is modeled as a device signal graph, with devices as nodes and cooperative relationships or signal correlations as edges. Graph neural networks (GAT, GCN, etc.) are used to extract the spatial coupling features between energy consumption.

[0171] 3. Transformer module construction: The engineering parameters are constructed as a time series with position encoding. The Transformer is used to model the dynamic evolution of the parameters over time. At the same time, stage label embedding is introduced to improve the adaptability of stage modeling.

[0172] 4. Staged modeling: Based on the construction status, drilling, circulation, tripping, drilling down, reaming and other working conditions are divided into independent stages. A corresponding sub-network is set up for each stage for feature recognition to improve the accuracy and robustness of the model.

[0173] 5. Fusion Modeling and Risk Output: The output features of GNN and Transformer are fused, and a hybrid model is constructed using concatenation or attention mechanisms to output a drilling complexity risk score and simultaneously estimate model uncertainty.

[0174] 6. Human-computer interaction and feedback learning: When the score exceeds the warning threshold or the credibility is low, the system automatically triggers the operator confirmation mechanism and collects the "false alarm / real alarm" feedback; the model is fine-tuned online by using feedback labels combined with pseudo-label generation technology to achieve closed-loop human-computer co-training.

[0175] Specifically, constructing the aforementioned equipment signal graph refers to modeling and representing the energy consumption data of key equipment during the drilling process using a graph structure. In detail, each piece of equipment (such as a mud pump, top drive, or winch) can correspond to a node in the graph, and the node's characteristics are its corresponding energy consumption signals (such as current, voltage, and power). The edges between nodes can be established based on the physical connections between the equipment, collaborative operation logic, or through data-driven methods (such as mutual information or Pearson correlation coefficient). For example, during the drilling phase, the top drive and mud pump often operate synchronously; therefore, edges can be constructed between them to represent their coupling relationship, thus forming a complete "equipment collaborative energy consumption graph."

[0176] It's important to note that during drilling, various pieces of equipment do not operate independently. Instead, they exhibit coupled behavior through control systems and operational procedures. Especially under complex conditions, this coordination can be reflected in the interplay of energy consumption fluctuations. Traditional models treat each channel's signal as an independent input, neglecting the structured dependencies between devices. However, constructing a device signal diagram can explicitly express this "spatial structural relationship," enabling the model to "understand the overall operating state of the equipment system" and providing a richer semantic foundation for modeling complex conditions.

[0177] Here, a Graph Neural Network (GNN) is used to process the equipment energy consumption map because GNNs have a natural advantage in modeling spatial structural features, enabling them to capture nonlinear coupling and potential collaborative anomalies between equipment. In drilling risk identification, this means the system can not only detect abnormal energy consumption of a single piece of equipment, but also identify whether there are "collaborative misalignment" or "abnormal propagation" patterns among multiple equipment. Compared to traditional time series models, GNNs, by aggregating information from adjacent nodes, possess stronger generalization ability and interpretability, making the model more sensitive to the early perception of complex events (such as sudden changes in pump pressure after tripping out of the well), thereby achieving more timely and accurate risk warnings.

[0178] It should also be noted that the spatial coupling characteristics can be extracted from the aforementioned energy consumption data because the energy consumption behavior of different devices in a drilling system is not isolated, but rather mutually influential and coordinated. For example, during drilling, the power output of the top drive, the current of the mud pump, and the load of the hydraulic system often fluctuate in tandem according to changes in the rock formation or operational commands. This "coordinated response" reflects the spatial coupling relationship between the devices. In other words, although the energy consumption data itself is a time-series signal, it implicitly contains the physical or control paths between devices, which is precisely the manifestation of "spatial structure."

[0179] The aforementioned energy consumption data and the extracted spatial coupling features are related in the following way: Energy consumption is the "behavioral feedback" of equipment to external loads and system changes. When complex situations occur downhole (such as well leakage, well collapse, or stuck drill bit), the energy consumption of multiple devices will produce non-independent, synchronous, or even cascading responses. This characteristic means that energy consumption data not only includes the operating status of individual devices but also indirectly records the coupling behavior and coordination mechanisms between devices, making it particularly suitable for modeling and extracting its potential spatial features using graph structures. Therefore, compared to directly collecting equipment locations or layout structures, energy consumption data provides "dynamic and functional spatial coupling clues." After structured modeling through graph neural networks, it is possible to capture the real linkage relationships between devices under different operating conditions, which is difficult to achieve with traditional linear modeling or single-channel analysis. This is precisely the key advantage of graph modeling + energy consumption data in your proposed technical solution.

[0180] The aforementioned "staged sub-models" (e.g., multiple time-series evolution feature extraction sub-models corresponding to different working conditions) refer to independent model branches or sub-networks constructed for typical working conditions in the drilling process (such as drilling, circulation, reaming, tripping, and running). This is because, due to the significant differences in equipment operation modes, energy consumption behavior, and engineering parameter characteristics under different working conditions, a unified model is difficult to adapt to all working conditions simultaneously. Therefore, the overall model is divided into multiple "staged sub-models," with each sub-model specifically responsible for processing data for a particular working condition.

[0181] Specifically, the core function of the aforementioned sub-models is to extract unique characteristic patterns under the specific operating condition, including energy consumption response patterns, parameter change trends, and risk evolution characteristics, thereby achieving "phased perception" modeling of complex operating conditions. These sub-models not only improve the model's accuracy in identifying the current operating condition but also enhance its early response capability to potential anomalies. Therefore, these phased sub-models are not only used to extract operating condition characteristics but are also key modules supporting the entire risk identification system's "operating condition adaptability" and "differentiated judgment capability."

[0182] Correspondingly, by dividing the work conditions into different stages, the model's ability to understand various drilling operation phases can be improved, allowing for more accurate extraction of temporal evolution features using corresponding dedicated model structures (such as Transformer sub-models). Specifically, during the drilling process, different work conditions (such as drilling, circulation, reaming, tripping, and running) correspond to completely different operational rhythms, equipment load states, and parameter fluctuation patterns. For example, parameter fluctuations are relatively stable and the rhythm is continuous during the drilling phase, while the tripping process contains a large number of non-steady-state, short-term abrupt signals. If a uniform model is used for processing, it will lead to feature confusion and ambiguous identification, affecting risk assessment. By dividing the work conditions and configuring independent temporal modeling sub-modules for each stage (such as work condition-specific Transformer structures or parameter branches), the model can focus on the unique signal patterns and risk evolution paths of the current stage based on the current work condition, thereby extracting temporal features more accurately, achieving work condition-aware modeling, and ultimately improving the overall system's accuracy in identifying complex risks and its response time.

[0183] Specifically, in the model structure, the Graphical Neural Network (GNN) is responsible for extracting the spatial coordination relationships between equipment, the Transformer model extracts the temporal evolution patterns of parameters such as drilling pressure and rotational speed, and the working condition identification sub-model intelligently identifies the current drilling stage (such as drilling, tripping, and running) based on the original input data, and outputs a corresponding working condition embedding vector. The features output by the three are uniformly modeled in the feature fusion layer. The fusion method can be concatenation, cross-attention, or weighted gating mechanisms, so that spatial behavior, temporal dynamics, and working condition semantics can fully interact in the feature space, laying an accurate foundation for subsequent risk assessment.

[0184] Furthermore, the output of the fusion layer is a comprehensive feature representation combining equipment operating status, parameter trends, and operational context. This representation vector is input into the risk identification module, which uses the fused features to determine the complexity and risk level of the current drilling status. Typically, a fully connected discriminant network structure is used, whose output can be a continuous risk score (0-1) or a discrete risk level (normal / warning / high risk, etc.). In this way, the model can identify subtle but crucial risk signals based on the interaction patterns between multidimensional signals, achieving earlier and more accurate risk warnings.

[0185] The fused risk prediction component constitutes the third functional module of the model. It typically employs a lightweight multilayer perceptron (MLP) as the risk identifier, mapping the fused features to a risk score or risk level output. This module has a simple structure, containing 2-3 fully connected layers with activation functions (such as ReLU / GELU), Dropout, or LayerNorm, and finally outputting the risk result via Sigmoid or Softmax. It's worth noting that the graph neural network (GNN), the Transformer model, and the condition recognition sub-model are all trainable neural network structures. During training, their parameters are updated along with the backpropagation error of the risk identifier, achieving end-to-end optimization. Therefore, the final risk prediction model is actually a composite architecture composed of multiple learnable modules, with each part learning collaboratively to improve the accuracy and generalization ability of risk identification.

[0186] In practice, during the drilling process, considering the significant differences in equipment behavior patterns and parameter characteristics under different operating conditions, please refer to [reference needed]. Figure 7 As shown, a three-module architecture of "energy consumption graph network + Transformer model + working condition identification sub-model" can be adopted, and accurate risk identification can be achieved through feature fusion. Taking "abnormal downhole resistance during the tripping stage" as an example: The system first collects multi-channel energy consumption data such as winch power and top drive power consumption, as well as engineering parameters such as drill string speed, drilling pressure, and mud pump displacement, and performs normalization, noise reduction, and time window division on the data.

[0187] Subsequently, the energy consumption graph network module constructs the energy consumption channels of each device into a device signal graph, where nodes represent devices (such as winches, top drives, etc.) and edges represent physical connections or cooperative operation relationships. Spatial coupling features between devices are extracted through graph neural networks. At the same time, the Transformer model models the time series of engineering parameters and extracts dynamic evolution features such as drilling pressure mutations and displacement fluctuations by combining location information and stage labels.

[0188] In this system, the working condition identification sub-model further intelligently identifies the current working condition stage based on the input signal, such as identifying it as the "start drilling" state, and outputs the corresponding working condition embedding vector. Finally, the three types of features (spatial features output by GNN, temporal features extracted by Transformer, and working condition embedding) are spliced ​​or cross-attention processed in the fusion layer to form a unified high-dimensional comprehensive representation.

[0189] The fused features are fed into a lightweight multilayer perceptron (MLP) risk identifier, which outputs a risk score and uncertainty estimate for the current drilling status. For example, in this case, the system might output a risk score of 0.84, which has low confidence, thus triggering the operator confirmation mechanism. The entire process demonstrates the collaborative risk identification capability of deep fusion of spatial structure, temporal evolution, and working condition awareness, significantly improving the efficiency of early identification and response to complex working conditions.

[0190] The aforementioned pseudo-labeling mechanism is used to fully utilize unlabeled drilling data samples. The system uses the currently trained model to predict the risk of unlabeled data. When the prediction confidence level is higher than a preset threshold, the prediction result is added as a pseudo-label to the training set and participates in subsequent model updates. This method effectively expands the number of training samples, enhances the model's generalization ability, and is particularly suitable for the actual situation where complete manual annotation is lacking at the drilling site.

[0191] Meanwhile, to avoid excessive interference from historical pseudo-labels on the model, a time decay factor mechanism is introduced to dynamically adjust the training weights of old samples. By setting an exponential decay function, the model pays more attention to recent drilling data and operating conditions during the update process, which helps to quickly adapt to changes in the drilling rig operating environment or formation conditions, thereby achieving "time-aware" adaptive learning.

[0192] Regarding model updates, an online fine-tuning strategy was employed for incremental training of the core sub-models. Specifically, the back-end encoding layer of the Transformer model and the risk identification module (such as MLP) will undergo online fine-tuning using pseudo-labeled samples, thereby dynamically learning new temporal features and risk trends. The GNN module, due to its reliance on the structural stability of the equipment graph, is typically kept frozen and only updated as a whole when the equipment topology changes. The operating condition identification sub-model can be selectively fine-tuned according to actual needs. Through this differentiated strategy, the model ensures both stability and strong adaptability.

[0193] After acquiring energy consumption data and engineering parameters, data normalization processing (e.g., min-max normalization or z-score standardization) can be performed to eliminate the interference of dimensional differences on model training. In the time dimension, the data can be divided into sliding windows of fixed lengths (e.g., 60 seconds, 300 seconds), and each window can be fed into the model as a sample. Simultaneously, the system can extract statistical features (e.g., average power, variance, slope variation, etc.) as augmented input features as needed. This preprocessing provides clean, aligned, and comparable high-quality input data for subsequent deep models such as GNN and Transformer.

[0194] Through the above scenario examples, the drilling risk detection method based on equipment energy consumption provided in this specification has been verified. By using graph structure modeling of energy consumption signals and multi-stage perception, it effectively improves the accuracy and real-time performance of risk identification in complex drilling conditions. The introduction of credibility estimation and human-computer interaction feedback mechanisms enables continuous adaptive optimization of the model, significantly enhancing the system's robustness and intelligence. This method is applicable to various drilling scenarios, effectively ensuring drilling operation safety and improving operational efficiency, and has significant engineering application value.

[0195] While this specification provides the steps of operation for the methods described in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or client product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.

[0196] Those skilled in the art will also know that, besides implementing the controller using purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller function as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices within it used to implement various functions can also be considered structures within that hardware component. Alternatively, the devices used to implement various functions can be considered as both software modules implementing the method and structures within a hardware component.

[0197] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer-readable storage media, including storage devices.

[0198] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of this specification can essentially be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of this specification.

[0199] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. This specification can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.

[0200] Although this specification has been described by way of examples, those skilled in the art will recognize that many variations and modifications are possible without departing from the spirit of this specification, and it is intended that the appended claims cover such variations and modifications without departing from the spirit of this specification.

Claims

1. A method for detecting drilling risk based on equipment energy consumption, characterized in that, include: Acquire equipment energy consumption data and drilling engineering parameters during the drilling process of the target well; Based on the equipment energy consumption data, construct an equipment collaborative energy consumption map for the key drilling equipment of the target well; wherein the key drilling equipment includes at least one of the following: top drive, mud pump, winch, and motor; The equipment collaborative energy consumption map is processed using a preset first model to extract the spatial coupling features of equipment energy consumption for the target well; the drilling engineering parameters are processed using a preset second model to extract the drilling construction time sequence evolution features of the target well based on its operating conditions; wherein, the preset first model is a graph neural network-based model and the preset second model is a Transformer-based model. By integrating the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation, a target fusion characteristic for the target well is obtained; Based on the target fusion characteristics, determine whether the target well has drilling risks; The process of constructing a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data includes: obtaining the association relationships of key drilling equipment; wherein the association relationships include at least one of the following: physical connection relationship, collaborative operation relationship, and data-driven relationship; setting nodes corresponding to key drilling equipment based on the equipment identifiers of the key drilling equipment; and marking the corresponding energy consumption features on the corresponding nodes based on the equipment energy consumption data to obtain an initial energy consumption map; connecting the related nodes in the initial energy consumption map using matching edges based on the association relationships of the key drilling equipment; and marking the corresponding relationship features on the edges to obtain a collaborative energy consumption map of key drilling equipment for the target well.

2. The method according to claim 1, characterized in that, The energy consumption data of the equipment includes at least one of the following: top drive power, mud pump load, winch power, and motor current.

3. The method according to claim 1, characterized in that, The drilling engineering parameters include at least one of the following: drilling pressure, drilling speed, rotational speed, and pump discharge rate.

4. The method according to claim 3, characterized in that, The preset second model includes at least: a working condition identification sub-model, and multiple time-series evolution feature extraction sub-models connected to the working condition identification sub-model; The multiple temporal evolution feature extraction sub-models correspond to different working conditions, and the temporal evolution feature extraction sub-models are feature extraction network models built based on the Transformer structure.

5. The method according to claim 4, characterized in that, The drilling engineering parameters are processed using a preset second model to extract the drilling construction time-series evolution characteristics of the target well based on its operating conditions, including: The working condition identification sub-model is used to determine the working condition of the target well and the relevant working condition embedding vector based on drilling engineering parameters. Based on the operating conditions of the target well, a matching target time-series evolution feature extraction sub-model is determined from multiple time-series evolution feature extraction sub-models; The drilling engineering parameters are processed using a target temporal evolution feature extraction sub-model to extract initial temporal evolution features; By concatenating the working condition embedding vector and the initial temporal evolution features, the drilling construction temporal evolution features of the target well based on its working condition are obtained.

6. The method according to claim 1, characterized in that, By integrating the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation, a target fusion characteristic for the target well is obtained, including: By using a fusion layer based on a cross-modal attention mechanism, the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation are cross-operated and spliced ​​to obtain the target fusion characteristics of the target well.

7. The method according to claim 1, characterized in that, Based on the target fusion characteristics, determine whether the target well has drilling risks, including: The target fusion features are processed using a preset third model to obtain a risk prediction value and a confidence parameter for the risk prediction value; wherein the preset third model is a model based on a deep ensemble network. Based on the predicted risk value and confidence parameters, determine whether the target well has drilling risks.

8. A drilling risk detection device based on equipment energy consumption, characterized in that, include: The acquisition module is used to acquire equipment energy consumption data and drilling engineering parameters during the drilling process of the target well; A construction module is used to construct a collaborative energy consumption map of key drilling equipment for the target well based on the equipment energy consumption data; wherein the key drilling equipment includes at least one of the following: top drive, mud pump, winch, and motor; The extraction module is used to process the equipment collaborative energy consumption map using a preset first model to extract the spatial coupling features of equipment energy consumption for the target well; and to process the drilling engineering parameters using a preset second model to extract the drilling construction time sequence evolution features of the target well based on its operating conditions; wherein the preset first model is a graph neural network-based model and the preset second model is a Transformer-based model. The fusion module is used to fuse the spatial coupling characteristics of the equipment energy consumption and the temporal evolution characteristics of the drilling operation to obtain the target fusion characteristics of the target well; The determination module is used to determine whether there is a drilling risk in the target well based on the target fusion characteristics; Specifically, the construction module is used to: obtain the association relationships of key drilling equipment; wherein the association relationships include at least one of the following: physical connection relationship, collaborative operation relationship, and data-driven relationship; set nodes corresponding to key drilling equipment based on the equipment identifier of the key drilling equipment; and mark the corresponding energy consumption characteristics on the corresponding nodes based on the equipment energy consumption data to obtain an initial energy consumption map; connect the related nodes in the initial energy consumption map using matching edges based on the association relationships of the key drilling equipment; and mark the corresponding relationship characteristics on the edges to obtain an equipment collaborative energy consumption map of the key drilling equipment for the target well.

9. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.