A drilling loss risk evaluation method and device based on zero-loss samples, a medium and equipment
By employing a drilling leakage risk assessment method based on zero-leakage samples, and utilizing the XGBoost classification model and particle swarm optimization algorithm, combined with seismic interpretation results and rock mechanics parameters, a quantitative assessment of leakage risk in deep and complex formations was achieved. This solved the problem of risk identification and early warning under zero-leakage sample conditions, and improved drilling safety and efficiency.
Patent Information
- Application Number
- CN202611595831.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-15
- Publication Date
- 2026-11-27
AI Technical Summary
Existing drilling loss risk assessment technologies rely heavily on historical loss samples. Especially under zero loss sample conditions, they cannot achieve accurate identification and early warning. Furthermore, they do not fully integrate seismic fracture interpretation results, geostress parameters, rock mechanics parameters, and engineering operation parameters, making it difficult to meet the risk quantification assessment needs of deep and complex strata.
The drilling leakage risk assessment method based on zero-leakage samples establishes a risk level classification mechanism by collecting drilling trajectory data, seismic interpretation results, and rock mechanics parameters, generates pseudo-labels, trains an XGBoost classification model, filters features using the Spearman rank correlation coefficient method, optimizes hyperparameters using the particle swarm optimization algorithm, and outputs a three-dimensional leakage risk profile for a single well.
It enables quantitative risk assessment under zero-missing sample conditions, improves prediction accuracy and robustness, provides proactive risk control throughout the drilling process, reduces drilling fluid loss, shortens the drilling cycle, and lowers construction costs.
Smart Images

