An intelligent monitoring method for early overflow in drilling based on misclassification cost
By introducing misclassification cost-sensitive learning in early overflow monitoring, a cost-sensitive model based on 7 feature parameters is constructed, which solves the problems of low classification accuracy and poor generalization ability caused by insufficient data volume in traditional methods, and achieves efficient Overflow monitoring performance.
Patent Information
- Application Number
- CN202210189947.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-02-28
AI Technical Summary
Traditional machine learning algorithms are difficult to overcome the problems of low classification accuracy and poor generalization ability caused by insufficient data volume in early overflow monitoring, especially when there is insufficient data for positive sample in early block development.
Using intelligent monitoring method for early overflow of drilling based on misclassification costs, 7 types of riser pressure difference, total pool volume difference, inlet and outlet flow difference, drilling fluid density difference, drilling fluid temperature difference, drilling fluid conductivity and drilling time were selected. Parameters are used as feature parameters, and cost-sensitive early overflow monitoring models are built through feature conversion modules, cost-sensitive data set construction modules and integrated learning modules. The optimization model aims to minimize misclassification.
This method exhibits high classification performance and strong generalization capabilities on data sets of various sizes, can effectively overcome the problems of low accuracy and poor generalization capabilities caused by insufficient data volume in traditional methods, and provides reliable overflow monitoring guidance .
Smart Images

