Early overflow detection and grading early warning processing system and method

By adopting hierarchical naive Bayes network clustering model and potential node technology in early overflow monitoring, the accuracy and error problems of overflow monitoring in the existing technology are solved, and more accurate overflow warning and hierarchical processing are achieved, ensuring drilling safety.

CN119807889APending Publication Date: 2025-04-11PETROCHINA CO LTD

Patent Information

Application Number
CN202311313788.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing technology has accuracy and error problems in early overflow monitoring, and the lack of effective overflow warning risk assessment and hierarchical treatment methods, making it difficult to ensure drilling safety.

Method used

The hierarchical naive Bayes network clustering model is adopted to simplify the dependence between attribute variables by introducing potential nodes, improve the simplicity and accuracy of the model structure, and build the overflow warning risk assessment part, warning grading and processing methods.

Benefits of technology

It improves the accuracy and reliability of overflow monitoring, reduces discrimination errors, achieves a more comprehensive understanding of the formation characteristics and overflow causes, enhances the ability to control the wellbore pressure, and ensures drilling safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807889A_ABST
    Figure CN119807889A_ABST
Patent Text Reader

Abstract

The invention provides an early overflow detection and grading early warning processing system and method, and belongs to the technical field of well control safety in oil and gas drilling engineering. Potential nodes are introduced to serve as intermediate variables, the dependency relationship between attribute variables is simplified, the attribute variables are independent relative to the conditions of the intermediate variables, and therefore the model structure is simplified, meanwhile, the interdependency relationship between the nodes can be reflected, and the modeling accuracy is improved. The method is further applied to actual working conditions, and the purposes of improving overflow monitoring accuracy and reducing discrimination errors are achieved. Besides, a plurality of grading early-warning threshold values are added, an overflow early-warning risk assessment part and an early-warning grading and processing mode part are constructed, stratum characteristics can be known more comprehensively, overflow causes can be judged, follow-up shaft pressure control can be conducted more comprehensively, and great significance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of well control safety technology in oil and gas drilling engineering, and in particular to an early overflow detection and graded early warning processing system and method. Background Art

[0002] Overflow refers to an accident during the drilling process in which the formation pressure is greater than the annular pressure of the wellbore, causing the formation fluid to flow into the wellbore, resulting in the wellhead liquid level or oil and gas blowing out of the ground. Timely detection and control of overflow is a difficult problem that needs to be solved in drilling operations, and is also the key to preventing oil and gas well blowouts. Therefore, optimizing overflow monitoring methods and improving their reliability are of great significance to achieving safe, efficient and economical drilling work.

[0003] For early overflow monitoring, a variety of technical methods have been developed and applied at home and abroad. They are mainly divided into two categories: ground monitoring and downhole monitoring. The monitoring methods can be further divided into different types such as flow monitoring, liquid level monitoring, comprehensive logging parameter monitoring and downhole pressure monitoring. Common monitoring methods include mud pool liquid level monitoring, micro-flow measurement, acoustic gas intrusion monitoring and PWD-based pressure analysis. The technical principles adopted by various early overflow monitoring methods are different, and the technical advantages they possess are also different. When applied on the field, their use has certain limitations. For example, the ground monitoring method is highly reliable, but there will be a certain lag in detection time; bottom hole monitoring can detect overflow in time, but it is limited by transmission bottlenecks.

[0004] With the rapid development of machine learning technology, the trend of early overflow monitoring technology is to select characteristic parameters that meet the monitoring conditions according to the response changes of various parameters at the wellhead and downhole when overflow occurs, and combine them with intelligent algorithms to quickly discover overflow. At present, many scholars have selected different characteristic parameters and combined them with various machine learning algorithms to train a variety of intelligent models for early overflow monitoring.

[0005] In a paper, the author Yuan Junliang disclosed a real-time early warning method for drilling overflow based on the naive Bayesian algorithm. The method established a priori probability calculation model for overflow and a conditional probability calculation model that included six attributes, namely, region, formation, lithology, torque, pump pressure, and mechanical drilling speed. The posterior probability of overflow was calculated based on Bayesian theory to achieve a real-time early warning function. This research method takes into account the advantages of the naive Bayesian algorithm, which is fast and easy to use. However, the premise of the implementation of the naive Bayesian algorithm is to ensure that all attributes are independent. In actual drilling conditions, the above conditions cannot be met. There will be dependencies between attributes. The non-independence between attributes can easily cause model misjudgment and affect the accuracy of judgment.

[0006] Chinese patent 201310398400.8 discloses an online comprehensive monitoring and early warning method for overflow during oil and gas well drilling. The method combines the traditional Bayesian model and the expert system as the overflow identification model. By selecting overflow characteristic parameters available on site, the overflow characteristic parameters are input into the trained Bayesian model or overflow identification is performed, and the final overflow identification result is given and displayed in the form of probability. Although the method can monitor the overflow situation in real time, there will be overflow monitoring accuracy and error problems in actual monitoring, and there is a lack of construction of overflow warning risk assessment classification and classification processing method. Summary of the invention

[0007] In order to solve the problems existing in the prior art, the present invention provides an early overflow detection and graded warning processing system and method, which introduces potential nodes as intermediate variables, simplifies the dependency between attribute variables, and makes multiple attribute variables conditionally independent relative to the intermediate variables, thereby simplifying the model structure, and at the same time can also reflect the mutual dependency between nodes, and then be applied to actual working conditions to achieve the purpose of improving overflow monitoring accuracy and reducing discrimination errors. In addition, the present invention also adds multiple graded warning thresholds, and constructs an overflow warning risk assessment part and a warning classification and processing method part, which can more comprehensively understand the formation characteristics, judge the overflow cause, and the subsequent wellbore pressure control, which is of great significance.

[0008] The present invention provides an early overflow detection and hierarchical early warning processing system, including a hierarchical naive Bayesian network clustering model and a hierarchical naive Bayesian overflow monitoring model;

[0009] Introducing potential nodes between class nodes and attribute nodes of the naive Bayesian network clustering model, constructing a hierarchical naive Bayesian network clustering model;

[0010] For early overflow in the drilling process, multiple overflow monitoring parameters are selected from three levels of measurement while drilling, comprehensive surface logging, and formation and lithology as multiple attribute nodes of the hierarchical naive Bayesian network clustering model, overflow events are used as class nodes of the hierarchical naive Bayesian network clustering model, and cluster nodes are used as potential nodes generated in the learning process of the hierarchical naive Bayesian network clustering model;

[0011] After introducing potential nodes, the node state values ​​are determined and a new classifier model is generated;

[0012] Taking the characteristic vector of overflow monitoring parameters as the input of a new classifier model of the hierarchical naive Bayesian network clustering model, and performing overflow identification based on the naive Bayesian algorithm and clustering processing through the new classifier model;

[0013] The overflow recognition results of the new classifier model for each overflow monitoring parameter are given in the form of probability, and the overflow recognition results of each overflow monitoring parameter are input into the hierarchical naive Bayes overflow monitoring model to obtain the final overflow discrimination result, and graded warning and processing are performed when the overflow discrimination result is abnormal.

[0014] The hierarchical naive Bayes model in the present invention is a tree-type Bayesian network model for processing discrete variables, which is composed of three types of nodes: class nodes (C), attribute nodes (A) and potential nodes (L), which are represented by symbol sets {C, A, L} respectively. In the model, the class variable C represents the root node of the tree structure; the attribute node represents the leaf node, and the potential variable acts as an intermediate node. It should be noted that the attribute node is observable, while the potential node is unobservable. Through this structure, the model can both simplify the dependency between variables and reflect the mutual dependency between nodes.

[0015] The definition of the hierarchical naive Bayesian network clustering model and the introduction of potential nodes relax some independence statements of the naive Bayesian classifier and integrate the local dependencies between attributes into the model. When there are no potential nodes in the hierarchical naive Bayesian model, it is a naive Bayesian model. However, in actual drilling overflow conditions, the independence conditions between attributes are obviously not met, and there will be dependencies between attributes. The non-independence between attributes can easily cause model misjudgment and affect the accuracy of discrimination. Hierarchical naive Bayes allows dependencies between attributes, and can capture more correlation information between features when modeling. This can more accurately represent the data and improve the predictive ability of the classifier.

[0016] The construction of the hierarchical naive Bayesian network clustering model, the class nodes (C), attribute nodes (A) and potential nodes (L) jointly construct the tree diagram of the hierarchical naive Bayesian network clustering model. The construction of the tree diagram of the model is to show the structure of the model and the relationship between the nodes. Through this tree structure, the model can describe the interdependence between multiple variables and the conditional independence assumptions between variables, and provide guidance for further model optimization and improvement.

[0017] Preferably, when selecting multiple overflow monitoring parameters, obtainable measurement while drilling monitoring parameters, comprehensive surface logging monitoring parameters, and formation and lithology monitoring parameters that can reflect the occurrence of overflow are selected and collected in real time.

[0018] Preferably, the measurement while drilling monitoring parameters that can reflect the occurrence of overflow are drilling speed R and torque M; the comprehensive surface logging monitoring parameters that can reflect the occurrence of overflow are density ρ, viscosity μ, temperature T, conductivity Rm, inlet and outlet flow difference Q and standpipe pressure P; the formation and lithology monitoring parameters that can reflect the occurrence of overflow are oil and gas field block B, lithology r, and total hydrocarbon content HC.

[0019] Preferably, the construction of the hierarchical naive Bayesian network clustering model is as follows: Figure 2 As shown, the method of the present invention selects overflow event K, density rho (ρ), viscosity mu (μ), temperature T, conductivity Rm, inlet and outlet flow difference Q, standpipe pressure P, drilling speed R, torque M, oil and gas field block B, lithology r (including porosity, permeability, pressure index, bulk elastic modulus and other physical parameters), total hydrocarbon content HC (mainly derived from the content of oil and gas components such as oil and gas in the rock layer) from three levels of measurement while drilling, comprehensive surface logging, formation and lithology, a total of 11 attributes as the attribute node (A) of the model, aggregation node A1, aggregation node A2, aggregation node A3 as the potential nodes (L) generated in the learning process of the model, and overflow event K as the class node (C) of the model.

