Drilling parameter optimization method and device
By screening data sets from historical well recording data, training machine learning models and establishing a random forest regression model, combining mechanical energy formulas and multi-objective optimization algorithms, the complexity and accuracy problems of drilling efficiency optimization in the existing technology are solved, and parameter optimization for drilling speed is achieved, and drilling efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202310583929.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2043-05-23
AI Technical Summary
The prior art has problems of complex solutions, poor accuracy and low adaptability in the optimization of drilling efficiency. Due to the problem of ‘data silo’, it is difficult to build a high-quality drilling parameter model, and it is impossible to effectively select the parameter value range for drilling speed increase.
By screening multiple data groups from historical well recording data and well history data, the training and verification sets were constructed; using the mean of historical drilling speed as the speed increase threshold, the machine learning model was trained to obtain a classification prediction model; using these models to predict whether the data groups can achieve drilling speed increase during drilling, and the first classification prediction model was selected; based on this model, a random forest regression model was established, combined with mechanical energy ratio formulas and multi-objective optimization algorithms, a two-objective evaluation function was constructed to determine the value range of drilling parameters.
The correlation between drilling parameters and mechanical drilling speed is achieved quickly, and the parameter value range that can achieve the speed increase of drilling speed is selected, which improves drilling efficiency and accuracy, and makes up for the shortcomings of the traditional modeling process.
Smart Images

