Whole sample-based drilling risk detection method and device and computer equipment
By using full sample-based drilling risk detection methods during the drilling process, combined with multiple detection models and learning methods, the problems of low risk detection accuracy and frequent false alarms in deep drilling are solved, efficient and accurate detection of drilling risks are achieved, and the safety of drilling construction is improved.
Patent Information
- Application Number
- CN202411847475.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-16
AI Technical Summary
During drilling in deep and ultra-deep stratigraphic areas, due to the complex geological environment, the risk detection model trained by existing methods is weak in generalization ability and low accuracy, resulting in frequent false alarms, affecting drilling construction safety.
A full sample-based drilling risk detection method is used to obtain well recording data of the target well, extract key features, and use the target joint risk prediction model to make risk prediction. The model includes a variety of detection models that adapt to complex geological environments through supervised and unsupervised learning, combining incremental learning and negative sample learning.
It has achieved efficient and accurate detection of drilling risks during the drilling process of target wells, reduced false alarm rates, and improved the safety and efficiency of drilling construction.
Smart Images

Figure CN119886806A_ABST
Abstract
Description
Technical Field
[0001] This specification belongs to the field of oil and gas drilling technology, and in particular to a detection method, device and computer equipment for drilling risks based on a full sample. Background Art
[0002] As shallow oil and gas resources are gradually depleted, oil and gas drilling is gradually turning to challenging formations such as deep and ultra-deep formations. However, in the above-mentioned formations, due to the uncertainty of deep and deep-water geological conditions, the geological environment is relatively complex, and drilling accidents such as overflows are prone to occur during the drilling process, posing a threat to the safety of drilling construction. In addition, due to the complex and changeable geological environment in the above-mentioned formations, the risk detection model trained based on the existing methods has weak generalization ability and low accuracy, which leads to false alarms in actual applications, affecting normal drilling construction.
[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0004] This specification provides a full-sample based detection method, device and computer equipment for drilling risks, which can efficiently and accurately detect and determine whether there are drilling risks during the drilling process of a target well, thereby effectively protecting the safety of drilling construction.
[0005] This specification provides a method for detecting drilling risks based on a full sample, including:
[0006] Obtain the logging data of the target well in the current time period;
[0007] Extracting target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features;
[0008] The target joint risk prediction model is used to process the target valid data to obtain the corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-class detection model, a target second-class detection model, and a target third-class detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells and logging data of target wells that failed to be predicted by the model during the drilling process of the target wells;
[0009] Based on the target prediction results, determine whether the target well currently has drilling risks.
[0010] In one embodiment, the key characteristics include at least one of the following: standpipe pressure, inlet flow rate, outlet flow rate, total pool volume, total hydrocarbon content.
[0011] In one embodiment, the target joint risk prediction model is trained according to preset training rules in the following manner:
[0012] Obtain sample logging data of the sample well; and construct a first training data set and a second training data set using the sample logging data of the sample well according to the first sample processing rule;
[0013] Constructing an initial first-category detection model and an initial second-category detection model; wherein the initial first-category detection model at least includes a parallel LSTM structure and a GRU structure, and the initial second-category detection model at least includes an LSTM-AE structure;
[0014] Using the first training data set to perform supervised learning on the initial first-category detection model, a first-category intermediate detection model is obtained; using the second training data set to perform unsupervised learning on the initial second-category detection model, a second-category intermediate detection model is obtained;
[0015] According to the intermediate first-category detection model, a corresponding intermediate third-category detection model is constructed; wherein the intermediate third-category detection model has the same model structure and model parameters as the intermediate first-category detection model;
[0016] Combining the intermediate first-category detection model, the intermediate second-category detection model, and the intermediate third-category detection model to obtain an initial joint risk prediction model;
[0017] Obtaining the logging data of the target well collected during the drilling process of the target well; and constructing a third training data set and a fourth training data set using the logging data of the target well according to the second sample processing rule; wherein the fourth training data set is generated based on the logging data of the target well that failed to be predicted using the initial joint risk prediction model;
[0018] The third training data set is used to perform incremental learning on the intermediate first-category detection model and the intermediate second-category detection model in the initial joint risk prediction model. At the same time, the fourth training data set is used to perform negative sample learning on the intermediate third-category detection model in the initial joint risk prediction model to obtain a target joint risk prediction model that meets the requirements.
[0019] In one embodiment, according to the first sample processing rule, the sample logging data of the sample well is used to construct a first training data set and a second training data set, including:
[0020] According to the first sample processing rule, historical logging data of drilling accidents are obtained and key features associated with the drilling accidents are determined through correlation analysis;
[0021] According to the key features, sample valid data is extracted from the sample logging data of the sample well;
[0022] Based on the sample valid data, the sample valid data of the first time period when the drilling accident occurred and the sample valid data of the second time period before the drilling accident occurred were screened out to construct a first training data set; and based on the sample valid data, the sample valid data of the drilling accident did not occur were screened out to construct a second training data set.
[0023] In one embodiment, after constructing the first training data set and the second training data set, the method further includes:
[0024] According to the first sample processing rule, the sample wells involved in the sample valid data in the first training data set are determined as training sample wells;
[0025] Filter out the sample valid data that does not involve the training sample wells from the sample valid data, and construct a test data set and a verification data set for the first type of detection model and the second type of detection model; wherein the test data set of the first type of detection model is the same as the test data set of the second type of detection model, and the verification data set of the first type of detection model is the same as the verification data set of the second type of detection model.
[0026] In one embodiment, according to the second sample processing rule, the logging data of the target well is used to construct a third training data set and a fourth training data set, including:
[0027] Use the initial joint risk prediction model to process the logging data of the target well to obtain the corresponding prediction results;
[0028] According to the logging data of the target well, valid data are randomly extracted and combined to construct a third training data set;
[0029] According to the prediction results, the logging data that failed to be predicted using the model are screened out from the logging data of the target well; and based on the logging data that failed to be predicted using the model, valid data are extracted as negative sample data to construct a fourth training data set.
[0030] In one embodiment, the method further comprises:
[0031] Obtain a knowledge graph of logging data during drilling;
[0032] Determine the reasons for the failure of the model prediction based on the knowledge graph and negative sample data;
[0033] Determine the data quality evaluation parameters of negative sample data according to the failure reasons;
[0034] According to the data quality evaluation parameters, negative sample data that meets the requirements are screened out from the negative sample data to construct a fourth training data set.
[0035] This specification also provides a detection device for drilling risk based on a full sample, comprising:
[0036] An acquisition module is used to obtain the logging data of the target well in the current time period;
[0037] An extraction module is used to extract target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features;
[0038] A processing module is used to process target valid data using a target joint risk prediction model to obtain a corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-class detection model, a target second-class detection model, and a target third-class detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, and logging data of target wells that failed to be predicted by the model during the drilling process of the target wells;
[0039] The determination module is used to determine whether the target well currently has drilling risks based on the target prediction results.
[0040] The present specification also provides a computer device, including a processor and a memory for storing processor executable instructions, wherein the processor implements the relevant steps of the method for detecting drilling risks based on the full sample when executing the instructions.
[0041] The present specification also provides a computer-readable storage medium having computer instructions stored thereon, and when the instructions are executed by a processor, the relevant steps of the method for detecting drilling risks based on the full sample are implemented.
[0042] Based on the full-sample drilling risk detection method, device and computer equipment provided in this specification, before specific implementation, according to the preset training rules, in the model building stage, first, based on the sample logging data of the acquired sample wells, a first training data set is constructed, which contains both abnormal data and normal data of drilling accidents, and the samples of normal data and abnormal data are relatively balanced, and a second data set only contains normal data without drilling accidents; then, the first training data set is used to perform supervised training on the initial first-category detection model to learn the changing law of data when drilling accidents occur in a targeted manner, and the second training data set is used to perform unsupervised training on the initial second-category detection model to learn the data law in normal data when no drilling accidents occur in a targeted manner, thereby obtaining an intermediate first-category detection model, an intermediate second-category detection model, and an intermediate third-category detection model. The initial joint risk prediction model of the detection model is then applied to the target well of concern, and the model is used to process the logging data of the target well in the model application stage; and the logging data of the target well that fails to be predicted by the model and has certain fuzziness and complexity are screened out as negative sample data for the model; and then the logging data of the target well can be used to incrementally learn the intermediate first-class detection model and the intermediate second-class detection model, so as to transfer the knowledge learned by the model based on the sample logging data of the sample well to the target well; at the same time, the negative sample data is used to perform negative sample learning on the intermediate third-class detection model, so as to learn the failure root causes and failure principles that are easy to cause model prediction failure in the target well in a targeted manner, so as to obtain a target joint risk prediction model that is suitable for the target well in the complex geological environment scenario, and has strong generalization and good effect. In the specific implementation, the target valid data that meets the requirements and contains key features can be extracted from the logging data of the target well in the current time period; and then the target joint risk prediction model is used to process the target valid data to detect whether the target well has drilling risks. Therefore, by comprehensively and targetedly utilizing the sample logging data of all sample wells and the logging data of existing target wells, the implicit data information in the relevant data can be fully mined and utilized, and a target joint risk prediction model with high accuracy and good effect for the target wells can be constructed and trained with relatively small data processing costs. Then, by using this target joint risk prediction model, it is possible to efficiently and accurately detect and determine whether there is a drilling risk during the drilling process of the target well, thereby effectively protecting the safety of drilling construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 It is a flowchart of a method for detecting drilling risks based on a full sample provided by an embodiment of this specification;
[0045] Figure 2 It is a schematic diagram of an embodiment of a drilling risk detection method based on a full sample provided by an embodiment of this specification, in a scenario example;
[0046] Figure 3 It is a schematic diagram of an embodiment of a drilling risk detection method based on a full sample provided by an embodiment of this specification, in a scenario example;
[0047] Figure 4 It is a schematic diagram of an embodiment of a drilling risk detection method based on a full sample provided by an embodiment of this specification, in a scenario example;
[0048] Figure 5 It is a schematic diagram of an embodiment of a drilling risk detection method based on a full sample provided by an embodiment of this specification, in a scenario example;
[0049] Figure 6 It is a schematic diagram of an embodiment of a drilling risk detection method based on a full sample provided by an embodiment of this specification, in a scenario example;
[0050] Figure 7 is a schematic diagram of the structure of a computer device provided by an embodiment of this specification;
[0051] Figure 8 It is a schematic diagram of the structure of a drilling risk detection device based on a full sample provided by an embodiment of the present specification;
[0052] Fig. 9 It is a schematic diagram of an embodiment of a drilling risk detection method based on a full sample provided by an embodiment of this specification, in a scenario example;
[0053] Fig.10 It is a schematic diagram of an embodiment of a drilling risk detection method based on full samples provided in an embodiment of this specification, in a scenario example. DETAILED DESCRIPTION
[0054] In order 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 in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0055] It should be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0056] See also Figure 1 As shown, the embodiment of this specification provides a method for detecting drilling risks based on the entire sample. The method may include the following contents when implemented:
[0057] S101: Obtaining the logging data of the target well in the current time period;
[0058] S102: extracting target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features;
[0059] S103: Processing target valid data using a target joint risk prediction model to obtain a corresponding target prediction result; wherein the target joint risk prediction model includes at least: a target first-class detection model, a target second-class detection model, and a target third-class detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, and logging data of target wells that failed to be predicted by the model during the drilling process of the target wells;
[0060] S104: Determine whether the target well currently has drilling risks based on the target prediction result.
[0061] The target well may be understood as an oil or gas well that is currently being drilled. Specifically, the target well may be an oil or gas well located in a formation area with a complex geological environment such as a deep layer or an ultra-deep layer.
[0062] In specific implementation, while drilling the target well, corresponding logging data can be collected synchronously.
[0063] The above-mentioned target joint risk prediction model can be specifically understood as an algorithm model that is trained through multiple learning methods such as supervised learning, unsupervised learning, and integrated learning, and is suitable for the complex geological environment scenarios where the target wells are located, using sample logging data from all sample wells collected during the drilling process of the target wells and the logging data of the target wells that failed to be predicted when the model was processed.
[0064] The above-mentioned target joint risk prediction model, on the one hand, can detect and identify drilling risks more comprehensively by learning the sample logging data of sample wells in the model construction stage; on the other hand, by learning the logging data of target wells in the model application stage, as well as the negative sample data that failed model prediction alone, it can better migrate and adapt to target wells in complex geological environment scenarios, and can also effectively avoid false alarms caused by detection and identification errors.
[0065] Specifically, the above-mentioned target joint risk prediction model at least includes a parallel target first-category detection model, a target second-category detection model, and a target third-category detection model.
[0066] Among them, the above-mentioned first-category detection model is a time series model obtained by supervised learning training, which mainly uses relatively balanced abnormal data (logging data with drilling accidents) and normal data (logging data without drilling accidents) in the sample logging data of the sample well. The above-mentioned second-category detection model is a time series model obtained by unsupervised learning training, which mainly uses the full amount of normal data in the sample logging data of the sample well. The above-mentioned third-category detection model is a time series model obtained by supervised learning training, which mainly uses negative sample data (logging data with failed model prediction) in the logging data of the target well.
[0067] Based on the above-mentioned target joint risk prediction model, we can first use the above-mentioned target first-category detection model, target second-category detection model, and target third-category detection model to separately process the input data to obtain three risk probability prediction values based on different dimensions; then use the three risk probability prediction values in combination and determine the final risk probability prediction value by voting as the target prediction result output by the model.
[0068] The above-mentioned supervised learning may specifically refer to a learning method of training and learning a model using labeled sample data.
[0069] The above-mentioned unsupervised learning may specifically refer to a learning method that uses unlabeled sample data to train and learn a model.
[0070] The above-mentioned ensemble learning can specifically refer to a learning method that combines multiple models through a voting mechanism to improve the overall prediction or classification performance, which can effectively improve the generalization ability of the model and reduce training overfitting.
[0071] The above key features can be specifically understood as features that have a more obvious impact on drilling risk prediction and a stronger correlation.
[0072] The above-mentioned drilling risks can be specifically understood as the risk of drilling accidents. Among them, the above-mentioned drilling accidents can specifically include overflow accidents, etc. Of course, it should be noted that the overflow accidents listed above are only a schematic illustration. During specific implementation, according to specific application scenarios and processing requirements, the above-mentioned drilling accidents can also include other types of accidents, such as well collapse, blowout, etc. This specification does not limit this.
[0073] In specific implementation, first, target valid data containing at least key features can be extracted from the logging data of the current time period. In this way, on the one hand, the amount of data processing of the subsequent model can be reduced, and on the other hand, the model can be more focused on analyzing the key features that are relatively more important for drilling risk prediction, reducing the interference of other factors in the logging data except the key features, so that the model can predict the drilling risk relatively more efficiently and accurately in the future.
[0074] Then, the pre-processed target joint risk prediction model can be used to process the target valid data, taking into account the changing law of the transformation of normal data to abnormal data when a drilling accident occurs, the data law of normal data when no drilling accident occurs, and the interference law that easily leads to model prediction failure, so as to accurately and efficiently detect and determine whether there is a drilling risk in the target well.
[0075] Based on the above embodiments, by training and utilizing a target joint risk prediction model that is adapted to target wells in complex geological environment scenarios and has strong generalization and good effects, it is possible to efficiently and accurately detect and determine whether there is a drilling risk during the drilling process of the target well, thereby effectively protecting the safety of drilling construction.
[0076] In some embodiments, the key features may specifically include at least one of the following: standpipe pressure, inlet flow rate, outlet flow rate, total pool volume, total hydrocarbon content, etc.
[0077] Among them, the above-mentioned riser pressure is identified as one of the key features because pressure changes are an important indicator for monitoring downhole dynamics during drilling operations. When a drilling accident such as an overflow occurs, the drilling fluid begins to flow freely and the balance of the static liquid column is broken. As the drilling fluid moves upward, the height of the static liquid column decreases, and the bottom hole pressure decreases accordingly. Inside the drill bit, the impact of fluid intrusion is small, and the static liquid column pressure and circulating pressure loss remain almost unchanged. Therefore, a decrease in bottom hole pressure will lead to a decrease in riser pressure. In turn, it is possible to consider using riser pressure as a key feature to analyze and predict drilling accidents such as overflows.
[0078] The changes in the inlet flow rate and outlet flow rate can also reflect the occurrence of drilling accidents such as overflow. Under normal circumstances, the inlet flow rate and outlet flow rate will remain relatively stable. However, when a drilling accident such as overflow occurs, the outlet flow rate will increase without increasing the inlet flow rate. Therefore, this feature can be used to analyze and predict drilling accidents such as overflow.
[0079] The above-mentioned total pool volume, as a key parameter to describe the drilling fluid reserve, also has an important impact on the prediction of drilling accidents such as overflows. Specifically, as the drilling fluid returns, the total pool volume will gradually increase. In the case of oil and water invasion, as the outlet flow rate increases, the total pool volume will also increase accordingly; in the case of gas invasion, due to the expansion of bubbles, the outlet flow rate increases, and the total pool volume will also increase. This change will appear soon after oil and water invasion and gas invasion occur, so this feature can be considered as an important clue to predict drilling accidents such as overflows.
[0080] The above changes in total hydrocarbon content usually involve the gas components in the drilling fluid. Specifically, when gas invasion occurs, as the gas circulates to the ground, the total hydrocarbon content will increase, which can effectively indicate drilling accidents such as overflows. Therefore, it is possible to consider introducing this feature to improve the model's ability to identify drilling accidents such as gas invasion and overflows.
[0081] In some embodiments, the above-mentioned extraction of target valid data that meets the requirements from the logging data of the current time period may include: based on key features, processing the logging data of the current time period to extract data that can characterize the key features and combining them as target valid data that meets the requirements corresponding to the current time period.
[0082] After obtaining the target valid data, the target valid data may be further preprocessed to eliminate data errors in the target valid data, so that the target valid data is relatively more suitable for processing by the target joint risk prediction model.
[0083] The above preprocessing may specifically include at least one of the following: data cleaning, outlier detection, missing value processing, data smoothing, etc.
[0084] In some embodiments, after determining whether the target well currently has a drilling risk according to the target prediction result, the method may further include the following when implemented:
[0085] S1: Determine the risk type and risk level of drilling risks;
[0086] S2: According to the risk type and risk level, query the preset risk handling strategy library to determine the matching target risk handling strategy;
[0087] S3: Eliminate risks on target wells according to target risk management strategy.
[0088] The preset risk handling strategy library may specifically store a plurality of preset risk handling strategies, and each preset risk handling strategy corresponds to at least one combination of risk type and risk level.
[0089] Before specific implementation, a preset risk handling strategy library can be constructed in the following manner: collect a large number of historical drilling risk handling records during historical drilling; screen out successfully handled records from the historical drilling risk handling records as sample drilling risk handling records; cluster the sample drilling risk handling records to obtain multiple data groups; wherein each data group corresponds to a combination of a risk class and a risk level, and contains common handling content related to drilling risk handling; based on the common handling content related to drilling risk handling contained in each data group, combined with expert experience, multiple preset risk handling strategies are constructed; and multiple preset risk handling strategies are combined to obtain a corresponding preset risk handling strategy library.
[0090] During specific implementation, drilling risk warning information about the target well can be generated; wherein, the drilling risk warning information at least carries a matching target risk handling strategy; the drilling risk warning information is sent to the drilling construction end of the target well to remind the drilling construction end of the relevant drilling risks, guide the drilling construction end to refer to the target risk handling strategy, and eliminate the drilling risks in a timely and accurate manner.
[0091] In some embodiments, see Figure 2 As shown, the target joint risk prediction model can be trained according to the preset training rules in the following manner:
[0092] S1: Obtain sample logging data of a sample well; and construct a first training data set and a second training data set using the sample logging data of the sample well according to a first sample processing rule;
[0093] S2: constructing an initial first-category detection model and an initial second-category detection model; wherein the initial first-category detection model at least includes a parallel LSTM structure and a GRU structure, and the initial second-category detection model at least includes an LSTM-AE structure;
[0094] S3: using the first training data set to perform supervised learning on the initial first-category detection model to obtain an intermediate first-category detection model; using the second training data set to perform unsupervised learning on the initial second-category detection model to obtain an intermediate second-category detection model;
[0095] S4: constructing a corresponding intermediate third-category detection model according to the intermediate first-category detection model; wherein the intermediate third-category detection model has the same model structure and model parameters as the intermediate first-category detection model;
[0096] S5: combining the intermediate first-category detection model, the intermediate second-category detection model, and the intermediate third-category detection model to obtain an initial joint risk prediction model;
[0097] S6: Obtaining the logging data of the target well collected during the drilling process of the target well; and constructing a third training data set and a fourth training data set using the logging data of the target well according to the second sample processing rule; wherein the fourth training data set is generated based on the logging data of the target well that failed to be predicted using the initial joint risk prediction model;
[0098] S7: Perform incremental learning on the intermediate first-category detection model and the intermediate second-category detection model in the initial joint risk prediction model by using the third training data set; at the same time, perform negative sample learning on the intermediate third-category detection model in the initial joint risk prediction model by using the fourth training data set to obtain a target joint risk prediction model that meets the requirements.
[0099] Based on the above embodiments, by constructing and combining a plurality of detection models of different structures and types according to preset training rules, and introducing and adopting a variety of different learning methods such as supervised learning, unsupervised learning, and integrated learning, the existing full amount of sample data can be fully and effectively utilized, and the data information carried in the sample data can be fully mined and used. With a relatively low data processing cost, a target joint risk prediction model with better effect and smaller error that is suitable for target wells in complex geological environment scenarios can be more efficiently trained.
[0100] The above-mentioned sample wells can be specifically understood as drilled oil and gas wells that are different from the target wells.
[0101] In some embodiments, the first training data set may be a sample data set constructed by using sample balanced normal data and abnormal data in sample logging data of sample wells during the model construction phase. Here, the abnormal data may be logging data during a drilling accident such as overflow. The normal data may be logging data during a normal drilling period before a drilling accident such as overflow occurs.
[0102] The second training data set may be a sample data set constructed using normal data in the sample logging data of the sample wells during the model building phase. Here, the normal data may be logging data during a normal drilling period without any drilling accidents such as overflow.
[0103] The third training data set may specifically be a sample data set constructed by using the logging data of the target well collected during the drilling process of the target well in the model application stage.
[0104] The fourth training data set may specifically be a sample data set constructed from mud logging data (which may be recorded as negative sample data) that fails to predict or even gives false positives when the mud logging data of the target well is processed using the existing joint risk prediction model during the model application phase.
[0105] The above LSTM (Long Short-Term Memory) structure can be specifically understood as a temporal recurrent neural network.
[0106] The above GRU (Gate Recurrent Unit) structure can be specifically understood as a variant structure of RNN (Recurrent Neural Network). The reset gate in GRU helps to extract short-term dependencies in the sequence, and the update gate helps to obtain long-term dependencies in the sequence data.
[0107] The above LSTM-AE (Long Short Term Memory Autoencoder) structure can be specifically understood as a time series autoencoder.
[0108] It should be noted that the LSTM-AE structure is introduced and used here, and the low-dimensional representation of the input data can be learned by using the neural network, and the original data can be restored as much as possible during the decoding process. By minimizing the difference between the input data and the reconstructed data (such as the mean square error), the useful feature representation of the data can be learned. Furthermore, the above LSTM-AE structure can be used to fully learn the full amount of normal data in the sample logging data, and effectively grasp the data rules of normal data, so that normal data can be accurately detected and identified.
[0109] The above three model structures can capture and learn the temporal dependencies of data.
[0110] In some embodiments, see Figure 3 As shown, according to the first sample processing rule, the sample logging data of the sample well is used to construct the first training data set and the second training data set. When implemented specifically, the following contents may be included:
[0111] S1: According to the first sample processing rule, obtain and determine the key features associated with the drilling accident through correlation analysis based on the historical logging data of the drilling accident;
[0112] S2: Extract sample valid data from the sample logging data of the sample well according to the key features;
[0113] S3: Based on the sample valid data, filter out the sample valid data of the first time period where the drilling accident occurred, and the sample valid data of the second time period before the drilling accident occurred, to construct a first training data set; and based on the sample valid data, filter out the sample valid data in which no drilling accident occurred, to construct a second training data set.
[0114] Based on the above embodiments, the sample logging data of the sample wells can be fully and comprehensively utilized to construct a first training data set and a second training data set based on different dimensions and for different learning objectives.
[0115] In some embodiments, the above-mentioned first sample processing rule is used to obtain and determine key features associated with drilling accidents through correlation analysis based on historical logging data of drilling accidents. The specific implementation may include the following contents.
[0116] First, the historical logging data of drilling accidents is obtained and combined with relevant background information and multi-physical field action models to determine the factors related to drilling accidents as candidate factors; based on the candidate factors, test experiments are carried out and corresponding experimental test data are collected; based on the experimental test data, data statistics are performed to obtain corresponding statistical results; based on the statistical results, a correlation matrix between candidate factors and drilling accidents is constructed. For details, please refer to Figure 4 shown.
[0117] When constructing the correlation matrix, the candidate factors can be used as the vertical and horizontal axes. At the same time, the statistical results are normalized to determine the proportion of various candidate factor combinations when a drilling accident occurs. The proportion is mapped to a corresponding grayscale value. The grayscale value is used to fill the corresponding block to obtain the above correlation matrix.
[0118] Next, according to the correlation matrix, by calculating and utilizing the contribution value of each candidate factor to the drilling accident, correlation analysis can be performed to screen out candidate factors whose contribution value is greater than a preset contribution threshold as the key feature.
[0119] In specific implementation, the appropriate first time period and second time period can be determined based on statistics and historical logging data of drilling accidents. In the sample valid data, the time point of the drilling accident is used as the starting point; starting from the starting point, the valid data of the first time period is intercepted backward along the time axis to obtain abnormal data, that is, the sample valid data of the first time period when the drilling accident occurs. At the same time, starting from the starting point, the valid data of the second time period is intercepted forward along the time axis to obtain normal data, that is, the sample valid data of the second time period before the drilling accident occurs. The sample valid data of the first time period when the drilling accident occurs and the sample valid data of the second time period before the drilling accident are combined to obtain a first training data set with relatively balanced samples.
[0120] At the same time, the full amount of valid data without drilling accidents is screened out from the sample valid data and combined to obtain the second training data set.
[0121] Specifically, when the first training data set is used to perform supervised learning on the initial first-category detection model, the first training data set may be labeled first; and then the labeled first training data set may be used to train the initial first-category detection model.
[0122] In addition, when the initial first type of detection model is trained, the first training data set can be split into two subsets; and one of the subsets is used to train the LSTM structure, and the other subset is used to train the GRU structure.
[0123] Specifically, when the second training data set is used to perform unsupervised learning on the initial second type detection model, the unlabeled second training data set may be used directly to train the initial second type detection model.
[0124] After the intermediate first category detection model is trained through supervised learning, an intermediate first category detection model can be copied to obtain the corresponding intermediate third category detection model.
[0125] After obtaining the intermediate first-category detection model, the intermediate second-category detection model, and the intermediate third-category detection model, the Boosting ensemble method or the Bagging ensemble method may be used to combine the above three models; and corresponding voting rules may be set to obtain an initial joint risk prediction model.
[0126] In some embodiments, considering that the proportion of abnormal data in the sample logging data is relatively small, in order to improve the training effect of the first type of detection model, after the sample valid data of the first time period when the drilling accident occurs and the sample valid data of the second time period before the drilling accident occurs, the sample valid data of the first time period when the drilling accident occurs and the sample valid data of the second time period before the drilling accident occur can be respectively enhanced to obtain the sample valid data of the first time period after enhancement and expansion, and the sample valid data of the second time period after enhancement and expansion; then, the sample valid data of the first time period after enhancement and expansion and the sample valid data of the second time period after enhancement and expansion are combined to construct a relatively richer first training data set with relatively better training effect.
[0127] In some embodiments, after the first training data set and the second training data set are constructed, the method may further include the following when implemented:
[0128] S1: According to the first sample processing rule, determine the sample wells involved in the sample valid data in the first training data set as training sample wells;
[0129] S2: Filter out the sample valid data that does not involve the training sample wells from the sample valid data, and construct a test data set and a verification data set for the first type of detection model and the second type of detection model; wherein the test data set of the first type of detection model is the same as the test data set of the second type of detection model, and the verification data set of the first type of detection model is the same as the verification data set of the second type of detection model.
[0130] In specific implementation, based on the corresponding cross-well data partitioning strategy, the test data set, the validation data set and the first training data set correspond to different sample wells, so that the model can obtain better generalization ability during training.
[0131] In specific implementation, after using the first training data set to perform supervised learning on the initial first-category detection model to obtain an intermediate first-category detection model, and using the second training data set to perform unsupervised learning on the initial second-category detection model to obtain an intermediate second-category detection model, the intermediate first-category detection model and the second-category detection model can be tested and verified using the test data set and the verification data set, and the test verification results can be collected.
[0132] Furthermore, based on the test verification results, the intermediate first category detection model and the intermediate second category detection model can be adjusted and optimized specifically to further improve the model accuracy of the intermediate first category detection model and the intermediate second category detection model.
[0133] At the same time, the model performance of the intermediate first category detection model and the intermediate second category detection model can also be evaluated based on the test verification results; and the voting rules can be adjusted based on the evaluation results, for example, the voting weight coefficient can be adjusted.
[0134] In addition, based on the test verification results, valid sample data that failed to be predicted by the first type of detection model and / or the second type of detection model during the test verification process can be screened out as negative sample data; and the negative sample data can be used to train the intermediate third type of detection model to improve the model accuracy of the intermediate third type of detection model.
[0135] By further introducing ensemble learning on the basis of supervised learning and unsupervised learning, on the one hand, the overall accuracy of model predictions can be improved by combining the predictions of multiple models; on the other hand, by combining multiple models, the possible overfitting problem based on a single model can be reduced, the generalization ability and robustness of the model can be improved, and false positives can be reduced.
[0136] In some embodiments, see Figure 5 As shown, according to the second sample processing rule, the third training data set and the fourth training data set are constructed using the logging data of the target well. When implemented specifically, the following contents may be included:
[0137] S1: Use the initial joint risk prediction model to process the logging data of the target well and obtain the corresponding prediction results;
[0138] S2: According to the logging data of the target well, valid data is randomly extracted and combined to construct a third training data set;
[0139] S3: According to the prediction result, filter out the logging data that failed to be predicted using the model from the logging data of the target well; and extract valid data based on the logging data that failed to be predicted using the model as negative sample data to construct a fourth training data set.
[0140] Based on the above embodiments, the logging data of the target well collected during the drilling process of the target well can be fully and comprehensively utilized to construct a third training data set and a fourth training data set based on different dimensions and for different learning objectives.
[0141] In some embodiments, during specific implementation, corresponding logging data can be randomly extracted from the logging data of the target well to construct a third training data set; and the third training data set can be used to perform incremental learning on the intermediate first-category detection model and the intermediate second-category detection model.
[0142] In specific implementation, replay-based incremental learning can be adopted, and the third training data set can be used to perform incremental learning on the intermediate first-category detection model and the intermediate second-category detection model, so that the model can retain the old knowledge that is effective for the target well that was previously learned based on the sample logging data of the sample well; at the same time, the model can further learn and master new knowledge for the target well, so that the model can be better adapted to the target well in complex geological environment scenarios.
[0143] In specific implementation, the reasons why the negative sample data leads to the failure of model prediction can be analyzed, and the negative sample data can be labeled according to the reasons for failure to obtain the corresponding fourth training data set; the fourth training data set is then used to perform negative sample learning on the intermediate third category detection model, so that the model can subsequently avoid false alarms caused by prediction failures as much as possible.
[0144] In some embodiments, after obtaining the valid data of the sample of the sample well and / or the valid data of the target well, the method may also include: preprocessing the valid data of the sample of the sample well and / or the valid data of the target well; wherein the preprocessing includes at least one of the following: data cleaning, outlier detection, missing value processing, data smoothing processing, etc.
[0145] In some embodiments, during specific implementation, the joint risk prediction model can be applied to the drilling process of the target well, and in each specified time period, the logging data of the target well in the previous time period is obtained; and the logging data of the target well in the previous time period is used to construct a third training data set and a fourth training data set of the previous time period; and then the third training data set and the fourth training data set of the previous time period are used to train and update the target joint risk prediction model to continuously improve and improve the joint risk prediction model.
[0146] In some embodiments, during specific implementation, negative sample data of prediction failures can be randomly extracted from the historical logging data of the target well on a regular basis, and combined with the positive sample data of successful predictions to construct a test data set; the test data set is then used to test the current target joint risk prediction model; and based on the test results, the target joint risk prediction model is adjusted and optimized.
[0147] In some embodiments, see Figure 6 As shown, when the method is implemented specifically, it may also include the following contents:
[0148] S1: Obtain the knowledge graph about the logging data during the drilling process;
[0149] S2: Determine the reasons for the failure of the prediction using the model based on the knowledge graph and negative sample data;
[0150] S3: Determine the data quality evaluation parameters of the negative sample data according to the failure reason;
[0151] S4: According to the data quality evaluation parameters, negative sample data that meets the requirements are screened out from the negative sample data to construct a fourth training data set.
[0152] Based on the above embodiment, by acquiring and using relevant knowledge graphs, it is possible to conduct an effective and in-depth analysis of negative sample data, and then construct a fourth training data set with relatively better results.
[0153] In some embodiments, during specific implementation, the typical case data about drilling accidents can be sorted and constructed based on the historical logging data of drilling accidents; and the data elements for the typical case data (for example, overflow accidents, riser parameters, inlet parameters, etc.) can be sorted out based on the background information and the corresponding historical logging data, as well as the relationships between the data elements; and then based on the above data elements, the relationships between the data elements, combined with expert experience, a knowledge graph that can reflect the interaction relationship between different data factors in the drilling process based on drilling accidents is constructed.
[0154] Furthermore, we can query the knowledge graph based on the negative sample data, and combine it with relevant background information to conduct in-depth analysis of the negative sample data to determine the reasons for the failure of model prediction, such as the characteristic manifestations of model errors and the root causes of input data anomalies.
[0155] Furthermore, based on the above-mentioned reasons for failure, the effect of the negative sample data in training the model can be evaluated to obtain data quality evaluation parameters for the negative sample data; then, based on the data quality evaluation parameters, negative sample data that meets the requirements can be screened out from the negative sample data to construct a fourth training data set, so that the fourth training data set with higher data quality can be used for negative sample learning, so that the model can be relatively more focused on overcoming the more widespread problems that lead to model prediction failures, thereby improving the generalization and stability of the model.
[0156] In addition, the model structure and / or preprocessing rules for valid data may be adjusted according to the above-mentioned failure reasons to overcome the problem of model prediction failure due to internal reasons such as model errors or data processing errors.
[0157] In some embodiments, after obtaining the knowledge graph, the first type of detection model, the second type of detection model, and the knowledge graph can be used in combination to process negative sample data to obtain corresponding prediction classification results; based on the prediction classification results, the negative sample data is labeled; and then the labeled negative sample data is used to construct a corresponding fourth training data set for targeted negative sample learning of the third type of detection model.
[0158] As can be seen from the above, based on the full-sample detection method, device and computer equipment provided in the embodiments of this specification, before specific implementation, according to the preset training rules, in the model building stage, first, based on the sample logging data of the acquired sample wells, a first training data set is constructed, which contains both abnormal data and normal data of drilling accidents, and the normal data and abnormal data are relatively balanced, and a second data set only contains normal data where no drilling accidents have occurred; then, the first training data set is used to perform supervised training on the initial first-category detection model, so as to learn the changing law of the data when a drilling accident occurs in a targeted manner; at the same time, the second training data set is used to perform unsupervised training on the initial second-category detection model, so as to learn the data law in the normal data when no drilling accidents occur in a targeted manner, thereby obtaining a detection model integrating the intermediate first-category detection model, the intermediate second-category detection model and the intermediate second-category detection model. The first detection model and the initial joint risk prediction model of the intermediate third detection model are used; the initial joint risk prediction model is then applied to the target well of interest, and the logging data of the target well is used to process the logging data of the target well in the model application stage; the logging data with certain ambiguity and complexity that fail to be predicted by the model are screened out from the logging data of the target well as negative sample data; the logging data of the target well is then used to perform incremental learning on the intermediate first detection model and the intermediate second detection model, so as to transfer the knowledge learned by the model based on the sample logging data of the sample well to the target well; at the same time, the negative sample data is used to perform negative sample learning on the intermediate third detection model, so as to learn the root causes of failure in the target well that are easy to cause the model prediction failure in a targeted manner, and obtain a target joint risk prediction model that is suitable for the target well in the complex geological environment scenario, and has strong generalization and good effect. In specific implementation, the target valid data that meets the requirements can be first extracted from the logging data of the target well in the current time period; the target joint risk prediction model is then used to process the target valid data to detect whether the target well has drilling risks. Therefore, by comprehensively and targetedly utilizing the full sample logging data and the existing logging data of the target wells, and fully mining and utilizing the relevant data, a target joint risk prediction model with high accuracy and good effect for the target wells can be constructed at a relatively low cost. Then, the target joint risk prediction model can be used to efficiently and accurately detect and determine whether there is a drilling risk during the drilling process of the target well, thereby effectively protecting the safety of the drilling construction.
[0159] The embodiment of this specification also provides a data processing method. When the method is implemented specifically, it may include the following contents:
[0160] S1: Obtain sample logging data of a sample well; and construct a first training data set and a second training data set using the sample logging data of the sample well according to a first sample processing rule;
[0161] S2: constructing an initial first-category detection model and an initial second-category detection model; wherein the initial first-category detection model at least includes a parallel LSTM structure and a GRU structure, and the initial second-category detection model at least includes an LSTM-AE structure;
[0162] S3: using the first training data set to perform supervised learning on the initial first-category detection model to obtain an intermediate first-category detection model; using the second training data set to perform unsupervised learning on the initial second-category detection model to obtain an intermediate second-category detection model;
[0163] S4: constructing a corresponding intermediate third-category detection model according to the intermediate first-category detection model; wherein the intermediate third-category detection model has the same model structure and model parameters as the intermediate first-category detection model;
[0164] S5: combining the intermediate first-category detection model, the intermediate second-category detection model, and the intermediate third-category detection model to obtain an initial joint risk prediction model;
[0165] S6: Obtaining the logging data of the target well collected during the drilling process of the target well; and constructing a third training data set and a fourth training data set using the logging data of the target well according to the second sample processing rule; wherein the fourth training data set is generated based on the logging data of the target well that failed to be predicted using the initial joint risk prediction model;
[0166] S7: Perform incremental learning on the intermediate first-category detection model and the intermediate second-category detection model in the initial joint risk prediction model by using the third training data set; at the same time, perform negative sample learning on the intermediate third-category detection model in the initial joint risk prediction model by using the fourth training data set to obtain a target joint risk prediction model that meets the requirements.
[0167] Based on the above method, a target joint risk prediction model with better effect that is suitable for target wells in complex geological environment scenarios can be trained more efficiently with relatively small data processing costs.
[0168] This specification embodiment provides a computer device, referring to Figure 7 The computer device includes a network communication port 701, a processor 702 and a memory 703, and the above structures are connected through internal cables so that each structure can perform specific data interaction.
[0169] The network communication port 701 can be used to obtain the logging data of the target well in the current time period.
[0170] The processor 702 can be specifically used to extract target valid data that meets the requirements from the logging data of the current time period; wherein the target valid data at least includes key features; the target valid data is processed using a target joint risk prediction model to obtain a corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-category detection model, a target second-category detection model, and a target third-category detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, as well as logging data of target wells that failed to be predicted by the model during the drilling process of the target wells; based on the target prediction result, determine whether the target well currently has a drilling risk.
[0171] The memory 703 may be specifically used to store corresponding instruction programs, as well as target effective data, target joint risk prediction model and other related data.
[0172] Based on the above method, the relevant structural performance of computer equipment can be effectively utilized, the data processing speed of electronic equipment can be improved, and the data processing of drilling risk detection can be efficiently realized.
[0173] In this embodiment, the network communication port 701 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. 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. In addition, 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, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.
[0174] In this embodiment, the processor 702 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.
[0175] In this embodiment, the memory 703 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function that has 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.
[0176] The embodiments of the present specification also provide a computer-readable storage medium based on the above-mentioned full-sample based drilling risk detection method, wherein the computer-readable storage medium stores computer program instructions, which, when executed, implement: obtaining the logging data of the target well in the current time period; extracting target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features; processing the target valid data using a target joint risk prediction model to obtain a corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-category detection model, a target second-category detection model, and a target third-category detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, and logging data of target wells that failed to be predicted by the model during the drilling of the target well; and determining whether the target well currently has a drilling risk based on the target prediction result.
[0177] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0178] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other implementations and will not be described in detail here.
[0179] The embodiments of the present specification also provide a computer program product, which at least includes a computer program, and when the computer program is executed by a processor, it implements the following method steps: obtaining the logging data of the target well in the current time period; extracting the target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features; using the target joint risk prediction model to process the target valid data to obtain the corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first category detection model, a target second category detection model, and a target third category detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, and logging data of target wells that failed to be predicted by the model during the drilling process of the target well; according to the target prediction result, determining whether the target well currently has a drilling risk.
[0180] See also Figure 8As shown, the embodiment of this specification also provides a detection device for drilling risk based on the whole sample, and the device may specifically include the following structural modules:
[0181] The acquisition module 801 may be specifically used to acquire the logging data of the target well in the current time period;
[0182] The extraction module 802 may be specifically used to extract target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features;
[0183] The processing module 803 can be specifically used to process the target valid data using the target joint risk prediction model to obtain the corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-class detection model, a target second-class detection model, and a target third-class detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, and logging data of target wells that failed to be predicted by the model during the drilling process of the target wells;
[0184] The determination module 804 may be specifically used to determine whether the target well currently has a drilling risk according to the target prediction result.
[0185] In some embodiments, the key features may specifically include at least one of the following: standpipe pressure, inlet flow rate, outlet flow rate, total pool volume, total hydrocarbon content, and the like.
[0186] In some embodiments, the apparatus may further include a training module.
[0187] Among them, the above-mentioned training model can be specifically trained according to the preset training rules in the following manner to obtain the target joint risk prediction model: obtain the sample logging data of the sample well; and according to the first sample processing rule, use the sample logging data of the sample well to construct a first training data set and a second training data set; construct an initial first-category detection model and an initial second-category detection model; wherein the initial first-category detection model at least includes a parallel LSTM structure and a GRU structure, and the initial second-category detection model at least includes an LSTM-AE structure; use the first training data set to perform supervised learning on the initial first-category detection model to obtain an intermediate first-category detection model; use the second training data set to perform unsupervised learning on the initial second-category detection model to obtain an intermediate second-category detection model; based on the intermediate first-category detection model, construct a corresponding intermediate third-category detection model; wherein the intermediate third The model structure and model parameters of the intermediate first category detection model are the same as those of the intermediate first category detection model; the intermediate first category detection model, the intermediate second category detection model, and the intermediate third category detection model are combined to obtain an initial joint risk prediction model; the logging data of the target well collected during the drilling process of the target well is obtained; and according to the second sample processing rule, the logging data of the target well is used to construct a third training data set and a fourth training data set; wherein the fourth training data set is generated based on the logging data of the target well that failed to be predicted using the initial joint risk prediction model; the intermediate first category detection model and the intermediate second category detection model in the initial joint risk prediction model are incrementally learned by using the third training data set; at the same time, the intermediate third category detection model in the initial joint risk prediction model is negatively sampled and learned using the fourth training data set to obtain a target joint risk prediction model that meets the requirements.
[0188] In some embodiments, when the above-mentioned training module is implemented, the first training data set and the second training data set can be constructed according to the first sample processing rule and the sample logging data of the sample well in the following manner: according to the first sample processing rule, the historical logging data of the drilling accident is obtained and the key features associated with the drilling accident are determined through correlation analysis; according to the key features, the sample valid data is extracted from the sample logging data of the sample well; according to the sample valid data, the sample valid data of the first time period where the drilling accident occurs and the sample valid data of the second time period before the drilling accident occur are screened out to construct the first training data set; and according to the sample valid data, the sample valid data of the drilling accident where no drilling accident occurs are screened out to construct the second training data set.
[0189] In some embodiments, after constructing the first training data set and the second training data set, the training module can also be used when it is implemented: according to the first sample processing rule, determine the sample wells involved in the sample valid data in the first training data set as training sample wells; filter out the sample valid data that does not involve the training sample wells from the sample valid data, and construct a test data set and a verification data set for the first type of detection model and the second type of detection model; wherein the test data set of the first type of detection model is the same as the test data set of the second type of detection model, and the verification data set of the first type of detection model is the same as the verification data set of the second type of detection model.
[0190] In some embodiments, when the above-mentioned training module is implemented, the third training data set and the fourth training data set can be constructed according to the second sample processing rule using the logging data of the target well in the following manner: the logging data of the target well is processed using the initial joint risk prediction model to obtain the corresponding prediction result; based on the logging data of the target well, valid data is randomly extracted and combined to construct the third training data set; based on the prediction result, the logging data that failed to be predicted using the model is screened out from the logging data of the target well; and based on the logging data that failed to be predicted using the model, valid data is extracted as negative sample data to construct the fourth training data set.
[0191] In some embodiments, when the device is implemented, it can also be used to: obtain a knowledge graph about the logging data in the drilling process; determine the failure cause of the prediction failure using the model based on the knowledge graph and the negative sample data; determine the data quality evaluation parameters of the negative sample data based on the failure cause; based on the data quality evaluation parameters, filter out negative sample data that meets the requirements from the negative sample data to construct a fourth training data set.
[0192] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0193] It can be seen from the above that the detection device for drilling risks based on the full sample provided in the embodiment of this specification fully mines and utilizes the relevant data by comprehensively and targetedly utilizing the full sample logging data and the existing logging data of the target well, and constructs a target joint risk prediction model with higher accuracy and better effect for the target well at a relatively low cost. Then, by using the target joint risk prediction model, it is possible to efficiently and accurately detect and determine whether there is a drilling risk during the drilling process of the target well, thereby effectively protecting the safety of the drilling construction.
[0194] In a specific scenario example, the drilling risk detection method based on the full sample provided in this specification can be applied to implement a drilling risk diagnosis module based on the full sample and a one-click update. For the specific implementation process, please refer to Fig. 9 As shown, including the following.
[0195] In this scenario example, considering the complex geological conditions such as deep and ultra-deep layers (for example, complex geological environment scenarios), dangerous events such as overflows become risks that cannot be ignored in the drilling process. Due to the uncertainty of deep and deep-water geological conditions, the frequency and impact of risks such as overflows gradually increase with increasing depth, which brings huge challenges to oil and gas exploration and development. At present, artificial intelligence models have been preliminarily applied in the field of oil and gas drilling, especially in the field of risk detection. However, intelligent models are often too sensitive in practical applications, resulting in a large number of false alarms. Faced with this challenge, how to more effectively deal with a large number of false alarms and effectively utilize these false alarm information has become a problem that needs to be solved urgently. The real-time model update method provides a possibility to solve this problem.
[0196] Taking into account negative samples (e.g., negative sample data), that is, cases where the model prediction fails, after the screening of model prediction failures, it has proved its value. Retraining a new model with negative samples and re-assembling it into the system will ensure that the intelligent model is more suitable for the current well conditions and effectively reduce the false alarm rate. Through improvement, the accuracy of risk diagnosis can be effectively improved.
[0197] Based on the above situation, the applicant, after creative thinking, proposed a way of utilizing negative samples to improve the diagnostic accuracy of drilling risks and realize real-time updating of intelligent models, thereby providing the industry with an advanced and feasible solution to improve the safety and efficiency of the drilling process and provide technical support for safe and efficient drilling.
[0198] refer to Fig. 9As shown, first, a conventional time series supervised model (e.g., a first type of detection model) is trained using risk segment data (e.g., a first training data set), and the model parameters are adjusted to make it perform well under the current data set. Next, a time series unsupervised model (e.g., a second type of detection model) is trained using data from the normal drilling phase (e.g., a second training data set), which can identify the regularity of normal data and determine whether the data at a certain moment is normal. Once it is determined to be abnormal, the system will issue a risk alarm. Then, the three models (including: the first type of detection model, the second type of detection model, and the third type of detection model) are integrated through a voting mechanism to construct a total risk overflow intelligent model (e.g., an initial joint risk prediction model). Finally, for samples where the model has false alarms in actual applications (e.g., negative sample data that failed to predict based on the logging data of the target well), these negative samples are selected and calibrated (e.g., constructing a fourth training data set) and reused to train a supervised time series model (e.g., a third type of detection model). Because these samples prove their confusing nature to the model, retraining can improve the accuracy of the model. At the same time, regular incremental update steps are performed for normal supervised and unsupervised time series models. Finally, multiple models are integrated through a voting mechanism to further improve the reliability and prediction accuracy of the model.
[0199] Specifically, the following steps may be included:
[0200] Step 1: Optimize input features (eg, key features), perform data preprocessing on the logging data, and form a data processing flow including outlier detection, interpolation, and smoothing filtering.
[0201] Before building a risk diagnosis model, the first task is to optimize input features and perform data preprocessing. This embodiment extensively collects and organizes comprehensive logging time series data (e.g., sample logging data of sample wells) of more than 140 overflow events that occurred in more than 130 wells in seven major oil regions in a certain area during drilling operations. These data cover detailed records of multiple fluids such as oil, gas, and water invading the formation, providing valuable information resources for in-depth analysis of overflow events.
[0202] In the initial analysis of the data, the applicant found that no single feature was significantly correlated with whether overflow occurred, such as Figure 4 The correlation calculation results are shown in the figure. Therefore, under the premise of ensuring that the model can be quickly and effectively applied at the drilling site, we carefully selected the following key features as inputs for model training: standpipe pressure, inlet flow rate, outlet flow rate, total pool volume, and total hydrocarbon content.
[0203] Among them, the riser pressure is taken into consideration because pressure changes are an important indicator for monitoring downhole dynamics during drilling operations. When overflow occurs, the drilling fluid begins to flow freely and the balance of the static column is broken. As the drilling fluid moves upward, the height of the static column decreases, and the bottomhole pressure decreases accordingly. Inside the drill bit, the impact of fluid intrusion is small, and the static column pressure and circulating pressure loss remain almost unchanged. Therefore, a decrease in bottomhole pressure will lead to a decrease in riser pressure, and this change is of great significance for predicting overflow.
[0204] Changes in inlet and outlet flow rates can also reflect the occurrence of overflow risks. Under normal circumstances, inlet and outlet flow rates should remain relatively stable. However, when overflow occurs, the outlet flow rate will increase without increasing the inlet flow rate, which is an important feature for identifying overflow.
[0205] As a key parameter describing the drilling fluid reserve, the total pool volume also has an important impact on the prediction of overflow. As the drilling fluid returns, the total pool volume will gradually increase. In the case of oil and water invasion, as the outlet flow rate increases, the total pool volume will also increase accordingly; in the case of gas invasion, due to the expansion of bubbles, the outlet flow rate increases, and the total pool volume will also increase. This change will appear soon after the oil and water invasion and gas invasion occur, providing important clues for predicting overflow.
[0206] The change in total hydrocarbon content is related to the gas composition in the drilling fluid. When gas invasion occurs, the total hydrocarbon content will increase as the gas circulates to the surface. This feature is of great significance for guiding field staff to detect overflow events in a timely manner. Therefore, incorporating total hydrocarbon content into the model input features will help improve the model's ability to identify gas invasion and overflow.
[0207] After selecting these key features, we performed a data cleaning step to reduce the impact of noise, outliers, and missing values. Data cleaning is a crucial part of machine learning pre-processing, which can improve data quality and make the data more suitable for subsequent analysis and modeling. In this example, we implemented outlier detection, missing value processing, data smoothing, and normalization by writing code, laying a solid foundation for subsequent model training.
[0208] Step 2: Sample balancing and normal data extraction.
[0209] Before model training, sample balance and normal data extraction are equally important. In this example, the data is divided into 60% training set, 20% validation set and 20% test set. In order to verify the accuracy of the model on different wells, a cross-well data partitioning strategy is adopted here to ensure that the training set and the test set use data from different wells. Doing so can improve the generalization ability of the model and enable it to better adapt to unseen well conditions.
[0210] In the anomaly detection task, the scarcity of abnormal data is a common problem. When the normal data is much larger than the abnormal data, the supervised model may become lazy and tend to predict that all data is normal. In order to avoid this problem, it is necessary to balance the number of normal data and abnormal data. In this embodiment, for the supervised model data set, the start time and duration of the overflow data are found, and normal data of the same duration are collected from the start time forward (the first training data set is constructed) to achieve the purpose of balancing the data.
[0211] At the same time, in order to ensure that a large amount of data during normal drilling can be fully utilized, all data with risk labels as non-occurrence in the training data set are extracted separately as the training data set for the unsupervised model (for example, to construct a second training data set). This ensures that the unsupervised model can learn the rules of normal drilling data and thus better identify abnormal data.
[0212] During the validation and testing phase, the unsupervised model used the same validation and test sets as the supervised model to accurately compare and verify the model performance. This step provided strong data support for in-depth analysis of the overflow event while ensuring the effectiveness of model training and the accuracy of evaluation.
[0213] Step 3: Establish an intelligent identification model for overflow risk.
[0214] After data preprocessing and sample balancing, the model building phase begins. This embodiment uses LSTM (Long Short-Term Memory Network) and GRU (Gated Recurrent Unit) as supervised time series models for training, and LSTM-AE (Bidirectional Long Short-Term Memory Network) as an unsupervised time series model for training. These models have significant advantages in processing time series data and can capture the time series dependencies in the data.
[0215] Taking the dataset of 59 wells in this example as an example, two random extraction operations were performed, each extracting data from 35 wells to form two independent sub-datasets. These two sub-datasets are used to train two supervised time series models, GRU and LSTM. Since the sampling process uses the feature of replacement, each subset may contain repeated samples and may omit some original samples. This processing method increases the diversity of the model and helps improve the generalization ability of the model.
[0216] During the model training process, the majority voting method (e.g., voting rule) is used to integrate the results of the three models. This method votes on the prediction results of multiple models and uses the majority opinion as the final prediction result. In the bagging ensemble method, no additional hyperparameters are required, and it mainly relies on the hyperparameters of each base learner. By optimizing these hyperparameters, the model performance can be improved to achieve better prediction results.
[0217] After training the unsupervised time series model with normal drilling data, the three models were integrated through a hard voting mechanism. This step significantly improved the prediction accuracy of the model from 69% to 75%. This improvement shows that by integrating the results of multiple models, the advantages of each model can be fully utilized to improve the overall prediction performance.
[0218] Step 4: Build a knowledge graph based on expert experience to extract negative samples.
[0219] In order to improve the accuracy and reliability of the model, the extraction and selection of negative samples is crucial. In this embodiment, a negative sample selection method based on expert experience is also proposed, which aims to automatically intercept samples and ensure the quality of negative samples.
[0220] First, cases where the intelligent model fails to predict can be used as the main source of negative samples. These negative samples are usually vague and complex, but they are valuable to select and analyze. By collecting these cases, a large amount of negative sample data can be obtained for model optimization.
[0221] Secondly, with the help of expert experience, we build a knowledge graph to conduct in-depth secondary analysis of these samples. A knowledge graph is a graph-based data structure that can intuitively display the relationships and patterns between data. By building a knowledge graph, we can dig out the specific reasons why the model determines it as a negative sample, including but not limited to the specific reasons why the model determines it as a negative sample and the root cause of data anomalies. This process helps to have a deeper understanding of the performance and limitations of the model, and provides strong support for subsequent optimization.
[0222] Finally, negative samples that have undergone secondary screening will be stored in a dedicated negative sample database. This database serves as an important data resource for subsequent model optimization and can be used to train new models or update existing models to improve the accuracy and reliability of the models.
[0223] Step 5: Automatically update the intelligent model based on positive and negative samples.
[0224] In order to make full use of negative samples and further improve model performance, an intelligent model automatic updating method based on positive-negative sample pairs is proposed. This method aims to adapt to new data environments and improve the accuracy of the model by continuously updating the model.
[0225] Specifically, for each of the two supervised models, a model with the same structure and hyperparameters is selected as a backup model. In the actual application of the model, when new negative samples are generated, these negative samples are labeled and classified using the trained model and the constructed knowledge graph. Then, these labeled negative samples are used to train the backup model. At the same time, for the three existing models, based on the incremental learning technology, the model is updated normally using samples. By continuously iterating and updating the backup model, the model performance can be gradually optimized and the model accuracy can be improved.
[0226] Finally, multiple models (including the original two supervised models (LSTM and GRU), one unsupervised model (Bi-LSTM), and two backup models (LSTM and GRU)) are integrated. By comparing and analyzing the prediction results of different models, the model performance can be further verified and optimized.
[0227] For details, please refer to Fig.10 The comparison results show that the prediction accuracy of the model after automatic updating has been significantly improved. This result fully proves the effectiveness and feasibility of the method proposed in the present invention.
[0228] Through the above scenario examples, it is verified that the detection method of drilling risks based on full samples provided in this specification can achieve a breakthrough in the intelligent monitoring technology of drilling risks under full sample applications. And it has the following specific beneficial effects: 1) Improve the prediction accuracy of the model. This method utilizes the full-sample intelligent model monitoring. It not only relies on a small amount of risk data, but also makes full use of a large amount of normal drilling data to train unsupervised time series models. At the same time, by combining a variety of time series with or without supervision models, the accuracy and reliability of risk identification are significantly improved through integrated learning methods. 2) Ensure the real-time performance of the model. By introducing negative sample update methods and incremental learning methods, the model can be dynamically adjusted and optimized according to real-time data during actual application. Therefore, when faced with changing environments and conditions, the model can respond quickly, improving the accuracy and immediacy of the prediction of downhole conditions.
[0229] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.
[0230] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0231] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer-readable storage media including storage devices.
[0232] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.
[0233] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0234] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.
Claims
1. A drilling risk detection method based on full samples, characterized in that: include: Obtain the logging data of the target well in the current time period; Extracting target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features; The target joint risk prediction model is used to process the target valid data to obtain the corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-class detection model, a target second-class detection model, and a target third-class detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells and logging data of target wells that failed to be predicted by the model during the drilling process of the target wells; Based on the target prediction results, determine whether the target well currently has drilling risks.
2. The method according to claim 1, characterized in that The key characteristics include at least one of the following: standpipe pressure, inlet flow, outlet flow, total pool volume, and total hydrocarbon content.
3. The method according to claim 1, characterized in that The target joint risk prediction model is trained according to the preset training rules in the following manner: Obtain sample logging data of the sample well; and construct a first training data set and a second training data set using the sample logging data of the sample well according to the first sample processing rule; Constructing an initial first-category detection model and an initial second-category detection model; wherein the initial first-category detection model at least includes a parallel LSTM structure and a GRU structure, and the initial second-category detection model at least includes an LSTM-AE structure; Using the first training data set to perform supervised learning on the initial first-category detection model, a first-category intermediate detection model is obtained; using the second training data set to perform unsupervised learning on the initial second-category detection model, a second-category intermediate detection model is obtained; According to the intermediate first-category detection model, a corresponding intermediate third-category detection model is constructed; wherein the intermediate third-category detection model has the same model structure and model parameters as the intermediate first-category detection model; Combining the intermediate first-category detection model, the intermediate second-category detection model, and the intermediate third-category detection model to obtain an initial joint risk prediction model; Obtaining the logging data of the target well collected during the drilling process of the target well; and constructing a third training data set and a fourth training data set using the logging data of the target well according to the second sample processing rule; wherein the fourth training data set is generated based on the logging data of the target well that failed to be predicted using the initial joint risk prediction model; The third training data set is used to perform incremental learning on the intermediate first-category detection model and the intermediate second-category detection model in the initial joint risk prediction model. At the same time, the fourth training data set is used to perform negative sample learning on the intermediate third-category detection model in the initial joint risk prediction model to obtain a target joint risk prediction model that meets the requirements.
4. The method according to claim 3, characterized in that According to the first sample processing rule, the sample logging data of the sample well is used to construct a first training data set and a second training data set, including: According to the first sample processing rule, historical logging data of drilling accidents are obtained and key features associated with the drilling accidents are determined through correlation analysis; According to the key features, sample valid data is extracted from the sample logging data of the sample well; Based on the sample valid data, the sample valid data of the first time period when the drilling accident occurred and the sample valid data of the second time period before the drilling accident occurred were screened out to construct a first training data set; and based on the sample valid data, the sample valid data of the drilling accident did not occur were screened out to construct a second training data set.
5. The method according to claim 4, characterized in that After constructing the first training data set and the second training data set, the method further includes: According to the first sample processing rule, the sample wells involved in the sample valid data in the first training data set are determined as training sample wells; Filter out the sample valid data that does not involve the training sample wells from the sample valid data, and construct a test data set and a verification data set for the first type of detection model and the second type of detection model; wherein the test data set of the first type of detection model is the same as the test data set of the second type of detection model, and the verification data set of the first type of detection model is the same as the verification data set of the second type of detection model.
6. The method according to claim 3, characterized in that According to the second sample processing rule, the third training data set and the fourth training data set are constructed using the logging data of the target well, including: Use the initial joint risk prediction model to process the logging data of the target well to obtain the corresponding prediction results; According to the logging data of the target well, valid data are randomly extracted and combined to construct a third training data set; According to the prediction results, the logging data that failed to be predicted using the model are screened out from the logging data of the target well; and based on the logging data that failed to be predicted using the model, valid data are extracted as negative sample data to construct a fourth training data set.
7. The method according to claim 6, characterized in that The method further comprises: Obtain a knowledge graph of logging data during drilling; Determine the reasons for the failure of the model prediction based on the knowledge graph and negative sample data; According to the failure reasons, determine the data quality evaluation parameters of negative sample data; According to the data quality evaluation parameters, negative sample data that meets the requirements are screened out from the negative sample data to construct a fourth training data set.
8. A drilling risk detection device based on full samples, characterized in that: include: An acquisition module is used to obtain the logging data of the target well in the current time period; An extraction module is used to extract target valid data that meets the requirements from the logging data in the current time period; wherein the target valid data at least includes key features; A processing module is used to process target valid data using a target joint risk prediction model to obtain a corresponding target prediction result; wherein the target joint risk prediction model at least includes: a target first-class detection model, a target second-class detection model, and a target third-class detection model; the target joint risk prediction model is trained according to preset training rules using sample logging data of sample wells, and logging data of target wells that failed to be predicted by the model during the drilling process of the target wells; The determination module is used to determine whether the target well currently has drilling risks based on the target prediction results.
9. A computer device, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the instructions.
10. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for intelligent identification and early warning of drilling risk
CN113496302A
Federal learning method and device, equipment, storage medium and computer program
CN114282691A
Classification model training method, quality inspection prediction method and corresponding devices
CN114462465A
Petroleum drilling big data processing method and device based on machine learning
CN114611958A
Weak supervision self-training method and device for image-text semantic alignment model
CN115205635A