Well drilling leakage position prediction method and device, computer equipment and storage medium

Through the Softmax linear regression function and neural network model, the problem of insufficient accuracy of drilling leakage position prediction in the existing technology is solved, and efficient and accurate prediction of drilling leakage position is achieved, which is suitable for a variety of leakage layers.

CN119227846APending Publication Date: 2024-12-31CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310777344.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing drilling leakage position prediction method has defects, and it is impossible to accurately judge multiple leakage layers and provide effective guidance for new drilling at different locations. The additional leakage layers cannot be judged based on pressure prediction methods. The prediction based on reservoir historical data does not accurately guide new drilling. significance.

Method used

The Softmax linear regression function is used to input the drilling sample data into the neural network, and a softmax linear regression equation learning model is established. The leakage position is predicted by real-time drilling parameters, and the model is verified using the training set and the test set to ensure the authenticity and accuracy of the results.

Benefits of technology

It realizes accurate prediction of the drilling leakage position, improves the accuracy of the judgment of leakage layers, and is suitable for the diagnosis of leakage layers at different depths and sizes, effectively solving the problems of inaccurate judgment of leakage layers and repeated leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227846A_ABST
    Figure CN119227846A_ABST
Patent Text Reader

Abstract

The invention provides a well drilling leakage position prediction method and device, computer equipment and a storage medium. The method comprises the steps of obtaining well drilling sample data; inputting the drilling sample data as a feature vector into a neural network, estimating the probability of the leakage category to which each drilling sample data belongs by using the drilling sample data based on a Softmax linear regression function, and establishing a Softmax linear regression equation learning model; real-time drilling parameters are collected; and inputting the real-time drilling parameters into the softmax linear regression equation learning model, and outputting a predicted drilling leakage position. According to the method, well drilling sample data is used as a processing basis, the authenticity and accuracy of a result are ensured, it is ensured that a one-dimensional vector can be defined through multi-classification features by taking a Softmax linear regression function as a discrete probability distribution form in the data magnitude and data errors are reduced, and therefore the prediction result of the well drilling leakage position is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drilling leakage prediction, and in particular to a drilling leakage position prediction method, device, computer equipment and storage medium. Background Art

[0002] With the continuous deepening of drilling depth in oil and gas resource exploration and development, drilling encounters complex formations with broken, fractured and fractured holes, and the problem of drilling leakage becomes more and more serious. The occurrence of well leakage not only wastes a lot of manpower and material resources, but also leads to complex underground accidents such as blowout, stuck drill, and well wall instability in serious cases.

[0003] At present, it is difficult to predict the leakage layer of drilling, and there is little combination of artificial intelligence and traditional drilling direction. The traditional leakage layer judgment method relies on a lot of manual experience judgment, and it is difficult to guarantee the accuracy of multiple leakage layer judgment.

[0004] By combining on-site actual drilling data with computer algorithms, preventing well leakage has become a research direction in recent years. One method of predicting drilling well leakage layers based on artificial intelligence neural network learning is to use support vector machines to integrate a large amount of effective data that causes well leakage layers based on actual working conditions and statistical multi-parameter calculations, thereby building an effective early warning system for judging well leakage layers. KELESSISIS established a calculation method for induced fracture width changes based on rule reasoning, an inversion model for controlling leakage pressure and well leakage, and a power function relationship model for fracture width and leakage rate. Using data mining technology to perform deep extraction and machine learning on the traditional oil and gas industry to assist the high-quality development of the traditional energy industry is a new direction and new hotspot for the development of the oil industry. MOHAN's machine learning algorithm based on random forests and case reasoning predicts underground complexity, monitors alarms, and assists decision-making, deepening the application of artificial intelligence and traditional oil extraction. The linear regression method originates from the regression analysis in mathematical statistics and is one of the important methods used in machine learning and data mining. This method has high efficiency in data processing and small errors. It can verify data multiple times using inversion and is insensitive to data missing. This method has good application prospects for efficiently processing actual engineering data to judge and predict drilling leakage layers.