[0020] Preferably, the measurement while drilling monitoring parameters are drilling speed R and torque M, which are usually measured by a measurement while drilling tool. The measurement while drilling tool can monitor the well depth, drill bit position, drilling speed, torque, drilling fluid properties, core sampling and other information around the clock during the drilling process. When drilling overflow occurs, the drilling speed R and torque M will undergo a series of changes, and the drilling process may produce stuck drill, sudden increase in drilling speed or emptying phenomenon, and the torque may also suddenly increase or show a fluctuating and unstable state; the comprehensive surface logging monitoring parameters are density rho (ρ), viscosity mu (μ), temperature T, conductivity Rm, inlet and outlet flow difference Q, and standpipe pressure P, which are usually obtained by comprehensive logging and real-time field measurement. The inlet and outlet flow difference Q and standpipe pressure P are measured by equipment outside the drilling fluid system. The inlet and outlet flow difference Q is usually measured by a flow meter, and the standpipe pressure P is measured by a pressure sensor. Parameters such as density rho (ρ), viscosity mu (μ), temperature T, and conductivity Rm can all be obtained through on-site measurements. For example, density rho (ρ) can be measured using a densitometer, viscosity mu (μ) can be measured using a rotor-type and pipe-type viscometer, temperature T can be measured using a thermometer or an infrared thermometer, and conductivity Rm can be measured using a conductivity meter. When drilling overflow occurs, the density of the drilling fluid usually decreases, and the viscosity of the drilling fluid is also affected. Since there is a certain correlation between the density rho (ρ), viscosity mu (μ), temperature T, and conductivity Rm of the drilling fluid, the changes in each overflow monitoring parameter affect each other; the formation and lithology monitoring parameters are oil and gas field block B, lithology r, and total hydrocarbon content HC, which are usually measured through a variety of methods such as comprehensive logging and core analysis. Oil and gas field block B can be measured by seismic exploration methods, and the physical property information of the underground can be obtained through the reflection and refraction of seismic waves, so as to judge the feasibility of the oil and gas field. Lithology r can be measured by core analysis to obtain lithology information of the formation, and the lithology of the formation can be determined by visual observation of the core, microscopic analysis, physical testing, etc. The total hydrocarbon content HC is completed using a specific logging tool, and combined with the gas logging chart to analyze data changes to obtain information on changes in hydrocarbon gas content.

[0021] Preferably, the flow meter selected for the inlet and outlet flow difference Q is a Coriolis flowmeter, which is installed on the throttling manifold branch; the riser pressure P is measured by a pressure sensor installed on the riser; the density rho (ρ) is measured by a densitometer installed in the drill string or a logging instrument; the viscosity mu (μ) is measured by a rotor-type and pipe-type viscometer used in the laboratory; the temperature T is measured by a thermometer or an infrared thermometer installed on a pipeline or a drill string; the conductivity Rm is measured by using a handheld conductivity meter at the drilling fluid return point at the wellhead.

[0022] Preferably, before using the early overflow monitoring and graded early warning processing based on the hierarchical naive Bayesian network clustering model, an overflow parameter feature database is established according to historical overflow data, and the corresponding hierarchical naive Bayesian overflow monitoring model is trained using different overflow monitoring parameters to obtain a hierarchical naive Bayesian overflow monitoring model for real-time overflow monitoring.

[0023] These trained hierarchical naive Bayes overflow monitoring models are the basis for the early overflow monitoring and graded warning processing methods based on the trained hierarchical naive Bayes network clustering model used in the model learning process.

[0024] Preferably, during the learning process of early overflow monitoring, the hierarchical naive Bayesian network clustering model continuously and dynamically updates overflow monitoring parameters and evaluates the model according to actual on-site working conditions and staff experience, thereby improving the predictive ability of the classifier and reducing the misjudgment rate of the model.

[0025] Preferably, for the overflow monitoring parameters collected in real time, the attribute conditional mutual information is calculated, and based on this, feature extraction is performed to construct a feature vector of the overflow monitoring parameters. Conditional mutual information refers to the amount of information between multiple random variables under the condition of a given random variable.

[0026] Preferably, in drilling overflow monitoring, for overflow monitoring parameters collected in real time, attribute condition mutual information is calculated to evaluate the interdependence between two variables. The specific process is as follows:

[0027] Suppose there are three random variables X, Y and Z. Under the condition of given Z (due to the large number of overflow monitoring parameters, only the calculation formula of three random variables is given as an example here), the calculation formula of the conditional mutual information CMI(X,Y|Z) between X and Y is as follows:

[0028]

[0029] in,

[0030] p(x, y, z) represents the joint probability distribution of three random variables X, Y, and Z;

[0031] p(x, y|z) represents the joint probability distribution of X and Y given Z;

[0032] p(x|z) and p(y|z) respectively represent the marginal probability distribution of X and Y under given conditions Z; the larger the value of CMI(X,Y|Z), the stronger the mutual dependence between X and Y. If CMI(X,Y|Z)=0, it means that X and Y are independent of each other. If CMI(X,Y|Z)=0, it means that X and Y are independent of each other, that is, there is no conditional mutual information between them. In drilling overflow monitoring, the conditional mutual information between each pair of features can be calculated, and the features with the most decision-making ability can be selected according to the value of the conditional mutual information, so as to design the optimal feature set, which is convenient for the next step of constructing the overflow feature vector. At the same time, conditional mutual information can also be used for feature selection to reduce the number of input features and avoid the essential cause of the dimensionality curse problem.

[0033] Preferably, the step of extracting features and constructing a feature vector of overflow monitoring parameters includes:

[0034] (1) Data preprocessing, including removal of outliers and noise data, normalization, and data stabilization operations;

[0035] (2) Data collection and storage: continuously collect overflow monitoring parameters in real time and store them in a database or real-time data warehouse;

[0036] (3) Feature selection: Based on the calculated attribute condition mutual information, the parameters whose attribute condition mutual information value in overflow monitoring is greater than the preset threshold are selected as the features with the most decision-making ability, thereby reducing the number of input overflow features and avoiding the curse of dimensionality;

[0037] (4) Feature transformation: improving the dimension of the original feature space to obtain a feature space with higher dimensions;

[0038] (5) Feature dimensionality reduction: reducing the higher-dimensional feature space back to the dimension of the original feature space.

[0039] Preferably, Min-Max normalization is used to scale the eigenvalues ​​to the range of [0,1]. Through Min-Max normalization, data with different eigenvalues ​​can be scaled to the same range, eliminating the size normalization problem between different eigenvalue weights, and providing more accurate data for overflow monitoring and prediction.

[0040] Preferably, during feature transformation, feature mapping is used to increase the dimension of the original feature space. When increasing the dimension of the original feature space, polynomial expansion is used to perform feature mapping, and the formula is as follows:

[0041]

[0042] in,