Figure CN119026441B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of petroleum engineering, and in particular to a drilling parameter optimization method and device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] Optimizing drilling efficiency is the ultimate goal of the intelligent transformation of drilling technology, and is a concrete manifestation of cost reduction, increased production, safe and efficient drilling in the oil and gas industry under the background of big data. As an important indicator for evaluating drilling efficiency, mechanical drilling speed is affected and restricted by many factors, among which uncontrollable factors include formation lithology and pressure, reservoir burial depth, etc., and controllable factors include drilling parameters such as drilling pressure, rotation speed and drilling fluid performance.
[0004] Experts and scholars in related fields have been committed to establishing models to characterize the relationship between drilling parameters and mechanical drilling speed for many years, in order to select the best speed-up parameters based on the influence of different parameter combinations on mechanical drilling speed under objective conditions, and achieve high-quality, efficient and low-cost drilling. Most traditional modeling processes are based on experience and logical reasoning, and have shortcomings such as complex solutions, poor accuracy, and low adaptability. In addition, the current "data island" problem is serious, making it difficult to ensure the integrity and consistency of historical data, and it is impossible to further build high-quality models for specific scenarios.
[0005] Machine learning algorithms are increasingly used in intelligent drilling projects. Effective results have been achieved in predicting drilling speed based on historical drilling parameters and further analyzing speed-up measures. However, there is still room for in-depth research in data quality assurance and algorithm model optimization, and it is impossible to further optimize the range of drilling parameter values for speeding up drilling speed. Summary of the invention
[0006] An embodiment of the present invention provides a drilling parameter optimization method for optimizing a drilling parameter value range that can achieve an increase in drilling speed. The method includes:
[0007] Select multiple data sets from historical logging data and well history information as sample data to construct training sets and validation sets;
[0008] The average drilling speed of historical wells is used as the speed-up threshold, and the speed-up threshold is used as the classification label. The machine learning model is trained according to the classification label and the training set to obtain a variety of classification prediction models established for each formation.
[0009] Using multiple classification prediction models, traverse the data groups in the validation set respectively, predict whether the drilling speed can be increased during drilling based on the data groups, and obtain the prediction accuracy of each classification prediction model;
[0010] Selecting a first classification prediction model from each classification prediction model according to the prediction accuracy of each classification prediction model and a preset performance evaluation index;
[0011] Based on the first classification prediction model, a data set that can achieve a drilling speed increase during drilling is obtained, a data set is established, and a random forest regression model is established using the data set as input data and the drilling speed as an output variable;
[0012] According to the mechanical specific energy formula and multi-objective optimization algorithm, a dual-objective evaluation function is constructed with the importance of characteristic parameters of the input data of the random forest regression model as weights; the characteristic parameters include well depth, drilling pressure, rotation speed and torque;
[0013] According to the dual-objective evaluation function and the preset optimization rate, the value range of each characteristic parameter is determined.
[0014] The embodiment of the present invention further provides a drilling parameter optimization device for optimizing a drilling parameter value range that can achieve a drilling speed increase, the device comprising:
[0015] The data screening module is used to screen multiple data sets from historical logging data and well history data as sample data to construct training sets and validation sets;
[0016] The prediction model acquisition module is used to use the average drilling speed of historical drilling as the speed-up threshold, and the speed-up threshold as the classification label. According to the classification label and the training set, the machine learning model is trained to obtain a variety of classification prediction models established for each formation.
[0017] The prediction accuracy acquisition module is used to use multiple classification prediction models to traverse the data groups in the verification set respectively, predict whether the drilling speed can be increased during drilling based on the data groups, and obtain the prediction accuracy of each classification prediction model;
[0018] A prediction model selection module is used to select a first classification prediction model from each classification prediction model according to the prediction accuracy of each classification prediction model and a preset performance evaluation index;
[0019] A regression model building module is used to obtain a data set that can achieve a drilling speed increase during drilling based on the first classification prediction model, establish a data set, use the data set as input data, and the drilling speed as an output variable to establish a random forest regression model;
[0020] An evaluation function construction module is used to construct a dual-objective evaluation function based on the mechanical specific energy formula and the multi-objective optimization algorithm, taking the importance of characteristic parameters of the input data of the random forest regression model as weights; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque;
[0021] The parameter value determination module is used to determine the value range of each characteristic parameter based on the dual-objective evaluation function and the preset optimization rate.
[0022] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned drilling parameter optimization method when executing the computer program.
[0023] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned drilling parameter optimization method is implemented.
[0024] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned drilling parameter optimization method is implemented.
[0025] In the embodiment of the present invention, the drilling parameter optimization scheme is compared with the traditional modeling process in the prior art, which is mostly based on experience and logical reasoning, has the shortcomings of complex solution, poor accuracy, low adaptability, etc., and the current "data island" problem is serious, it is difficult to ensure the integrity and consistency of historical data, and it is impossible to further build a high-quality model for a specific scenario, and thus it is impossible to further optimize the drilling parameter value range for speeding up the drilling speed. By selecting multiple data groups from historical logging data and well history data as sample data, a training set and a verification set are constructed; the historical drilling speed average is used as the speed-up threshold, and the speed-up threshold is used as the classification label. According to the classification label and the training set, the machine learning model is trained to obtain a plurality of classification prediction models established for each formation; using a plurality of classification prediction models, the data groups in the verification set are traversed respectively to predict According to the data group, whether the drilling speed can be increased during drilling is obtained, and the prediction accuracy of each classification prediction model is obtained; according to the prediction accuracy of each classification prediction model and the preset performance evaluation index, the first classification prediction model is selected from the classification prediction models; based on the first classification prediction model, the data group that can achieve the drilling speed increase during drilling is obtained, and a data set is established, and the data set is used as input data and the drilling speed is used as the output variable to establish a random forest regression model; according to the mechanical specific energy formula and the multi-objective optimization algorithm, the importance of the characteristic parameters of the input data of the random forest regression model is used as the weight to construct a dual-objective evaluation function; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque; according to the dual-objective evaluation function and the preset optimization rate, the value range of each characteristic parameter is determined, so as to optimize the drilling parameter value range that can achieve the drilling speed increase. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0027] Figure 1 Schematic diagram of the process of the drilling parameter optimization method in an embodiment of the present invention;
[0028] Figure 2 A schematic diagram of a process flow of a drilling parameter optimization method according to an embodiment of the present invention;
[0029] Figure 3 A visualization heat map of the mutual information correlation of drilling parameter features in an embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram comparing the effects of different classification prediction models for each layer of the training set in an embodiment of the present invention;
[0031] Figure 5 is the value range of the drilling parameters obtained from the training set in the embodiment of the present invention;
[0032] Figure 6 Schematic diagram of the construction principle of the dual-objective evaluation function in an embodiment of the present invention;
[0033] Figure 7 Schematic diagram of the framework of the random forest regression model in an embodiment of the present invention;
[0034] Figure 8 A schematic diagram showing the comparison of mechanical drilling speed and mechanical specific energy before and after drilling parameter optimization in an embodiment of the present invention;
[0035] Fig. 9 Schematic diagram of a drilling parameter optimization device in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0037] In the description of this specification, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present invention, and the order of steps is not limited and can be appropriately adjusted as needed.
[0038] Most of the traditional modeling processes in the existing technology are based on experience and logical reasoning, and have shortcomings such as complex solutions, poor accuracy, and low adaptability. In addition, the current "data island" problem is serious, and it is difficult to ensure the integrity and consistency of historical data. It is impossible to further build high-quality models for specific scenarios, and therefore it is impossible to further optimize the range of drilling parameter values for speeding up drilling speed.
[0039] Based on the above problems, an embodiment of the present invention proposes a drilling parameter optimization method to optimize the drilling parameter value range that can achieve the drilling speed increase. Figure 1 FIG. 1 is a flow chart of a drilling parameter optimization method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0040] Step 101: Filter out multiple data sets from historical logging data and well history data as sample data, and construct training sets and validation sets;
[0041] Step 102: Taking the average drilling speed of historical wells as the speed-up threshold, taking the speed-up threshold as the classification label, training the machine learning model according to the classification label and the training set, and obtaining a plurality of classification prediction models established for each formation;
[0042] Step 103: using a plurality of classification prediction models, respectively traverse the data groups in the validation set, predict whether the drilling speed can be increased during drilling according to the data groups, and obtain the prediction accuracy of each classification prediction model;
[0043] Step 104: selecting a first classification prediction model from each classification prediction model according to the prediction accuracy of each classification prediction model and a preset performance evaluation index;
[0044] Step 105: Based on the first classification prediction model, a data set that can achieve a drilling speed increase during drilling is obtained, a data set is established, and a random forest regression model is established using the data set as input data and the drilling speed as an output variable;
[0045] Step 106: According to the mechanical specific energy formula and the multi-objective optimization algorithm, a dual-objective evaluation function is constructed with the importance of characteristic parameters of the input data of the random forest regression model as weights; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque;
[0046] Step 107: Determine the value range of each characteristic parameter according to the dual-objective evaluation function and the preset optimization rate.
[0047] In one embodiment, multiple data sets are selected from historical logging data and well history data as sample data to construct training sets and validation sets, including:
[0048] Perform data cleaning and feature selection on historical logging data and well history data, screen out multiple data groups, and perform mutual information correlation analysis and formation matching on multiple data groups;
[0049] Among them, data cleaning includes: detecting and deleting null values, eliminating abnormal data, compensating for missing values, one or any combination thereof;
[0050] Feature selection includes: screening out data groups in which characteristic parameters such as drilling pressure, rotation speed, and torque are all greater than 0;
[0051] The mutual information correlation analysis includes: establishing a visual heat map of each characteristic parameter and the drilling speed according to the correlation between the characteristic parameters in the data group and the drilling speed, and retaining the characteristic parameters that affect the drilling speed according to the visual heat map;
[0052] Stratum matching includes: matching the stratum where the data set is located according to the characteristic parameters in the data set.
[0053] In one embodiment, the dual-objective evaluation function in step 106 is calculated by the following formula:
[0054]
[0055] Among them, U(x) represents the dual-objective evaluation function. When i≤s, λ i Represents the weighting factor of the minimum mechanical specific energy target. When i≥s+1, λ i represents the weighting factor of the maximum target of mechanical drilling speed. When i≤s, f i (x) represents the minimum objective function of mechanical specific energy. When i≥s+1, f i (x) represents the objective function of minimizing mechanical specific energy.
[0056] In one embodiment, the multiple classification prediction models include: a K-nearest neighbor model, a multi-layer perceptron model, a naive Bayes model, and a logistic regression model.
[0057] Combine the following Figure 2 The drilling parameter optimization method in the embodiment of the present invention is described in detail. Figure 2 FIG. 1 is a flow chart of a method for optimizing drilling parameters in one embodiment of the present invention. Figure 2 As shown, the method includes:
[0058] Complete data cleaning and feature selection based on logging data and well history information;
[0059] The well depth, rotation speed, drilling pressure and torque in the drilling process are selected as the characteristic parameters of the subsequent model. Mutual information can characterize the uncertainty of a random variable reduced by knowing another random variable. It is a commonly used method to measure the nonlinear relationship between variables. Figure 3 FIG. 1 is a visualization heat map of the mutual information correlation of drilling parameter features in an embodiment of the present invention, such as Figure 3 As shown in the figure, the mutual information values of each characteristic parameter and mechanical drilling rate ROP are ranked as follows: well depth (0.75), rotation speed (0.55), drilling pressure (0.52), and torque (0.3), which is consistent with the actual situation of the influence of each characteristic parameter on the mechanical drilling rate ROP. Multiple data groups are selected from historical logging data and well history data as sample data;
[0060] According to the sample data in multiple data sets, a training set and a validation set are constructed, wherein the training set corresponds to the modeling well, and the validation set corresponds to the application well. For the data in the training set, a classification algorithm model is established in each formation with the historical average drilling speed as the speed-up threshold, and it is predicted whether the speed-up effect can be achieved when drilling with a certain characteristic parameter combination. The classification label "1" indicates that the speed can be increased, and the classification label "0" indicates that the speed cannot be increased. After the matching is completed, there are four formations, namely T2k1, T1b3, T1b2, and T1b1;
[0061] Optimize the speed-up prediction model. Use K-nearest neighbor algorithm KNN, multi-layer perceptron algorithm MLP, naive Bayes algorithm NB, and logistic regression algorithm LR to predict each layer. ROC curve and AUC value are commonly used indicators to evaluate the performance of classification algorithms. The closer the AUC value is to 1, the better the model effect. Figure 4 Schematic diagram of the comparison of the effects of different classification prediction models for different layers of the training set in the embodiment of the present invention. Figure 4As shown, in the four formations T2k1, T1b3, T1b2, and T1b1 in the training set, the AUC values of the K nearest neighbor model are 0.96, 0.98, 0.98, and 0.99, respectively, the AUC values of the multilayer perceptron model are 0.81, 0.87, 0.84, and 0.74, respectively, the AUC values of the naive Bayes model are 0.77, 0.86, 0.83, and 0.61, respectively, and the AUC values of the logistic regression model are 0.80, 0.87, 0.84, and 0.75, respectively. It is easy to see that the K nearest neighbor model has the best prediction effect in the four formations of the modeling well, so the K nearest neighbor model is selected as the classification prediction model;
[0062] Based on the K nearest neighbor model, a data set that can achieve the drilling speed increase during drilling is obtained, and a data set is established. The data set is used as input data and the drilling speed is used as the output variable to establish a random forest regression model. According to the mechanical specific energy formula and the multi-objective optimization algorithm, the importance of the characteristic parameters of the input data of the random forest regression model is used as the weight to construct a dual-objective evaluation function; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque; according to the dual-objective evaluation function and the preset optimization rate, the value range of each characteristic parameter is determined.
[0063] Before and after optimizing the range of characteristic parameters, the mean values of rate of penetration (ROP) and mechanical specific energy (MSE) of each formation were compared and analyzed.
[0064] In one embodiment, the preferred rate is set to 5%. Figure 5 is the value range of the drilling parameters obtained from the training set in the embodiment of the present invention, such as Figure 5 As shown, it can be seen that among the four formations T2k1, T1b3, T1b2, and T1b1 selected based on the well depth, the value ranges of the characteristic parameters drilling pressure (WOB, KN·m), rotation speed (RPM, r / min), and torque (TOR, KN·m) selected for each formation.
[0065] The principles of the above K-nearest neighbor, multi-layer perceptron, naive Bayes, and logistic regression models are as follows:
[0066] The K nearest neighbor classification algorithm is as follows:
[0067] In the feature space containing the sample of the characteristic parameter to be tested, its category can be determined according to the K training samples closest to the sample. The algorithm mainly considers three factors: training set, distance (similarity), and K value. The "similarity" is measured by Euclidean distance:
[0068]
[0069] Among them, d a,b is the distance between points a and b, a x 、a y is the horizontal and vertical coordinates of point a, bx 、b y are the horizontal and vertical coordinates of point b.
[0070] The implementation of the algorithm includes the following steps:
[0071] a. Calculate the distance between the feature parameter sample point to be tested and each sample point in the training set;
[0072] b. Sort by increasing distance;
[0073] c. Select K training sample points closest to the feature parameter sample point to be tested;
[0074] d. Determine the frequency of occurrence of the categories to which the K training sample points belong;
[0075] e. Return the category with the highest frequency among the K training sample points as the predicted category of the feature parameter sample point to be tested.
[0076] The naive Bayes classification algorithm is as follows:
[0077] Solve the probability of each category under the condition that the feature parameter sample to be tested appears, and then classify the feature parameter sample to be tested into the category with a larger probability. Assume that D is the training sample set, N is the number of samples, and there are m categories in total (the present invention is binary classification, m = 2), represented by C = {C0, C1}, then the number of samples in each category is N Cj (j=0,1), if each sample contains n attributes A1, A2, …, A n , then the kth (k=1,2,…,N) sample is represented by x k =(x k1 ,x k2 ,…,x kn ), where x ki Represents the value of the kth sample attribute A2 (i=1,2,…,n).
[0078] If a characteristic parameter sample to be tested is given y=(y1,y2,…,y n ), then y belongs to category C j The posterior probability is:
[0079]
[0080]
[0081] In the formula, y i is the feature parameter sample y to be tested in attribute A i The value of P(y) is y=(y1,y2,…,y n ), P(y i |C j ) is in the Cj Under the premise of the class, the feature parameter sample y to be tested is in attribute A i The value of is y i The conditional probability, P(C j ) is the C j The prior probability of the class. i When it is continuous, let For C j Class sample attributes A i The mean value of For C j Class sample attributes A i The mean of the conditional probability P(y i |C j ) is calculated as follows:
[0082]
[0083] Since y belongs to category C j The posterior probability formula can be used to obtain the probability P that the feature parameter sample y to be tested belongs to each category. j =P(C j |y), if P r =max{P1,P2}, then the feature parameter sample to be tested is judged to be the rth category, r∈C.
[0084] The logistic regression classification algorithm is as follows:
[0085] It is mainly used for binary classification. It uses the Logistic function (i.e. Sigmoid function) to map the predicted value to the (0.1) interval, and judges whether the feature parameter sample to be tested belongs to a certain category based on the probability value. The LR algorithm model is as follows:
[0086]
[0087] Where ω and b are model parameters, x is the characteristic vector of the characteristic parameter sample to be tested, ω T represents the transpose of the vector ω, if ω T If x+b>0, then x belongs to class 1, otherwise x belongs to class 0. Since P(y=0|x)+P(y=1|x)=1, let z=ω T x+b, then the LR algorithm model formula can be rewritten as:
[0088]
[0089] Further expressing P(y=1|x) as a function of z is:
[0090]
[0091] The function σ(z) is called the Logistic or Sigmoid function. If the model parameters ω and b are known, the above formula can be used to estimate the posterior probability of the feature parameter sample x to be tested and determine its category label.
[0092] The multi-layer perceptron classification algorithm is as follows:
[0093] Multilayer perceptron is a basic artificial neural network model, including input layer, hidden layer and output layer. Assume that the input space (feature space) is That is, n-dimensional vector space, the output space is Y = {+1, -1}, +1 represents a positive example, -1 represents a negative example. Given x is the feature parameter sample to be tested, corresponding to the feature space R n For a point x∈X, x=(x1,x2,…,x n ), y∈Y represents the category to which the sample belongs, then the perceptron function model is:
[0094] f(x)=sign(ω×x+b)
[0095] Among them, the vector ω=(ω1,ω2,…,ω n ) represents the input space R n Each component x i The weight of , b is called the function deviation, ω×x represents the inner product of vector ω and x, and sign is the sign function, that is:
[0096]
[0097] According to the perceptron function model formula and the sign function formula, when the feature vector of the feature parameter sample x to be tested is input, its category can be determined according to the output value y (+1 is the 1st category, -1 is the 0th category).
[0098] In one embodiment, the dual-objective evaluation function U is constructed by comprehensively considering the two objectives of maximizing mechanical drilling speed and minimizing mechanical specific energy. Assume that s is objective 1 (minimizing mechanical specific energy) and m is objective 2 (maximizing mechanical drilling speed), λ i is the weighting factor A single-objective optimization weighted evaluation function U(x) is constructed. When U(x) satisfies the minimum requirement, the mechanical drilling speed and mechanical specific energy are the best combination. The dual-objective evaluation function formula U(x) is defined as follows:
[0099]
[0100] Among them, U(x) represents the dual-objective evaluation function. When i≤s, λ i Represents the weighting factor of the minimum mechanical specific energy target. When i≥s+1, λ irepresents the weighting factor of the maximum target of mechanical drilling speed. When i≤s, f i (x) represents the minimum objective function of mechanical specific energy. When i≥s+1, f i (x) represents the objective function of minimizing mechanical specific energy.
[0101] Figure 6 is a schematic diagram of the construction principle of the dual-objective evaluation function in an embodiment of the present invention, such as Figure 6 As shown in the figure, based on the statistical principle of multi-objective optimization, if the expectations of the two sub-objective functions f1(x) and f2(x) are max[f1(x)] and min[f2(x)] respectively, where f1(x) represents the mechanical drilling rate ROP and f2(x) represents the mechanical specific energy MSE, the maximum / minimum value of ROP and the maximum / minimum value of MSE constitute the feasible domain D f , point P is the intersection of ROP(min) and MSE(max), point Q is the intersection of ROP(max) and MSE(min), and the cross-domain D f The slope of any straight line OC passing through the origin O is:
[0102]
[0103] when When , the straight line OC moves to the position of OA, and the function value tanα1 corresponding to point Q is the optimal solution. By presetting the optimization rate, a set of solutions that meet the conditions can be obtained.
[0104] Combined with the mechanical specific energy theory, it is assumed that the weight of bit pressure (WOB) is ω1, the weight of speed (RPM) is ω2, and the weight of torque (TOR) is ω3 in the evaluation of speed-up effect. b ) weight is ω4, and the evaluation function with the goal of maximizing ROP and minimizing MSE is as follows:
[0105]
[0106] Simplified:
[0107]
[0108] In one embodiment, the importance of feature parameters of input data of a random forest regression model is used as a weight, including: in a random forest regression model, a random forest is composed of multiple unrelated decision trees, and when processing a regression problem, the final output result of the model is the mean of the outputs of each decision tree in the forest. Figure 7 Schematic diagram of the framework of the random forest regression model in the embodiment of the present invention, such as Figure 7 As shown, the implementation steps are as follows:
[0109] a. Select n samples from the sample set S as the training set by sampling with replacement;
[0110] b. Generate a decision tree based on the sampled samples, randomly and non-repeatedly select d features to generate each node in the tree, use these d features to divide the sample set respectively, and find the best division feature (the discriminant method is Gini coefficient, gain rate or information gain);
[0111] c. Repeat steps a and b for k times, where k is the number of decision trees in the random forest.
[0112] d. Use the trained model to predict the test samples and use the mean method to determine the prediction results.
[0113] In the formula In the random forest regression model, the weight of each feature parameter is determined according to the feature importance. The core idea is to calculate the contribution value of each feature on each decision tree in the forest, then take the average value of all trees, and finally compare the contribution values of each feature. The contribution value is usually measured using the Gini index or the out-of-bag data error rate as an evaluation indicator. The present invention calculates the contribution value based on the out-of-bag data error rate (out-of-bag data: training samples that did not participate in the generation of the i-th tree). The specific calculation method is:
[0114] a. For a tree T in the forest i , using out-of-bag data samples, we can get the error e1;
[0115] b. Randomly change the jth column in the out-of-bag data sample, keep other columns unchanged, and randomly permute the jth column up and down to obtain the error e2;
[0116] c. Use e1-e2 to characterize the importance of feature j. The basis is: if feature j is very important, then its change will have a great impact on the test error. If the test error changes very little, it means that feature j is not important.
[0117] In one embodiment, a schematic diagram of the result of applying the method in the adjacent wells in the same area as the well area where the training set used for modeling is located is shown in the following specific process:
[0118] The selected K nearest neighbor model was verified and applied in the neighboring wells (defined as well number X) in the same area as the modeling well. The original data had a total of 540,528 data items and 55 columns of feature items. After cleaning the null values, abnormal values, and redundant items, 66,449 data items and 5 columns of feature items were retained, which were divided into four formations: T2k1, T1b3, T1b2, and T1b1.
[0119] The training data set and validation data set are divided according to the stratum according to the ratio (7:3), among which the T2k1 stratum has a total of 723 data samples (506 in the training set and 217 in the validation set), the T1b3 stratum has a total of 3180 data samples (2226 in the training set and 954 in the validation set), the T1b2 stratum has a total of 715 data samples (501 in the training set and 214 in the validation set), and the T1b1 stratum has a total of 61831 data samples (43282 in the training set and 18549 in the validation set);
[0120] The selected K nearest neighbor model was applied to Well X. The prediction accuracy rates in the four formations T2k1, T1b3, T1b2, and T1b1 were 0.94, 0.94, 0.92, and 0.96, respectively, and the AUC values were 0.98, 0.97, 0.96, and 0.98, respectively. The model performed well and achieved the expected application goal.
[0121] The mean values of mechanical rate of penetration (ROP) and mechanical specific energy (MSE) of each formation before and after optimization were compared and analyzed visually based on the dual-objective evaluation function. Figure 8 FIG. 1 is a schematic diagram showing the comparison of mechanical drilling speed and mechanical specific energy before and after drilling parameter optimization in an embodiment of the present invention. Figure 8 As shown, it can be seen that after optimization, the ROP mean of the T2k1 formation increased by 25.1% year-on-year, and the MSE mean decreased by 62.7% year-on-year, the ROP mean of the T1b3 formation increased by 12.3% year-on-year, and the MSE mean decreased by 22.2% year-on-year, the ROP mean of the T1b2 formation increased by 3.3% year-on-year, and the MSE mean decreased by 22.3% year-on-year, and the ROP mean of the T1b1 formation increased by 33.8% year-on-year, and the MSE mean decreased by 47.6% year-on-year, meeting the dual goals of maximizing mechanical drilling speed and minimizing mechanical specific energy. Compared with the traditional single-objective optimization method, the optimization of speed-up drilling parameters according to the method of the present invention best meets the multi-objective requirements of complex drilling projects.
[0122] The drilling parameter optimization method provided by the embodiment of the present invention includes three parts: data cleaning and feature selection, speed-up prediction model optimization and drilling parameter optimization. First, the historical drilling data is cleaned and processed, and the characteristic variables are screened out according to the correlation analysis between each drilling parameter and the mechanical drilling speed; then, four classification prediction models such as K nearest neighbor, multi-layer perceptron, naive Bayes, and logistic regression are established based on the mechanical rock breaking drilling parameters, and the best performing speed-up prediction model is optimized according to the formation; finally, a weighted speed-up evaluation function is constructed by combining the mechanical specific energy theory, multi-objective optimization principle and the feature importance of the random forest regression model, and the parameter value range that can achieve the speed-up effect is optimized. The present invention applies the machine learning algorithm to drilling parameter tuning, which can quickly analyze the correlation between drilling parameters and mechanical drilling speed, predict and optimize the drilling parameters that can achieve the speed-up effect, make up for the shortcomings of complex solution, poor accuracy, and low adaptability in the traditional modeling process, accelerate the research of intelligent drilling technology, and improve the level of cost reduction and efficiency improvement in exploration and development.
[0123] The present invention also provides a drilling parameter optimization device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to that of the drilling parameter optimization method, the implementation of the device can refer to the implementation of the drilling parameter optimization method, and the repeated parts will not be repeated.
[0124] Fig. 9 Schematic diagram of a drilling parameter optimization device according to an embodiment of the present invention. Fig. 9 As shown, the device comprises:
[0125] Data screening module 01 is used to screen multiple data sets from historical logging data and well history data as sample data to construct training sets and verification sets;
[0126] The prediction model acquisition module 02 is used to use the average drilling speed of historical drilling as the speed-up threshold, and the speed-up threshold as the classification label, and train the machine learning model according to the classification label and the training set to obtain multiple classification prediction models established for each formation;
[0127] The prediction accuracy acquisition module 03 is used to use multiple classification prediction models to traverse the data groups in the verification set respectively, predict whether the drilling speed can be increased during drilling based on the data groups, and obtain the prediction accuracy of each classification prediction model;
[0128] The prediction model selection module 04 is used to select a first classification prediction model from each classification prediction model according to the prediction accuracy of each classification prediction model and a preset performance evaluation index;
[0129] The regression model building module 05 is used to obtain a data set that can achieve a drilling speed increase during drilling based on the first classification prediction model, establish a data set, use the data set as input data, and the drilling speed as an output variable to establish a random forest regression model;
[0130] Evaluation function construction module 06 is used to construct a dual-objective evaluation function according to the mechanical specific energy formula and the multi-objective optimization algorithm, taking the importance of characteristic parameters of the input data of the random forest regression model as weights; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque;
[0131] The parameter value determination module 07 is used to determine the value range of each characteristic parameter according to the dual-objective evaluation function and the preset optimization rate.
[0132] In one embodiment, the data screening module 01 is specifically used for:
[0133] Perform data cleaning and feature selection on historical logging data and well history data, screen out multiple data groups, and perform mutual information correlation analysis and formation matching on multiple data groups;
[0134] Among them, data cleaning includes: detecting and deleting null values, eliminating abnormal data, compensating for missing values, one or any combination thereof;
[0135] Feature selection includes: screening out data groups whose characteristic parameters such as drilling pressure, rotation speed and torque are all greater than 0;
[0136] The mutual information correlation analysis includes: establishing a visual heat map of each characteristic parameter and the drilling speed according to the correlation between the characteristic parameters in the data group and the drilling speed, and retaining the characteristic parameters that affect the drilling speed according to the visual heat map;
[0137] Stratum matching includes: matching the stratum where the data set is located according to the characteristic parameters in the data set.
[0138] In one embodiment, the evaluation function construction module 06 is specifically used for:
[0139] The dual-objective evaluation function is calculated by the following formula:
[0140]
[0141] Among them, U(x) represents the dual-objective evaluation function. When i≤s, λ i Represents the weighting factor of the minimum mechanical specific energy target. When i≥s+1, λ i represents the weighting factor of the maximum target of mechanical drilling speed. When i≤s, f i (x) represents the minimum objective function of mechanical specific energy. When i≥s+1, f i(x) represents the objective function of minimizing mechanical specific energy.
[0142] In one embodiment, the multiple classification prediction models include: a K-nearest neighbor model, a multi-layer perceptron model, a naive Bayes model, and a logistic regression model.
[0143] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned drilling parameter optimization method when executing the computer program.
[0144] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned drilling parameter optimization method is implemented.
[0145] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned drilling parameter optimization method is implemented.
[0146] In the embodiment of the present invention, the drilling parameter optimization scheme is compared with the traditional modeling process in the prior art, which is mostly based on experience and logical reasoning, has the shortcomings of complex solution, poor accuracy, low adaptability, etc., and the current "data island" problem is serious, it is difficult to ensure the integrity and consistency of historical data, and it is impossible to further build a high-quality model for a specific scenario, and thus it is impossible to further optimize the drilling parameter value range for speeding up the drilling speed. By selecting multiple data groups from historical logging data and well history data as sample data, a training set and a verification set are constructed; the historical drilling speed average is used as the speed-up threshold, and the speed-up threshold is used as the classification label. According to the classification label and the training set, the machine learning model is trained to obtain a plurality of classification prediction models established for each formation; using a plurality of classification prediction models, the data groups in the verification set are traversed respectively to predict According to the data group, whether the drilling speed can be increased during drilling is obtained, and the prediction accuracy of each classification prediction model is obtained; according to the prediction accuracy of each classification prediction model and the preset performance evaluation index, the first classification prediction model is selected from the classification prediction models; based on the first classification prediction model, the data group that can achieve the drilling speed increase during drilling is obtained, and a data set is established, and the data set is used as input data and the drilling speed is used as the output variable to establish a random forest regression model; according to the mechanical specific energy formula and the multi-objective optimization algorithm, the importance of the characteristic parameters of the input data of the random forest regression model is used as the weight to construct a dual-objective evaluation function; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque; according to the dual-objective evaluation function and the preset optimization rate, the value range of each characteristic parameter is determined, so as to optimize the drilling parameter value range that can achieve the drilling speed increase.
[0147] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0151] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A drilling parameter optimization method, characterized in that: include: Select multiple data sets from historical logging data and well history information as sample data to construct training sets and validation sets; The average drilling speed of historical wells is used as the speed-up threshold, and the speed-up threshold is used as the classification label. The machine learning model is trained according to the classification label and the training set to obtain a variety of classification prediction models established for each formation. Using multiple classification prediction models, traverse the data groups in the validation set respectively, predict whether the drilling speed can be increased during drilling based on the data groups, and obtain the prediction accuracy of each classification prediction model; Selecting a first classification prediction model from each classification prediction model according to the prediction accuracy of each classification prediction model and a preset performance evaluation index; Based on the first classification prediction model, a data set that can achieve a drilling speed increase during drilling is obtained, a data set is established, and a random forest regression model is established using the data set as input data and the drilling speed as an output variable; According to the mechanical specific energy formula and multi-objective optimization algorithm, a dual-objective evaluation function is constructed with the importance of characteristic parameters of the input data of the random forest regression model as weights; the characteristic parameters include well depth, drilling pressure, rotation speed and torque; According to the dual-objective evaluation function and the preset optimization rate, the value range of each characteristic parameter is determined; The dual-objective evaluation function is calculated by the following formula: Among them, U(x) represents the dual-objective evaluation function. When i≤s, λ i Represents the weighting factor of the minimum mechanical specific energy target. When i≥s+1, λ i represents the weighting factor of the maximum target of mechanical drilling speed. When i≤s, f i (x) represents the minimum objective function of mechanical specific energy. When i≥s+1, f i (x) represents the minimum objective function of mechanical specific energy, and x is the characteristic vector of the characteristic parameter sample to be measured.
2. The method according to claim 1, characterized in that Multiple data sets are selected from historical logging data and well history data as sample data to construct training sets and validation sets, including: Perform data cleaning and feature selection on historical logging data and well history data, screen out multiple data groups, and perform mutual information correlation analysis and formation matching on multiple data groups; Among them, data cleaning includes: detecting and deleting null values, eliminating abnormal data, compensating for missing values, one or any combination thereof; Feature selection includes: screening out data groups in which characteristic parameters such as drilling pressure, rotation speed, and torque are all greater than 0; The mutual information correlation analysis includes: establishing a visual heat map of each characteristic parameter and the drilling speed according to the correlation between the characteristic parameters in the data group and the drilling speed, and retaining the characteristic parameters that affect the drilling speed according to the visual heat map; Stratum matching includes: matching the stratum where the data set is located according to the characteristic parameters in the data set.
3. The method according to claim 1, characterized in that Various classification prediction models include: K nearest neighbor model, multi-layer perceptron model, naive Bayes model and logistic regression model.
4. A drilling parameter optimization device, characterized in that: include: The data screening module is used to screen multiple data sets from historical logging data and well history data as sample data to construct training sets and validation sets; The prediction model acquisition module is used to use the average drilling speed of historical drilling as the speed-up threshold, and the speed-up threshold as the classification label. According to the classification label and the training set, the machine learning model is trained to obtain a variety of classification prediction models established for each formation. The prediction accuracy acquisition module is used to use multiple classification prediction models to traverse the data groups in the verification set respectively, predict whether the drilling speed can be increased during drilling based on the data groups, and obtain the prediction accuracy of each classification prediction model; A prediction model selection module is used to select a first classification prediction model from each classification prediction model according to the prediction accuracy of each classification prediction model and a preset performance evaluation index; A regression model building module is used to obtain a data set that can achieve a drilling speed increase during drilling based on the first classification prediction model, establish a data set, use the data set as input data, and the drilling speed as an output variable to establish a random forest regression model; An evaluation function construction module is used to construct a dual-objective evaluation function based on the mechanical specific energy formula and the multi-objective optimization algorithm, taking the importance of characteristic parameters of the input data of the random forest regression model as weights; wherein the characteristic parameters include well depth, drilling pressure, rotation speed and torque; The parameter value determination module is used to determine the value range of each characteristic parameter according to the dual-objective evaluation function and the preset optimization rate; The evaluation function building module is specifically used to calculate the dual-objective evaluation function using the following formula: Among them, U(x) represents the dual-objective evaluation function. When i≤s, λ i Represents the weighting factor of the minimum mechanical specific energy target. When i≥s+1, λ i represents the weighting factor of the maximum target of mechanical drilling speed. When i≤s, f i (x) represents the minimum objective function of mechanical specific energy. When i≥s+1, f i (x) represents the minimum objective function of mechanical specific energy, and x is the characteristic vector of the characteristic parameter sample to be measured.
5. The device according to claim 4, characterized in that The data filtering module is specifically used for: Perform data cleaning and feature selection on historical logging data and well history data, screen out multiple data groups, and perform mutual information correlation analysis and formation matching on multiple data groups; Among them, data cleaning includes: detecting and deleting null values, eliminating abnormal data, compensating for missing values, one or any combination thereof; Feature selection includes: screening out data groups in which characteristic parameters such as drilling pressure, rotation speed, and torque are all greater than 0; The mutual information correlation analysis includes: establishing a visual heat map of each characteristic parameter and the drilling speed according to the correlation between the characteristic parameters in the data group and the drilling speed, and retaining the characteristic parameters that affect the drilling speed according to the visual heat map; Stratum matching includes: matching the stratum where the data set is located according to the characteristic parameters in the data set.
6. The device according to claim 4, characterized in that Various classification prediction models include: K nearest neighbor model, multi-layer perceptron model, naive Bayes model and logistic regression model.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
9. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Cited By
PDC environment relative energy consumption while drilling calculation method and device
CN122654445A