[0005] In summary, the existing leakage methods at home and abroad are mainly divided into two categories: pressure prediction and reservoir historical data prediction. Among them, the method based on pressure prediction cannot determine whether there are other leaky layers in addition to the leaky layer. The prediction based on reservoir historical data has no accurate guiding significance for new drilling at different locations. Therefore, the existing drilling leakage location prediction method has defects. Summary of the invention

[0006] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for predicting the location of drilling leakage in response to the above technical problems.

[0007] A method for predicting a drilling leakage position, comprising:

[0008] Obtain drilling sample data;

[0009] The drilling sample data is input into a neural network as a feature vector, and the probability of the loss category to which each drilling sample data belongs is estimated based on a Softmax linear regression function using the drilling sample data to establish a softmax linear regression equation learning model;

[0010] Collect real-time drilling parameters;

[0011] The real-time drilling parameters are input into the softmax linear regression equation learning model, and the predicted drilling leakage position is output.

[0012] In one embodiment,

[0013] The step of inputting the drilling sample data as a feature vector into a neural network, using the drilling sample data to estimate the probability of the loss category to which each drilling sample data belongs based on a Softmax linear regression function, and establishing a softmax linear regression equation learning model includes:

[0014] Determine a characteristic attribute from the drilling sample data, determine a value of the characteristic attribute as a characteristic input parameter of the softmax linear regression equation learning model, and determine an output category of the softmax linear regression equation learning model;

[0015] Dividing the drilling sample data into a training set and a test set;

[0016] Input the training set as a feature vector into a neural network, use the training set to estimate the probability of the leakage category to which each drilling sample data belongs based on a Softmax linear regression function, and establish the Softmax linear regression equation learning model;

[0017] The step of establishing the softmax linear regression equation learning model also includes:

[0018] The test set is input into the softmax linear regression equation learning model, and the test set is used to verify the predicted drilling leakage position output by the softmax linear regression equation learning model.

[0019] In one embodiment, the step of estimating the probability of the leakage category to which each drilling sample data belongs based on the Softmax linear regression function using the training set and establishing the softmax linear regression equation learning model includes:

[0020] The training set is used to estimate the probability of the missing category to which each drilling sample data belongs based on the Softmax linear regression function, and the probability of the missing category is calculated using the cross entropy CE to establish the softmax linear regression equation learning model.

[0021] In one embodiment, dividing the drilling sample data into a training set and a test set comprises:

[0022] The drilling sample data is divided into a training set and a test set by random stratified sampling.

[0023] In one embodiment, the step of inputting the drilling sample data as a feature vector into a neural network, using the drilling sample data to estimate the probability of the loss category to which each drilling sample data belongs based on a Softmax linear regression function, and establishing a softmax linear regression equation learning model includes:

[0024] Inputting the drilling sample data into a neural network as a feature vector;

[0025] Selecting k nearest values ​​from the same type of drilling sample data and all non-same type of drilling sample data respectively;

[0026] Calculating the weight of each of the feature vectors based on k nearest values;

[0027] Check whether the preset number of iterations has been reached;

[0028] When the preset number of iterations is not reached, returning to the step of dividing the drilling sample data into a training set and a test set by adopting a random stratified sampling method;

[0029] When the preset number of iterations is reached, the preferred feature subset is output.

[0030] In one embodiment, obtaining drilling sample data includes:

[0031] Acquiring the drilling sample data;

[0032] Preprocessing the drilling sample data;

[0033] Screening the pre-processed drilling sample data based on the risk level of the well leakage parameter to obtain the screened drilling sample data;

[0034] A preset division ratio is obtained, and the screened drilling sample data is divided into a training set and a test set according to the preset division ratio.

[0035] In one embodiment, the preprocessing of the drilling sample data includes:

[0036] The drilling sample data is cleaned and integrated.

[0037] A drilling leakage position prediction device, comprising:

[0038] A sample data acquisition module is used to acquire drilling sample data;

[0039] A training module, used to input the drilling sample data as a feature vector into a neural network, use the drilling sample data to estimate the probability of the leakage category to which each drilling sample data belongs based on a Softmax linear regression function, and perform learning training accordingly to establish a softmax linear regression equation learning model;

