Drilling fluid leakage online prediction method and system based on instant learning
Through an instant learning method, the relevant sample data are selected using Euclidean distance and cosine similarity, and combined with Pearson correlation coefficient calculation, the problems of drilling fluid leakage monitoring lag and high cost are solved, real-time leakage prediction and accurate decision support during drilling process are achieved.
Patent Information
- Application Number
- CN202411944645.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-04
AI Technical Summary
Drilling fluid leakage occurs in deep drilling operations with lag monitoring and high-cost real-time detection, which makes it difficult to detect and prevent leakage in a timely manner.
Using a method based on real-time learning, the relevant sample data are selected through Euclidean distance and cosine similarity, and combined with Pearson correlation coefficient calculation, the training data set is constructed for loss prediction.
It realizes the perception of leakage situation in advance during drilling, provides real-time decision-making support, reduces the economic losses and engineering risks caused by leakage, and improves the accuracy of leakage prediction.
Smart Images

Figure CN119761586A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of oil and gas artificial intelligence drilling fluid, and in particular to a method and system for constructing training data based on real-time learning to predict drilling fluid loss. Background Art
[0002] Drilling fluid loss is a common problem in drilling operations. Drilling fluid is not only used to carry cuttings, but also plays a key role in cooling and lubricating the drill bit, stabilizing the wellbore wall, and controlling formation pressure. However, as exploration and development targets gradually shift to deeper layers, the problem of drilling fluid loss has become increasingly prominent. The loss problem not only leads to the consumption of a large amount of materials and the extension of drilling time, but may also seriously affect the development efficiency of oil and gas reservoirs. Once the drilling fluid enters the reservoir, it may significantly reduce or even completely lose the production capacity of the reservoir, thereby reducing the quality of crude oil. In addition, the loss may also induce accidents such as blowouts, stuck drill, well collapse, and well kicks, posing a major threat to the safe and efficient development of deep oil and gas resources.
[0003] At the drilling site, the judgment of leakage usually relies on monitoring the change of mud pool volume and evaluating it in combination with formation information. In addition, the leakage can also be perceived through real-time monitoring systems, such as downhole cables, measurement while drilling (MWD) and logging while drilling (LWD). However, the monitoring of mud pool volume changes usually has a lag, and is often detected only after the leakage occurs; and although the drilling monitoring system is accurate, its high cost limits the economic benefits of widespread application.
[0004] The introduction of artificial intelligence technology has brought broad prospects for the digital and intelligent development of the oil and gas industry, making full use of the large amount of historical data accumulated in the industry. Traditional global modeling methods usually combine models with training data for offline training and apply them to online predictions. However, this method often lacks pertinence and flexibility when processing massive data. In contrast, real-time learning, as a dynamic model adaptation strategy, is particularly suitable for data stream processing and online learning environments. Its core advantage is that it can update or build prediction models in real time based on the latest data. Once a new sample is received, the real-time learning algorithm can immediately perform modeling and prediction, and achieve the optimal response to the current instance by training or fine-tuning model parameters using local data sets. In a non-stationary environment where the data distribution changes dynamically over time, the real-time learning model can quickly adapt to new patterns, providing an efficient solution for prediction tasks in complex environments. Summary of the invention
[0005] In view of the problems existing in the on-site monitoring of the mud pool volume and the real-time detection system for drilling fluid loss, the invention proposes a drilling fluid loss degree prediction method based on real-time learning to predict the loss degree. The technical solution is as follows:
[0006] Before training, real-time learning first selects training sample data. When a new test sample x k When time k arrives, the algorithm first selects the same as x from the existing training data set. k The relevant or most similar subset S k The present invention selects sample similarity (Formula 3) based on Euclidean distance (Formula 1) and cosine similarity (Formula 2):
[0007]
[0008] Where X i is the i-th historical sample data, X q is the sample to be queried,
[0009]
[0010] Among them, λ is the weight, s i The larger the value, the higher the similarity between the historical sample data and the sample to be queried.
[0011] Data with smaller angles and sample similarities are extracted from the data set to compile a new data set as a training data set. Compared with the original data set, this data set has smaller characteristics, is similar to the characteristics of the data to be predicted, and is more targeted.
[0012] In order to narrow the query scope of the data, we added the average absolute Pearson correlation coefficient calculation before the instant learning algorithm. The calculation formula is:
[0013]
[0014] where x i ,y i are pairs of data points; are the average values of x and y respectively; n is the number of data points.
[0015] The advantages of the technical solution of the present invention are reflected in the following two aspects:
[0016] 1. Prediction capability based on real-time learning. The present invention predicts the amount of drilling fluid loss based on the real-time learning method, so that possible leakage can be perceived in advance during the drilling process. This prediction capability provides real-time decision support for field engineers, facilitating timely adjustment of drilling fluid parameters, thereby effectively reducing economic losses and potential engineering risks caused by leakage.
[0017] 2. Innovative application of Pearson correlation coefficient. The present invention innovatively introduces the calculation of Pearson correlation coefficient into the real-time learning algorithm for the prediction task of drilling fluid loss. Through this method, the correlation between key variables affecting the loss can be captured more accurately, thereby significantly improving the performance of the prediction model and achieving better results in the prediction of drilling fluid loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of the drilling fluid loss degree prediction based on real-time learning of the present invention. DETAILED DESCRIPTION
[0019] In order to make the features of the present invention easier to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific examples. It should be noted that the exemplary features described herein are only used to illustrate and explain the present invention, and do not limit the present invention.
[0020] To predict the amount of drilling fluid loss, it is necessary to first complete the correlation analysis between the drilling condition characteristics and the loss in the local historical database, and select the characteristics with a higher correlation with the loss for the next step of analysis. The purpose of this is to achieve higher loss prediction accuracy.
[0021] The method proposed by the present invention comprises:
[0022] 1. The historical logging data of multiple wells at the drilling site are used as the data set Data for constructing the prediction of the degree of drilling fluid loss. The data set Data is sorted and the abnormal values therein are processed;
[0023] 2. For the convenience of verification, according to different well numbers, about 70% of the well data are divided into the training set Train data, and about 30% of the well data are divided into the test set Test data. In the actual drilling process, the entire data set Data is used as the training set Train data, and the online monitoring data while drilling is included in the test set Test data;
[0024] 3. The training set Train data is used as local historical data, and a piece of data in the test set Test data represents a query data Query sample;
[0025] 4. Select a query data Query sample, use formula (4) to calculate it with the local historical data, and select several data with larger r values to form a new sample historical data (size is M);
[0026] 5. Use the query data Query sample selected in the previous step, bring it into formula (3) and the newly composed sample historical data for real-time learning calculation, where the λ value can be adjusted. i Sort and select several pieces of data to form the final training set (size is N and M ≥ N);
[0027] 6. Selection of drilling fluid loss prediction model: This part includes three models (SVR, GBDT and MLP). The three models are integrated using the Bagging method. The Bagging method performs a weighted combination of the results of the three models and finally completes the prediction of a query data.
[0028] 7. Repeat steps 4 to 6 to complete the prediction of the entire test set.
[0029] The implementation steps and methods described above merely express the implementation methods and preferred embodiments of the present invention and should not be construed as limitations of the present invention. Without departing from the concept of the present invention, any modifications, deformations, equivalent substitutions, etc. made should be included in the scope of protection of the patent of the present invention.
Claims
1. An online prediction method for drilling fluid loss based on real-time learning, characterized in that: The following steps are involved: S1. Use the logging data at the drilling site as a local historical data set to build a drilling fluid loss prediction model; S2. Take each piece of data in the test set as query data (Query sample), calculate its average absolute Pearson correlation coefficient with the local historical data set, filter out data with high correlation with the query data, and construct a new sample historical data set; S3. Based on the newly constructed sample historical data set, the query data is immediately learned and calculated to generate a training set for prediction, which is then input into the loss prediction model to complete the prediction of the query data loss.
2. The method for predicting drilling fluid loss based on real-time learning according to claim 1, characterized in that: In step S1, the drilling site logging data after outlier processing and feature selection is used.
3. The method for predicting drilling fluid loss based on real-time learning according to claim 1, characterized in that: In step S2, data related to drilling fluid loss prediction is extracted from the local historical data set by calculating the average absolute Pearson correlation coefficient, and a new sample historical data set is constructed.
4. The method for predicting drilling fluid loss based on real-time learning according to claim 1, characterized in that: In step S3, the query data (Query sample) is calculated through real-time learning, and several pieces of data with the highest similarity are selected to generate a training set for model prediction.
5. A drilling fluid loss prediction system based on real-time learning, characterized in that: include: Data loading module: used to read the cleaned and feature-selected logging data, including data features and data labels, and load the query data (Query sample) that needs to be predicted; Instant learning module: Calculate the average absolute Pearson correlation coefficient and instant learning similarity of the loaded data, and filter the data to generate a training set based on the calculation results; Model training and prediction module: takes the training set generated by the instant learning module as input to predict the loss of query data.
6. The drilling fluid loss prediction system based on real-time learning according to claim 5, characterized in that: The model training and prediction module adopts a fusion model, including support vector regression (SVR), gradient boosted decision tree (GBDT) and multi-layer perceptron (MLP), and the fusion method is bagging, using a weighted combination method to generate the final prediction result.