Figure CN123179173A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, apparatus, medium, and equipment for assessing drilling leakage risk based on zero-leakage samples, belonging to the field of oil and gas exploration and development technology. Background Technology
[0002] Safe, economical, and efficient drilling is a core prerequisite for accelerating the exploration and development of deep and ultra-deep oil and gas, ensuring national energy supply, and improving oil and gas recovery rates. As oil and gas exploration and development continues to expand into deeper and ultra-deep areas with more complex geological conditions, target formations generally exhibit characteristics of high temperature, high pressure, and high ground stress. The probability of the development of natural leakage channels such as faults, fractures, and karst caves increases significantly, leading to a substantial rise in the risk of well leakage during drilling. Well leakage is one of the most dangerous downhole complexities in drilling engineering. At best, it causes significant drilling fluid loss, drilling interruptions, extended drilling cycles, and soaring construction costs. At worst, it can induce a chain reaction of accidents such as wellbore instability, stuck pipe, well kicks, and even blowouts, seriously threatening the lives of workers, the integrity of equipment and facilities, and the stability of the ecological environment. It is a key bottleneck restricting the efficient and rapid drilling of deep and ultra-deep wells.
[0003] Existing well leakage risk assessment methods mainly include empirical assessment methods based on traditional approaches and intelligent assessment methods based on machine learning. Empirical assessment methods rely primarily on the experience of field engineers and some charts for qualitative or semi-quantitative judgments, making it difficult to fully explore the inherent correlations between multi-source data, resulting in limited accuracy and consistency of assessment results. While machine learning-based intelligent assessment methods can uncover the inherent correlations between multi-source data, they heavily depend on supervised training using historical drilling leakage samples. However, in actual drilling operations, to ensure construction safety, most blocks do not experience significant leakage in historical wells, with only a small number or even zero leakage samples. This directly leads to a lack of effective positive sample support for the intelligent model, resulting in problems such as large training bias, weak generalization ability, and unreliable prediction results, failing to meet the needs of field applications.
[0004] One existing technology proposes a method, device, electronic equipment, and storage medium for predicting well leakage accidents in drilling. It searches for the optimal parameters of a BP neural network based on an improved simulated annealing method, automates the network parameter tuning process, and improves the accuracy of early warning. At the same time, it proposes a dual-track verification process with test and validation sets, which strengthens the support for multi-dimensional expansion of input data.
[0005] A second existing technology provides a low-cost intelligent well leakage prediction method. This method includes: acquiring on-site well history data such as logging data; integrating and processing the well history data to remove redundant and invalid data; finding feature combinations based on feature correlation analysis; classifying well leakage risk levels based on risk thresholds; constructing multiple classification machine learning prediction models using the feature combinations as input and the well leakage risk level as output; establishing a cost-sensitive error rate model evaluation index, and optimizing the model using an intelligent optimization algorithm; comparing the optimized models, and selecting the best-performing one as the well leakage prediction model; inputting new well data to be judged into the prediction model to obtain the well leakage risk status.
[0006] The third existing technology proposes a drilling leakage prediction system and method based on deep learning. It uses the VGG convolutional neural network model for deep learning to effectively warn of leakage accidents, explores the value of the VGG model in industrial applications, and provides a new solution for leakage prediction. It is simple to implement, has fast data processing speed, high accuracy, and low cost.
[0007] In summary, existing leakage risk assessment technologies do not fully integrate seismic fracture interpretation results, geostress parameters, rock mechanics parameters, and engineering operation parameters. Furthermore, they lack a risk quantification system under conditions without leakage samples, failing to overcome the technical limitations of insufficient samples and hindering accurate identification and early warning of drilling leakage risks. Therefore, there is an urgent need to develop a dedicated method that does not rely on historical leakage samples and can quantify leakage risks in deep and complex formations, providing technical support for downhole risk control. This is a key technical problem that urgently needs to be solved in the current oil and gas drilling engineering field. Summary of the Invention
[0008] To address the aforementioned technical problems, this invention provides a drilling leakage risk assessment method, apparatus, medium, and equipment based on zero-leakage samples. This method constructs a dedicated approach that does not rely on historical leakage samples and can achieve quantitative assessment of leakage risks in deep and complex formations, providing a reliable theoretical basis and technical support for proactive downhole risk prevention and control.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: A drilling loss risk assessment method based on zero-loss samples, comprising: S1: Collect drilling trajectory data, seismic interpretation results, rock mechanics parameters and actual drilling engineering parameters of the drilled wells in the target work area, and match and integrate all data according to depth points to form an initial dataset; S2: Perform systematic data cleaning on the initial dataset to obtain the training dataset; S3: Based on the training dataset, the geodetic coordinates of the corresponding depth point are calculated according to the well inclination, azimuth and wellhead coordinates of each depth point, and non-numerical features are encoded and converted at the same time. S4: Based on geodetic coordinates, extract the crack intensity values at corresponding locations from the crack data volume of the 3D seismic interpretation of the target work area, sort all crack intensity values from smallest to largest and divide them into risk levels according to proportion, perform one-hot encoding on the risk levels to generate pseudo-labels, match the feature vector of each depth point with the corresponding pseudo-label vector to form a complete training dataset as a supervision signal for subsequent XGBoost classification model training. S5: The Spearman rank correlation coefficient method is used to analyze the correlation between the original feature set of each input depth point and the risk level. Low contribution features that are almost unrelated to the risk level and features with serious multicollinearity are removed. The core influencing parameters are retained in combination with the practical significance of engineering, and the input feature set of the XGBoost classification model is determined. S6: Establish an XGBoost classification model, use particle swarm optimization algorithm to globally optimize the hyperparameters of the XGBoost classification model, search for the optimal hyperparameter combination within the preset parameter range, input the XGBoost classification model into the feature set and train the optimized XGBoost classification model to obtain a stable and convergent prediction model. S7: Input the seismic data and engineering parameters of the target well into the trained prediction model, and output a three-dimensional leakage risk profile of a single well to achieve quantitative identification and spatial distribution prediction of low, medium and high risk areas, as well as proactive risk prevention and control throughout the drilling process.
[0010] The drilling loss risk assessment method based on zero-loss samples, preferably, includes the following steps in step S1: drilling trajectory data includes well inclination, azimuth, and wellhead coordinates at each depth point, which are converted into geodetic coordinates for each depth point through calculation; actual drilling engineering parameters include drilling fluid density, drilling fluid viscosity, displacement, and pump pressure; and seismic interpretation results include fracture strength, wave impedance, intrinsic coherence, curvature, gradient mode, differential simulation GR, differential simulation PI, and lithological parameters.
[0011] The drilling loss risk assessment method based on zero-loss samples, preferably, includes the following specific steps in step S2: 1) Missing value handling: For a small number of randomly missing parameters, linear interpolation between adjacent depth points is used to fill in the missing values. For data segments with consecutive missing values exceeding the threshold, they are removed. 2) Outlier detection and correction, based on statistics 3 σ The criteria and actual range of engineering values are used to identify and eliminate abnormal data points that exceed the reasonable range, and to correct erroneously entered data. 3) Dimension consistency processing: unify the units of measurement for different parameters and perform normalization processing to eliminate feature weight bias caused by differences in dimensions, resulting in a standardized, clean, and reliable training dataset.
[0012] The drilling loss risk assessment method based on zero-loss samples, preferably, includes the following specific steps in step S3: 1) Let the geodetic coordinates of the wellhead be ( X 0, Y 0, Z 0), for each depth point i Based on the measured depth, well inclination angle, and azimuth angle, the following are calculated: interval between adjacent depth points, vertical depth increment, cumulative vertical depth, northward displacement increment, cumulative northward coordinates, eastward displacement increment, and cumulative eastward coordinates. Finally, the geodetic coordinates corresponding to each depth point are obtained. X i , Y i , Z i ); 2) For the classification features in the input of the XGBoost classification model, namely the relative omission risk level, one-hot encoding is used to convert them into numerical vectors to eliminate the interference of the non-numerical attributes of the classification features on the training of the XGBoost classification model. 3) After completing coordinate transformation and encoding, perform a final consistency check on all classification features.
[0013] The drilling loss risk assessment method based on zero-loss samples, preferably, includes the following specific steps in step S4: 1) Based on the geodetic coordinates corresponding to each depth point ( X i , Y i , Z i ), extract the crack strength value at the corresponding location from the crack data volume of the 3D seismic interpretation of the target work area; 2) Statistical feature analysis was performed on the crack strength values extracted from all depth points to provide a basis for risk level classification; 3) Based on the geological correlation between crack strength value and leakage risk, a risk level classification standard is established using the percentile method, and the risk level is uniquely thermally coded to generate pseudo-labels; 4) Match the feature vector of each depth point with the corresponding pseudo-label vector to form a complete training dataset, which will serve as a supervision signal for the subsequent training of the XGBoost classification model.
[0014] The drilling loss risk assessment method based on zero-loss samples, preferably, includes the following specific steps in step S5: 1) Rank the original feature set and pseudo-label risk level of each depth point in ascending order. If there are ties, take the average ranking. 2) Calculate the Spearman correlation coefficient between each feature and the risk level to obtain the correlation matrix; 3) Set a rejection threshold. When the absolute value of the Spearman correlation coefficient between a feature and the risk level is less than the threshold, it is considered to be almost unrelated to the risk level and is rejected. Features that are significantly related to the risk level are retained for the next round of screening. 4) Use Spearman correlation coefficient to analyze multicollinearity between features: When the absolute value of the Spearman correlation coefficient between two features is greater than or equal to the set severe collinearity threshold, it is judged as severe collinearity and highly overlapping information, and is removed; when its absolute value is in the moderate correlation range, it is decided whether to retain it based on the actual engineering significance.
[0015] In the preferred embodiment of the drilling loss risk assessment method based on zero-loss samples, the objective function of the XGBoost classification model in step S6 is: ; In the formula, l ( y i , i ) is the cross-entropy loss function, Ω( f k ) represents the regularization term. K The number of trees.
[0016] A second aspect of the present invention provides a drilling loss risk assessment device based on zero-loss samples, comprising: The first processing unit is used to collect drilling trajectory data, seismic interpretation results, rock mechanics parameters and actual drilling engineering parameters of the drilled wells in the target work area, and to match and integrate all the data according to depth points to form an initial dataset. The second processing unit is used to systematically clean the initial dataset to obtain the training dataset; The third processing unit is used to calculate the geodetic coordinates of the corresponding depth point based on the training dataset, according to the well inclination, azimuth and wellhead coordinates of each depth point, and to encode and convert non-numerical features. The fourth processing unit is used to extract the crack intensity value at the corresponding location from the crack data volume of the 3D seismic interpretation of the target work area based on the geodetic coordinates, sort all the crack intensity values in ascending order and divide them into risk levels according to the proportion, perform one-hot encoding on the risk levels to generate pseudo-labels, match the feature vector of each depth point with the corresponding pseudo-label vector to form a complete training dataset as a supervision signal for the subsequent training of the XGBoost classification model. The fifth processing unit is used to analyze the correlation between each input feature and the risk level using the Spearman rank correlation coefficient method, remove low-contribution features that are almost unrelated to the risk level and features with serious multicollinearity, retain core influencing parameters in combination with practical engineering significance, and determine the input features of the XGBoost classification model. The sixth processing unit is used to build an XGBoost classification model. It uses the particle swarm optimization algorithm to globally optimize the hyperparameters of the XGBoost classification model. It searches for the optimal combination of hyperparameters within the preset parameter range. The divided training set and test set are input into the optimized XGBoost classification model according to the ratio for training, and a stable and converged prediction model is obtained. The seventh processing unit is used to input the seismic data and engineering parameters of the target well into the trained prediction model, output a three-dimensional leakage risk profile of a single well, and realize the quantitative identification and spatial distribution prediction of low, medium and high risk areas, as well as proactive risk prevention and control throughout the drilling process.
[0017] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the drilling loss risk assessment method based on zero-loss samples described above.
[0018] A fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the drilling loss risk assessment method based on zero-loss samples described above.
[0019] The present invention has the following advantages due to the adoption of the above technical solutions: 1. This invention establishes a risk level classification mechanism based on seismic interpretation of fracture data and generates pseudo-labels, transforming unsupervised geological risk classification into a supervised model training problem. It does not rely on historical missed positive samples, thus overcoming the technical bottleneck that intelligent models cannot be effectively trained under zero missed sample conditions.
[0020] 2. This invention uses the Spearman rank correlation coefficient method for feature selection and multicollinearity elimination, retains core influencing parameters in combination with practical engineering significance, reduces data redundancy and model overfitting risk, and improves the generalization ability of the model and the credibility of prediction results.
[0021] 3. This invention uses the particle swarm optimization algorithm to globally optimize the hyperparameters of the XGBoost model, avoiding the subjectivity of manual parameter tuning. It also combines five-fold cross-validation and cross-entropy loss monitoring for model training, which significantly improves the accuracy and robustness of risk prediction.
[0022] 4. The single-well three-dimensional leakage risk profile output by this invention can realize the quantitative identification and spatial distribution prediction of low, medium and high risk areas, providing a reliable basis for drilling fluid density optimization, well structure design and active downhole risk prevention and control. It can effectively reduce drilling fluid loss, shorten the drilling cycle, reduce construction costs, and ensure safe and fast drilling of deep and ultra-deep wells. Attached Figure Description
[0023] Figure 1 A flowchart of the drilling loss risk assessment method based on zero-loss samples provided by this invention; Figure 2 This is a diagram showing the predicted leakage risk profile obtained from the leakage risk assessment of the target well, as provided by the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," "third," "fourth," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0026] For ease of description, spatial relative terms may be used in the text to describe the relationship of one element or feature relative to another element or feature as shown in the figure. These relative terms include, for example, "inside," "outside," "middle," "outer," "below," "above," etc. Such spatial relative terms are intended to include different orientations of the device in use or operation, other than those depicted in the figure.
[0027] Existing well leakage risk assessment technologies heavily rely on historical leakage samples for supervised training. However, in actual drilling operations, to ensure construction safety, most blocks do not experience significant leakage in historical wells, with only a small number or even zero leakage samples. This directly leads to a lack of effective positive sample support for intelligent models, resulting in problems such as large training bias, weak generalization ability, and unreliable prediction results, failing to meet the needs of field applications. At the same time, existing leakage risk assessment technologies do not fully integrate seismic fracture interpretation results, geostress parameters, rock mechanics parameters, and engineering operation parameters, nor have they established a risk quantification characterization system under conditions without leakage samples, making it difficult to achieve accurate identification and early warning of well leakage risks.
[0028] Based on the above-mentioned technical problems, this invention provides a drilling leakage risk assessment method based on zero-leakage samples. This method addresses the industry pain point of scarce or even zero historical leakage samples in drilling, and provides a drilling leakage risk assessment method based on zero-leakage samples. It breaks through the modeling bottleneck under zero-leakage sample conditions, significantly improves the accuracy and robustness of risk prediction, and has strong field applicability and guiding significance.
[0029] like Figure 1 As shown, the drilling loss risk assessment method based on zero-loss samples provided by this invention includes the following specific steps: S1: Collect drilling trajectory data, seismic interpretation results, rock mechanics parameters, and actual drilling engineering parameters of the drilled wells in the target work area. The drilling trajectory data includes the well inclination, azimuth, and wellhead coordinates at each depth point, which are converted into geodetic coordinates for each depth point through calculation. The actual drilling engineering parameters include drilling fluid density, drilling fluid viscosity, displacement, and pump pressure. The seismic interpretation results include fracture strength, wave impedance, intrinsic coherence, curvature, gradient mode, differential simulation GR, differential simulation PI, and lithological parameters. All data are matched and integrated according to depth points to form an initial dataset.
[0030] S2: Perform systematic data cleaning on the initial dataset to eliminate the interference of data quality issues on the training of the XGBoost classification model, resulting in a clean, reliable, and standardized training dataset. The data cleaning steps are as follows: 1) Missing Value Handling: Differential completion and removal strategies are employed to address the missing characteristics of different parameters in the initial dataset, maximizing the retention of valid data. For cases where the same parameter is consecutively missing for more than 5 depth points, or where the missing percentage of the entire well trajectory data exceeds 20%, the data segment is deemed invalid, and all parameter data for that depth segment are directly removed to prevent invalid data from interfering with the training accuracy of the XGBoost classification model. For isolated or random missing values of a single parameter in the depth sequence, such as a single point or a small area of consecutive missing values not exceeding 5 depth points, linear interpolation of adjacent depth points is used for completion. Taking drilling fluid density as an example, if the depth point... Hi Drilling fluid density is missing at this location; take data from adjacent depth points. H i-1 and H i+1 The measured value of drilling fluid density was supplemented using a linear interpolation formula, which is:
[0031] in, ρ i For depth point H i The completed density value, ρ i-1 ρ i+1 These are the measured density values at adjacent upper and lower depth points, respectively.
[0032] 2) Outlier Detection and Correction: Combining statistical criteria and practical engineering constraints, a dual outlier identification mechanism is constructed to ensure data authenticity and rationality. Normality tests are performed on the cleaned dataset for parameters such as drilling fluid density and displacement, and the mean of the parameters is calculated. μ with standard deviation σ This will exceed [ μ-3σ , μ+3σ Data points within a given range are marked as outliers and removed. Reasonable value ranges are set for each parameter, and data exceeding these ranges are marked as outliers. If the outlier is an input error, it is corrected based on engineering common sense; if it is an uncorrectable outlier, it is removed directly.
[0033] 3) Data Normalization: All input parameters are standardized and normalized, mapping parameters of different dimensions to the [0, 1] interval. After normalization, all parameters have a consistent numerical scale, eliminating the problem of feature weights favoring larger numerical parameters during model training due to differences in dimensions. This ensures the fairness of the contribution of features with different dimensions, such as fracture strength, drilling fluid density, and displacement, to model training. The normalization formula is:
[0034] In the formula: x These are the original parameter values; x min , x max These are the minimum and maximum values of the parameter in the dataset, respectively. x′ This is the normalized standard value.
[0035] After data cleaning, noise, errors, and inconsistencies in the initial dataset are effectively eliminated, forming a clean, reliable, and standardized training dataset, which provides a high-quality data foundation for subsequent coordinate transformation, pseudo-label construction, and model training.
[0036] S3: This step is based on the cleaned standardized drilling trajectory data and wellhead coordinate data. Through spatial geometric transformation, the wellbore trajectory points are converted to a unified geodetic spatial coordinate system, and non-numerical features are encoded and converted to provide a standardized data format for subsequent seismic attribute extraction and XGBoost classification model input. The specific implementation process is as follows.
[0037] 1) Let the geodetic coordinates of the wellhead be ( X 0, Y 0, Z 0), of which X 0、 Y 0 represents the plane coordinates of the wellhead in the geodetic coordinate system of the target work area. Z 0 represents the wellhead elevation for each depth point. i The measured depth is MD i The well inclination angle is α i azimuth angle is β i The vertical depth increment and horizontal displacement component are calculated based on the geometric relationship between adjacent depth points. For the first... i A depth point, its vertical depth Z i The horizontal displacement components are calculated as follows: Spacing between adjacent depth points:
[0038]
[0039] Vertical depth increment:
[0040]
[0041] Cumulative vertical depth:
[0042]
[0043] Northward displacement increment:
[0044]
[0045] Cumulative northward coordinates:
[0046]
[0047] Eastward displacement increment:
[0048]
[0049] Cumulative eastward coordinates:
[0050]
[0051] Finally, the geodetic coordinates corresponding to each depth point are obtained. X i , Y i , Z i This coordinate system is completely consistent with the spatial coordinate system of the seismic data volume and can be directly used for the extraction of seismic attributes.
[0052] 2) Non-numerical feature encoding conversion: For the classification features (relative omission risk levels) in the XGBoost classification model input, one-hot encoding is used to convert them into numerical vectors, eliminating the interference of the non-numerical attributes of the classification features on the XGBoost classification model training. Based on the defined low, medium, and high risk levels, the one-hot encoding rule is used for conversion: low risk corresponds to vector (0, 0, 1), medium risk corresponds to (0, 1, 0), and high risk corresponds to (1, 0, 0). After encoding, the risk level features are converted from single labels into three-dimensional numerical vectors, which can be directly used in model calculations.
[0053] 3) After completing coordinate transformation and encoding, perform a final consistency check on all classification features. Check the validity of the geodetic coordinates to ensure... X i , Y i Within the seismic data coverage area of the work area Z i It conforms to the burial depth characteristics of the work area; verifies the correctness of the encoding vector to ensure that the risk level is not repeated or omitted; performs dimension alignment on the transformed feature matrix to ensure that the feature vector length of each depth point is consistent, forming a standardized model input dataset.
[0054] Through the above processing, the original drilling trajectory and classification features are converted into a numerical feature matrix in a unified spatial coordinate system. This not only preserves the spatial location information of the well trajectory but also meets the format requirements of the XGBoost classification model for input data, laying the foundation for subsequent risk label construction and model training.
[0055] S4: To address the issue of no historical well loss records and a lack of positive loss samples in the target work area, a risk level classification mechanism is established based on seismic interpretation of fracture data: This mechanism is based on the geodetic coordinates of each depth point (…). X i , Y i , Z iThe crack intensity values corresponding to the coordinates in the crack data volume are extracted. All crack intensity values are then sorted from smallest to largest, and risk levels are categorized according to the proportions of low risk (top 70%), medium risk (70%–95%), and high risk (bottom 5%). One-hot encoding is then used to quantify the risk levels, generating pseudo-labels required for training the XGBoost classification model. The specific implementation process is as follows: 1) Seismic fracture data volume extraction, based on the geodetic coordinates of each depth point obtained in step three ( X i , Y i , Z i The crack strength value at the corresponding location is extracted from the crack data volume of the 3D seismic interpretation of the target work area. The specific method is as follows: ①Calculate the geodetic coordinates of each depth point ( X i , Y i , Z i Spatial matching is performed between the coordinate and the grid nodes of the seismic data volume, and the nearest neighbor interpolation method is used to determine the corresponding grid cell in the fracture data volume; ② Read the crack strength value within the grid cell. F i This value comprehensively reflects parameters such as fracture density, aperture, and connectivity, and is a core indicator characterizing the development degree of formation leakage channels. ③ To improve the accuracy of crack strength value extraction, the average crack strength within a cylindrical volume range of radius r and height h around the target coordinate point is also extracted as the final crack strength value at that depth point. F i To eliminate local noise interference during the earthquake interpretation process.
[0056] 2) Crack strength values extracted from all depth points F i Conduct statistical characteristic analysis to provide a basis for risk level classification: ① Crack strength values at all depth points F i Arrange them in ascending order to form the sequence {F(1), F(2), ..., F(n)}, where n is the total number of depth points.
[0057] ② Calculate the minimum value of crack strength F min Maximum value F max mean μF Standard deviation σF Statistical measures were used to analyze the overall distribution characteristics of crack development.
[0058] ③ Analyze the distribution pattern of crack intensity using histograms and probability density functions to verify whether it conforms to geological laws.
[0059] 3) Based on the geological correlation between crack strength value and leakage risk, the percentile method is used to establish a risk level classification standard.
[0060] ① Depth points with crack strength values falling within the top 70% range are classified as low-risk levels, i.e. F i ≤F(0.7n), where F(0.7n) is the fracture strength value corresponding to the 70th percentile after sorting; this level corresponds to good stratum integrity, undeveloped fractures, and extremely low leakage probability.
[0061] ② Depth points with crack strength values between 70% and 95% are classified as medium-risk levels, i.e., F(0.7n) ≤ F i ≤F(0.95n), where F(0.95n) is the crack strength value corresponding to the 95th percentile after sorting; this level corresponds to a crack zone of a certain scale, and there is a possibility of omission.
[0062] ③ Depth points with crack strength values in the bottom 5% range are classified as high-risk levels, i.e. F i >F(0.95n); This level corresponds to highly developed cracks and fracture zones, with an extremely high risk of leakage.
[0063] The feature vector of each depth point is matched with the corresponding pseudo-label vector to form a complete training dataset. ,in x i For the first i Feature vectors of depth points y i This represents the corresponding pseudo-label vector; this dataset serves as a supervision signal for subsequent model training, addressing the model training problem under the condition of zero missing samples.
[0064] Using S4, a risk labeling system based on fracture development intensity was successfully constructed, transforming unsupervised geological risk classification into a supervised model training problem, providing a reliable data foundation for subsequent feature selection and model optimization.
[0065] S5: The Spearman rank correlation coefficient method is used to analyze the correlation between each input feature and the omission risk level, and low contribution features that are almost unrelated to the risk level are eliminated; at the same time, based on the Spearman correlation coefficient between features, features with serious multicollinearity are identified and eliminated, and core influencing parameters are retained in combination with practical engineering significance, and finally the model input features are determined.
[0066] Because drilling engineering parameters and geological characteristics have a non-linear relationship, the traditional Pearson correlation coefficient cannot accurately characterize the monotonic relationship between variables. Therefore, the Spearman rank correlation coefficient method is used to quantify the correlation between each input feature and the leakage risk level. The calculation formula is as follows:
[0067] in, d i This represents the ranking difference between feature X and risk level Y within the same sample group. n This represents the sample size. P s The value ranges from [-1, 1]. The closer the absolute value is to 1, the stronger the correlation. Positive values indicate positive correlation, and negative values indicate negative correlation.
[0068] 1) The original feature set of each depth point, including fracture strength, drilling fluid density, drilling fluid viscosity, displacement, pump pressure, well inclination, azimuth, wave impedance, intrinsic coherence, curvature, gradient mode, differential simulation GR, differential simulation PI, lithology, etc., are ranked in ascending order with the pseudo-label risk level. If there are ties, the average ranking is taken. 2) Substitute the values into the formula to calculate the Spearman correlation coefficient between each feature and the risk level, and obtain the correlation matrix; 3) Set a rejection threshold. When the absolute value of the Spearman correlation coefficient between a feature and the risk level is less than the threshold, it is considered to be almost unrelated to the risk level and is rejected. Features that are significantly related to the risk level are retained for the next round of screening. 4) To avoid overfitting of the model due to information overlap between features, Spearman correlation coefficient is used to analyze multicollinearity between features: when the absolute value of the Spearman correlation coefficient between two features is greater than or equal to the set severe collinearity threshold, it is judged as severe collinearity and highly overlapping information, and is removed; when its absolute value is in the moderate correlation range, whether to retain it is determined in combination with the actual engineering significance.
[0069] After the above screening, the final input feature set for the XGBoost classification model was determined.
[0070] S6: Establish an XGBoost classification model. Use particle swarm optimization (PSO) to globally optimize the model's hyperparameters, searching for the optimal hyperparameter combination within a preset parameter range. Input the XGBoost classification model into the feature set and train the model using five-fold cross-validation. Monitor the training process using cross-entropy loss to obtain a stable and converged prediction model. The specific process is as follows: 1) XGBoost is chosen as the base classification model. Its core idea is to iteratively construct multiple regression trees and sum the prediction results of each tree as the final output. The objective function is:
[0071] in, l ( y i , i ) is the cross-entropy loss function, Ω( f k ) represents the regularization term. K The number of trees.
[0072] 2) The Particle Swarm Optimization (PSO) algorithm is used to globally optimize the hyperparameters n_estimators, max_depth, gamma, learning_rate, reg_alpha, and reg_lambda of XGBoost, avoiding the subjectivity of manual parameter tuning. The PSO velocity and position update formulas are as follows:
[0073] Among them, pbest i is the historical best position of particle i, and gbest is the global best position of the population. w Inertial weight; c 1 represents the individual learning factor; c 2 represents the social learning factor; r 1 and r 2 is a random number uniformly distributed within the interval [0,1]. t This represents the current iteration number.
[0074] 3) The selected feature subset and label dataset of the input feature set of the XGBoost classification model are divided into training set and test set in an 8:2 ratio to ensure the consistency of the distribution of the two datasets; a 5-fold cross-validation strategy is adopted, in which the training set is divided into 5 parts, and 4 parts are taken as training subset and 1 part as validation subset in each iteration, and the iteration is repeated 5 times to comprehensively evaluate the generalization ability of the model; cross-entropy loss is used as the monitoring index to train the XGBoost classification model; the accuracy changes of the training set and test set are recorded during the training process to evaluate the performance of the XGBoost classification model.
[0075] Through the above process, the construction of a high-precision XGBoost classification model from raw features was completed, providing a model foundation for single-well leakage risk profile prediction.
[0076] Step 7: Input the seismic data and engineering parameters of the target well into the trained XGBoost classification model, and output a three-dimensional leakage risk profile of the single well to achieve quantitative identification and spatial distribution prediction of low, medium and high risk areas, and realize proactive risk prevention and control throughout the drilling process.
[0077] The first processing unit is used to collect drilling trajectory data, seismic interpretation results, rock mechanics parameters and actual drilling engineering parameters of the drilled wells in the target work area, and to match and integrate all the data according to depth points to form an initial dataset. The second processing unit is used to systematically clean the initial dataset to obtain the training dataset; The third processing unit is used to calculate the geodetic coordinates of the corresponding depth point based on the training dataset, according to the well inclination, azimuth and wellhead coordinates of each depth point, and to encode and convert non-numerical features. The fourth processing unit is used to extract the crack intensity value at the corresponding location from the crack data volume of the 3D seismic interpretation of the target work area based on the geodetic coordinates. After sorting all the crack intensity values from smallest to largest, the risk levels are divided proportionally, and the risk levels are one-hot encoded to generate pseudo-labels. The feature vector of each depth point is matched with the corresponding pseudo-label vector to form a complete training dataset as a supervision signal for the subsequent training of the XGBoost classification model. The fifth processing unit is used to analyze the correlation between each input feature and the risk level using the Spearman rank correlation coefficient method, remove low-contribution features that are almost unrelated to the risk level and features with serious multicollinearity, retain core influencing parameters in combination with practical engineering significance, and determine the input features of the XGBoost classification model. The sixth processing unit is used to build an XGBoost classification model. It uses the particle swarm optimization algorithm to globally optimize the hyperparameters of the XGBoost classification model. It searches for the optimal combination of hyperparameters within the preset parameter range. The divided training set and test set are input into the optimized XGBoost classification model according to the ratio for training, and a stable and converged prediction model is obtained. The seventh processing unit is used to input the seismic data and engineering parameters of the target well into the trained prediction model, output a three-dimensional leakage risk profile of a single well, and realize the quantitative identification and spatial distribution prediction of low, medium and high risk areas, as well as proactive risk prevention and control throughout the drilling process.
[0078] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the drilling loss risk assessment method based on zero-loss samples described above.
[0079] A fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the drilling loss risk assessment method based on zero-loss samples described above.
[0080] This invention is described based on flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to specific embodiments. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowcharts and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A drilling loss risk assessment method based on zero-loss samples, characterized in that, include: S1: Collect drilling trajectory data, seismic interpretation results, rock mechanics parameters and actual drilling engineering parameters of the drilled wells in the target work area, and match and integrate all data according to depth points to form an initial dataset; S2: Perform systematic data cleaning on the initial dataset to obtain the training dataset; S3: Based on the training dataset, the geodetic coordinates of the corresponding depth point are calculated according to the well inclination, azimuth and wellhead coordinates of each depth point, and non-numerical features are encoded and converted at the same time. S4: Based on geodetic coordinates, extract the crack intensity values at corresponding locations from the crack data volume of the 3D seismic interpretation of the target work area, sort all crack intensity values from smallest to largest and divide them into risk levels according to proportion, perform one-hot encoding on the risk levels to generate pseudo-labels, match the feature vector of each depth point with the corresponding pseudo-label vector to form a complete training dataset as a supervision signal for subsequent XGBoost classification model training. S5: The Spearman rank correlation coefficient method is used to analyze the correlation between the original feature set of each input depth point and the risk level. Low contribution features that are almost unrelated to the risk level and features with serious multicollinearity are removed. The core influencing parameters are retained in combination with the practical significance of engineering, and the input feature set of the XGBoost classification model is determined. S6: Establish an XGBoost classification model, use particle swarm optimization algorithm to globally optimize the hyperparameters of the XGBoost classification model, search for the optimal hyperparameter combination within the preset parameter range, input the XGBoost classification model into the feature set and train the optimized XGBoost classification model to obtain a stable and convergent prediction model. S7: Input the seismic data and engineering parameters of the target well into the trained prediction model, and output a three-dimensional leakage risk profile of a single well to achieve quantitative identification and spatial distribution prediction of low, medium and high risk areas, as well as proactive risk prevention and control throughout the drilling process.
2. The drilling loss risk assessment method based on zero-loss samples according to claim 1, characterized in that, In step S1, the drilling trajectory data includes the well inclination, azimuth, and wellhead coordinates at each depth point, which are converted into geodetic coordinates for each depth point through calculation; the actual drilling engineering parameters include drilling fluid density, drilling fluid viscosity, displacement, and pump pressure; the seismic interpretation results include fracture strength, wave impedance, intrinsic coherence, curvature, gradient mode, differential simulation GR, differential simulation PI, and lithological parameters.
3. The drilling loss risk assessment method based on zero-loss samples according to claim 2, characterized in that, Step S2 includes the following specific steps: 1) Missing value handling: For a small number of randomly missing parameters, linear interpolation between adjacent depth points is used to fill in the missing values. For data segments with consecutive missing values exceeding the threshold, they are removed. 2) Outlier detection and correction, based on statistics 3 σ The criteria and actual range of engineering values are used to identify and eliminate abnormal data points that exceed the reasonable range, and to correct erroneously entered data. 3) Dimension consistency processing: unify the units of measurement for different parameters and perform normalization processing to eliminate feature weight bias caused by differences in dimensions, resulting in a standardized, clean, and reliable training dataset.
4. The drilling loss risk assessment method based on zero-loss samples according to claim 3, characterized in that, Step S3 includes the following specific steps: 1) Let the geodetic coordinates of the wellhead be ( X 0, Y 0, Z 0), for each depth point i Based on the measured depth, well inclination angle, and azimuth angle, the following are calculated: interval between adjacent depth points, vertical depth increment, cumulative vertical depth, northward displacement increment, cumulative northward coordinates, eastward displacement increment, and cumulative eastward coordinates. Finally, the geodetic coordinates corresponding to each depth point are obtained. X i , Y i , Z i ); 2) For the classification features in the input of the XGBoost classification model, namely the relative omission risk level, one-hot encoding is used to convert them into numerical vectors to eliminate the interference of the non-numerical attributes of the classification features on the training of the XGBoost classification model. 3) After completing coordinate transformation and encoding, perform a final consistency check on all classification features.
5. The drilling loss risk assessment method based on zero-loss samples according to claim 4, characterized in that, Step S4 includes the following specific steps: 1) Based on the geodetic coordinates corresponding to each depth point ( X i , Y i , Z i ), extract the crack strength value at the corresponding location from the crack data volume of the 3D seismic interpretation of the target work area; 2) Statistical feature analysis was performed on the crack strength values extracted from all depth points to provide a basis for risk level classification; 3) Based on the geological correlation between crack strength value and leakage risk, a risk level classification standard is established using the percentile method, and the risk level is uniquely thermally coded to generate pseudo-labels; 4) Match the feature vector of each depth point with the corresponding pseudo-label vector to form a complete training dataset, which will serve as a supervision signal for the subsequent training of the XGBoost classification model.
6. The drilling loss risk assessment method based on zero-loss samples according to claim 5, characterized in that, Step S5 includes the following specific steps: 1) Rank the original feature set and pseudo-label risk level of each depth point in ascending order. If there are ties, take the average ranking. 2) Calculate the Spearman correlation coefficient between each feature and the risk level to obtain the correlation matrix; 3) Set a rejection threshold. When the absolute value of the Spearman correlation coefficient between a feature and the risk level is less than the threshold, it is considered to be almost unrelated to the risk level and is rejected. Features that are significantly related to the risk level are retained for the next round of screening. 4) Use Spearman correlation coefficient to analyze multicollinearity between features: When the absolute value of the Spearman correlation coefficient between two features is greater than or equal to the set severe collinearity threshold, it is judged as severe collinearity and highly overlapping information, and is removed; when its absolute value is in the moderate correlation range, it is decided whether to retain it based on the actual engineering significance.
7. The drilling loss risk assessment method based on zero-loss samples according to claim 5, characterized in that, In step S6, the objective function of the XGBoost classification model is: ; In the formula, l ( y i , i ) is the cross-entropy loss function, Ω( f k ) represents the regularization term. K The number of trees.
8. A drilling loss risk assessment device based on zero-loss samples, characterized in that, include: The first processing unit is used to collect drilling trajectory data, seismic interpretation results, rock mechanics parameters and actual drilling engineering parameters of the drilled wells in the target work area, and to match and integrate all the data according to depth points to form an initial dataset. The second processing unit is used to systematically clean the initial dataset to obtain the training dataset; The third processing unit is used to calculate the geodetic coordinates of the corresponding depth point based on the training dataset, according to the well inclination, azimuth and wellhead coordinates of each depth point, and to encode and convert non-numerical features. The fourth processing unit is used to extract the crack intensity value at the corresponding location from the crack data volume of the 3D seismic interpretation of the target work area based on the geodetic coordinates, sort all the crack intensity values in ascending order and divide them into risk levels according to the proportion, perform one-hot encoding on the risk levels to generate pseudo-labels, match the feature vector of each depth point with the corresponding pseudo-label vector to form a complete training dataset as a supervision signal for the subsequent training of the XGBoost classification model. The fifth processing unit is used to analyze the correlation between each input feature and the risk level using the Spearman rank correlation coefficient method, remove low-contribution features that are almost unrelated to the risk level and features with serious multicollinearity, retain core influencing parameters in combination with practical engineering significance, and determine the input features of the XGBoost classification model. The sixth processing unit is used to build an XGBoost classification model. It uses the particle swarm optimization algorithm to globally optimize the hyperparameters of the XGBoost classification model. It searches for the optimal combination of hyperparameters within the preset parameter range. The divided training set and test set are input into the optimized XGBoost classification model according to the ratio for training, and a stable and converged prediction model is obtained. The seventh processing unit is used to input the seismic data and engineering parameters of the target well into the trained prediction model, output a three-dimensional leakage risk profile of a single well, and realize the quantitative identification and spatial distribution prediction of low, medium and high risk areas, as well as proactive risk prevention and control throughout the drilling process.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the drilling loss risk assessment method based on zero-loss samples as described in any one of claims 1-7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the drilling loss risk assessment method based on zero-loss samples as described in any one of claims 1-7.