[0040] Parameter collection module, used to collect real-time drilling parameters;

[0041] The prediction module is used to input the real-time drilling parameters into the softmax linear regression equation learning model and output the predicted drilling leakage position.

[0042] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method for predicting a drilling leakage position in any of the above-mentioned embodiments when executing the computer program.

[0043] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for predicting a drilling leakage position in any of the above embodiments.

[0044] The above-mentioned drilling loss position prediction method, device, computer equipment and storage medium use drilling sample data as the processing basis, which ensures the authenticity and accuracy of the results and the data magnitude. The Softmax linear regression function as a discrete probability distribution form can define multi-classification features for one-dimensional vectors, reduce data errors, and thus make the prediction results of drilling loss positions more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a flow chart of a method for predicting a well leakage position in one embodiment;

[0046] Figure 2 A structural block diagram of a device for predicting a well leakage position in an embodiment;

[0047] Figure 3 is an internal structure diagram of a computer device in one embodiment;

[0048] Figure 4 A schematic diagram of a process flow of preprocessing drilling data in one embodiment;

[0049] Figure 5 The figure is a schematic diagram of a prediction process based on a linear regression algorithm in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] Embodiment 1

[0052] In this embodiment, Figure 1 As shown, a method for predicting the location of a well leakage is provided, which comprises:

[0053] Step 110, obtaining drilling sample data.

[0054] In this embodiment, the categories of drilling sample data include drilling pressure, rotary table speed, displacement, pump pressure, drilling fluid density, drilling fluid plastic viscosity, solid content, drilling fluid initial shear force and final shear force.

[0055] Step 120: input the drilling sample data as feature vectors into a neural network, use the drilling sample data to estimate the probability of the loss category to which each drilling sample data belongs based on a Softmax linear regression function, and establish a softmax linear regression equation learning model.

[0056] In this embodiment, the drilling sample data includes nine characteristic attributes, including drilling pressure, rotary table speed, displacement, pump pressure, drilling fluid density, drilling fluid plastic viscosity, solid content, drilling fluid initial shear force and final shear force, and the output category space Y includes two output categories, namely, no leakage and leakage.

[0057] The value of each drilling sample data based on the characteristic attribute is recorded as xi, the drilling pressure is recorded as x1, the rotary table speed is x2, the displacement is x3, the pump pressure is x4, the drilling fluid density is recorded as x5, the plastic viscosity is recorded as x6, the solid phase content is recorded as x7, the initial shear force is recorded as x8, and the final shear force is recorded as x9. The determined characteristic attribute values ​​are recorded as vector X=(x1, x2, x3, x4, x5, x6, x7, x8, x9); a neural network with one hidden layer is constructed, the hidden layer size is n×k, and the input layer is (n×x) features. For n input data {(x1, y1), (x2, y2), ..., (xm, ym)}, xn is the input vector, yn is the corresponding category vector, the output layer has 2 categories, corresponding to a node (n_y), and the results are divided into 0 (the first category has no loss) and the second category 1 (there is loss). For all probability outcomes y, there are P possible outcomes, that is, yi belongs to {1, 2, …, P}.

[0058] The Softmax linear regression function mainly estimates the probability that the input data belongs to each category. For any input vector, its prediction function can be expressed as: kθ(x)=P(y n =j|x,θ)=1 / (1+e-θTx), where K is the sum of the probability occurrences, P is the distribution of the probability of loss under a certain condition, y is the output, and x is the input parameter.

[0059] In this embodiment, supervised learning training is performed using each drilling sample data to establish a softmax linear regression equation learning model. In this way, the softmax linear regression equation learning model obtained by learning the drilling sample data can estimate the probability of the leakage category to which each drilling sample data belongs, and the leakage category includes the first category: no leakage and the second category: leakage exists; and the probability and location of drilling leakage can be predicted.

[0060] Step 130, collecting real-time drilling parameters.

[0061] Step 140, input the real-time drilling parameters into the softmax linear regression equation learning model, and output the predicted drilling leakage position.