[0043] [x1,x2,...,x dis the specific form of the original data x, is the eigenvector of the extended overflow monitoring parameters.

[0044] Polynomial expansion can extend the input data from the original feature space to a higher-dimensional space, increasing the number of features while enhancing the non-linear representation ability of the feature space, thereby improving the fitting ability of the machine learning model.

[0045] Preferably, the principal component analysis method is used to reduce the dimension of the high-dimensional feature space back to the dimension of the original feature space to improve the performance and interpretability of the model. Suppose there is a feature vector matrix X of overflow monitoring parameters with dimensions m×n, where m represents the number of samples and n represents the number of features. The data matrix is reduced to K dimensions through the principal component analysis method, where K < n. The specific steps are as follows:

[0046] a. Data centering: Subtract the mean of each feature from the feature vector matrix X of the original overflow monitoring parameters:

[0047]

[0048] where, X c is the feature vector matrix of the overflow monitoring parameters after centering, and X i is the i-th sample in the feature vector matrix of the overflow monitoring parameters;

[0049] b. Calculate the covariance matrix C of the feature vector matrix X c of the overflow monitoring parameters after centering:

[0050]

[0051] c. Calculate the eigenvectors and eigenvalues of the covariance matrix C. The eigenvalue matrix is Λ, then there is:

[0052]

[0053] where, each column in X is an eigenvector;

[0054] d. According to the order of the eigenvalues, select the eigenvectors corresponding to the top k eigenvalues and form the principal component matrix W k of the eigenvectors. These eigenvectors are called principal components;

[0055] e. Project the feature vector matrix X of the overflow monitoring parameters onto the principal components to obtain the projected feature vector matrix of the overflow monitoring parameters:

[0056] Y = X C W k

[0057] Among them, Y is the eigenvector matrix of overflow monitoring parameters after projection.

[0058] Preferably, introducing potential nodes between class nodes and attribute nodes of the naive Bayesian network clustering model, and constructing a hierarchical naive Bayesian network clustering model comprises the following steps:

[0059] In drilling overflow monitoring, after constructing the feature vector of overflow monitoring parameters, in order to relax some independence statements of the naive Bayes classifier and better integrate the local dependencies between attributes into the model, three potential nodes representing different variables are introduced into the naive Bayes classifier to more accurately analyze and predict overflow conditions. The three potential nodes are added to the feature vector of the original overflow monitoring parameters to obtain the extended feature vector of the overflow monitoring parameters. Assume that the feature vector of the original overflow monitoring parameters is:

[0060] x=(x1,x2,...,x j )

[0061] j is the dimension of the feature vector of the overflow monitoring parameter. The three potential nodes node1, node2, and node3 are added to the feature vector x of the overflow monitoring parameter, and the expanded feature vector is as follows:

[0062]

[0063] Normalize the expanded feature vector. Since the three potential nodes may have a large difference in the variable magnitude from the original feature vector, in order to avoid their excessive influence in the feature space, the expanded feature vector needs to be normalized.

[0064] Preferably, after introducing the potential node, the node status value is determined as follows:

[0065] Based on the experience of experts in the drilling industry, the status and interrelationship of three potential nodes related to drilling overflow are determined.

[0066] For example, the formation pressure may have normal, high and abnormal states, the correlation between the drilling fluid density rho (ρ), viscosity mu (μ), temperature T, and conductivity Rm, and the mutual influence between the inlet and outlet flow difference Q, standpipe pressure P, drilling speed R, and torque M.

[0067] Preferably, the steps of classifier based on naive Bayes algorithm in early overflow monitoring are as follows:

[0068] A large data sample is established based on historical well data, and each sample is represented by a vector containing overflow parameters, potential nodes and overflow values;

[0069] Classify the attributes of historical well big data samples into corresponding potential nodes;

[0070] Calculate the prior probability of overflow occurrence and non-occurrence, that is, the percentage of samples s1 with overflow value "yes" to the total number of samples s and the percentage of samples s0 with overflow value "no" to the total number of samples s;

[0071] Calculate the conditional probabilities of the attributes corresponding to the classification of the potential nodes respectively;

[0072] Calculate the posterior probability P2 of overflow occurrence and the posterior probability P3 of overflow non-occurrence under various overflow monitoring attribute conditions of the target well;

[0073] Compare P2 and P3. If the posterior probability of overflow occurrence is greater than the posterior probability of overflow not occurring, it is judged that overflow occurs in the target well at this time; otherwise, it is judged that overflow does not occur.

[0074] The advantages of the Naive Bayes algorithm are that it has a small amount of calculation, is simple and easy to implement, and is suitable for processing multidimensional data. By introducing potential nodes and determining node status operations, the algorithm can very well solve the harsh condition that the attributes must be independent of each other.

[0075] Preferably, when the overflow identification result is abnormal, graded warning and processing are carried out specifically as follows: threshold limits are set on the number of drilling overflows or the wellhead pressure to classify and determine the overflow level that has occurred.

[0076] Preferably, when limiting the number of drilling overflows, the threshold formula of the number of drilling overflows is as follows:

[0077] Quantity_Threshold=V0+k1*(Drilling_Rate–R0)

[0078] Among them, V0 represents the set basic threshold value; R0 represents the set standard drilling speed; Drilling_Rate represents the drilling speed of the drill bit; k1 represents the set quantity threshold coefficient, usually 1 to 2. When the flow rate of drilling fluid exceeds the overflow classification threshold value, it is divided into different overflow grades.

[0079] Preferably, when limiting the wellhead pressure, the threshold formula of the wellhead pressure is as follows:

[0080] Pressure_Threshold=P0+k2*(Depth–D0)

[0081] Among them, P0 represents the set basic threshold value; D0 represents the set basic depth; Depth represents the depth of the well; k2 represents the set pressure threshold coefficient, usually 0.1-0.2. When the wellhead pressure exceeds the overflow classification threshold value, it is divided into different overflow grades.

[0082] The present invention provides an early overflow detection and graded warning processing method, which is used in the early overflow detection and graded warning processing system according to any one of claims 1 to 16, comprising the following steps:

[0083] Select overflow monitoring parameters;

[0084] Collect overflow monitoring parameters in real time and use the overflow monitoring parameters as attributes;

[0085] Calculate attribute conditional mutual information;

[0086] Constructing feature vectors of overflow monitoring parameters;

[0087] Introducing potential nodes;

[0088] Determine the node state value and generate a new classifier model;

[0089] Overflow identification is performed based on the hierarchical naive Bayesian model. If there is an abnormality, overflow warning classification and classification processing are carried out, and the overflow characteristic number database update, Bayesian model training, model evaluation and evaluation steps are performed in sequence. If there is no abnormality, the overflow monitoring parameters are dynamically updated.

[0090] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0091] 1. The present invention collects monitoring parameters such as measurement while drilling, comprehensive surface logging, formation and lithology in real time, comprehensively judges the occurrence of overflow from two aspects of surface monitoring and bottom hole monitoring, and improves the accuracy and reliability of overflow monitoring;

[0092] 2. The present invention adopts a hierarchical naive Bayesian clustering method, relaxes certain independence statements of the naive Bayesian classifier, and integrates the local dependencies between attributes into the model, which can not only simplify the dependencies between variables, but also reflect the mutual dependencies between nodes, thereby more accurately representing the data and improving the predictive ability of the classifier.

[0093] 3. The overflow discrimination classifier of the present invention uses a naive Bayes classifier. This algorithm has the advantages of small amount of calculation, simple and easy implementation, and applicable to multi-dimensional data processing. It is very suitable for overflow monitoring under a variety of complex conditions.

[0094] 4. The present invention adds overflow warning and classification processing after overflow monitoring and identification, fully considering the changes in parameters such as total hydrocarbon content HC during drilling and the changes in related parameters under drilling overflow conditions, and conducts comprehensive analysis, identification and correction processing on them, which effectively improves the warning accuracy and timeliness of the overflow monitoring model and improves the overflow risk prevention system.

[0095] 5. Since the change of overflow characteristic parameters is not necessarily caused by overflow, the overflow identification result is given in the form of probability, which is more reasonable. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] Figure 1 It is a schematic diagram of the structure of the hierarchical naive Bayesian network clustering model of the present invention;

[0097] Figure 2 A schematic diagram of the structure of a hierarchical naive Bayesian network clustering model for early overflow monitoring according to an embodiment of the present invention;

[0098] Figure 3 A flow chart of a method for early overflow detection and graded early warning processing based on a hierarchical naive Bayesian network clustering model according to an embodiment of the present invention;

[0099] Figure 4 A logging diagram showing steady-state changes in total hydrocarbon content HC under normal drilling conditions according to an embodiment of the present invention;

[0100] Figure 5 A logging diagram showing abnormal changes in total hydrocarbon content HC under normal drilling conditions according to an embodiment of the present invention;

[0101] Figure 6 is an overflow probability curve of an embodiment of the present invention;

[0102] In the figure: K-overflow event, A1-aggregation node, A2-aggregation node, A3-aggregation node (A1, A2 and A3 are aggregation nodes generated after model learning), rho (ρ)-density, mu (μ)-viscosity, T-temperature, Rm-conductivity, Q-inlet and outlet flow difference, P-riser pressure, R-drilling rate, M-torque, B-oil and gas field block, r-lithology (including porosity, permeability, pressure index, bulk elastic modulus and other physical parameters), HC-total hydrocarbon content (mainly derived from the content of oil, gas and other oil and gas components in the rock layer). DETAILED DESCRIPTION

[0103] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0104] The present invention provides an early overflow detection and hierarchical early warning processing system, including a hierarchical naive Bayesian network clustering model and a hierarchical naive Bayesian overflow monitoring model;

[0105] Introducing potential nodes between class nodes and attribute nodes of the naive Bayesian network clustering model, constructing a hierarchical naive Bayesian network clustering model;

[0106] For early overflow in the drilling process, multiple overflow monitoring parameters are selected from three levels of measurement while drilling, comprehensive surface logging, and formation and lithology as multiple attribute nodes of the hierarchical naive Bayesian network clustering model, overflow events are used as class nodes of the hierarchical naive Bayesian network clustering model, and cluster nodes are used as potential nodes generated in the learning process of the hierarchical naive Bayesian network clustering model;

[0107] After introducing potential nodes, the node state values ​​are determined and a new classifier model is generated;

[0108] Taking the characteristic vector of overflow monitoring parameters as the input of a new classifier model of the hierarchical naive Bayesian network clustering model, and performing overflow identification based on the naive Bayesian algorithm and clustering processing through the new classifier model;

[0109] The overflow recognition results of the new classifier model for each overflow monitoring parameter are given in the form of probability, and the overflow recognition results of each overflow monitoring parameter are input into the hierarchical naive Bayes overflow monitoring model to obtain the final overflow discrimination result, and graded warning and processing are performed when the overflow discrimination result is abnormal.

[0110] According to a specific embodiment of the present invention, when selecting multiple overflow monitoring parameters, obtainable measurement while drilling monitoring parameters, comprehensive surface logging monitoring parameters, and formation and lithology monitoring parameters that can reflect the occurrence of overflow are selected and collected in real time.

[0111] According to a specific implementation scheme of the present invention, the measurement while drilling monitoring parameters that can reflect the occurrence of overflow are selected as drilling speed R and torque M; the comprehensive surface logging monitoring parameters that can reflect the occurrence of overflow are density ρ, viscosity μ, temperature T, conductivity Rm, inlet and outlet flow difference Q and standpipe pressure P; the formation and lithology monitoring parameters that can reflect the occurrence of overflow are oil and gas field block B, lithology r, and total hydrocarbon content HC.

[0112] According to a specific implementation scheme of the present invention, before using the early overflow monitoring and graded early warning processing based on the hierarchical naive Bayesian network clustering model, an overflow parameter feature database is established according to historical overflow data, and the hierarchical naive Bayesian overflow monitoring model corresponding to it is trained using different overflow monitoring parameters to obtain a hierarchical naive Bayesian overflow monitoring model for real-time overflow monitoring.

[0113] According to a specific embodiment of the present invention, during the learning process of early overflow monitoring, the hierarchical naive Bayesian network clustering model continuously and dynamically updates overflow monitoring parameters and evaluates and assesses the model according to actual on-site working conditions and staff experience.

[0114] According to a specific embodiment of the present invention, for overflow monitoring parameters collected in real time, attribute condition mutual information is calculated, and feature extraction is performed based on the calculated attribute condition mutual information to construct a feature vector of the overflow monitoring parameters.

[0115] According to a specific embodiment of the present invention, in drilling overflow monitoring, for overflow monitoring parameters collected in real time, attribute condition mutual information is calculated to evaluate the mutual dependence between two variables. The specific process is as follows:

[0116] Suppose there are three random variables X, Y and Z. Given Z, the calculation formula for the conditional mutual information CMI(X,Y|Z) between X and Y is as follows:

[0117]

[0118] in,

[0119] p(x, y, z) represents the joint probability distribution of three random variables X, Y, and Z;

[0120] p(x, y|z) represents the joint probability distribution of X and Y given Z;

[0121] p(x|z) and p(y|z) represent the marginal probability distribution of X and Y respectively under the given condition Z. The larger the value of CMI(X,Y|Z), the stronger the mutual dependence between X and Y. If CMI(X,Y|Z)=0, it means that X and Y are independent of each other.

[0122] According to a specific embodiment of the present invention, the steps of extracting features and constructing feature vectors of overflow monitoring parameters include:

[0123] (1) Data preprocessing, including removal of outliers and noise data, normalization, and data stabilization operations;

[0124] (2) Data collection and storage: continuously collect overflow monitoring parameters in real time and store them in a database or real-time data warehouse;

[0125] (3) Feature selection: Based on the calculated attribute condition mutual information, the parameters whose attribute condition mutual information value in overflow monitoring is greater than the preset threshold are selected as the features with the most decision-making ability;

[0126] (4) Feature transformation: improving the dimension of the original feature space to obtain a feature space with higher dimensions;

[0127] (5) Feature dimensionality reduction: reducing the higher-dimensional feature space back to the dimension of the original feature space.

[0128] According to a specific embodiment of the present invention, when performing feature transformation, a feature mapping is used to increase the dimension of the original feature space. When increasing the dimension of the original feature space, polynomial expansion is used for feature mapping, and its formula is as follows:

[0129]

[0130] wherein,

