Well leakage risk intelligent early warning method and device based on data driving, electronic equipment and storage medium
By cleaning and pre-processing of drilling data, combined with LOWESS and Borderline-SMOTE methods, the LightGBM model was built, which solved the problems of poor data quality and sample imbalance in well leakage warning, and realized intelligent early warning of well leakage risk.
Patent Information
- Application Number
- CN202410917989.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-05
AI Technical Summary
During oil drilling, well leakage warning is difficult, the existing technology relies on expert experience and poor data quality, resulting in poor early warning effect and unbalanced sample categories lead to reduced model performance.
By cleaning and pre-processing massive drilling data, the LOWESS algorithm is used for smooth noise reduction, and the sample category weight is adjusted using the Borderline-SMOTE method, and an intelligent well leakage warning model is built in combination with the LightGBM framework.
It improves data quality and sample balance, achieves timely, accurate and intelligent early warning of well leakage risks, and reduces dependence on manual monitoring and expert experience.
Smart Images

Figure CN118898032A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of oil drilling engineering, and in particular to a data-driven intelligent early warning method, device, electronic equipment and storage medium for well leakage risk. Background Art
[0002] During the oil drilling process, well leakage is a high-frequency, highly complex, and highly hazardous underground complex situation. Well leakage often does not occur overnight, but is gradually formed through the accumulation of a period of abnormal conditions, which makes the prediction of well leakage difficult, with low accuracy and lack of scientific basis. Existing well leakage warning technology mainly relies on expert experience and neighboring well data, and uses manual duty to monitor the underground dynamics in real time for alarm, which requires a lot of manpower, material resources, and financial resources, and the warning effect is not good. At present, data mining technology and artificial intelligence technology have shown good application effects in many fields. If the two can be combined and enabled in the well leakage warning scenario, it will provide a reliable idea for the intelligent realization of well leakage warning, which has positive significance for maintaining drilling safety and assisting plugging decision-making.
[0003] Drilling data is mainly obtained from comprehensive logging instruments. However, due to the differences in the models, accuracy, acquisition frequency, and measurement parameters of the comprehensive logging instruments used at different wellheads, the quality of the collected drilling data varies greatly, with a high proportion of dirty and dead data, resulting in huge data waste. Therefore, it is urgent to clean the massive amount of drilling big data, eliminate data noise, and improve data quality. Some scholars use filtering technology to smooth the data. Although this can remove noise, it also causes some real fluctuation characteristics in the data to be lost. In addition, some filtering technologies have lags and cannot reflect the law of data change characteristics in a timely manner.
[0004] In the fault warning case, there is a situation where the model warning accuracy is artificially high, which is caused by the imbalance of positive and negative samples. If the difference between the number of majority class samples and minority class samples is too large, the classifier will preferentially vote for the majority class samples, resulting in a higher missed alarm rate, greatly reducing the classification performance of the model, and resulting in invalid warnings. In the well leakage warning problem, there is also a phenomenon that the number of safe drilling data far exceeds the well leakage data. Therefore, in order to improve the effectiveness and reliability of well leakage warning, it is very necessary to balance the samples. Summary of the invention
[0005] The purpose of the present invention is to provide a data-driven intelligent early warning method, device, electronic device and storage medium for well leakage risk. By performing data cleaning and data preprocessing on massive drilling data, the LOWESS algorithm is used to achieve smooth noise reduction of massive drilling data, the Borderline-SMOTE method is used to adjust the category weight coefficients of well leakage samples and safe drilling samples, and a well leakage intelligent early warning model is built in combination with the machine learning framework LightGBM to solve the problems of low availability of drilling data, unbalanced sample categories, and low intelligence level of well leakage risk warning in drilling projects.
[0006] To achieve the above object, the present invention provides a data-driven intelligent early warning method for well leakage risk, comprising the following steps:
[0007] Step 1: Obtain the historical data of drilling while drilling from different wellheads, form a historical database of well leakage, and preprocess the historical data of drilling while drilling; the preprocessing mainly includes missing value processing, outlier processing and smoothing processing of drilling data;
[0008] Step 2: Divide the massive data in the well leakage history database into working conditions, formulate labeling rules and perform standardization, and construct a safe drilling data set and a well leakage symptom data set;
[0009] Step 3: Use the Borderline-SMOTE method to adjust the category weights of the safe drilling data set and the well leakage symptom data set to balance the data volumes of the safe drilling data set and the well leakage symptom data set;
[0010] Step 4: Fuse the data set generated in step 2 with the data generated in step 3, and divide the fused data into a training set, a validation set, and a test set in a ratio of 8:1:1;
[0011] Step 5: Build a well leakage intelligent early warning model based on LightGBM, set the initial hyperparameters of the model, and use the training set to train the model;
[0012] Step 6: Use the validation set to optimize and adjust the parameters of the lost circulation intelligent early warning model, and use confusion matrix, ROC curve, specificity, and Matthews correlation coefficient to evaluate the model performance;
[0013] Step 7: Test the performance and generalization ability of the lost circulation intelligent early warning model, input the test set into the model, test the effectiveness and reliability of the model, and output the model early warning results.
[0014] Preferably, in the data smoothing process, the LOWESS algorithm is used to realize the smoothing process of the massive drilling data, and the specific steps are as follows:
[0015] A LOWESS model is built for the data near the required smooth data points. The triangular kernel function is used as the weighting function of the LOWESS model. The weight factor of each neighboring point is calculated. Local weighted regression is performed according to the influence of the neighboring points on the required smooth points. The weighted least squares method is used to fit the LOWESS model, so as to obtain the LOWESS curve of the entire set of data and achieve a smoothing effect.
[0016] Preferably, the massive data in the well leakage history database is divided into working conditions, labeling rules are formulated and standardized, and a safe drilling data set and a well leakage symptom data set are constructed, specifically:
[0017] In view of the massive amount of drilling data, the safe drilling condition data and the data on the complexity of well leakage are extracted according to the construction information recorded in the drilling daily report and other drilling data. When extracting the data on the complexity of well leakage, it is necessary to combine the data feature analysis method to extract the drilling data containing the signs of well leakage before the occurrence of the well leakage accident;
[0018] A labeling rule is formulated for the extracted safe drilling condition data and the well leakage complex situation data, wherein the label of the safe drilling condition data is 0, and the label of the well leakage complex situation data is 1, and the label information is obtained;
[0019] The Z-Score method is used to standardize the safe drilling condition data and the data of complex well leakage conditions;
[0020] The label information is combined with the standardized data to form a safe drilling data set and a well leakage symptom data set.
[0021] Preferably, the Borderline-SMOTE method is used to adjust the category weights of the safe drilling data set and the well leakage symptom data set to balance the data volumes of the safe drilling data set and the well leakage symptom data set, specifically:
[0022] The drilling data set is S, S∈R n, The safe drilling data set is S1, and the well leakage sign data set is S2, S = S1 ∪ S2, where the safe drilling data set S1 is the majority class sample, and S2 is the minority class sample. S2 is divided into three categories: safe, danger, and noise;
[0023] P is a certain well leakage data point, P∈S2, and the k sample points closest to point P are selected as the neighbor sample set of P. The neighbor sample set of point P is S k ,when Point P belongs to the safe category; when Point P belongs to the danger category; when |S k ∩S1|=k, point P belongs to the noise category;
[0024] The interpolation method is used to synthesize new well leakage data for the danger sample, and the new well leakage data is located on the line connecting the danger sample and its neighboring well leakage samples.
[0025] Preferably, an appropriate c is set according to the category distribution of the safe drilling data set and the well leakage symptom data set, c neighboring well leakage data points are selected from the neighboring sample set of the danger sample, and c new samples are synthesized between the danger sample and the c neighboring well leakage data points. The specific formula is:
[0026]
[0027] in, represents the newly generated i-th sample; x d Indicates the value of the danger sample; x i Represents x d The value of the i-th neighboring leakage sample; r i Represents x i The corresponding random coefficient, 0 <r i <1;
[0028] For each danger sample in S2, the above steps are used to generate a new sample. If there are N danger samples in S2, c×N new samples are finally obtained.
[0029] Preferably, the training set is used for model training, specifically:
[0030] In the training set, the well leakage related parameters of drilling pressure, riser pressure, drilling time, pool volume, mud leakage, torque, rotation speed, outlet flow, inlet flow, outlet temperature, inlet temperature, and DCZS are used as model inputs to iteratively train the well leakage intelligent early warning model based on LightGBM.
[0031] A data-driven intelligent early warning device for well leakage risk, comprising:
[0032] The data acquisition module is used to obtain the historical data of different wellheads in each block from the comprehensive logging instrument and establish a historical database of well leakage;
[0033] Data cleaning module: used for missing value processing and benefit group processing;
[0034] The data enhancement module is used to smooth the data using LOWESS and adjust the category weights using the Borderline-SMOTE method to balance the data volume of the safe drilling data set and the well leakage symptom data set;
[0035] The model building module is used to fuse the data set generated in step 2 with the data generated in step 3, divide the fused data into training set, validation set and test set in a ratio of 8:1:1, and build a well leakage intelligent early warning model based on LightGBM, set the initial hyperparameters of the model, and use the training set for model training;
[0036] The model evaluation module is used to optimize and adjust the parameters of the lost circulation intelligent early warning model using the validation set, and the confusion matrix, ROC curve, specificity, and Matthews correlation coefficient are used to evaluate the model performance.
[0037] An electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the processor implements the steps of a data-driven intelligent early warning method for well leakage risk.
[0038] A storage medium stores computer executable instructions, which, when loaded and executed by a processor, implement the steps of a data-driven intelligent early warning method for well leakage risk.
[0039] Therefore, the present invention adopts the above-mentioned data-driven intelligent early warning method for well leakage risk, and the technical effects are as follows:
[0040] (1) In order to solve the problem that drilling data cannot accurately reflect the drilling status and downhole dynamics due to instrument measurement errors, construction environment noise and other reasons, the present invention adopts the LOWESS algorithm to construct a local weighted fitting model, fully considers the contribution of different neighboring points to the fitting of the point, assigns corresponding weight factors according to the contribution, draws a LOWESS curve to fit the original data, eliminates data noise while retaining the characteristics of the original data, and improves data quality.
[0041] (2) In order to solve the problem that there is a large difference in the volume of safe drilling condition data and complex well leakage data in drilling data, the present invention proposes a category balancing method based on Borderline-SMOTE. By mining the intrinsic characteristics of well leakage boundary samples, the generated new data meets the distribution characteristics of the original data, improves the reliability of the expanded data set, and improves the efficiency of well leakage data identification while achieving category balance.
[0042] (3) In order to solve the practical problem that the early warning of complex underground situations still requires manual monitoring and is extremely dependent on expert experience, the present invention constructs an intelligent early warning model for well leakage based on LightGBM. The model achieves rapid gradient improvement by adopting unilateral gradient sampling, leaf-wise growth strategy and mutually exclusive feature bundling algorithm. It has excellent performance in running speed, memory occupancy, parallel learning and processing of large-scale data, and can realize timely, accurate and intelligent early warning of well leakage risk. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of a data-driven intelligent early warning device for well leakage risk according to the present invention;
[0044] Figure 2 It is Borderline-SMOTE class balance;
[0045] Figure 3 The present invention is a flow chart of a data-driven intelligent early warning method for well leakage risk. DETAILED DESCRIPTION
[0046] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0047] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.
[0048] Embodiment 1
[0049] Step 1: Obtain the historical data of drilling while drilling from different wellheads, form a historical database of well leakage, and preprocess the historical data of drilling while drilling; data preprocessing mainly includes missing value processing, outlier processing and smoothing processing of drilling data.
[0050] In terms of missing value detection, the isnan function of the numpy library in Python is used to detect missing values in logging data; in terms of outlier detection, box plots are used to identify outliers. For the detected missing values and outliers, the mean filling method is used to replace them.
[0051] In this embodiment, in terms of missing value detection, the engineering parameter data value of "-99" indicates that the data is missing, and the isnan function of the numpy library in python is used to detect missing values in the logging data.
[0052] In terms of outlier detection, a box plot is used to identify outliers. The sample data is sorted from small to large, and the sample is divided into four equal parts using quartiles. Data with values lower than Q1-1.5*IQR or higher than Q3+1.5*IQR are judged as outliers, where IQR represents the interquartile range, and its calculation formula is as follows:
[0053] IQR=Q3-Q1
[0054] Among them, Q3 is the 75% data in the reordered sample; Q1 is the 25% data in the reordered sample.
[0055] The missing values and outliers detected were replaced by the mean imputation method.
[0056] In terms of data smoothing, the LOWESS algorithm is used to achieve smoothing of massive drilling data. The specific steps are: build a LOWESS model for the data near the required smoothing data points, use the triangular kernel function as the weighting function of the LOWESS model, calculate the weight factor of each neighboring point, perform local weighted regression based on the degree of influence of the neighboring points on the required smoothing points, and use the weighted least squares method to fit the LOWESS model, so as to obtain the LOWESS curve of the entire set of data and achieve a smoothing effect.
[0057] In this embodiment, the LOWESS algorithm is used to achieve smoothing of massive drilling data. LOWESS is a non-parametric kernel density estimation smoothing method. Its basic idea is to build a local weighted model based on the data near the required smoothing data point, and dynamically adjust the weight factor according to the degree of influence of the neighboring data on the point, so as to obtain the weighted regression value of the point. The LOWESS algorithm has good flexibility and can achieve the optimal data fitting effect by adjusting model parameters such as frac, it, and delta. In the application of drilling big data smoothing, the triangular kernel function is used as the weighting function of the LOWESS model. The specific formula is:
[0058]
[0059] Among them, w j (x) is the weighting function of the neighboring j-th point; x is the time parameter of the required smoothing point; x j is the time parameter of the adjacent j-th point; b is the bandwidth parameter.
[0060] The weight factor of each neighboring point is calculated according to the above formula, and the LOWESS model is fitted using the weighted least squares method to obtain the data value after smoothing the required smoothing point. The specific formula is as follows:
[0061]
[0062] in, is the smoothing value of the point; w j is the weighting function of the neighboring j-th point; y j is the value of the jth neighboring point.
[0063] Repeat the above steps to perform weighted fitting on each data set to obtain the LOWESS fitting curve of the entire set of data and achieve smoothing of the drilling data.
[0064] Step 2: Divide the massive data in the well leakage history database into working conditions, formulate labeling rules and perform standardization, and construct a safe drilling data set and a well leakage symptom data set;
[0065] The massive data in the well leakage history database is divided into working conditions, and the safe drilling working condition data and the well leakage complex situation data are extracted through data slicing. In this embodiment, for the massive drilling data, the safe drilling working condition data and the well leakage complex situation data are extracted according to the construction information recorded in the drilling daily report and other drilling data. When extracting the well leakage complex situation data, it is necessary to combine the trend line analysis and other data feature analysis methods to extract the drilling data containing the well leakage signs before the well leakage accident occurs.
[0066] Labeling rules are formulated for drilling data according to the working condition category. The label of safe drilling working condition data is set to 0, and the label of complex well leakage data is set to 1.
[0067] The Z-Score method is used to standardize the two types of data. The specific formula of Z-Score is:
[0068]
[0069] Among them, y′ is the standardized value; y is the original data value; μ is the mean of the population data; σ is the standard deviation of the population data.
[0070] The label information is combined with the standardized data to form a safe drilling data set and a well leakage symptom data set.
[0071] Step 3: Use the Borderline-SMOTE method to adjust the category weights of the safe drilling data set and the well leakage symptom data set to balance the data volumes of the safe drilling data set and the well leakage symptom data set;
[0072] The drilling system is represented by an n-dimensional vector space R n To describe, P∈R n , Q∈R n , P=(p1,p2,...,pn), Q=(q1,q2,...,qn), the distance between point P and point Q is described by Euclidean distance, the specific formula is:
[0073]
[0074] Assume that the drilling data set is S, (S∈R n ), the safe drilling data set is S1, and the well leakage sign data set is S2, S = S1 ∪ S2. Obviously, S1 is the majority class sample, S2 is the minority class sample, and S2 is divided into three categories: safe, danger, and noise according to the following rules.
[0075] Assume that P is a certain well leakage data point, P∈S2, and select the k sample points closest to P as the nearest neighbor sample set of P. Assume that the nearest neighbor sample set of P is S k ,when Point P belongs to the safe category; when Point P belongs to the danger category; when |S k ∩S1|=k, point P belongs to the noise category.
[0076] Danger samples are edge samples of well leakage samples, and their feature distinction is weak. The interpolation method is used to synthesize new well leakage data for the danger samples in the well leakage symptom data set. The newly generated data is located on the line connecting the danger sample and its neighboring well leakage samples.
[0077] According to the category distribution of the safe drilling data set and the well leakage symptom data set, an appropriate c is set, c neighboring well leakage data points are selected from the neighboring sample set of the danger sample, and c new samples are synthesized between the danger sample and the c neighboring well leakage data points. The specific formula is:
[0078]
[0079] in, represents the newly generated i-th sample; x d Indicates the value of the danger sample; x i Represents x d The value of the i-th neighboring leakage sample; r i Represents x i The corresponding random coefficient, 0 <r i <1;
[0080] For each danger sample in S2, the above steps are used to generate a new sample. If there are N danger samples in S2, c×N new samples are finally obtained.
[0081] Step 4: Fuse the data set generated in step 2 with the data generated in step 3, and divide the fused data into a training set, a validation set, and a test set in a ratio of 8:1:1;
[0082] Step 5: Build a well leakage intelligent early warning model based on LightGBM, set the initial hyperparameters of the model, and use the training set to train the model;
[0083] LightGBM is a GBDT model based on Histogram. It uses a leaf-wise growth strategy with depth restriction to reduce errors and improve classification accuracy. It also uses the GOSS algorithm to remove samples that contribute less to information gain and increase training speed. Assuming that the current node t uses the split feature j to split at d, the current variance gain can be expressed as:
[0084]
[0085] Among them, |S t | is the number of samples at the current node t; |S - | is the number of samples of the left child node; |S + | is the number of samples of the right child node; V(S t ) is the variance of the target variable at the current node t; V(S - ) is the target variable variance of the left child node; V(S + ) is the target variable variance of the right child node.
[0086] Furthermore, V(S t ) is expressed as:
[0087]
[0088] Among them, y i represents the target variable value of sample i; Represents the mean value of the sample target variable in the current node t; |S t | is the number of samples of the current node t.
[0089] In the training set, the parameters related to well leakage, such as drilling pressure, riser pressure, drilling time, pool volume, mud leakage, torque, rotation speed, outlet flow rate, inlet flow rate, outlet temperature, inlet temperature, and DCZS, are taken as model inputs for iterative training.
[0090] Step 6: Use the validation set to optimize and adjust the parameters of the lost circulation intelligent early warning model, and use confusion matrix, ROC curve, specificity, and Matthews correlation coefficient to evaluate the model performance; the specific formula is:
[0091] (1) Specificity:
[0092] (2) Matthews correlation coefficient:
[0093]
[0094] Among them, TP is the number of true positive examples; TN is the number of true negative examples; FP is the number of false positive examples; FN is the number of false negative examples.
[0095] The larger the TNR value is, the more accurate the prediction is; the closer the Matthews correlation coefficient is to 1, the more accurate the classification is; the specific indicator threshold can be set according to the specific situation.
[0096] The validation set data is input into the well leakage warning model, and the model parameters are dynamically adjusted according to the results of the above evaluation indicators until the model achieves a better classification warning effect.
[0097] Step 7: Test the performance and generalization ability of the lost circulation intelligent early warning model, input the test set into the model, test the effectiveness and reliability of the model, and output the model early warning results.
[0098] A data-driven intelligent early warning device for well leakage risk, comprising:
[0099] The data acquisition module is used to obtain the historical data of different wellheads in each block from the comprehensive logging instrument and establish a historical database of well leakage;
[0100] Data cleaning module: used for missing value processing and benefit group processing;
[0101] The data enhancement module is used to smooth the data using LOWESS and adjust the category weights using the Borderline-SMOTE method to balance the data volume of the safe drilling data set and the well leakage symptom data set;
[0102] The model building module is used to fuse the data set generated in step 2 with the data generated in step 3, divide the fused data into training set, validation set and test set in a ratio of 8:1:1, and build a well leakage intelligent early warning model based on LightGBM, set the initial hyperparameters of the model, and use the training set for model training;
[0103] The model evaluation module is used to optimize and adjust the parameters of the lost circulation intelligent early warning model using the validation set, and the confusion matrix, ROC curve, specificity, and Matthews correlation coefficient are used to evaluate the model performance.
[0104] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0105] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0106] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.
[0107] Therefore, the present invention adopts the above-mentioned data-driven intelligent early warning method, device, electronic device and storage medium for well leakage risk, performs data cleaning and data preprocessing on massive drilling data, adopts the LOWESS algorithm to achieve smoothing and denoising of massive drilling data, uses the Borderline-SMOTE method to adjust the category weight coefficients of well leakage samples and safe drilling samples, and combines the machine learning framework LightGBM to build a well leakage intelligent early warning model to solve the problems of low availability of drilling data, unbalanced sample categories, and low intelligence level of well leakage risk warning in drilling projects.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A data-driven intelligent early warning method for well leakage risk, It is characterized in that The following steps are involved: Step 1: Obtain the historical data of drilling while drilling from different wellheads, form a historical database of well leakage, and preprocess the historical data of drilling while drilling; the preprocessing mainly includes missing value processing, outlier processing and smoothing processing of drilling data; Step 2: Divide the massive data in the well leakage history database into working conditions, formulate labeling rules and perform standardization, and construct a safe drilling data set and a well leakage symptom data set; Step 3: Use the Borderline-SMOTE method to adjust the category weights of the safe drilling data set and the well leakage symptom data set to balance the data volumes of the safe drilling data set and the well leakage symptom data set; Step 4: Fuse the data set generated in step 2 with the data generated in step 3, and divide the fused data into a training set, a validation set, and a test set in a ratio of 8:1:1; Step 5: Build a well leakage intelligent early warning model based on LightGBM, set the initial hyperparameters of the model, and use the training set to train the model; Step 6: Use the validation set to optimize and adjust the parameters of the lost circulation intelligent early warning model, and use confusion matrix, ROC curve, specificity, and Matthews correlation coefficient to evaluate the model performance; Step 7: Test the performance and generalization ability of the lost circulation intelligent early warning model, input the test set into the model, test the effectiveness and reliability of the model, and output the model early warning results.
2. According to claim 1, a data-driven intelligent early warning method for lost circulation risk, It is characterized in that In data smoothing, the LOWESS algorithm is used to achieve smoothing of massive drilling data. The specific steps are as follows: A LOWESS model is built for the data near the required smooth data points. The triangular kernel function is used as the weighting function of the LOWESS model. The weight factor of each neighboring point is calculated. Local weighted regression is performed according to the influence of the neighboring points on the required smooth points. The weighted least squares method is used to fit the LOWESS model, so as to obtain the LOWESS curve of the entire set of data and achieve a smoothing effect.
3. According to claim 1, a data-driven intelligent early warning method for lost circulation risk, It is characterized in that The massive data in the well leakage history database is divided into working conditions, labeling rules are formulated and standardized, and safe drilling data sets and well leakage symptom data sets are constructed. Specifically: In view of the massive amount of drilling data, the safe drilling condition data and the data on the complexity of well leakage are extracted according to the construction information recorded in the drilling daily report and other drilling data. When extracting the data on the complexity of well leakage, it is necessary to combine the data feature analysis method to extract the drilling data containing the signs of well leakage before the occurrence of the well leakage accident; A labeling rule is formulated for the extracted safe drilling condition data and the well leakage complex situation data, wherein the label of the safe drilling condition data is 0, and the label of the well leakage complex situation data is 1, and the label information is obtained; The Z-Score method is used to standardize the safe drilling condition data and the data of complex well leakage conditions; The label information is combined with the standardized data to form a safe drilling data set and a well leakage symptom data set.
4. According to claim 1, a data-driven intelligent early warning method for lost circulation risk, It is characterized in that The Borderline-SMOTE method is used to adjust the category weights of the safe drilling dataset and the well leakage symptom dataset to balance the data volumes of the safe drilling dataset and the well leakage symptom dataset. Specifically: The drilling data set is S, S∈R n , the safe drilling data set is S 1 , the well leakage symptom data set is S 2 , S=S 1 ∪S 2 , where the safe drilling data set S 1 is the majority class sample, S 2 For the minority class samples, S 2 Divided into three categories: safe, danger, and noise; P is a certain well leakage data point, P∈S 2 , select the k sample points closest to point P as the nearest neighbor sample set of P, and the nearest neighbor sample set of point P is S k ,when Point P belongs to the safe category; when Point P belongs to the danger category; when |S k ∩S 1 |=k, point P belongs to the noise category; The interpolation method is used to synthesize new well leakage data for the danger sample, and the new well leakage data is located on the line connecting the danger sample and its neighboring well leakage samples.
5. According to claim 4, a data-driven intelligent early warning method for lost circulation risk, It is characterized in that According to the category distribution of the safe drilling data set and the well leakage symptom data set, an appropriate c is set, c neighboring well leakage data points are selected from the neighboring sample set of the danger sample, and c new samples are synthesized between the danger sample and the c neighboring well leakage data points. The specific formula is: in, represents the newly generated i-th sample; x d represents the value of the danger sample; x i Represents x d The value of the i-th neighboring leakage sample; r i Represents x i The corresponding random coefficient, 0 <r i <1; For S 2 Each danger sample in S is generated by the above steps. 2 If there are N danger samples in , then c×N new samples are finally obtained.
6. According to claim 1, a data-driven intelligent early warning method for well leakage risk, It is characterized in that The training set is used for model training, specifically: In the training set, the well leakage related parameters of drilling pressure, riser pressure, drilling time, pool volume, mud leakage, torque, rotation speed, outlet flow, inlet flow, outlet temperature, inlet temperature, and DCZS are used as model inputs to iteratively train the well leakage intelligent early warning model based on LightGBM.
7. A data-driven intelligent early warning device for well leakage risk, It is characterized in that include The data acquisition module is used to obtain the historical data of different wellheads in each block from the comprehensive logging instrument and establish a historical database of well leakage; Data cleaning module: used for missing value processing and benefit group processing; The data enhancement module is used to smooth the data using LOWESS and adjust the category weights using the Borderline-SMOTE method to balance the data volume of the safe drilling data set and the well leakage symptom data set; The model building module is used to fuse the data set generated in step 2 with the data generated in step 3, divide the fused data into training set, validation set and test set in a ratio of 8:1:1, and build a well leakage intelligent early warning model based on LightGBM, set the initial hyperparameters of the model, and use the training set for model training; The model evaluation module is used to optimize and adjust the parameters of the lost circulation intelligent early warning model using the validation set, and the confusion matrix, ROC curve, specificity, and Matthews correlation coefficient are used to evaluate the model performance.
8. An electronic device, It is characterized in that It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of a data-driven intelligent early warning method for well leakage risk as claimed in any one of claims 1 to 6 are implemented.
9. A storage medium, It is characterized in that The storage medium stores computer executable instructions, which, when loaded and executed by a processor, implement the steps of a data-driven intelligent early warning method for well leakage risk as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Training and predicting method for intelligent prediction model of well drilling overflow working condition and underground overflow risk probability prediction system
CN116796647A
Method for classifying high-dimensional imbalanced data based on svm
WO2019041629A1
Cited By
Whole sample-based drilling risk detection method and device and computer equipment
CN119886806A
Well drilling leakage identification method based on artificial intelligence
CN121434938A