[0062] In the above embodiment, the drilling sample data is used as the processing basis to ensure the authenticity and accuracy of the results and the data magnitude. The Softmax linear regression function can define the multi-classification features for the one-dimensional vector as a discrete probability distribution form to reduce data errors. This method has the advantages of fast speed, accurate results, simple operation, and a wide range of applications. It is suitable for diagnosing the location of leaking layers of different depths and sizes, and can effectively solve the problems of inaccurate leaking layer judgment and repeated leakage. The data judgment interval is fitted between (0, 1), and the leaking layer judgment accuracy is >90%.

[0063] In one embodiment, the drilling sample data is input into a neural network as a feature vector, and the probability of each loss category to which the drilling sample data belongs is estimated based on a Softmax linear regression function using the drilling sample data, and the step of establishing a softmax linear regression equation learning model includes: determining feature attributes from the drilling sample data, determining the value of the feature attribute as a feature input parameter of the softmax linear regression equation learning model, and determining the output category of the softmax linear regression equation learning model; dividing the drilling sample data into a training set and a test set; inputting the training set into a neural network as a feature vector, and estimating the probability of each loss category to which the drilling sample data belongs based on a Softmax linear regression function using the training set, and establishing the softmax linear regression equation learning model; after the step of establishing the softmax linear regression equation learning model, the step also includes: inputting the test set into the softmax linear regression equation learning model, and using the test set to verify the predicted drilling loss position output by the softmax linear regression equation learning model.

[0064] In this embodiment, supervised learning training is performed using a training set to establish a softmax linear regression equation learning model, and a test set is used to verify the accuracy of the predicted drilling leakage location output by the softmax linear regression equation learning model, thereby effectively improving the precision and accuracy of the softmax linear regression equation learning model.

[0065] In one embodiment, dividing the drilling sample data into a training set and a test set includes: dividing the drilling sample data into a training set and a test set by adopting a random stratified sampling method.

[0066] It is worth mentioning that, in order to avoid the additional error caused by data division affecting the accuracy of the final classification result, the data should be divided to maintain the consistency of data distribution. At the same time, in order to ensure the representativeness of the data, in this embodiment, the data is divided by random stratified sampling, the drilling sample data is divided into a training set and a test set, and the pre-processed drilling loss parameter data is randomly stratified sampled. In this way, the training set can be used for training and learning, and the test set can be used to verify the accuracy of the model output results.

[0067] In one embodiment, the step of using the training set to estimate the probability of the missing category to which each drilling sample data belongs based on the Softmax linear regression function and establishing the softmax linear regression equation learning model includes: using the training set to estimate the probability of the missing category to which each drilling sample data belongs based on the Softmax linear regression function, and using cross entropy CE to calculate the probability of the missing category to establish the softmax linear regression equation learning model.

[0068] In one embodiment, the drilling sample data is input into a neural network as a feature vector, and the probability of the loss category to which each drilling sample data belongs is estimated based on the Softmax linear regression function using the drilling sample data, and the step of establishing a softmax linear regression equation learning model includes: inputting the training set into the neural network as a feature vector; selecting k nearest values ​​from the same type of drilling sample data and all non-similar drilling sample data in the training set; calculating the weight of each feature vector based on the k nearest values; detecting whether a preset number of iterations has been reached; when the preset number of iterations has not been reached, returning to the step of dividing the drilling sample data into a training set and a test set by random stratified sampling; when the preset number of iterations has been reached, outputting a preferred feature subset.

[0069] In this embodiment, supervised learning training is performed using the training set to establish a softmax linear regression equation learning model. Wherein, P represents the probability of calculation, θ = {θ1, θ2, ...θk} is a weight vector of n×k. Since the interaction between the various drilling parameters will affect the well leakage, in order to eliminate the error of the algorithm model, the values ​​in different ranges are mapped to an interval of (0,1) through the derivative value of the hyperbolic tangent function tanh to prevent the activation function from propagating too much and reduce the problem of gradient disappearance during the back propagation of the model.