[0131] [x1,x2,...,x d is the specific form of the original data x, is the feature vector of the extended overflow monitoring parameter.

[0132] According to a specific embodiment of the present invention, the principal component analysis method is used to reduce the dimension of the high-dimensional feature space back to the dimension of the original feature space. Assume a feature vector matrix X of the overflow monitoring parameter with m×n, where m represents the number of samples and n represents the number of features. The data matrix is reduced to K dimensions through the principal component analysis method, where K < n, specifically as follows:

[0133] a. Data centering, subtracting the mean of each feature from the feature vector matrix X of the original overflow monitoring parameter:

[0134]

[0135] wherein, X c is the feature vector matrix of the overflow monitoring parameter after centering, and X i is the i-th sample in the feature vector matrix of the overflow monitoring parameter;

[0136] b. Calculate the covariance matrix C of the feature vector matrix X c of the overflow monitoring parameter after centering:

[0137]

[0138] c. Calculate the eigenvectors and eigenvalues of the covariance matrix C. The eigenvalue matrix is Λ, then there is:

[0139] CX = XΛ

[0140] wherein, each column in X is an eigenvector;

[0141] d. According to the order of the eigenvalues, select the eigenvectors corresponding to the first k eigenvalues, and form the principal component matrix W k of the eigenvectors. These eigenvectors are called the principal components;

[0142] e. Project the feature vector matrix X of the overflow monitoring parameter onto the principal components to obtain the projected feature vector matrix of the overflow monitoring parameter:

[0143] Y=X C W k

[0144] Among them, Y is the eigenvector matrix of overflow monitoring parameters after projection.

[0145] According to a specific embodiment of the present invention, a potential node is introduced between the class node and the attribute node of the naive Bayesian network clustering model, and the hierarchical naive Bayesian network clustering model is constructed, comprising the following steps:

[0146] In drilling overflow monitoring, after constructing the feature vector of overflow monitoring parameters, three potential nodes representing different variables are introduced into the naive Bayes classifier, and the three potential nodes are added to the feature vector of the original overflow monitoring parameters to obtain the extended feature vector of the overflow monitoring parameters. Assume that the feature vector of the original overflow monitoring parameters is:

[0147] x=(x1,x2,...,x j )

[0148] j is the dimension of the feature vector of the overflow monitoring parameter. The three potential nodes node1, node2, and node3 are added to the feature vector x of the overflow monitoring parameter, and the expanded feature vector is as follows:

[0149]

[0150] Normalize the expanded feature vector.

[0151] According to a specific embodiment of the present invention, after introducing the potential node, the node state value is determined as follows:

[0152] Based on the experience of experts in the drilling industry, the status and interrelationship of three potential nodes related to drilling overflow are determined.

[0153] According to a specific embodiment of the present invention, the steps of classifier based on naive Bayes algorithm in early overflow monitoring are as follows:

[0154] A large data sample is established based on historical well data, and each sample is represented by a vector containing overflow parameters, potential nodes and overflow values;

[0155] Classify the attributes of historical well big data samples into corresponding potential nodes;

[0156] Calculate the prior probability of overflow occurrence and non-occurrence, that is, the percentage of samples s1 with overflow value "yes" to the total number of samples s and the percentage of samples s0 with overflow value "no" to the total number of samples s;

[0157] Calculate the conditional probabilities of the attributes corresponding to the classification of the potential nodes respectively;

[0158] Calculate the posterior probability P2 of overflow occurrence and the posterior probability P3 of overflow non-occurrence under various overflow monitoring attribute conditions of the target well;

[0159] Compare P2 and P3. If the posterior probability of overflow occurrence is greater than the posterior probability of overflow not occurring, it is judged that overflow occurs in the target well at this time; otherwise, it is judged that overflow does not occur.

[0160] According to a specific embodiment of the present invention, when the overflow identification result is abnormal, the graded warning and processing are specifically: a threshold is set for the number of drilling overflows or the wellhead pressure to classify and determine the overflow level that occurs.

[0161] According to a specific embodiment of the present invention, when limiting the number of drilling overflows, the threshold formula of the number of drilling overflows is as follows:

[0162] Quantity_Threshold=V0+k1*(Drilling_Rate–R0)

[0163] Among them, V0 represents the set basic threshold value; R0 represents the set standard drilling speed; Drilling_Rate represents the drilling speed of the drill bit; k1 represents the set quantity threshold coefficient, usually 1 to 2. When the flow rate of drilling fluid exceeds the overflow classification threshold value, it is divided into different overflow grades.

[0164] According to a specific embodiment of the present invention, when the wellhead pressure is limited, the threshold formula of the wellhead pressure is as follows:

[0165] Pressure_Threshold=P0+k2*(Depth–D0)

[0166] Among them, P0 represents the set basic threshold value; D0 represents the set basic depth; Depth represents the depth of the well; k2 represents the set pressure threshold coefficient, usually 0.1-0.2. When the wellhead pressure exceeds the overflow classification threshold value, it is divided into different overflow grades.

[0167] The present invention provides an early overflow detection and graded warning processing method, which is used in the early overflow detection and graded warning processing system according to any one of claims 1 to 16, comprising the following steps:

[0168] Select overflow monitoring parameters;

[0169] Collect overflow monitoring parameters in real time and use the overflow monitoring parameters as attributes;

[0170] Calculate attribute conditional mutual information;

[0171] Constructing feature vectors of overflow monitoring parameters;

[0172] Introducing potential nodes;

[0173] Determine the node state value and generate a new classifier model;

[0174] Overflow identification is performed based on the hierarchical naive Bayesian model. If there is an abnormality, overflow warning classification and classification processing are carried out, and the overflow feature number database update, Bayesian model training, model evaluation and evaluation steps are performed in sequence. If there is no abnormality, the overflow monitoring parameters are dynamically updated.

[0175] Example 1

[0176] According to a specific embodiment of the present invention, referring to the attached Figure 3 The early overflow detection and graded warning processing method of the present invention is described in detail below, including the following steps:

[0177] (1) According to the actual situation on site, available monitoring parameters such as measurement while drilling, comprehensive surface logging, formation and lithology that can reflect the occurrence of overflow are selected as overflow characteristic parameters.

[0178] (2) Real-time acquisition of selected overflow monitoring parameters: the drilling speed R and torque M in the measurement while drilling monitoring parameters can be decoded by the ground decoding module of the measurement while drilling tool and then connected to the computer through the RS232 converter; the overflow characteristic parameters measured by the density meter installed in the drill string or logging instrument and the thermometer or infrared thermometer installed on the pipeline or drill string can be decoded by the ground decoding module and then connected to the computer through the RS232 converter; the overflow characteristic parameters measured by the Coriolis flowmeter installed in the throttling manifold branch and the pressure sensor installed on the riser can be connected to the computer through the RS485 converter.

[0179] (3) The conditional mutual information of the attributes (parameters) of the selected overflow monitoring parameters is calculated. The interdependence between multiple variables is evaluated by using the conditional mutual information to help select the most decision-making features for overflow prediction.

[0180] (4) Extract features from overflow monitoring parameters after data processing and construct overflow feature vectors. Constructing overflow feature vectors can lay a good foundation for data processing for the subsequent introduction of potential nodes, determination of node status, new classifiers, etc., and is the most important step in the machine learning process.

[0181] (5) Three potential node clustering operations are introduced into the hierarchical naive Bayes overflow monitoring model.

[0182] (6) For the hierarchical naive Bayes overflow monitoring model, after introducing three potential nodes, the node state value operation is performed and a new classifier is generated. The state of the three potential nodes is determined by the knowledge of domain experts. Through communication with domain experts related to the drilling industry, the state range of the three potential nodes related to drilling overflow is determined; in drilling overflow monitoring, after constructing the overflow feature vector, introducing three potential nodes, and determining the state of these three nodes, the correlation between the attributes is greatly weakened, avoiding the correlation problem between the features, making the overflow monitoring parameters (attributes) approximately independent of each other. When selecting the overflow discrimination classifier, the naive Bayes algorithm can be used first. The advantages of this algorithm are that it has a small amount of calculation, is simple and easy to implement, and is suitable for processing multidimensional data. By introducing potential nodes and determining the node state operation, the algorithm can very well solve the harsh condition that the attributes must be independent of each other.

[0183] (7) The overflow identification results of the classifier model are given in the form of probability, and each identification result is input into the hierarchical naive Bayes overflow monitoring model to obtain the final overflow discrimination result. The final overflow discrimination result is displayed. If the discrimination result is abnormal and displayed as "No", the dynamic parameter update step is executed, and steps (2)-(7) are repeated; the final overflow discrimination result is displayed. If the discrimination result is abnormal and displayed as "Yes", the overflow feature number database update, Bayesian model training, model evaluation and optimization steps are executed in sequence, and steps (5)-(7) are repeated; the final overflow discrimination result is displayed. If the discrimination result is abnormal and displayed as "Yes", the overflow warning and graded processing results are executed.

[0184] Example 2

[0185] In this embodiment, an early overflow monitoring and graded early warning processing method based on a hierarchical naive Bayesian network clustering model is combined with Figure 3 , its characteristic steps are as follows:

[0186] A. Determine overflow monitoring parameters: According to the actual situation on site, select available monitoring parameters such as measurement while drilling, comprehensive surface logging, formation and lithology that can reflect the occurrence of overflow;

[0187] B. Real-time collection of selected overflow monitoring parameters;

[0188] C. Calculating attribute (parameter) conditional mutual information of the selected overflow monitoring parameters;

[0189] D. Extracting features from overflow monitoring parameters after data processing and constructing overflow feature vectors;

[0190] E1. Introducing three potential node clustering operations into the hierarchical naive Bayes overflow monitoring model;

[0191] E2. After introducing three potential nodes into the hierarchical naive Bayes overflow monitoring model, the node state value operation is determined and a new classifier is generated;

[0192] F. Inputting the parameter features generated after constructing the overflow feature vector into the hierarchical naive Bayes overflow monitoring model respectively, and performing overflow identification based on the naive Bayes algorithm and the identification model of clustering processing;

[0193] G. Give the overflow recognition results of the classifier model in the form of probability, and input each recognition result into the hierarchical naive Bayes overflow monitoring model to obtain the final overflow discrimination result;

[0194] H1, display the final overflow judgment result. If the judgment result is abnormal and displayed as "No", execute the dynamic parameter update step and repeat steps B-H1;

[0195] H2, display the final overflow discrimination result. If the discrimination result is abnormal and is displayed as "yes", the overflow characteristic number database update, Bayesian model training, model evaluation and evaluation steps are performed in sequence, and steps E1-H2 are repeated;

[0196] H3. Display the final overflow judgment result. If the judgment result is abnormal and displayed as "yes", the overflow warning and graded processing results will be executed.

[0197] In this embodiment, the overflow monitoring parameters described in steps A and B are selected according to the actual situation on site, and the available monitoring parameters such as measurement while drilling, comprehensive surface logging, formation and lithology that can reflect the occurrence of overflow are selected and collected in real time; the measurement while drilling monitoring parameters that can reflect the occurrence of overflow are drilling speed R and torque M; the comprehensive surface logging monitoring parameters that can reflect the occurrence of overflow are density rho (ρ), viscosity mu (μ), temperature T, conductivity Rm, inlet and outlet flow difference Q, and standpipe pressure P; the formation and lithology monitoring parameters that can reflect the occurrence of overflow are oil and gas field block B, lithology r, and total hydrocarbon content HC.

[0198] In this embodiment, the overflow monitoring parameters in steps A and B, the measurement while drilling monitoring parameters are drilling speed R and torque M, which are usually obtained by measurement while drilling tools. The measurement while drilling tools can monitor well depth, drill bit position, drilling speed, torque, drilling fluid properties, core sampling and other information around the clock during the drilling process. When drilling overflow occurs, a series of changes will occur in the drilling speed R and torque M. The drilling process may cause stuck drill, sudden increase in drilling speed or emptying phenomenon, and the torque may also suddenly increase or show a fluctuating and unstable state; the comprehensive surface logging monitoring parameters are density rho (ρ), viscosity mu (μ), temperature T, conductivity Rm, inlet and outlet flow difference Q, and standpipe pressure P, which are usually obtained by comprehensive logging and real-time field measurement. The inlet and outlet flow difference Q and standpipe pressure P are measured by equipment outside the drilling fluid system. The inlet and outlet flow difference Q is usually measured by a flow meter, and the standpipe pressure P is measured by a pressure sensor. Parameters such as density rho (ρ), viscosity mu (μ), temperature T, and conductivity Rm can all be obtained through on-site measurements. For example, density rho (ρ) can be measured using a densitometer, viscosity mu (μ) can be measured using a rotor-type and pipe-type viscometer, temperature T can be measured using a thermometer or an infrared thermometer, and conductivity Rm can be measured using a conductivity meter. When drilling overflow occurs, the density of the drilling fluid usually decreases, and the viscosity of the drilling fluid is also affected. Since there is a certain correlation between the density rho (ρ), viscosity mu (μ), temperature T, and conductivity Rm of the drilling fluid, the changes in each overflow monitoring parameter affect each other; the formation and lithology monitoring parameters are oil and gas field block B, lithology r, and total hydrocarbon content HC, which are usually measured through a variety of methods such as comprehensive logging and core analysis. Oil and gas field block B can be measured by seismic exploration methods, and the physical property information of the underground can be obtained through the reflection and refraction of seismic waves, so as to judge the feasibility of the oil and gas field. Lithology r can be measured by core analysis to obtain lithology information of the formation, and the lithology of the formation can be determined by visual observation of the core, microscopic analysis, physical testing, etc. The total hydrocarbon content HC is completed using a specific logging tool, and combined with the gas logging chart to analyze data changes to obtain information on changes in hydrocarbon gas content.

[0199] In this embodiment, the flow meter selected for the inlet and outlet flow difference Q is a Coriolis flowmeter, and the Coriolis flowmeter is installed on the throttling manifold branch; the riser pressure P is measured by a pressure sensor installed on the riser; the density rho (ρ) is measured by a densitometer installed in the drill string or a logging instrument; the viscosity mu (μ) is measured by a rotor-type and pipe-type viscometer used in the laboratory; the temperature T is measured by a thermometer or an infrared thermometer installed on a pipeline or a drill string; the conductivity Rm is measured by using a handheld conductivity meter at the wellhead where the drilling fluid returns.

[0200] In this embodiment, due to the complex formation conditions and poor on-site construction environment during the actual drilling process, tool measurement will inevitably produce certain errors, which increases the difficulty of early overflow monitoring. The traditional early overflow monitoring method based on a single factor is often greatly affected by error noise and cannot accurately identify overflows. Therefore, through the investigation of literature and a large amount of field data, some characteristic parameters closely related to overflows and their characterization laws are selected and summarized as shown in Table 1. By monitoring early overflows with multiple parameters, the accuracy of overflow identification can be improved and drilling safety can be enhanced.

[0201] Table 1 Overflow characteristic parameters and their characterization rules

[0202]

[0203] In this embodiment, the hierarchical naive Bayesian overflow monitoring model described in step DG refers to an overflow feature database established according to historical overflow data before the early overflow monitoring and graded early warning processing method based on the hierarchical naive Bayesian network clustering model is used, and the hierarchical naive Bayesian overflow monitoring model corresponding to it is trained using different overflow monitoring data; these trained hierarchical naive Bayesian overflow monitoring models are the basis for the early overflow monitoring and graded early warning processing method based on the hierarchical naive Bayesian network clustering model used in the model learning process; during the learning process of early overflow monitoring, the hierarchical naive Bayesian network clustering model will continuously dynamically update the overflow monitoring parameters and evaluate the model according to the actual working conditions on site and the experience of the staff, thereby improving the prediction ability of the classifier and reducing the misjudgment rate of the model.

[0204] In this embodiment, the detailed related technologies involved in the characteristic steps of an early overflow monitoring and graded early warning processing method based on a hierarchical naive Bayesian network clustering model are as follows.

[0205] In this embodiment, the characteristic step C is a step and related technology for calculating the conditional mutual information of the selected overflow monitoring parameters. Conditional mutual information refers to the amount of information between multiple random variables under the condition of a given random variable. In drilling overflow monitoring, there are three random variables X, Y and Z (due to the large number of overflow monitoring parameters, this article simplifies the calculation formula of three random variables for easy understanding by readers), and the calculation formula of conditional mutual information is as follows:

[0206]

[0207] Among them, p(x,y,z) represents the joint probability distribution of the three random variables X, Y, and Z, p(x,y|z) represents the joint probability distribution of X and Y under the condition of given Z, and p(x|z) and p(y|z) represent the marginal probability distribution of X and Y under the condition of given Z. The larger the value of CMI(X,Y|Z), the stronger the mutual dependence between X and Y. If CMI(X,Y|Z)=0, it means that X and Y are independent of each other, that is, there is no conditional mutual information between them. In drilling overflow monitoring, the conditional mutual information between each pair of features can be calculated, and the most decision-making features can be selected according to the value of conditional mutual information, so as to design the optimal feature set, which is convenient for the next step of constructing overflow feature vectors. At the same time, conditional mutual information can also be used for feature selection to reduce the number of input features and avoid the essential cause of the dimensionality curse problem.

[0208] In this embodiment, before the steps and related technologies of constructing the overflow feature vector are performed, the actual drilling data of multiple specific blocks in the XXX well area of ​​the XX oil field are selected as the original data, and the cumulative changes of the feature parameters in about 20 seconds are used to construct data sets of various sizes to simulate different periods of block development and test the generalization ability of the model. The specific information of the actual drilling data set is shown in Table 2.

[0209] Table 2 Actual drilling data set

[0210]

[0211]

[0212] In this embodiment, the number of samples in the actual drilling data set in Table 2 is 1000 groups, of which 100 groups have overflow samples and 900 groups have no overflow samples. The serial numbers 1-1000 in Table 2 represent multiple specific blocks in the XXX well area, and the actual drilling data of the well area blocks are used as original data, which provides real and reliable data support for the subsequent feature step D to extract features from the overflow monitoring parameters after data processing and construct overflow feature vectors.

[0213] In this embodiment, the characteristic step D extracts features from the overflow monitoring parameters after data processing, and constructs the steps and related technologies of the overflow feature vector:

[0214] (1) Data preprocessing

[0215] The overflow monitoring data collected in real time may contain outliers, noise and other erroneous data. First, the overflow monitoring data needs to be preprocessed. The preprocessing steps include removing outliers, noise and other erroneous data, normalization, data stabilization and other operations to ensure the quality and accuracy of the data.

[0216] The present invention uses Min-Max normalization, which can scale the eigenvalue to the range of [0,1]. The specific normalization processing formula is as follows:

[0217]

[0218]

[0219]

[0220] x is the original data, min(x) is the minimum value in the data, max(x) is the maximum value in the data, and x' is the normalized data. Through Min-Max normalization, data with different eigenvalues ​​can be scaled to the same range, eliminating the size normalization problem between different eigenvalue weights, and providing more accurate data for overflow monitoring and prediction.

[0221] (2) Data collection and storage

[0222] In real-time monitoring, overflow monitoring data needs to be continuously collected and stored in a database or real-time data warehouse to facilitate subsequent overflow characteristic database updates and Bayesian model training.

[0223] (3) Feature selection

[0224] By calculating the attribute (parameter) conditional mutual information (CMI) of the selected overflow monitoring parameters through the feature step C, the features can be selected. The most decision-making features in overflow monitoring are selected to reduce the number of input overflow features and avoid the dimensionality disaster.

[0225] (4) Feature transformation

[0226] During feature transformation, feature mapping is used to increase the dimension of the original feature space. Feature mapping is a method of mapping low-dimensional data to high-dimensional data, that is, mapping from a low-dimensional space to a high-dimensional space.

[0227] When using feature mapping to increase the dimension of the original feature space, polynomial expansion is used for feature mapping, and the formula is as follows:

[0228]

[0229] x is the original data, deg represents the highest degree of polynomial expansion, is the expanded eigenvector.

[0230] Polynomial expansion can expand the input data from the original feature space to a higher-dimensional space, increasing the number of features while improving the nonlinear representation capability of the feature space, thereby improving the fitting ability of the machine learning model.

[0231] (5) Feature Dimensionality Reduction

[0232] After feature transformation, the original feature space becomes a high-dimensional space. Principal component analysis (PCA) is used to reduce the high-dimensional feature space back to the original dimensional space to improve the performance and interpretability of the model. The formula is as follows:

[0233] Suppose there is an m×n data matrix X, where m represents the number of samples and n represents the number of features. Now we use principal component analysis (PCA) to reduce the data matrix to K dimensions, where K <n。

[0234] a. Data Center

[0235] First, subtract the mean of each feature in the original data matrix X to ensure that the mean of all features is 0. That is:

[0236]

[0237] X c is the centralized data matrix, X i is the i-th sample in the data matrix.

[0238] b. Calculate the covariance matrix

[0239] Calculate the centralized data matrix X c The covariance matrix C of is:

[0240]

[0241] Here, m is the number of samples.

[0242] c. Calculate eigenvectors and eigenvalues

[0243] Calculate the eigenvectors and eigenvalues ​​of the covariance matrix C. Let the eigenvector matrix be V and the eigenvalue matrix be Λ. Then we have:

[0244] CV=VΛ 8)