Figure CN114548306B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of oil and gas exploitation, and in particular to an intelligent monitoring method for early overflow in drilling based on misclassification cost. Background Art
[0002] As the first barrier to well control safety, the application and development of early overflow monitoring technology has important theoretical and practical significance for preventing blowouts. With the rapid development of machine learning technology, the development trend of early overflow monitoring technology is to optimize characteristic parameters and combine intelligent algorithms to quickly detect overflows according to the response time of various parameters at the wellhead when overflow occurs. At present, many scholars have selected different characteristic parameters and combined various machine learning algorithms to train a variety of intelligent models for early overflow monitoring.
[0003] Early overflow monitoring can be regarded as a binary classification problem. We call overflow samples positive samples and non-overflow samples negative samples. In reality, the number of negative samples in the dataset used to train the model is much larger than that of positive samples, which is obvious. Therefore, early overflow monitoring is a typical binary classification problem of unbalanced small sample data set. Traditional machine learning assumes that the number of samples of each category is balanced in a specific dataset with a large amount of data, and takes the minimum misclassification rate or the highest prediction accuracy as the optimization goal to learn a classification model so that the model has the highest classification accuracy for the data on the test dataset. Therefore, the application of traditional machine learning algorithms in the field of early overflow monitoring has the following problems: 1) A large amount of data is required to ensure that the traditional machine learning algorithm can obtain a high-performance model, but in reality it is difficult to provide enough positive sample data, especially in the early development of the block; 2) Unbalanced samples will cause the training model to focus on the category with a large number of samples, while "disdaining" the category with a small number of samples, and the generalization ability of the model on the test data is greatly limited. Many scholars have proposed different solutions to the problem of unbalanced small sample data set classification. Existing methods can be divided into sampling methods, ensemble learning methods, and cost-sensitive learning methods. Sampling methods include undersampling (Liu, Wu, and Zhou 2009; Zheng et al. 2021;) and oversampling (Chawla et al. 2002; Barua et al. 2014; Li and Xiong 2020). The undersampling method achieves a balance between positive and negative samples by deleting negative samples, but some important samples may be deleted from the majority class. The oversampling method replicates a minority of samples multiple times, which can easily cause model overfitting; ensemble learning methods (Seiffert et al. 2010; Alam et al. 2018; Fang et al. 2019; Niu and Zhang 2020) usually use majority voting, but the results may be biased due to the existence of "unstable samples". Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent monitoring method for early overflow in drilling based on misclassification cost, in view of the fact that traditional machine learning algorithms are difficult to overcome the problems of low classification accuracy and poor generalization ability caused by insufficient data in the field of early overflow monitoring.
[0005] The present invention provides an intelligent monitoring method for early overflow in drilling based on misclassification cost, which selects seven parameters, namely, riser pressure difference, total pool volume difference, inlet and outlet flow difference, inlet and outlet drilling fluid density difference, inlet and outlet drilling fluid temperature difference, inlet and outlet drilling fluid conductivity, and drilling time, as characteristic parameters for overflow warning, takes the lowest misclassification cost as the optimization target of the model, introduces cost sensitivity into early overflow monitoring, and constructs an early overflow monitoring model based on cost sensitivity for monitoring early overflow. The model consists of three modules, namely, a feature conversion module, a cost-sensitive data set construction module, and an integrated learning module, which are performed in sequence. Among them, the feature conversion module is used to normalize the input data set and convert the original feature space; the cost-sensitive data set construction module is used to construct a training data set containing cost information; and the integrated learning module is used to integrate multiple weak classifiers to obtain a strong classifier.
[0006] The intelligent monitoring method for early overflow in drilling of the present invention comprises the following steps:
[0007] S1. Select the seven parameters of riser pressure difference, total pool volume difference, inlet and outlet flow difference, inlet and outlet drilling fluid density difference, inlet and outlet drilling fluid temperature difference, inlet and outlet drilling fluid conductivity, and drilling time as characteristic parameters for overflow warning.
[0008] S2. Establish a cost-sensitive early overflow monitoring model, where:
[0009] The feature conversion module inputs the cumulative change of each feature parameter at the next moment relative to the previous moment as an input parameter into the feature conversion module for preprocessing to obtain a data set after normalization and feature dimension reduction processing.
[0010] The cost-sensitive data set construction module sends the preprocessed data set to the cost-sensitive data set construction module, the positive class samples are amplified, and the amplified positive class samples and negative class samples constitute a cost-sensitive training set.
[0011] The ensemble learning module is used to integrate multiple weak classifiers to obtain a strong classifier.
[0012] S3. Use the real drilling data of a certain block to train and test the cost-sensitive early overflow monitoring model. In this step, the six indicators of total misclassification cost, accuracy, recall, precision, F-measure and AUC are used to evaluate the performance of the cost-sensitive early overflow monitoring model.
[0013] In the above method, the feature conversion module performs linear transformation on the original data, and the conversion function is as follows:
[0014]
[0015] In the formula, max and min are the maximum and minimum values of the original data respectively. An original value x is mapped to a value x' in the interval [0,1] through min-max standardization.
[0016] The KPCA algorithm is used to transform features. Through nonlinear mapping Φ, each X=(x1,x2,…,x p )(x i ∈R n , i = 1, 2, ..., p) are mapped to the high-dimensional feature space Y, that is:
[0017]
[0018] In the formula, R n —original low-dimensional space, Y—high-dimensional space after mapping; Φ is a nonlinear mapping, Φ maps all samples in X to the feature space Y to obtain a new matrix Φ(X).
[0019] Data processing is performed in a high-dimensional feature space to make the indivisible data in the input space separable in the high-dimensional feature space. The covariance matrix of the features is then used in this higher-dimensional space to determine the variance consistency between variables and find the best linear combination between the variables to replace the features, thereby achieving the purpose of dimensionality reduction.
[0020] In the KPCA algorithm, the polynomial kernel function used is as follows:
[0021] k(x,y)=(ax t y+c) d (3)
[0022] Where d is the highest order of the polynomial function, a is used to set the gamma parameter in the kernel function, and c is the coefficient.
[0023] The cost-sensitive dataset construction module includes the following operations:
[0024] (1) Cost sensitivity uses a cost matrix to represent the cost of a misclassification. c0 is a positive sample, c1 is a negative sample, and C(i, j) represents the cost of misclassifying i as j.
[0025] (2) After obtaining the cost information through the cost matrix, cost-sensitive learning is divided into three categories according to the different cost embedding processes: data pre-processing method, direct cost-sensitive learning method and result post-processing method;
[0026] (3) By increasing the number of positive samples in the data set, changing the imbalance ratio of the data set, and embedding the cost information into the data set. The GAN model is used to increase the number of positive samples. The specific method is as follows:
[0027] The GAN model consists of a generator G and a discriminator D; the objective function of the GAN model is defined as:
[0028]
[0029] Where, E is the mathematical expectation; logD(x) is the loss of the discriminator D; z is the random input; G(z) is the newly generated sample; P data(x) —The distribution of real samples; P z(z) —The distribution from which samples are generated.
[0030] In each round of training, G randomly collects m vectors from the noise distribution Pz(z) as input and generates m fake data G(z i )(i=1,2…m), whose probability distribution is P G ; D accepts m fake data generated by G as input and randomly selects m samples from the real data as input. The probability distribution of the real data is P data ; D through P G With P data The difference between them determines whether the input data comes from real data or the generator, and outputs D the probability that the input is the real distribution, and feeds the output back to G to guide the training of G; E x~Pdata(x) [logD(x)] represents the expectation of the discriminator for the real sample judgment result, E z~pz(z) [log(1-D(G(z)))] represents the expectation of the discriminator for the false sample judgment result; after multiple rounds of adversarial training, until D's judgment result D(x) for the real sample is 1, logD(x) is 0, that is, E x~Pdata(x) The larger [logD(x)] is, the better; for false samples, D(G(z)) is 0, 1-D(G(z)) is 1, and log(1-D(G(z))) is 0, that is, E z~Pz(z) The larger [log(1-D(G(z)))] is, the better; ultimately D cannot tell whether the input data is from the real data x or the generated data G(z i )(i=1,2…m), that is, the output probability value of D each time is 1 / 2, and the model reaches the optimal value at this time.
[0031] In the ensemble learning module, the Stacking method is used to first train several base classifiers according to the original training set, and then the prediction results of the multiple base classifiers are used as a new training set to train a new classifier as the final classifier.
[0032] Compared with the prior art, the present invention is beneficial in that:
[0033] The present invention introduces cost-sensitive learning into early overflow monitoring, selects seven parameters such as standpipe pressure, total pool volume, inlet and outlet flow, and inlet and outlet drilling fluid density difference as features, takes the lowest misclassification cost as the optimization goal of the model, and constructs a new intelligent model for early overflow monitoring. The model has excellent performance on data sets of various sizes, which proves that our model is reliable, has strong classification performance, high generalization ability, and can provide guidance for on-site construction. The method of the present invention avoids the problems of low accuracy and poor generalization ability caused by insufficient data that are difficult to overcome in traditional machine learning in early overflow monitoring.
[0034] Other advantages, objectives and features of the present invention will be embodied in part through the following description, and in part will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 , FCE-Kick Detection schematic diagram.
[0036] Figure 2 , schematic diagram of the principle of KPCA to achieve sample separation.
[0037] Figure 3 , diagram of cost-sensitive learning.
[0038] Figure 4 , GAN network structure.
[0039] Figure 5 , Four Comparison of classification performance of various algorithms.
[0040] Figure 6 , the relationship between the optimal cost and the number of positive samples.
[0041] Figure 7 , the relationship between Real IR, positive samples and imbalance ratio. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0043] In the actual drilling process, due to the complex formation conditions and poor on-site construction environment, certain errors will occur during tool measurement, which increases the difficulty of early overflow monitoring. Early overflow monitoring based on a single factor is greatly affected by error noise. Therefore, through the investigation of literature and a large amount of field data, the present invention optimizes and summarizes the characteristic parameters closely related to overflow and their characterization rules as shown in Table 1, based on multi-parameter monitoring of early overflow, to improve the accuracy of identifying overflow.
[0044] Table 1 Overflow warning characteristic parameters and their characterization rules
[0045]
[0046] In the present invention, the numerical value of each characteristic parameter at each moment is not directly used as input, but the cumulative change of the characteristic parameter at the next moment relative to the previous moment is used as the input parameter. The length of the moment can be appropriately adjusted according to the actual situation, and then the relationship between the change of the characteristic parameter and the early overflow is analyzed through the intelligent model to perform intelligent monitoring of the early overflow.
[0047] The present invention takes the minimum misclassification cost as the optimization goal and uses the data pre-processing method to construct a cost-sensitive early overflow monitoring model, which is named FCE-Kick Detection (see Figure 1 ).Depend on Figure 1 It can be seen that the model is mainly composed of three modules: 1) Feature transformation module (F), which is responsible for normalizing the input data set and converting the original feature space; 2) Cost-sensitive data set construction module (C: Cost-sensitive Data Construction), which is responsible for constructing a training data set containing cost information; 3) Ensemble learning module (E: Ensemble Learning), which is used to integrate multiple weak classifiers to obtain a strong classifier.
[0048] The workflow of the model: First, the original data set is sent to the data preprocessing module to obtain a normalized and feature-reduced data set. Then, the preprocessed data set is sent to the CDC module, and the positive samples will be amplified. The amplified positive samples and negative samples constitute a cost-sensitive training set. Finally, in the EL module, we integrate multiple weak classifiers to form a strong classifier as the final classifier. The construction, training and testing of the model are based on the Python-keras deep learning library. Keras is an advanced neural network API written in Python that can run on TensorFlow, CNTK or Theano, enabling fast experiments.
[0049] The following are descriptions of the three modules:
[0050] (1) Feature conversion module
[0051] Feature transformation aims to enhance the connection between feature parameters and overflow. Before transforming the feature space, the data set is normalized. Data normalization limits the preprocessed data to a certain range, thereby eliminating the adverse effects caused by singular sample data. The present invention uses min-maxNormalization to perform linear transformation on the original data, and the transformation function is as follows:
[0052]
[0053] The KPCA (Kernel Principal Component Analysis) algorithm is used to transform features. PCA is an analysis method that uses the idea of dimensionality reduction to transform multiple indicator problems into new indicator problems under the premise of minimizing the loss of sample data information. These new indicators are not only unrelated to each other, but can also comprehensively reflect the information contained in the original indicators. The PCA operation is actually an orthogonal transformation that determines a coordinate system. In this new coordinate system, the variance of the transformed data points is maximized along the new coordinate axes, which are often called principal components. Principal component analysis can better handle linear relationships between variables, but when dealing with nonlinear relationships, the contribution rate of each principal component will be too dispersed, and it is impossible to find a comprehensive variable that can effectively represent the original sample, and the processing effect is poor. KPCA uses the idea of kernelization to transform each X=(x1, x2,…, x p )(x i ∈R n , i=1,2,…,p) are mapped to the high-dimensional feature space Y, that is:
[0054]
[0055] Data processing is performed in the high-dimensional feature space to make the indivisible data in the input space separable in the high-dimensional feature space. Then, the covariance matrix of the features is used in this higher-dimensional space to determine the variance consistency between the variables and find the best linear combination between the variables to replace the features, thereby achieving the purpose of dimensionality reduction ( Figure 2 ).
[0056] The polynomial kernel function is very suitable for orthogonal normalized data. It is a commonly used kernel function and has a good effect in dealing with binary classification problems. Its mathematical formula is as follows:
[0057] k(x,y)=(ax t y+c) d (3)
[0058] (2) Cost-sensitive dataset construction module
[0059] Cost-sensitive learning assigns different costs to different classification errors to avoid high-cost classification errors and achieve the goal of minimizing the classification cost. Cost sensitivity generally uses a cost matrix (see Table 2) to represent the cost that the classifier needs to pay when it is misclassified. c0 is a positive sample, c1 is a negative sample, and C(i, j) represents the cost of misclassifying i into j.
[0060] Table 2 Confusion matrix
[0061]
[0062] After obtaining the cost information through the cost matrix, cost-sensitive learning can be divided into three categories according to the different cost embedding processes: data pre-processing methods, direct cost-sensitive learning methods and result post-processing methods, such as Figure 3 shown.
[0063] By expanding the number of positive samples in the data set and changing the imbalance ratio of the data set, the cost information can be embedded into the data set. In the specific implementation process, GAN (Generative Adversarial Networks, GAN) is selected to expand the positive samples. GAN is a new generative model proposed by Goodfellow et al. in 2014 (Goodfellow2014). The unique adversarial idea of GAN makes it stand out among many generator models. Since GAN is not a simple reproduction of real data, but has certain data interpolation and extrapolation functions, it can effectively increase the diversity of samples. This is perfectly consistent with our idea that the generated data is different from the real data, and is very suitable for early overflow monitoring and amplification samples. GAN consists of a generative network and a discriminative network. The network structure is as follows: Figure 4 shown.
[0064] GAN consists of a generator G (Generate network) and a discriminator D (Discriminant network). The objective function of GAN is defined as:
[0065]
[0066] In each round of training, G randomly collects m vectors from the noise distribution Pz(z) as input and generates m fake data G(z i )(i=1,2…m), whose probability distribution is P G D accepts m fake data generated by G as input and randomly selects m samples from real data as input. The probability distribution of real data is P data .D through P G With P dataThe difference between them determines whether the input comes from real data or the generator, and outputs the probability that D recognizes the input as the real distribution, and feeds the output back to G to guide the training of G. x~Pdata(x) [logD(x)] represents the expectation of the discriminator for the real sample judgment result, E z~pz(z) [log(1-D(G(z)))] represents the expectation of the discriminator for the false sample judgment result. After multiple rounds of adversarial training, the ideal D for the real sample judgment result D(x) should be 1, and logD(x) should be 0, that is, E x~Pdata(x) The larger [logD(x)] is, the better. For false samples, the judgment result D(G(z)) should be 0, 1-D(G(z)) should be 1, and log(1-D(G(z))) should be 0, that is, E z~pz(z) The larger [log(1-D(G(z)))] is, the better. In the end, D cannot distinguish whether the input data comes from the real data x or the generated data G(z i )(i=1,2…m), that is, the output probability value of D each time is 1 / 2, and the model reaches the optimal value at this time.
[0067] (3) Integrated learning module
[0068] Ensemble learning is to combine multiple weak classification models to obtain a better and more comprehensive strong classifier. The underlying idea of ensemble learning is that even if a weak classifier makes an incorrect prediction, other weak classifiers can correct the error.
[0069] The present invention uses the Stacking method to train a model for combining other base models. In practice, we selected five base classifiers: RF, AdBoost, GradientBoost, ET and SVM. The Stacking method first trains several base classifiers based on the original training set, and then uses the prediction results of multiple base classifiers as new training sets to train a new classifier. The specific steps of the Stacking method are as follows:
[0070] 1) For Model1, the training set D C Divide into k parts, for each part, use the remaining data set to train the model, and then predict the result of this part;
[0071] 2) Repeat the above steps until each prediction is made, and obtain the training set of the secondary model. Get k test sets, and average them to get the test set of the secondary model;
[0072] 3) Repeat the above steps for the remaining models to obtain M-dimensional data;
[0073] 4) Select the secondary model. As the final prediction model, we used Logistic Regression.
[0074] The application cases of the intelligent monitoring method for early overflow in drilling based on misclassification cost of the present invention are as follows:
[0075] Step 1. Dataset
[0076] The actual drilling data of the LZ block was selected as the original data, and the cumulative changes of the characteristic parameters in about 30 seconds were used to construct data sets of various sizes to simulate different periods of block development and test the generalization ability of the model. We first constructed the test data set A for model verification, and the specific information is shown in Table 3.
[0077] Table 3. Dataset A (dataset imbalance ratio = 9)
[0078]
[0079]
[0080] There are 1,000 samples in the dataset, including 100 positive samples and 900 negative samples. The sample imbalance rate reaches 9, which is a typical unbalanced dataset. For overflow, it is difficult to obtain a large amount of data even in the later stage of block development.
[0081] Step 2: Evaluation indicators
[0082] Since the number of positive samples is far less than that of negative samples, the classification performance of negative samples is more important. At this time, the accuracy cannot reasonably measure the classification performance of the model for unbalanced data. In order to more meaningfully evaluate the performance of the classification algorithm, the confusion matrix method is usually used to evaluate the model performance. The confusion matrix is shown in Table 4.
[0083] Table 4. Confusion matrix
[0084]
[0085] The number of positive samples predicted correctly by the model is TP, the number of negative samples predicted correctly is TN, the number of negative samples predicted as positive is FP, and the number of positive samples predicted as negative is FN. The secondary indicators under the confusion matrix are selected here, including Accuracy, Recall, Precision, F-measure, Area under the ROC Curve (AUC), and Total Cost generated by model classification errors as evaluation criteria to measure algorithm performance.
[0086] F-measure is the weighted harmonic average of Precision and Recall. Precision calculates the proportion of TP in all retrieved TP+FP, and Recall calculates the proportion of all retrieved TP in all TP+FN. The evaluation index formula is:
[0087]
[0088]
[0089]
[0090]
[0091] The area under the ROC curve (AUC) is an important indicator to measure the recognition ability of the model. An area of 0.5 indicates random classification and a recognition ability of 0. The closer the area is to 1, the stronger the recognition ability is. An area equal to 1 indicates complete recognition.
[0092] If the cost of correct classification is set to 0 and the cost of dividing the negative class into the positive class is set to 1, the total cost of the model misclassification is:
[0093] Total Cost=FP·1+FN·C(c1,c0) (9)
[0094] Step 3: Test results and comparative analysis
[0095] Here, a variety of different costs are set to test the performance of the model. It is worth noting that when C(C0, C1) = C(C1, C0), the model degenerates into a traditional classification model. We conducted multiple tests to verify the performance of the model, and the following results are the averages after multiple tests. The classification performance test results of dataset A after being converted to different dimensions are shown in Table 5.
[0096] Table 5. Classification results of dataset A
[0097]
[0098]
[0099] As shown in Table 5, when C(C1, C0) = 1, that is, the model degenerates into a traditional classification model, although the classification accuracy of the model exceeds 0.95, the F-measure value is extremely low, which indicates that the model has extremely low classification accuracy for positive samples. Even when the dimension is 6, the F-measure value is the highest, but it is only 0.79. It can be seen that the traditional classification model cannot effectively identify positive samples in the imbalanced sample set. When the misclassification cost is set between 2-5, the model shows extremely strong classification performance. The model has high classification accuracy for both positive and negative data. When the misclassification cost is set to 3 and the dimension is 6, the total cost of model misclassification is only 0.9. At this time, compared with the traditional classification model, the recognition accuracy of the model for positive data is improved by 48.9%. As the misclassification cost is further increased, the model generates a higher total misclassification cost. It can be found that the model has a very high classification accuracy for positive samples, but the classification accuracy for negative samples is reduced. The higher total misclassification cost is generated due to the large number of misclassifications of negative samples. The reason is that when the misclassification cost is set too high, in order to avoid higher costs, the model tends to classify more samples as positive samples. Based on this feature, we believe that in the early stage of block development or when drilling in complex formations, the misclassification cost can be appropriately increased to ensure the model's prediction accuracy for overflows, even if it sacrifices the classification accuracy of normal drilling to a certain extent. From the overall test results, our model is accurate and reliable and can be used in early overflow monitoring.
[0100] The inventor compared the total cost of model misclassification in data set A, the relationship between the misclassification cost and the converted feature dimension. The results show that when the misclassification cost is set between 2-4 and the dimension is between 4-6, the total misclassification cost generated by the model is the smallest. Combined with Table 5, it can be seen that when the converted feature dimension is between 4-6, the classification performance of the model is optimal. The reason is that the converted feature dimension is too small, and the data set after the feature conversion contains too little useful information, so the trained model is underfitting. The converted feature dimension is too large, and the data set after the feature conversion contains too much redundant information, resulting in overfitting of the model. Because the dimension of the features in the original overflow data set of the present invention has been determined, it is impossible to compare the relationship between the original feature dimension and the converted feature dimension, so as to derive the optimal dimension calculation method.
[0101] The inventors also compared the classification performance of the model of the present invention with other methods, including oversampling method, undersampling method and Smote method. The test results of oversampling method, undersampling method and Smote method are shown in Tables 6 to 8.
[0102] Table 6 Oversampling method test results
[0103]
[0104]
[0105]
[0106]
[0107]
[0108] The classification performance comparison of the best models trained by these algorithms is as follows: Figure 5 As shown. It can be seen from the figure that the three models of SMOTE, oversampling and undersampling have a high classification accuracy for negative samples, but a very low classification accuracy for positive samples, resulting in a higher total misclassification cost. The classification performance of the FDE model (i.e., the model established by the present invention) is significantly better than the other three models. It can be concluded that the method of simply copying or deleting samples in the data set and simply interpolating between data set samples to increase the number of samples cannot solve the problem of insufficient and unbalanced positive samples in the early overflow data set, and the trained model cannot be applied to early overflow monitoring. Our model can effectively solve the problems of unbalanced data sets and insufficient positive samples.
[0109] The misclassification cost is a priori information, but in practice, it is difficult to determine the appropriate cost. Therefore, we analyzed the optimal cost based on the premise of optimal model performance. We set the number of positive samples between 20 and 100, the imbalance ratio of the data set between 5 and 15, and constructed multiple data sets. The feature dimension of the converted data set was set to 5, and multiple experiments were conducted. The experimental results are shown in Table 9.
[0110] Table 9 Model classification performance under different numbers of positive samples and imbalance ratios of data sets
[0111]
[0112]
[0113]
[0114] It can be seen from Table 9 that the classification performance of the models under different imbalance ratios and numbers of positive samples varies greatly.
[0115] The trend of the optimal cost changing with the imbalance ratio of the data set and the number of positive samples is compared, such as Figure 6As shown in the figure, we can see that: 1) the optimal cost increases with the increase of the imbalance ratio; 2) the optimal cost varies greatly with the number of positive samples, and the regularity is not strong; 3) overall, the optimal cost remains between 3 and 11. The imbalance of the expanded data set is defined as Real IR, and the variation of Real IR corresponding to the optimal cost under different positive sample sizes and imbalance ratios is compared, as shown in the figure. Figure 7 shown.
[0116] Depend on Figure 7 It can be seen that when the imbalance ratio is 5, the Real IR corresponding to the optimal cost is between 1-1.7; when the imbalance ratio is 7.5, the Real IR corresponding to the optimal cost is between 1.25-1.9; when the imbalance ratio is 10, the Real IR corresponding to the optimal cost is between 1.25-2; when the imbalance ratio is 12.5, the Real IR corresponding to the optimal cost is between 1.4-2.1; when the imbalance ratio is 15, the Real IR corresponding to the optimal cost is between 1.3-1.9. Overall, the Real IR corresponding to the optimal cost is between 1-2.5, and thus the optimal cost calculation formula of the model is given:
[0117]
[0118] In formula (9), C is the optimal cost; IR is the imbalance ratio of the dataset; c is the coefficient.
[0119] In summary, the present invention provides an intelligent monitoring method for early overflow in drilling based on misclassification cost, which overcomes the problems of low classification accuracy and poor generalization ability of traditional machine learning algorithms when there are too few overflow samples. The model performance was tested using real drilling data from the LZ block, and the test results consistently showed that the model has extremely strong classification performance. And in comparison with the sampling method and the Smote method, it shows extremely strong competitiveness. The classification performance of the model when the converted feature dimension is between 2-7 is compared in detail. After multiple tests, it is concluded that the model has the best performance when the dimension is between 4-6. Especially when the dimension is 6 and the misclassification cost is 3, the misclassification cost generated by the model is only 0.9, and the corresponding Accuracy reaches 0.998, Recall reaches 0.990, Precision is 0.986, F-measure is 0.998, AUC is 0.997, and the model shows extremely strong classification performance. Finally, we constructed multiple data sets with positive sample sizes between 20-100 and data set imbalance ratios between 5-15. While verifying the generalization ability of the model, it was found that the imbalance ratio of the real data set corresponding to the misclassification cost was between 1 and 2.5, and the optimal cost value formula of the model was derived from this, providing a reference for engineers. The study found that when the cost was too high, the model had a very high classification accuracy for overflow samples, but to a certain extent, it reduced the classification accuracy for normal drilling samples. Therefore, in the early stage of block development or when drilling in complex formations, the misclassification cost can be appropriately increased based on this feature to ensure drilling safety.
[0120] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. An intelligent monitoring method for early overflow in drilling based on misclassification cost, characterized in that: The following steps are involved: S1. Select the seven parameters of riser pressure difference, total pool volume difference, inlet and outlet flow difference, inlet and outlet drilling fluid density difference, inlet and outlet drilling fluid temperature difference, inlet and outlet drilling fluid conductivity, and drilling time as characteristic parameters for overflow warning; S2. Taking the lowest misclassification cost as the optimization goal of the model, cost sensitivity is introduced into early overflow monitoring, and an early overflow monitoring model based on cost sensitivity is constructed to monitor early overflow; the early overflow monitoring model is composed of three modules: a feature conversion module, a cost-sensitive data set construction module, and an integrated learning module, which are carried out in sequence; wherein, The feature conversion module is used to normalize the input data set and convert the original feature space; Specifically, the cumulative change of each feature parameter at the next moment relative to the previous moment is input as an input parameter to the feature conversion module for preprocessing to obtain a data set after normalization and feature dimension reduction processing; The cost-sensitive data set construction module is used to construct a training data set containing cost information; specifically, the preprocessed data set is sent to the cost-sensitive data set construction module, the positive class samples are amplified, and the amplified positive class samples and negative class samples constitute a cost-sensitive training set; The ensemble learning module is used to integrate multiple weak classifiers to obtain a strong classifier; S3. Use the real drilling data of a certain block to train and test the cost-sensitive early overflow monitoring model.
2. The intelligent monitoring method for early overflow in drilling based on misclassification cost according to claim 1, characterized in that: In the feature conversion module, the original data is linearly transformed, and the conversion function is as follows: The KPCA algorithm is used to transform features. Through nonlinear mapping Φ, each X=(x1,x2,…,x p )(x i ∈R n , i = 1, 2, ..., p) are mapped to the high-dimensional feature space Y, that is: Data processing is performed in a high-dimensional feature space to make the indivisible data in the input space separable in the high-dimensional feature space. The covariance matrix of the features is then used in this higher-dimensional space to determine the variance consistency between variables and find the best linear combination between the variables to replace the features, thereby achieving the purpose of dimensionality reduction.
3. The intelligent monitoring method for early overflow in drilling based on misclassification cost according to claim 2, characterized in that: In the KPCA algorithm, the polynomial kernel function used is as follows: k(x,y)=(ax t y+c) d 。 4. The intelligent monitoring method for early overflow in drilling based on misclassification cost according to claim 1, characterized in that: The cost-sensitive dataset construction module includes the following operations: (1) Cost sensitivity uses a cost matrix to represent the cost of a misclassification. c0 is a positive sample, c1 is a negative sample, and C(i, j) represents the cost of misclassifying i as j. (2) After obtaining the cost information through the cost matrix, cost-sensitive learning is divided into three categories according to the different cost embedding processes: data pre-processing method, direct cost-sensitive learning method and result post-processing method; (3) By increasing the number of positive samples in the dataset and changing the imbalance ratio of the dataset, the cost information is embedded into the dataset.
5. The intelligent monitoring method for early overflow in drilling based on misclassification cost according to claim 4, characterized in that: The GAN model is used to expand the number of positive samples. The specific method is as follows: The GAN model consists of a generator G and a discriminator D; the objective function of the GAN model is defined as: In each round of training, G randomly collects m vectors from the noise distribution Pz(z) as input and generates m fake data G(z i )(i=1,2…m), whose probability distribution is P G ; D accepts m fake data generated by G as input and randomly selects m samples from the real data as input. The probability distribution of the real data is P data ; D through P G With P data The difference between them determines whether the input data comes from real data or the generator, and outputs D the probability that the input is the real distribution, and feeds the output back to G to guide the training of G; E x~Pdata(x) [logD(x)] represents the expectation of the discriminator for the real sample judgment result, E z~pz(z) [log(1-D(G(z)))] represents the expectation of the discriminator for the false sample judgment result; after multiple rounds of adversarial training, until D's judgment result D(x) for the real sample is 1, logD(x) is 0, that is, E x~Pdata(x) The larger [logD(x)] is, the better; for false samples, D(G(z)) is 0, 1-D(G(z)) is 1, and log(1-D(G(z))) is 0, that is, E z~Pz(z) The larger [log(1-D(G(z)))] is, the better; ultimately D cannot tell whether the input data is from the real data x or the generated data G(z i )(i=1,2…m), that is, the output probability value of D each time is 1 / 2, and the model reaches the optimal value at this time.
6. The intelligent monitoring method for early overflow in drilling based on misclassification cost according to claim 1, characterized in that: In the ensemble learning module, the Stacking method is used to first train several base classifiers according to the original training set, and then the prediction results of the multiple base classifiers are used as a new training set to train a new classifier as the final classifier.
7. The intelligent monitoring method for early overflow in drilling based on misclassification cost according to claim 1, characterized in that: In step S3, the performance of the cost-sensitive early overflow monitoring model is evaluated using six indicators: total misclassification cost, accuracy, recall, precision, F-measure, and AUC.
Citation Information
Patent Citations
Re-sampling and cost-sensitive learning integrated unbalanced data integration and classification method
CN107545275A
Classification method for imbalance problem based on cost local generalization error
CN110110754A
Transformer fault diagnosis method based on cost sensitivity and ensemble learning
CN111860658A
Text classification method and system based on active learning strategy
CN112069310A
Software defect prediction method based on class imbalance learning algorithm
CN112465040A