[0070] Set n×k parameter weights and bias matrices. Take one of the nodes P1 (y1 = 1|x, θ = 1) as an example to set the parameter weights of w1+b1. There are a total of P (yn = j|x, θ = n), that is, w n +b n . Set up the back propagation model, calculate the derivative of the cross entropy loss CE function, eliminate the error of negative results and improve the accuracy of the model. Update the parameters of wn+bn, use the softmax function to activate the hidden layer of the updated parameters, and pre-store the output non-negative results. The non-negative results represent the corresponding conditional probabilities. This feature combination method can weaken the algorithm's feature conditional independence assumption to a certain extent, and avoid the strong dependency between features, which will increase the computational complexity of the learning model and the occurrence of overfitting.

[0071] The Softmax loss function is based on the logarithmic cross entropy CE theory, which can be expressed as:

[0072]

[0073] Where is a normalization parameter to ensure that the sum of the sample data probabilities can be 1, thereby improving the generalization performance of the missing mechanism classification simulation based on the softmax linear regression algorithm;

[0074] Perform gradient descent loop calculation on the initialization parameter (n_x) and an output result (n_y), repeat the forward and backward propagation steps again, update the parameters and perform iterative calculations, and when the preset number of iterations is reached, output the feature preferred subset. If the preset number of iterations is not reached, return to the step of dividing the drilling sample data into a training set and a test set by random stratified sampling, so as to achieve the purpose of calibrating the model accuracy.

[0075] In one embodiment, the obtaining of drilling sample data includes: obtaining the drilling sample data; preprocessing the drilling sample data; screening each of the preprocessed drilling sample data based on the well leakage parameter risk level to obtain the screened drilling sample data; obtaining a preset division ratio, and dividing the screened drilling sample data into a training set and a test set according to the preset division ratio.

[0076] In this embodiment, the drilling sample data are screened according to the well leakage parameter risk level of each drilling sample data, and the drilling sample data with a higher well leakage risk level is screened out. In this way, the validity of the data can be effectively improved, and the prediction result of the well leakage is more accurate. Subsequently, feature selection is performed on each drilling sample data, and the screened drilling sample data is divided into a training set and a test set according to a preset division ratio.

[0077] In one embodiment, the preprocessing of the drilling sample data includes: cleaning and integrating the drilling sample data.

[0078] In this embodiment, the preprocessing of the drilling sample data includes cleaning and integration, so that the preprocessed drilling sample data forms structured data that can be used for machine learning. In this embodiment, cleaning the data refers to screening and filtering the data.

[0079] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0080] Embodiment 2

[0081] 1) Figure 4 FIG. 1 is a block diagram of on-site drilling data preprocessing in one embodiment, as shown in FIG. Figure 4 As shown, in the implementation scheme of this specification, the data that can be used for drilling loss layer diagnosis prediction will be backed up and stored in the database. Before using the softmax linear regression algorithm to establish a classification model to mine and deeply learn the actual drilling data, the data needs to be preprocessed;

[0082] In the implementation scheme of this specification, the above data preprocessing includes:

[0083] 1-1) Extract the actual drilling data, select the drilling pressure, rotary table speed, displacement, pump pressure, drilling fluid density, drilling fluid plastic viscosity, drilling fluid initial cutting force and final cutting force, etc. for conversion and integration, and process them into structured data for machine learning;

[0084] 1-2) The algorithm is used to apply the coding mechanism to the coding of the optimization target parameter group, using binary numbers and other methods to encode. The algorithm continuously selects, crosses, and mutates the data, evaluates the fitness of the parameter group, eliminates the parameter group with low fitness, and passes the high-quality data group to the next generation for continued iterative analysis.

[0085] 1-3) The study uses floating point encoding to encode the parameters in softmax linear regression. Each parameter

[0086] Represented by a floating point number, each parameter group consists of all the parameters in the regression model. The parameter group is the basic unit of genetic algorithm iteration, and a parameter group represents a softmax linear regression model with specific parameters.