[0245] Among them, each column in V is a feature vector.

[0246] d. Select the principal component

[0247] According to the order of the eigenvalues, the eigenvectors corresponding to the first k eigenvalues ​​are selected and they are combined into the eigenvector matrix Wk. These eigenvectors are called principal components and can be used to project the original data X into a low-dimensional space.

[0248] e. Projection

[0249] Project the data X onto the principal components to obtain a new data matrix Y:

[0250] Y=X C W k 9)

[0251] Among them, W k The principal component matrix, Y is the new data matrix after projection.

[0252] In this embodiment, the steps and related technologies of introducing three potential node clustering operations into the hierarchical naive Bayes overflow monitoring model are as follows:

[0253] In drilling overflow monitoring, after constructing the overflow feature vector, in order to relax some independence statements of the naive Bayes classifier, the local dependencies between attributes are better integrated into the model. Three potential nodes representing different variables are introduced to more accurately analyze and predict the overflow situation. The three potential nodes are added to the original feature vector to obtain the expanded feature vector. Assume that the original feature vector is:

[0254] x=(x1,x2,...,x n )

[0255] n is the dimension of the feature vector. By adding three potential nodes node1, node2, and node3 to the feature vector x, we can get the expanded feature vector:

[0256]

[0257] Since the three potential nodes may have a large difference in the magnitude of the variables from the original feature vector, in order to avoid their excessive influence in the feature space, they need to be standardized or normalized. For the processing technology and operation of normalizing the expanded feature vector, readers can refer to the Min-Max normalization method above.

[0258] In this embodiment, the hierarchical naive Bayes overflow monitoring model introduces three potential nodes, performs node state value operations, and generates steps and related technologies for generating new classifiers:

[0259] (1) Determine the node status value

[0260] The states of the three potential nodes are determined through the knowledge of domain experts. Through communication with domain experts related to the drilling industry, the state ranges of the three potential nodes related to drilling overflow are determined. For example, the formation pressure may have normal, high and abnormal states, the correlation between the drilling fluid density rho (ρ), viscosity mu (μ), temperature T, and conductivity Rm, and the mutual influence between the inlet and outlet flow difference Q, standpipe pressure P, drilling speed R, and torque M.

[0261] (2) Selection of classifier

[0262] In drilling overflow monitoring, after constructing the overflow feature vector, introducing three potential nodes, and determining the state operations of these three nodes, the correlation between attributes is greatly weakened, avoiding the correlation problem between features, making the overflow monitoring parameters (attributes) approximately independent of each other. When selecting an overflow discrimination classifier, the naive Bayes algorithm can be used first. The advantages of this algorithm are that it has a small amount of calculation, is simple and easy to implement, and is suitable for processing multidimensional data. By introducing potential nodes and determining the node state operation, the algorithm can very well solve the harsh condition that the attributes must be independent of each other.

[0263] In this embodiment, the steps of early overflow monitoring and identification based on the naive Bayes classifier are as follows:

[0264] (1) Based on the available historical wells, m rows of big data samples are established. Each sample is represented by a vector X={X 11 , X 12 , X 13 , X 14 , X 21 , X 22 , X 23 , X 24 , X 31 , X 32 , X 33 , A1, A2, A3, C} means, where X 11 is the density rho(ρ), X 12 is the viscosity mu (μ), X 13 is the temperature T, X 14 is the conductivity Rm, X 21 is the inlet and outlet flow difference Q, X 22 is the riser pressure P, X 23 is the drilling speed R, X 24 is the torque M, X 31 For oil and gas field block B, X 32 is the lithology r, X 33 is the total hydrocarbon content HC; A1, A2, A3 are three aggregation nodes generated by model learning, and C represents the overflow value, which is "yes" or "no".

[0265] (2) The first 11 attributes of the historical well big data sample are classified, among which X 11 -X 14 The type is A1 aggregation attribute, X 21 -X 24 The type is A2 aggregation attribute, X 31 -X 33 The type is A3 aggregation attribute.

[0266] (3) First, calculate the prior probability of overflow occurrence and non-occurrence (also called historical well probability), that is, the percentage of samples s1 with overflow value "yes" in the total number of samples s and the percentage of samples s0 with overflow value "no" in the total number of samples s.

[0267] Calculate the prior probability of overflow occurring and not occurring

[0268]

[0269]

[0270] In the formula, s1 is the number of samples with an overflow value of "yes" in the sample; s0 is the number of samples with an overflow value of "no" in the sample; s is the total number of samples; P1 is the prior probability of overflow occurring; P0 is the prior probability of overflow not occurring.

[0271] (4) Calculate the aggregation attribute X of A1 respectively 11 , X 12 , X 13 , X 14 The conditional probability of X 11 , X 12 , X 13 , X 14 As a quantitative attribute, the distribution conforms to the normal shape. In all samples with the overflow value of "yes", X 11 , X 12 , X 13 , X 14 The conditional probability that the values ​​of (density, viscosity, temperature, and conductivity) are rho(ρ), mu(μ), T, and Rm respectively is

[0272]

[0273]

[0274]

[0275]

[0276] In the formula, σ1rh and μ 1rh They represent all samples with overflow value “yes”, X 11 (density) mean and standard deviation; σ 1m and μ 1m They represent all samples with overflow value “yes”, X 12 (viscosity) mean and standard deviation; σ 1T and μ 1T They represent all samples with overflow value “yes”, X 13 (temperature) mean and standard deviation; σ 1Rm and μ 1Rm They represent all samples with overflow value “yes”, X 14 (Conductivity) mean and standard deviation;

[0277] In all samples with overflow value "No", X 11 , X 12 , X 13 , X 14 The conditional probability that the values ​​of (density, viscosity, temperature, and conductivity) are rho(ρ), mu(μ), T, and Rm respectively is

[0278]

[0279]

[0280]

[0281]

[0282] In the formula, σ 0rh and μ 0rh In all samples where the overflow value is “No”, X 11 (density) mean and standard deviation; σ 0m and μ 0m In all samples where the overflow value is “No”, X 12 (viscosity) mean and standard deviation; σ 0T and μ 0T In all samples where the overflow value is “No”, X 13 (temperature) mean and standard deviation; σ 0Rm and μ 0Rm In all samples where the overflow value is “No”, X 14 (Conductivity) mean and standard deviation;

[0283] (5) Calculate the A2 aggregation attribute X separately 21 , X 22 , X 23, X 24 The conditional probability of X 21 , X 22 , X 23 , X 24 As a quantitative attribute, the distribution conforms to the normal shape. In all samples with the overflow value of "yes", X 21 , X 22 , X 23 , X 24 The conditional probability that the values ​​of (inlet and outlet flow difference, standpipe pressure, drilling speed, torque) are Q, P, R, and M respectively is

