Method and device for predicting overflow and leakage working conditions of drilling well
Technical Field
The invention relates to the field of petroleum and natural gas, in particular to a prediction method of dangerous working conditions in the field of drilling, and particularly relates to a prediction method and a prediction device of drilling overflow and loss working conditions.
Background
Along with the development of petroleum exploration and development towards deep complex strata, the safety problem of narrow-density window drilling becomes more obvious, the drilling risks, particularly overflow and lost circulation, are frequent, and the well control requirement is increased, so that the timely early warning of the risks such as overflow and lost circulation is very important. According to data statistics of hundreds of wells in the Sichuan area, the time from overflow discovery to blowout is very short, 67% of the time is within 30 minutes, and 50% of the time is within 10 minutes, so that once a drilling accident occurs, a large amount of time is spent for processing, the drilling period and the economic benefit are seriously influenced, the time for processing the drilling accident sometimes accounts for 15% of the total drilling time, a large amount of manpower, material resources and time are consumed in the process, and the occurrence of the serious accident can even threaten the personal safety of constructors. This has led to a high level of emphasis on the monitoring and prevention of drilling accidents since the advent of drilling projects. Whether the early-stage drilling accident happens or not can give a certain degree of early warning in a certain meaning, and the early-stage drilling early-stage early.
With the development of information network technology, many experts and scholars at home and abroad apply artificial intelligence technology to the petroleum drilling process, and adopt a computer to analyze actually measured data on a drilling site in real time, monitor the change of risk parameters in real time, and utilize an artificial intelligence analysis method to analyze and early warn risks in real time. It can be understood that the workload can be reduced by adopting an artificial intelligence method, errors caused by artificial subjective judgment are avoided to a great extent, and the early warning accuracy is improved.
The artificial intelligent early warning method mainly comprises a Bayes method, an artificial neural network method, an expert system, a fuzzy inference method and the like. Hargreaves (2001) uses Bayesian probability to monitor deep-sea well drilling overflow, and calculates the probability of overflow occurrence by analyzing acoustic data and using Bayesian model to obtain the probability of overflow occurrence. And Nybo (2008), establishing a BP neural network prediction model, and performing real-time early warning on the overflow condition by comparing a predicted value of outlet flow with an actual data value, but not performing real-time dynamic calculation on data. Moazzeni (2012) adopts a neural network to calculate drilling operation parameters and geological data and predict and calculate drilling well leakage. The Chua Hanjun (2014) adopts a neural network fusion technology to research the well leakage diagnosis. The simmons (2016) adopts a BP neural network to construct a real-time early warning model based on symptom parameters. Schyusheng (1999) proposed a real-time monitoring and fault detection method that combines an expert system with artificial intelligence, emphasizing the analysis of how to build an expert knowledge base. Korean morning glory (2008) studied the application of knowledge construction in the field of drilling accidents. Wujunjie (2006) proposes to adopt a fuzzy theory to carry out early warning on drilling engineering abnormity, and designs a related technical method and a thought route. Wangjie (2008) develops a drilling risk pre-glimpsing system based on hierarchical fuzzy reasoning aiming at the difficulties of multiple risk types, multiple measurement parameters, difficult determination of main judgment parameters and the like in the drilling process. Guoguang (2012) introduces ontology and bayesian network fusion methods to analyze drilling risk. Plum xylol (2015) adopts a kernel principal component analysis method to perform early warning on well leakage risks. Through research on overflow and other drilling risk early warning at home and abroad, on one hand, on the other hand, on-site overflow leakage monitoring needs to be manually analyzed by on-site engineers; on the other hand, experts and scholars at home and abroad are in an exploration stage when artificial intelligence is introduced into the research of drilling risk analysis, and have larger research space.
Therefore, how to find and early warn the overflow and leakage conditions is an urgent problem to be solved.
Disclosure of Invention
Aiming at the problems in the prior art, the invention can establish a method for discovering the working conditions of the overflow and leakage drilling in time.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides a method for predicting a drilling overflow and loss condition, comprising:
acquiring drilling data of a working condition to be predicted;
and predicting the drilling overflow and leakage working condition by using the drilling data of the working condition to be predicted and a pre-established depth belief network model.
In one embodiment, the method for predicting the drilling overflow and loss condition further comprises: and establishing a depth belief network model according to the drilling historical data.
In one embodiment, the method for predicting the drilling overflow and loss condition further comprises: and training the pre-established deep belief network model according to the drilling history data, the visible layer bias and the hidden layer bias of the deep belief network model and the connection weight of the visible layer bias and the hidden layer bias.
In one embodiment, before the building of the depth belief network model from the drilling history data, the method further comprises:
filtering the drilling history data;
normalizing the drilling history data;
outliers in the drilling history data are removed.
In one embodiment, the drilling data includes essential characteristic parameters and auxiliary characteristic parameters, wherein the essential characteristic parameters include: riser pressure, wellhead pressure, outlet flow and inlet flow; the assist feature parameters include: pump stroke, hook load, time of drilling, bottom hole annulus pressure, total hydrocarbons and C1 data;
the drilling history data comprises necessary characteristic parameters, auxiliary characteristic parameters and working condition data, wherein the working condition data comprises: overflow, loss and normal.
In one embodiment, training a pre-established deep belief network model based on drilling history data, visible layer bias, hidden layer bias, and connection weights of the visible layer bias and the hidden layer bias of the deep belief network model comprises:
setting an initial value of visible layer bias, an initial value of hidden layer bias and an initial value of connection weight as three random numbers smaller than a preset value;
inputting the drilling history data into a depth belief network model;
performing the following iterative operations until the prediction error of the deep belief network model is less than or equal to a preset error to obtain the deep belief network model:
training the deep belief network model to an n-1 layer from bottom to top layer by layer, and inputting a training result to an nth layer of the deep belief network model to obtain a training result of the nth layer; wherein n is the total number of training layers of the deep belief network model;
calculating a prediction error according to the training result of the nth layer and the drilling historical data;
and when the prediction error is larger than the preset error, optimizing the depth belief network model to the layer 1 from top to bottom layer by layer according to the prediction error.
In one embodiment, optimizing the deep belief network model from top to bottom layer by layer to layer 1 comprises
And adjusting the visible layer bias, the hidden layer bias and the connection weight of each layer in the depth belief network model from top to bottom layer by layer to the layer 1.
In a second aspect, the present invention provides a drilling overflow and loss condition prediction device, comprising:
the drilling data acquisition unit is used for acquiring the drilling data of the working condition to be predicted;
and the working condition prediction unit is used for predicting the drilling overflow leakage working condition by using the drilling data of the working condition to be predicted and the pre-established depth belief network model.
In one embodiment, the drilling overflow and loss operating condition predicting device further comprises:
and the deep belief network model establishing unit is used for establishing a deep belief network model according to the drilling historical data.
In one embodiment, the drilling overflow and loss operating condition predicting device further comprises:
and the deep belief network model training unit is used for training a pre-established deep belief network model according to the drilling history data, the visible layer bias and the hidden layer bias of the deep belief network model and the connection weight of the visible layer bias and the hidden layer bias.
In one embodiment, the drilling overflow and loss operating condition predicting device further comprises:
the drilling history data filtering unit is used for filtering the drilling history data;
the well drilling historical data normalization unit is used for normalizing the well drilling historical data;
and the drilling history data abnormal value removing unit is used for removing abnormal values in the drilling history data.
In one embodiment, the deep belief network model training unit includes:
the initial value setting module is used for respectively setting the initial value of the visible layer bias, the initial value of the hidden layer bias and the initial value of the connection weight as three random numbers which are smaller than a preset numerical value;
the drilling history data input module is used for inputting the drilling history data into the depth belief network model;
the iteration module is used for carrying out the following iteration operations until the prediction error of the deep belief network model is less than or equal to the preset error to obtain the deep belief network model:
training the deep belief network model to an n-1 layer from bottom to top layer by layer, and inputting a training result to an nth layer of the deep belief network model to obtain a training result of the nth layer; wherein n is the total number of training layers of the deep belief network model;
calculating a prediction error according to the training result of the nth layer and historical data;
and when the prediction error is larger than the preset error, optimizing the depth belief network model to the layer 1 from top to bottom layer by layer according to the prediction error.
In an embodiment, the iteration module is specifically configured to adjust the visible layer bias, the hidden layer bias, and the connection weight of each layer in the depth belief network model from top to bottom layer by layer to the layer 1.
In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for predicting the drilling overflow and loss conditions when executing the program.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for predicting a drilling spill-over and loss condition.
From the above description, the present invention provides a method and an apparatus for predicting the overflow and leakage conditions of a drilling well, wherein a deep belief network model is trained according to known working condition data and drilling data corresponding to the known working condition data, and the working condition corresponding to actual drilling data is predicted according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby taking effective measures for coping with and processing the overflow and leakage complex working conditions in advance in actual production and reducing the drilling loss caused by the complex working conditions.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a first configuration of a drilling overflow and loss condition prediction system according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a second configuration of a system for predicting drilling overflow and loss conditions according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a method for predicting a drilling overflow and loss condition according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a DBN model training process according to an embodiment of the invention;
FIG. 5 is a schematic flow chart of a method for predicting a drilling overflow and loss condition according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an embodiment of the method for predicting overflow and loss conditions of a drilling well according to the present invention;
FIG. 7 is a schematic flow chart of a method for predicting a drilling overflow leakage condition in an embodiment of the present invention;
FIG. 8 is a diagram illustrating predicted operating conditions of a DBN model test sample according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a drilling overflow and loss condition prediction device in an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application provides a drilling overflow and loss working condition prediction system, which comprises a drilling overflow and loss working condition prediction device, referring to fig. 1, the device can be a server a1, the server a1 can be in communication connection with a plurality of drilling data receiving terminals B1, the server a1 can also be in communication connection with a plurality of databases respectively, or as shown in fig. 2, the databases can also be arranged in the server a 1. The drilling data receiving end B1 is used for receiving data such as riser pressure, wellhead pressure, outlet flow, inlet flow pump stroke, hook load, drilling time, bottom hole annular pressure, total hydrocarbons and C1 in the drilling process. After the server A1 collects the drilling data, the drilling data is predicted in real time, and the prediction result is displayed to the user through the client C1.
It is understood that the drilling data receiving end B1 may be a sensor, which may be a pressure sensor, a flow sensor, a displacement sensor, a gas sensor, etc., and the client C1 may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, the part for predicting the drilling overflow and loss conditions may be performed on the side of the server a1 as described above, i.e., the architecture shown in fig. 1 or fig. 2, or all operations may be performed in the client C1 device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. If all the operations are completed in the client device, the client device may further include a processor for performing operations such as processing of the drilling overflow and loss condition prediction result.
The client C1 device may have a communication module (i.e., a communication unit) to communicate with a remote server for data transmission. The server may include a server on the drilling overflow and loss condition prediction side, or may include a server on an intermediate platform in other implementation scenarios, such as a server on a third party server platform communicatively linked to the drilling overflow and loss condition prediction server. The server may comprise a single computer device, or may comprise a server cluster formed by a plurality of servers, or a server structure of a distributed device.
The server and client devices may communicate using any suitable network protocol, including network protocols not yet developed at the filing date of this application. The network protocols may include, for example, TCP/IP protocol, UDP/IP protocol, HTTP protocol, HTTPS protocol, and the like. Of course, the network Protocol may also include, for example, an RPC Protocol (remote procedure Call Protocol) used above the above Protocol, a REST Protocol (Representational state transfer Protocol), and the like.
The embodiment of the invention provides a specific implementation mode of a drilling overflow and loss working condition prediction method, and referring to fig. 3, the drilling overflow and loss working condition prediction method specifically comprises the following contents:
step 100: and acquiring drilling data of the working condition to be predicted.
The drilling data for the conditions to be predicted in step 100 includes: essential feature parameters and auxiliary feature parameters.
The necessary characteristic parameters include: riser pressure, wellhead pressure, outlet flow and inlet flow;
the assist feature parameters include: pump stroke, hook load, time of drilling, bottom hole annulus pressure, total hydrocarbons and C1 data;
step 200: and predicting the drilling overflow and leakage working condition by using the drilling data of the working condition to be predicted and a pre-established depth belief network model.
It is understood that Deep Belief Network (DBN) is a generative model, and by training the weights among its neurons, the whole neural Network can be made to generate training data according to the maximum probability. Not only can the DBN be used to identify features, classify data, but also to generate data. DBNs are composed of multiple layers of neurons, which are in turn divided into visible and hidden layer neurons. The visible layer neurons are used to accept input and the hidden layer neurons are used to extract features.
Further, the drilling overflow and loss working condition prediction method further comprises the following steps: and establishing a depth belief network model according to the drilling historical data.
It is understood that this step is prior to step 200, and the deep belief network model at this time is an initial model, see fig. 4, i.e., an untrained deep belief network model. The drilling history data in this step is based on the drilling data in step 100, and further includes operating condition data, i.e., overflow, loss, and normality.
Further, the drilling overflow and loss working condition prediction method further comprises the following steps: and training the pre-established deep belief network model according to the drilling history data, the visible layer bias and the hidden layer bias of the deep belief network model and the connection weight of the visible layer bias and the hidden layer bias.
The method comprises the following steps of training a depth belief network model (initial model), specifically, inputting riser pressure, wellhead pressure, outlet flow, inlet flow, pump stroke, hook load, drilling time, bottom hole annular pressure, total hydrocarbons, C1 data and working conditions in drilling historical data into the depth belief network model, carrying out error calculation on results of layer-by-layer training and actual working condition results, adjusting the depth belief network model according to errors until the errors are smaller than preset error values, and finally obtaining the trained depth belief network model.
Further, before the deep belief network model is built according to the drilling history data, the method further comprises the following steps: pre-processing the drilling history data, comprising: filtering the drilling history data; normalizing the drilling history data; outliers in the drilling history data are removed. In a preferred embodiment, the well data for the conditions to be predicted also need to be preprocessed.
Further, training a pre-established deep belief network model according to the drilling history data, the visible layer bias, the hidden layer bias and the connection weight of the visible layer bias and the hidden layer bias of the deep belief network model, wherein the training comprises the following steps:
setting an initial value of visible layer bias, an initial value of hidden layer bias and an initial value of connection weight as three random numbers smaller than a preset value;
inputting the drilling history data into a depth belief network model;
performing the following iterative operations until the prediction error of the deep belief network model is less than or equal to a preset error to obtain the deep belief network model:
training the deep belief network model to an n-1 layer from bottom to top layer by layer, and inputting a training result to an nth layer of the deep belief network model to obtain a training result of the nth layer; wherein n is the total number of training layers of the deep belief network model;
calculating a prediction error according to the training result of the nth layer and the drilling historical data;
and when the prediction error is larger than the preset error, optimizing the depth belief network model to the layer 1 from top to bottom layer by layer according to the prediction error.
Further, optimizing the depth belief network model layer by layer from top to bottom to the layer 1, including: and adjusting the visible layer bias, the hidden layer bias and the connection weight of each layer in the depth belief network model from top to bottom layer by layer to the layer 1.
From the above description, the invention provides a drilling overflow and leakage condition prediction method, which trains a deep belief network model through known working condition data and drilling data corresponding to the known working condition data, and predicts the working condition corresponding to actual drilling data according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby taking effective measures for coping with and processing the overflow and leakage complex working conditions in advance in actual production and reducing the drilling loss caused by the complex working conditions.
In one embodiment, the invention also provides an embodiment of a method for predicting the drilling overflow and loss working condition, which is shown in fig. 5.
Step 401: and preprocessing the drilling history data.
The drilling history data needs to be preprocessed, including filtering, normalization and other processing, accidental values are removed, and the drilling history data is processed into a format required by a DBN method through normalization.
Step 402: and establishing a depth belief network model according to the drilling historical data.
The deep belief network realizes complex function approximation by learning a deep nonlinear network structure, represents input data distributed representation, and shows strong ability of learning essential characteristics of a data set from a few sample sets. By using the deep learning method, learning can be performed under the condition that a specific relation or a model between parameters is not known, or the deep learning method can be applied under the complex condition that a physical model does not exist between the parameters. The Deep Belief Network (DBN) belongs to one of multilayer neural networks, and can be used for both unsupervised learning and supervised learning. From unsupervised learning, the goal is to preserve the features of the original features as much as possible while reducing the dimensionality of the features. From supervised learning, the aim is to make the classification error rate as small as possible. The nature of DBN is the process of feature learning, i.e. how to get better feature expression. The classic DBN network structure is a deep neural network composed of a plurality of layers of Restricted Boltzmann Machines (RBMs) and a layer of Back Propagation (BP) neural network. The deep belief network overcomes the defects that the BP network is easy to fall into local optimum and the training time is long, and a characteristic learning part is added, so that a large data set for training only contains few marks. The DBN training process is to use an unsupervised greedy layer-by-layer training algorithm to pre-train to obtain weights. The deep belief network is a good unsupervised learning method, and the feature extraction function of the deep belief network can be widely applied to various fields according to the granularity of different concepts. But at present DBNs are mainly used for image and speech recognition. The method is introduced into the technical field of drilling overflow and loss working condition prediction for the first time.
The drilling history data in step 402 includes: riser pressure, wellhead pressure, outlet and inlet flow, pump stroke, hook load, while drilling, bottom hole annulus pressure, total hydrocarbons, C1 data, and operating conditions data (flooding, loss and normal).
Step 403: and inputting the drilling history data into a depth belief network model, and training the model.
In the DBN model, the initial values of the connection weight W between the visible layer and the hidden layer, the visible layer bias a, and the hidden layer bias b are small random numbers. It is to be understood that the initial value of the connection weight W, the initial value of the visible layer bias a, and the implicit layer bias b may be set to the same random number, or may be set to three different random numbers. Substituting the preprocessed training data set into a DBN initial model, training layer by layer from bottom to top to obtain parameters of each layer such as connection weight W, visible layer bias a, hidden layer bias b and the like until the n-1 layer is trained, inputting the training result of the n-1 layer into a neural network of the n (top) layer, comparing the training result of the n layer with working condition data (actual data) in the training data set, and obtaining a corresponding error. And then, transmitting the error layer by layer from top to bottom, finely adjusting the connection weight W, the visible layer offset a and the hidden layer offset b in each layer according to the error of each layer until the layer 1, then training layer by layer upwards by utilizing training data, and repeating … … repeatedly until the error is smaller than a preset error to obtain the DBN prediction model.
Step 404: and acquiring the drilling data of the working condition to be predicted in real time.
The overflow and leakage working conditions are the phenomena of the underground and the wellhead after the formation pressure and the bottom hole pressure lose balance. When overflow or leakage occurs, the outlet flow rate changes, and the wellhead back pressure and vertical pressure may or may not change. Therefore, the outlet flow, the inlet flow, the vertical pressure, the wellhead back pressure and the like are selected as necessary characteristic parameters for identifying the overflow leakage working condition, and the pump stroke, the hook load, the drilling time, the bottom hole annular pressure, the total hydrocarbon and the C1 data are used as auxiliary characteristic parameters for identifying the overflow leakage working condition.
Step 405: and preprocessing the drilling data of the working condition to be predicted.
It is understood that the pre-processing content in this step 405 is identical to the pre-processing content in step 401.
Step 406: and inputting the drilling data of the working condition to be predicted into the trained depth belief network model, and predicting the drilling overflow leakage working condition corresponding to the drilling data of the working condition to be predicted.
From the above description, the invention provides a drilling overflow and leakage condition prediction method, which trains a deep belief network model through known working condition data and drilling data corresponding to the known working condition data, and predicts the working condition corresponding to actual drilling data according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby taking effective measures for coping with and processing the overflow and leakage complex working conditions in advance in actual production and reducing the drilling loss caused by the complex working conditions.
In order to further explain the scheme, the invention provides a specific application example of the drilling overflow leakage condition prediction method by taking a Tarim basin H1 well area as an example, and the specific application example of the drilling overflow leakage condition prediction method specifically comprises the following contents: referring to fig. 6, the overall concept of the specific application example is as follows: firstly, dividing collected field drilling historical data (sample data) into two parts, wherein one part is used for training a deep belief network model, and the other part is used for testing the deep belief network model. After the drilling historical data are preprocessed, the drilling historical data are made to meet the requirements of a DBN method, and the deep belief network model is trained layer by layer to achieve the expected effect.
Referring to fig. 7, a specific embodiment of the method for predicting the drilling overflow and loss condition includes:
s0: the collected on-site drilling historical data is divided into a training data set and a testing data set.
The training data set includes: riser pressure, wellhead pressure, outlet flow, inlet flow and pump stroke, hook load, while drilling, bottom hole annulus pressure, total hydrocarbons, C1 data, and operating conditions data (flooding, loss and normal).
The test data set includes: riser pressure, wellhead pressure, outlet flow, inlet flow and pump stroke, hook load, while drilling, bottom hole annulus pressure, total hydrocarbons, C1 data.
S1: the training data set and the test data set are preprocessed.
In specific implementation, the preprocessing in S1 includes the following steps: and (3) carrying out operations such as filtering, normalization and abnormal value removal on the training data set and the test data set, and processing the operations into a format required by the DBN method, wherein the data is in a range of [0,1 ].
Preferably, the normalization method selected in step S1 is: the data is divided by the largest of the values in the set of data.
xi' -certain data after normalization, xi-normalizing certain data before processing, xj-normalizing all data before processing.
S2: and establishing a DBN initial model according to the training data set.
S3: and training the DBN initial model according to the training data set to generate a DBN prediction model.
In the DBN model, the initial values of the connection weight W between the visible layer and the hidden layer, the visible layer bias a, and the hidden layer bias b are small random numbers. It is to be understood that the initial value of the connection weight W, the initial value of the visible layer bias a, and the implicit layer bias b may be set to the same random number, or may be set to three different random numbers. Substituting the preprocessed training data set into a DBN initial model, training layer by layer from bottom to top to obtain parameters of each layer such as connection weight W, visible layer bias a, hidden layer bias b and the like until the n-1 layer is trained, inputting the training result of the n-1 layer into a neural network of the n (top) layer, comparing the training result of the n layer with working condition data (actual data) in the training data set, and obtaining a corresponding error. And then, transmitting the error layer by layer from top to bottom, finely adjusting the connection weight W, the visible layer offset a and the hidden layer offset b in each layer according to the error of each layer until the layer 1, then training layer by layer upwards by utilizing training data, and repeating … … repeatedly until the error is smaller than a preset error to obtain the DBN prediction model.
In the process of training the DBN initial model, the update rule of parameters such as the connection weight W, the visible layer bias a, the hidden layer bias b and the like in the training process is as follows:
Δwi,j=P(hi=1|v(0))vj (0)-P(hi=1|v(k))vj (k)
Δaj=vj (0)-vj (k)
Δbi=P(hi=1|v(0))-P(hi=1|v(k))
after the model is trained, the obtained working condition prediction judgment value (one of a normal working condition, an overflow working condition or a leakage working condition) is compared with an expected working condition (one of the normal working condition, the overflow working condition or the leakage working condition) in a verification data set to verify and obtain an error, the error is transmitted back layer by layer so as to fine-tune parameters (a connection weight W, a visible layer bias a and a hidden layer bias b) of the DBN, in the back transmission process, the (sensitivity) value of each layer needs to be calculated, and the sensitivity is transmitted from top to bottom to correct the weight parameters of the network.
For the output layer, assume the actual output of the ith node is oiThe desired output is diThen the calculation expression of the sensitivity is:
=oi(1-oi)(di-oi)
for the l hidden layer, the sensitivity is calculated as
After the sensitivity of each layer is obtained, the network weight of the DBN is updated according to the following two formulas:
and (5) finishing training if the working condition prediction judgment value obtained after multiple times of training meets the expected working condition. And finally obtaining a reasonable DBN prediction model which comprises the connection weight W, the visible layer bias a and the hidden layer bias b.
S4: and testing a DBN prediction model.
The test data set is input into the DBN prediction model to obtain a corresponding predicted condition, i.e. one of an overflow, a leak, or a normal condition, see fig. 8.
From the above description, the invention provides a drilling overflow and leakage condition prediction method, which trains a deep belief network model through known working condition data and drilling data corresponding to the known working condition data, and predicts the working condition corresponding to actual drilling data according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby taking effective measures for coping with and processing the overflow and leakage complex working conditions in advance in actual production and reducing the drilling loss caused by the complex working conditions.
Based on the same inventive concept, the embodiment of the present application further provides a drilling overflow and loss condition prediction apparatus, which can be used to implement the methods described in the above embodiments, such as the following embodiments. Because the principle of solving the problems of the drilling overflow and leakage condition prediction device is similar to that of the drilling overflow and leakage condition prediction method, the implementation of the drilling overflow and leakage condition prediction device can be implemented by referring to the drilling overflow and leakage condition prediction method, and repeated parts are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
The embodiment of the invention provides a specific implementation mode of a drilling overflow and loss working condition prediction device capable of realizing a drilling overflow and loss working condition prediction method, and referring to fig. 9, the drilling overflow and loss working condition prediction device specifically comprises the following contents:
the drilling data acquisition unit 10 is used for acquiring the drilling data of the working condition to be predicted;
and the working condition prediction unit 20 is used for predicting the drilling overflow leakage working condition by using the drilling data of the working condition to be predicted and the pre-established depth belief network model.
In one embodiment, the drilling overflow and loss operating condition predicting device further comprises:
and the deep belief network model establishing unit is used for establishing a deep belief network model according to the drilling historical data.
In one embodiment, the drilling overflow and loss operating condition predicting device further comprises:
and the deep belief network model training unit is used for training a pre-established deep belief network model according to the drilling history data, the visible layer bias and the hidden layer bias of the deep belief network model and the connection weight of the visible layer bias and the hidden layer bias.
In one embodiment, the drilling overflow and loss operating condition predicting device further comprises:
the drilling history data filtering unit is used for filtering the drilling history data;
the well drilling historical data normalization unit is used for normalizing the well drilling historical data;
and the drilling history data abnormal value removing unit is used for removing abnormal values in the drilling history data.
In one embodiment, the deep belief network model training unit includes:
the initial value setting module is used for respectively setting the initial value of the visible layer bias, the initial value of the hidden layer bias and the initial value of the connection weight as three random numbers which are smaller than a preset numerical value;
and the drilling history data input module is used for inputting the drilling history data into the depth belief network model.
The iteration module is used for carrying out the following iteration operations until the prediction error of the deep belief network model is less than or equal to the preset error to obtain the deep belief network model:
training the deep belief network model to an n-1 layer from bottom to top layer by layer, and inputting a training result to an nth layer of the deep belief network model to obtain a training result of the nth layer; wherein n is the total number of training layers of the deep belief network model;
calculating a prediction error according to the training result of the nth layer and historical data;
and when the prediction error is larger than the preset error, optimizing the depth belief network model to the layer 1 from top to bottom layer by layer according to the prediction error.
In an embodiment, the iteration module is specifically configured to adjust the visible layer bias, the hidden layer bias, and the connection weight of each layer in the depth belief network model from top to bottom layer by layer to the layer 1.
From the above description, the present invention provides a drilling well overflow and leakage condition prediction device, which trains a deep belief network model according to known working condition data and drilling well data corresponding to the known working condition data, and predicts the working condition corresponding to actual drilling well data according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby taking effective measures for coping with and processing the overflow and leakage complex working conditions in advance in actual production and reducing the drilling loss caused by the complex working conditions.
The embodiment of the present application further provides a specific implementation manner of an electronic device capable of implementing all steps in the drilling overflow and loss condition prediction method in the foregoing embodiment, and referring to fig. 10, the electronic device specifically includes the following contents:
a processor (processor)1201, a memory (memory)1202, a communication interface 1203, and a bus 1204;
the processor 1201, the memory 1202 and the communication interface 1203 complete communication with each other through the bus 1204; the communication interface 1203 is used for realizing information transmission among related devices such as a server-side device, a drilling data receiving end and a client device;
the processor 1201 is configured to call the computer program in the memory 1202, and the processor executes the computer program to implement all the steps of the method for predicting a drilling overflow and loss condition in the above embodiment, for example, the processor executes the computer program to implement the following steps:
step 401: and preprocessing the drilling history data.
Step 402: and establishing a depth belief network model according to the drilling historical data.
Step 403: and inputting the drilling history data into a depth belief network model, and training the model.
Step 404: and acquiring the drilling data of the working condition to be predicted in real time.
Step 405: and preprocessing the drilling data of the working condition to be predicted.
Step 406: and inputting the drilling data of the working condition to be predicted into the trained depth belief network model, and predicting the drilling overflow leakage working condition corresponding to the drilling data of the working condition to be predicted.
From the above description, it can be seen that, in the electronic device in the embodiment of the present application, the deep belief network model is trained through known working condition data and drilling data corresponding to the known working condition data, and the working condition corresponding to actual drilling data is predicted according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby taking effective measures for coping with and processing the overflow and leakage complex working conditions in advance in actual production and reducing the drilling loss caused by the complex working conditions.
Embodiments of the present application further provide a computer-readable storage medium capable of implementing all steps of the drilling overflow and loss condition prediction method in the foregoing embodiments, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all steps of the drilling overflow and loss condition prediction method in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
step 401: and preprocessing the drilling history data.
Step 402: and establishing a depth belief network model according to the drilling historical data.
Step 403: and inputting the drilling history data into a depth belief network model, and training the model.
Step 404: and acquiring the drilling data of the working condition to be predicted in real time.
Step 405: and preprocessing the drilling data of the working condition to be predicted.
Step 406: and inputting the drilling data of the working condition to be predicted into the trained depth belief network model, and predicting the drilling overflow leakage working condition corresponding to the drilling data of the working condition to be predicted.
From the above description, it can be seen that the computer-readable storage medium in the embodiment of the present application trains the deep belief network model according to the known working condition data and the drilling data corresponding to the known working condition data, and predicts the working condition corresponding to the actual drilling data according to the trained deep belief network model. In conclusion, the invention can establish a method for finding the overflow and leakage drilling working conditions in time, thereby greatly reducing the occurrence frequency of drilling accidents caused by the overflow and leakage working conditions in the actual production.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Although the present application provides method steps as in an embodiment or a flowchart, more or fewer steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
Although embodiments of the present description provide method operational steps as in embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, in implementing the embodiments of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, and the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The embodiments of this specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The described embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is only an example of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure. Various modifications and variations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the embodiments of the present specification.