[0087] 1-4) In the implementation scheme of this description, the drilling loss probability prediction model based on the drilling loss parameter using the softmax linear regression function algorithm is a supervised learning process. In order to avoid the additional error caused by data division and affect the accuracy of the final classification result, the data should be divided to maintain the consistency of data distribution. At the same time, in order to ensure the representativeness of the data, the data is divided into a training set and a test set by random stratified sampling, and the above pre-processed drilling loss parameter data is randomly stratified sampled.

[0088] 2) Figure 5 It is a prediction flow chart based on linear regression algorithm, such as Figure 5 As shown, in a specific implementation case of the solution of the present invention, the drilling data parameters after data collection and preprocessing include 9 available feature attributes, including drilling pressure, rotary table speed, displacement, pump pressure, drilling fluid density, plastic viscosity, solid content, initial shear force, final shear force, and the output category space Y includes two output categories, namely, no leakage and leakage;

[0089] 1-2-2-1) Let the value of the characteristic attribute be xi, let the drilling pressure be x1, the rotary speed be x2, the displacement be x3, the pump pressure be x4, the drilling fluid density be x5, the plastic viscosity be x6, the solid content be x7, the initial shear force be x8, and the final shear force be x9, and let the determined characteristic attribute values ​​be recorded as vector X=(x1, x2, x3, x4, x5, x6, x7, x8, x9); construct a neural network with one hidden layer, the hidden layer size is n×k, the input layer is (n×x) features, for n input data {(x1, y1), (x2, y2), …, (xm, ym)}, where x n is the input vector, y n is the corresponding category vector, the output layer has 2 categories, corresponding to a node (n_y), and the results are divided into 0 (the first category has no loss) and the second category 1 (there is loss). For all probability results y, there are P possible results, that is, yi belongs to {1, 2, ..., P}.

[0090] 2-2) The Softmax linear regression function mainly estimates the probability that the input data belongs to each category. For any input vector, its prediction function can be expressed as: kθ(x) = P(y n =j|x,θ)=1 / (1+e-θTx), where K is the sum of the probability occurrences, P is the distribution of the loss probability under a certain condition, y is the output, and x is the input parameter.

[0091]

[0092] 3) Use the training set for supervised learning and establish a softmax linear regression equation learning model, where P represents the probability of the calculation occurring, θ = {θ1, θ2, ...θk}, which is an n×k weight vector.

[0093] 3-1) Since the interaction between various drilling parameters will affect well leakage, in order to eliminate the error of the algorithm model, the values ​​in different ranges are mapped to an interval of (0, 1) through the derivative value of the hyperbolic tangent function tanh to prevent the activation function from propagating too much and alleviate the problem of gradient disappearance during the back propagation process of the model.

[0094] 3-2) Set n×k parameter weights and bias matrices. Take one of the nodes P1 (y1=1|x, ​​θ=1) where (x1, y1) as an example to set w 1 +b 1 The parameter weights are P(yn=j|x,θ=n), that is, w n +b n . Set up the back propagation model and calculate the derivative of the cross entropy loss CE function to eliminate the error of generating negative results and improve the accuracy of the model. Update w n +b n The parameters of the model are activated and the hidden layer of the updated parameters is activated using the softmax function, and the non-negative output results are pre-stored. The non-negative results represent the corresponding conditional probabilities. This feature combination method can weaken the feature conditional independence assumption of the algorithm to a certain extent, and avoid the strong dependency between features, which will increase the computational complexity of the learning model and cause overfitting.

[0095] 3-3) The Softmax loss function is based on the logarithmic cross entropy CE theory, which can be expressed as:

[0096]

[0097] Where is a normalization parameter to ensure that the sum of the sample data probabilities can be 1, thereby improving the generalization performance of the missing mechanism classification simulation based on the softmax linear regression algorithm;

[0098] 3-4) Perform gradient descent loop calculation on the initialization parameters (n_x) and an output result (n_y), repeat the forward and backward propagation steps again, update the parameters and perform iterative calculations to calibrate the model accuracy.