[0284]

[0285]

[0286]

[0287]

[0288] In the formula, σ 1Q and μ 1Q They represent all samples with overflow value “yes”, X 21 The mean and standard deviation of (difference between import and export flow); σ 1P and μ 1P They represent all samples with overflow value “yes”, X 22 The mean and standard deviation of (standpipe pressure); σ 1R and μ 1R They represent all samples with overflow value “yes”, X 23 The mean and standard deviation of drilling speed; σ 1M and μ 1M They represent all samples with overflow value “yes”, X 24 (torque) mean and standard deviation;

[0289] In all samples with overflow value "No", X 21 , X 22 , X 23 , X 24 The conditional probability that the values ​​of (inlet and outlet flow difference, standpipe pressure, drilling speed, torque) are Q, P, R, and M respectively is

[0290]

[0291]

[0292]

[0293]

[0294] In the formula, σ 0Q and μ 0Q In all samples where the overflow value is “No”, X 21 The mean and standard deviation of (difference between import and export flow); σ 0P and μ 0P In all samples where the overflow value is “No”, X 22 The mean and standard deviation of (standpipe pressure); σ 0R and μ 0R In all samples where the overflow value is “No”, X 23 The mean and standard deviation of drilling speed; σ 0M and μ 0M In all samples where the overflow value is “No”, X 24 (torque) mean and standard deviation;

[0295] (6) Calculate the A3 aggregation attribute X respectively 31 , X 32 , X 33 The conditional probability of X 31 , X 32 , X 33 As a qualitative attribute, in all samples where the overflow value is “yes”, X 31 , X 32 , X 33 The conditional probability that the values ​​of (oil and gas field block, lithology, total hydrocarbon content) are B, r, and HC respectively is

[0296]

[0297]

[0298]

[0299] In the formula, s 1B Indicates that among all samples with overflow value "yes", the attribute is X 31 The number of samples of oil and gas field blocks; 1r Indicates that among all samples with overflow value "yes", the attribute is X 32 The number of samples of lithology; s 1H Indicates that among all samples with overflow value "yes", the attribute is X 33 Number of samples for total hydrocarbon content.

[0300] In all samples with overflow value "No", X 31 , X 32 , X 33 The conditional probability that the values ​​of (oil and gas field block, lithology, total hydrocarbon content) are B, r, and HC respectively is

[0301]

[0302]

[0303]

[0304] In the formula, s 0B Indicates that among all samples with overflow value "No", the attribute is X 31 The number of samples of oil and gas field blocks; 0r Indicates that among all samples with overflow value "No", the attribute is X 32 The number of samples of lithology; s 0H Indicates that among all samples with overflow value "No", the attribute is X 33 Number of samples for total hydrocarbon content.

[0305] (7) According to the naive Bayesian probability theory, based on the prior probability obtained in step 3, the conditional probabilities of the qualitative attributes of the A1 and A2 clusters obtained in steps 4 and 5, and the conditional probability of the quantitative attributes of the A3 cluster obtained in step 6, the posterior probability P2 of the overflow occurring in the target well and the posterior probability P3 of the overflow not occurring under the conditions of various overflow monitoring attributes can be calculated.

[0306] The posterior probability P2 of overflow is

[0307]

[0308] Where P2 is the target well at X based on historical big data. 31 Oil and Gas Field Block X 32 In lithology, density is X 11 , viscosity mu (μ) is X 12 , temperature T is X 13 , conductivity Rm is X 14 , the inlet and outlet flow difference Q is X 21 , the riser pressure P is X 22 , drilling speed R is X 23 , torque M is X 24 , the total hydrocarbon content HC is X 33 The probability of overflow occurring underground.

[0309] The posterior probability P3 of overflow occurrence is

[0310]

[0311] Where P3 is the target well at X based on historical big data. 31 Oil and Gas Field Block X 32 In lithology, density is X 11 , viscosity mu (μ) is X 12, temperature T is X 13 , conductivity Rm is X 14 , the inlet and outlet flow difference Q is X 21 , the riser pressure P is X 22 , drilling speed R is X 23 , torque M is X 24 , the total hydrocarbon content HC is X 33 The probability that no overflow occurs underground.

[0312] (8) According to the naive Bayesian theory, P2 and P3 are compared. If the former is greater than the latter, it is judged that overflow has occurred in the target well at this time; otherwise, it is judged that no overflow has occurred.

[0313] In this embodiment, the step H3 is a step and related technology for executing overflow warning and grading processing results:

[0314] After the drilling overflow condition is identified in the early overflow monitoring based on the naive Bayes classifier described in this embodiment, the overflow classification threshold can be set on the computer software monitoring end to classify the drilling overflow according to the historical well data and actual field experience. The classification of the drilling overflow provides a guarantee basis for the subsequent overflow warning and classification processing.

[0315] The overflow classification threshold is set to classify the level of drilling overflow. The method that can be used is to set a threshold for the number or pressure of drilling overflow to classify and judge the overflow level that occurs. The formula for setting the overflow classification threshold is as follows:

[0316] (1) Threshold formula for calculating drilling overflow quantity

[0317] Quantity_Threshold=V0+k1*(Drilling_Rate–R0)36)

[0318] Among them, V0 represents the set basic threshold value; R0 represents the set standard drilling speed; Drilling_Rate represents the drilling speed (drilling speed) of the drill bit; k1 represents the set quantity threshold coefficient, usually 1 to 2. When the flow rate of drilling fluid exceeds the overflow classification threshold value, it is divided into different grades.

[0319] (2) Threshold formula for calculating wellhead pressure

[0320] Pressure_Threshold=P0+k2*(Depth–D0)37)

[0321] Among them, P0 represents the set basic threshold value; D0 represents the set basic depth; Depth represents the depth of the well; k2 represents the set pressure threshold coefficient, usually 0.1 to 0.2. When the wellhead pressure exceeds the overflow classification threshold value, it is divided into different grades.

[0322] (3) Threshold formula for classifying drilling overflow levels

[0323] When the flow rate of drilling fluid or the wellhead pressure exceeds the overflow classification threshold value, the drilling overflow grade can be divided. The overflow classification threshold value can be set based on geological conditions, operating processes and other experience. Taking the number of drilling overflows as an example, when the flow rate Q of the drilling fluid exceeds the overflow classification threshold value, it can be divided into the following grades:

[0324] 1) Slight overflow: Q<1.5Q0;

[0325] 2) Medium overflow: 1.5Q0≤Q≤3Q0;

[0326] 3) Severe overflow: Q>3Q0;

[0327] According to the overflow volume and degree of harm, drilling overflow can be divided into three levels: slight, moderate and severe. The corresponding graded warning treatment is shown in Table 3.

[0328] Table 3 Drilling overflow levels and graded warning treatment

[0329]

[0330] (4) In conjunction with the above-mentioned drawings and the brief description of the drawings Figure 5 , Figure 6 The analysis leads to the conclusion that:

[0331] 1) Under normal drilling conditions, the total hydrocarbon content HC usually shows a steady-state change;

[0332] 2) Under normal drilling conditions, the total hydrocarbon content HC will also show abnormal changes. The sudden increase in the total hydrocarbon content HC may be caused by abnormal formation boundaries, drilling fluid problems, measurement errors and other issues;

[0333] 3) The reason for the sudden increase in total hydrocarbon content HC needs to be judged and analyzed based on the actual situation to determine whether drilling overflow conditions have occurred, reduce the misjudgment of overflow monitoring, and improve the accuracy and timeliness of the overflow identification model;

[0334] Example 3

[0335] In this embodiment, in order to verify that the invented method system can detect drilling overflow accidents in real time and effectively, multiple test experiments were conducted based on the overflow and historical well data of the drilling site in the XXX well area of ​​XX Oilfield. Some overflow monitoring data and graded warning results are shown in Table 4.

[0336] Table 4 Partial overflow monitoring data and graded warning results

[0337]

[0338] In this embodiment, the serial numbers 1-1000 in Table 4 represent multiple specific blocks in the XXX well area of ​​the XX oil field, and the actual drilling data of the well area blocks are all original data. The number of overflow monitoring data and graded warning samples in Table 4 is 1000 groups, of which there are 100 groups of overflow samples (68, 26, and 6 groups of samples with drilling overflow levels of slight, moderate, and severe, respectively), and there are 900 groups of samples without overflow.

[0339] In this embodiment, the accuracy of the hierarchical naive Bayesian network clustering model can reach 96.67%, and the specific classification results are shown in Table 5. Among them, the drilling overflow levels of "mild", "medium" and "serious" can achieve high evaluation accuracy. This shows that the evaluation model has good accuracy, and the evaluation results can provide support for scientific decision-making.

[0340] Table 5 Test sample evaluation results

[0341]

[0342] In this embodiment, the early overflow monitoring and graded early warning processing method based on the hierarchical naive Bayesian network clustering model is used to judge the overflow probability curve. Figure 6 . It is judged that the overflow occurs at the bottom of the target well in the XXX well area. The actual target is observed to have an abnormal increase in the return volume at the wellhead 30 minutes after the overflow occurs at the bottom of the well. For the target well, the method of the present invention can monitor the abnormal overflow parameter warning in advance at 17 minutes, providing sufficient time for judging the degree of overflow and taking well control measures.