[0099] 3-5) The classification prediction problem can be transformed into minimizing the prediction function parameter θ to obtain the probability that the current sample belongs to each category. J(θ) is the loss function of the linear regression equation, and its physical meaning is to make the proportion of correctly classified samples large enough. However, this function assumes that there is no difference between the categories in the correct classification when the sample data is balanced.

[0100] In this embodiment, the actual drilling parameters are input into the drilling loss probability prediction classifier, and the corresponding well leakage prediction results and the single-point leakage probability can be obtained through the results of the neural network cross entropy operation, thereby guiding the special plugging construction decision during the drilling process.

[0101] This application belongs to the field of drilling loss position prediction and artificial intelligence machine learning, and specifically relates to a drilling loss position prediction method based on a linear regression function algorithm. In this application, preprocessing is performed according to the actual drilling parameters of a certain well, a sample group and a test group are created, the key characteristic parameters of the input layer are determined from the sample data, and a program is written using Python software using a softmax regression equation function model, and real-time drilling parameter data is input into the model to predict the location of drilling loss.

[0102] Embodiment 3

[0103] In this embodiment, Figure 2 As shown, a drilling leakage position prediction device is provided, comprising:

[0104] The sample data acquisition module 210 is used to acquire drilling sample data;

[0105] The training module 220 is used to input the drilling sample data as a feature vector into the neural network, use the drilling sample data to estimate the probability of the loss category to which each drilling sample data belongs based on the Softmax linear regression function, and perform learning training accordingly to establish a softmax linear regression equation learning model;

[0106] Parameter collection module 230, used to collect real-time drilling parameters;

[0107] The prediction module 240 is used to input the real-time drilling parameters into the softmax linear regression equation learning model and output the predicted drilling leakage position.

[0108] In one embodiment, the drilling leakage position prediction device further includes:

[0109] A partitioning module, used for partitioning the drilling sample data into a training set and a test set;

[0110] The training module is also used to input the training set as a feature vector into the neural network, use the training set to estimate the probability of the leakage category to which each drilling sample data belongs based on the Softmax linear regression function, and establish the softmax linear regression equation learning model;

[0111] The drilling leakage position prediction device also includes a verification module, which is used to input the test set into the softmax linear regression equation learning model, and use the test set to verify the predicted drilling leakage position output by the softmax linear regression equation learning model.

[0112] In one embodiment, the partitioning module is further used to partition the drilling sample data into a training set and a test set by adopting a random stratified sampling method.

[0113] In one embodiment, the training module includes:

[0114] A feature input unit, used for inputting the drilling sample data as a feature vector into a neural network;

[0115] A K value selection unit, used for selecting k nearest values ​​from the same type of drilling sample data and all non-same type of drilling sample data;

[0116] A weight calculation unit, used for calculating the weight of each of the feature vectors based on k nearest values;

[0117] An iteration detection unit, used to detect whether a preset number of iterations has been reached;

[0118] A returning unit, configured to return to the step of dividing the drilling sample data into a training set and a test set by adopting a random stratified sampling method when the preset number of iterations is not reached;

[0119] The output subset unit is used to output the preferred feature subset when the preset number of iterations is reached.

[0120] In one embodiment, the sample data acquisition module includes:

[0121] A sample data acquisition unit, used to acquire the drilling sample data;

[0122] A preprocessing unit, used for preprocessing the drilling sample data;

[0123] A screening unit, used for screening the pre-processed drilling sample data based on the risk level of the well leakage parameter to obtain the screened drilling sample data;

[0124] The partitioning unit is used to obtain a preset partitioning ratio, and to partition the screened drilling sample data into a training set and a test set according to the preset partitioning ratio.

[0125] In one embodiment, the pre-processing unit is further used to clean and integrate the drilling sample data.

[0126] The specific definition of the drilling loss position prediction device can be found in the definition of the drilling loss position prediction method above, which will not be repeated here. Each unit in the above-mentioned drilling loss position prediction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned units can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned units.

[0127] Embodiment 4

[0128] In this embodiment, a computer device is provided. Its internal structure diagram can be shown as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program, and the non-volatile storage medium is deployed with a database, which is used to store drilling sample data and real-time drilling parameters. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with other computer devices deployed with application software. When the computer program is executed by the processor, a method for predicting the location of drilling leakage is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0129] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0130] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the method for predicting the location of a drilling loss in any of the above embodiments when executing the computer program.

[0131] Embodiment 5

[0132] In this embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for predicting the location of a drilling loss in any of the above embodiments are implemented.

[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0134] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0135] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for predicting the location of drilling leakage, characterized in that: include: Obtain drilling sample data; The drilling sample data is input into a neural network as a feature vector, and the probability of the loss category to which each drilling sample data belongs is estimated based on a Softmax linear regression function using the drilling sample data to establish a softmax linear regression equation learning model; Collect real-time drilling parameters; The real-time drilling parameters are input into the softmax linear regression equation learning model, and the predicted drilling leakage position is output.

2. The method according to claim 1, characterized in that The step of inputting the drilling sample data as a feature vector into a neural network, using the drilling sample data to estimate the probability of the loss category to which each drilling sample data belongs based on a Softmax linear regression function, and establishing a softmax linear regression equation learning model includes: Determine a characteristic attribute from the drilling sample data, determine a value of the characteristic attribute as a characteristic input parameter of the softmax linear regression equation learning model, and determine an output category of the softmax linear regression equation learning model; Dividing the drilling sample data into a training set and a test set; Input the training set as a feature vector into a neural network, use the training set to estimate the probability of the leakage category to which each drilling sample data belongs based on a Softmax linear regression function, and establish the Softmax linear regression equation learning model; The step of establishing the softmax linear regression equation learning model also includes: The test set is input into the softmax linear regression equation learning model, and the test set is used to verify the predicted drilling leakage position output by the softmax linear regression equation learning model.

3. The method according to claim 2, characterized in that The step of using the training set to estimate the probability of the leakage category to which each drilling sample data belongs based on the Softmax linear regression function and establishing the softmax linear regression equation learning model includes: The training set is used to estimate the probability of the missing category to which each drilling sample data belongs based on the Softmax linear regression function, and the probability of the missing category is calculated using the cross entropy CE to establish the softmax linear regression equation learning model.

4. The method according to claim 2, characterized in that: The dividing the drilling sample data into a training set and a test set comprises: The drilling sample data is divided into a training set and a test set by random stratified sampling.

5. The method according to claim 4, characterized in that The step of inputting the drilling sample data as a feature vector into a neural network, using the drilling sample data to estimate the probability of the loss category to which each drilling sample data belongs based on a Softmax linear regression function, and establishing a softmax linear regression equation learning model includes: Inputting the drilling sample data into a neural network as a feature vector; Selecting k nearest values ​​from the same type of drilling sample data and all non-same type of drilling sample data respectively; Calculating the weight of each of the feature vectors based on k nearest values; Check whether the preset number of iterations has been reached; When the preset number of iterations is not reached, returning to the step of dividing the drilling sample data into a training set and a test set by adopting a random stratified sampling method; When the preset number of iterations is reached, the preferred feature subset is output.

6. The method according to any one of claims 1 to 5, characterized in that: The obtaining of drilling sample data comprises: Acquiring the drilling sample data; Preprocessing the drilling sample data; Screening the pre-processed drilling sample data based on the risk level of the well leakage parameter to obtain the screened drilling sample data; A preset division ratio is obtained, and the screened drilling sample data is divided into a training set and a test set according to the preset division ratio.

7. The method according to claim 6, characterized in that The preprocessing of the drilling sample data comprises: The drilling sample data is cleaned and integrated.

8. A drilling leakage position prediction device, characterized in that: include: A sample data acquisition module is used to acquire drilling sample data; A training module, used to input the drilling sample data as a feature vector into a neural network, use the drilling sample data to estimate the probability of the leakage category to which each drilling sample data belongs based on a Softmax linear regression function, and perform learning training accordingly to establish a softmax linear regression equation learning model; Parameter collection module, used to collect real-time drilling parameters; The prediction module is used to input the real-time drilling parameters into the softmax linear regression equation learning model and output the predicted drilling leakage position.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.