[0343] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An early overflow detection and graded warning processing system, characterized in that: Including hierarchical naive Bayesian network clustering model and hierarchical naive Bayesian overflow monitoring model; Introducing potential nodes between class nodes and attribute nodes of the naive Bayesian network clustering model, constructing a hierarchical naive Bayesian network clustering model; For early overflow in the drilling process, multiple overflow monitoring parameters are selected from three levels of measurement while drilling, comprehensive surface logging, and formation and lithology as multiple attribute nodes of the hierarchical naive Bayesian network clustering model, overflow events are used as class nodes of the hierarchical naive Bayesian network clustering model, and cluster nodes are used as potential nodes generated in the learning process of the hierarchical naive Bayesian network clustering model; After introducing potential nodes, the node state values ​​are determined and a new classifier model is generated; Taking the characteristic vector of overflow monitoring parameters as the input of the new classifier model of the hierarchical naive Bayesian network clustering model, and performing overflow identification based on the naive Bayesian algorithm and clustering processing through the new classifier model; The overflow recognition results of the new classifier model for each overflow monitoring parameter are given in the form of probability, and the overflow recognition results of each overflow monitoring parameter are input into the hierarchical naive Bayes overflow monitoring model to obtain the final overflow discrimination result, and graded warning and processing are performed when the overflow discrimination result is abnormal.

2. The early overflow detection and graded warning processing system according to claim 1 is characterized in that: When multiple overflow monitoring parameters are selected, available measurement while drilling monitoring parameters, comprehensive surface logging monitoring parameters, and formation and lithology monitoring parameters that can reflect the occurrence of overflow are selected and collected in real time.

3. The early overflow detection and graded warning processing system according to claim 2 is characterized in that: The measurement while drilling monitoring parameters that can reflect the occurrence of overflow are selected as drilling speed R and torque M; the comprehensive surface logging monitoring parameters that can reflect the occurrence of overflow are density ρ, viscosity μ, temperature T, conductivity Rm, inlet and outlet flow difference Q and standpipe pressure P; the formation and lithology monitoring parameters that can reflect the occurrence of overflow are oil and gas field block B, lithology r, and total hydrocarbon content HC.

4. The early overflow detection and graded warning processing system according to claim 1 is characterized in that: Before using the early overflow monitoring and graded early warning processing based on the hierarchical naive Bayesian network clustering model, an overflow parameter feature database is established according to historical overflow data, and the corresponding hierarchical naive Bayesian overflow monitoring model is trained using different overflow monitoring parameters to obtain a hierarchical naive Bayesian overflow monitoring model for real-time overflow monitoring.

5. The early overflow detection and graded warning processing system according to claim 4 is characterized in that: During the learning process of early overflow monitoring, the hierarchical naive Bayesian network clustering model continuously and dynamically updates overflow monitoring parameters and evaluates and assesses the model according to actual on-site working conditions and staff experience.

6. The early overflow detection and graded warning processing system according to claim 1 is characterized in that: For the overflow monitoring parameters collected in real time, the attribute condition mutual information is calculated, and based on this, feature extraction is performed to construct the feature vector of the overflow monitoring parameters.

7. The early overflow detection and graded warning processing system according to claim 6 is characterized in that: In drilling overflow monitoring, for overflow monitoring parameters collected in real time, attribute condition mutual information is calculated to evaluate the interdependence between two variables. The specific process is as follows: Suppose there are three random variables X, Y and Z. Given Z, the calculation formula for the conditional mutual information CMI(X,Y|Z) between X and Y is as follows: in, p(x, y, z) represents the joint probability distribution of three random variables X, Y, and Z; p(x, y|z) represents the joint probability distribution of X and Y given Z; p(x|z) and p(y|z) respectively represent the marginal probability distributions of X and Y given Z; the larger the value of CMI(X, Y|Z), the stronger the mutual dependence relationship between X and Y. If CMI(X, Y|Z) = 0, it indicates that X and Y are independent of each other.

8. The early overflow detection and graded warning processing system according to claim 6 is characterized in that: The steps for feature extraction and constructing the feature vector of the overflow monitoring parameters include: (1) Data preprocessing, including removing outliers and noise data, normalization, and data stationary operation; (2) Data collection and storage, continuously and real-time collecting the overflow monitoring parameters and storing them in a database or a real-time data warehouse; (3) Feature selection, according to the calculated conditional mutual information of attributes, selecting the parameters with conditional mutual information values of attributes in overflow monitoring greater than a preset threshold as the most decision-making features; (4) Feature transformation, increasing the dimension of the original feature space to obtain a higher-dimensional feature space; (5) Feature reduction, reducing the dimension of the higher-dimensional feature space back to the dimension of the original feature space.

9. The early overflow detection and graded warning processing system according to claim 8, characterized in that: During feature transformation, use feature mapping to increase the dimension of the original feature space. When increasing the dimension of the original feature space, use polynomial expansion for feature mapping, and its formula is as follows: where, [x1,x2,...,x d ] is the specific form of the original data x, is the expanded feature vector of overflow monitoring parameters.

10. The early overflow detection and graded warning processing system according to claim 8, characterized in that: Use the principal component analysis method to reduce the dimension of the high-dimensional feature space back to the dimension of the original feature space. Assume a feature vector matrix X of overflow monitoring parameters of m×n, where m represents the number of samples and n represents the number of features. The data matrix is reduced to K dimensions through the principal component analysis method, where K < n, specifically as follows: a. Data centering, subtracting the mean of each feature from the original feature vector matrix X of overflow monitoring parameters: Among them, X c is the eigenvector matrix of the overflow monitoring parameters after centralization, X i is the i-th sample in the eigenvector matrix of overflow monitoring parameters; b. Calculate the eigenvector matrix X of the overflow monitoring parameters after centralization c The covariance matrix C of is: c. Calculate the eigenvectors and eigenvalues of the covariance matrix C. The eigenvalue matrix is Λ, then there is: CX = XΛ where, each column in X is an eigenvector; d. According to the order of the eigenvalues, select the eigenvectors corresponding to the first k eigenvalues ​​and form them into the principal component matrix W of the eigenvectors k , these eigenvectors are called principal components; e. Project the feature vector matrix X of overflow monitoring parameters onto the principal components to obtain the projected feature vector matrix of overflow monitoring parameters: Y=X C W k where, Y is the projected feature vector matrix of overflow monitoring parameters.

11. The early overflow detection and graded warning processing system according to claim 1, characterized in that: Introduce latent nodes between the class nodes and attribute nodes of the naive Bayesian network clustering model. The steps for constructing the hierarchical naive Bayesian network clustering model are as follows: In drilling overflow monitoring, after constructing the feature vector of the overflow monitoring parameters, introduce three latent nodes representing different variables in the naive Bayesian classifier, and add the three latent nodes to the original feature vector of the overflow monitoring parameters to obtain the extended feature vector of the overflow monitoring parameters. Assume the original feature vector of the overflow monitoring parameters is: x=(x1,x2,...,x j ) j is the dimension of the feature vector of the overflow monitoring parameters. Add the three latent nodes node1, node2, and node3 to the feature vector x of the overflow monitoring parameters to obtain the extended feature vector as follows: Normalize the extended feature vector.

12. The early overflow detection and graded warning processing system according to claim 11, characterized in that: After introducing the latent nodes, determine the node state values specifically as follows: According to the experience of drilling industry domain experts, determine the states and mutual correlations of the three latent nodes related to drilling overflow.

13. The early overflow detection and graded warning processing system according to claim 1, characterized in that: The steps for the classifier to perform early overflow monitoring discrimination based on the naive Bayesian algorithm are as follows: A large data sample is established based on historical well data, and each sample is represented by a vector containing overflow parameters, potential nodes and overflow values; Classify the attributes of historical well big data samples into corresponding potential nodes; Calculate the prior probability of overflow occurring and not occurring; Calculate the conditional probabilities of the attributes corresponding to the classification of the potential nodes respectively; Calculate the posterior probability P2 of overflow occurrence and the posterior probability P3 of overflow non-occurrence under various overflow monitoring attribute conditions of the target well; Compare P2 and P3. If the posterior probability of overflow occurrence is greater than the posterior probability of overflow not occurring, it is judged that overflow occurs in the target well at this time; otherwise, it is judged that overflow does not occur.

14. The early overflow detection and graded warning processing system according to claim 1, characterized in that: When the overflow judgment result is abnormal, the graded warning and processing are as follows: The number of drilling overflows or the wellhead pressure is limited to a threshold to classify and determine the level of overflow that occurs.

15. The early overflow detection and graded warning processing system according to claim 14, characterized in that: When limiting the number of drilling overflows, the threshold formula for the number of drilling overflows is as follows: Quantity_Threshold=V0+k1*(Drilling_Rate–R0) Among them, V0 represents the set basic threshold value; R0 represents the set standard drilling speed; Drilling_Rate represents the drilling speed of the drill bit; k1 represents the set quantity threshold coefficient, usually 1 to 2. When the flow rate of drilling fluid exceeds the overflow classification threshold value, it is divided into different overflow grades.

16. The early overflow detection and graded warning processing system according to claim 14, characterized in that: When limiting the wellhead pressure, the threshold formula of the wellhead pressure is as follows: Pressure_Threshold=P0+k2*(Depth–D0) Among them, P0 represents the set basic threshold value; D0 represents the set basic depth; Depth represents the depth of the well; k2 represents the set pressure threshold coefficient, usually 0.1-0.

2. When the wellhead pressure exceeds the overflow classification threshold value, it is divided into different overflow grades.

17. An early overflow detection and graded warning processing method, characterized in that: The early overflow detection and graded warning processing system for any one of claims 1 to 16 comprises the following steps: Select overflow monitoring parameters; Collect overflow monitoring parameters in real time and use the overflow monitoring parameters as attributes; Calculate attribute conditional mutual information; Constructing feature vectors of overflow monitoring parameters; Introducing potential nodes; Determine the node state value and generate a new classifier model; Overflow identification is performed based on the hierarchical naive Bayesian model. If there is an abnormality, overflow warning classification and classification processing are carried out, and the overflow characteristic number database update, Bayesian model training, model evaluation and evaluation steps are performed in sequence. If there is no abnormality, the overflow monitoring parameters are dynamically updated.

Citation Information

Patent Citations

  • On-line comprehensive monitoring and early warning method of overflow during oil and gas well drilling

    CN103470202B

Cited By

  • Method for determining the probability of leaks in production wells and a system for its implementation

    RU2863654C1