A drilling fluid dynamic liquid column pressure prediction method based on a K-means clustering algorithm
By processing drilling data using the K-means clustering algorithm, the problem of real-time prediction of drilling fluid dynamic column pressure was solved, enabling accurate prediction under different well depths and complex geological environments, reducing the risk of well leakage and improving the success rate of plugging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA NAT PETROLEUM CORP
- Filing Date
- 2024-12-18
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies struggle to accurately predict drilling fluid column pressure in real time during drilling, leading to a high risk of well leakage and making them unsuitable for predicting drilling fluid column pressure at different well depths.
Using the K-means clustering algorithm, historical drilling, logging, and well logging data are collected and preprocessed. Cluster centers for dynamic fluid column pressure are randomly selected to form a real-time prediction model. The cluster centers are then updated under threshold control to achieve real-time prediction of dynamic fluid column pressure.
It enables real-time prediction of drilling fluid dynamic column pressure under different well depths and complex geological environments, reducing the well leakage accident rate and improving the accuracy of drilling parameter adjustment and the success rate of leakage plugging.
Smart Images

Figure CN122241283A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for predicting drilling fluid dynamic column pressure based on the K-means clustering algorithm, belonging to the field of drilling fluid loss and plugging technology for oil and gas wells. Background Technology
[0002] With advancements in development technology, oil and gas exploration and exploitation are increasingly shifting towards deeper and ultra-deeper oil and gas formations with complex geological structures and greater challenges. Ensuring safe and efficient drilling operations is of paramount importance for developing my country's oil and gas resources. However, due to the highly complex nature of well leakage problems, research findings are subject to numerous controversies and issues.
[0003] Loss in wells is a common engineering challenge in drilling projects in complex formations, characterized by its frequency, randomness, and persistence. During oil and gas well drilling, high-density drilling fluids are typically used to balance formation pressure and ensure drilling safety. However, if natural fractures are encountered, the drilling fluid can easily penetrate the reservoir under the pressure of the bottom-hole fluid column. If the drilling fluid's plugging capacity is insufficient to seal the fractures, the fracture aperture will further increase under the dynamic pressure of the drilling fluid column, potentially leading to fracture extension and ultimately large-scale loss. Therefore, accurately predicting the dynamic pressure of the drilling fluid column is crucial for optimizing the solid particle size distribution of the drilling fluid and preventing loss. In this context, real-time prediction and assessment of the dynamic pressure parameters of the drilling fluid are particularly important for safe drilling.
[0004] Currently, domestic and international scholars mainly employ a combination of engineering data and field experience, resulting in a lag in the analysis results and hindering effective guidance for drilling engineering design before drilling. Furthermore, drilling fluid dynamic column pressure involves multiple factors such as hydrostatic pressure, drilling pressure, friction, and drilling fluid properties, making it difficult to predict this parameter through laboratory or numerical simulation methods. During drilling, drilling fluid dynamic column pressure is often regulated by adjusting construction parameters such as drilling fluid density. This method relies heavily on experience to infer formation conditions, is difficult to implement widely, and carries a significant risk of well leakage. Therefore, a method for real-time prediction of drilling fluid dynamic column pressure is urgently needed in drilling operations.
[0005] In the prior art, a patent application with application number "202111296812.1" entitled "A Method and System for Determining the Bottom-of-Well Drilling Fluid Column Pressure of Ultra-Deep Wells" was published on May 5, 2023. This document mentions that: firstly, the drilling fluid density under high temperature and high pressure conditions is obtained experimentally; then, using the principle of drilling fluid column pressure superposition, the experimentally obtained drilling fluid density is applied to the calculation of the drilling fluid column pressure, thereby obtaining the bottom-of-well drilling fluid column pressure of ultra-deep wells. This technology considers the actual conditions of uneven drilling fluid density at different well depths due to the compressibility of high-density drilling fluid under high temperature and high pressure conditions in ultra-deep wells, and obtains the bottom-of-well drilling fluid column pressure of ultra-deep wells using the principle of drilling fluid column pressure superposition. However, this method still has the following shortcomings: First, this method only considers the relevant parameters of the drilling fluid's own properties, without taking into account the influence of formation, temperature, pump pressure, friction, etc. on the pressure of the drilling fluid column at the bottom of the well. Secondly, this method is only applicable to the prediction of drilling fluid column pressure at the bottom of ultra-deep wells, and cannot be used to predict drilling fluid column pressure in shallow wells or ordinary deep wells. This is because the method uses the principle of superposition of drilling fluid column pressure for prediction, and it can be seen that the lower the well depth, the greater the error, thus having great limitations. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing methods for real-time prediction of drilling fluid dynamic column pressure. The purpose of this invention is to propose a drilling fluid dynamic column pressure prediction method based on the K-means clustering algorithm.
[0007] This invention is achieved through the following technical solution: A method for predicting drilling fluid dynamic column pressure based on the K-means clustering algorithm includes the following steps: 1) Collect historical drilling data, logging data, drilling fluid data, well logging data, and real-time drilling data of the target block, and perform data preprocessing; 2) Use the preprocessed data from step 1) as training samples and randomly select cluster centers for drilling fluid dynamic column pressure; 3) Obtain the first cluster of the drilling fluid dynamic column pressure real-time prediction model based on step 2); 4) Based on the initial clustering in step 3), obtain the re-clustering of the drilling fluid dynamic column pressure real-time prediction model; 5) Based on steps 2) to 4), obtain a real-time prediction model for drilling fluid dynamic column pressure that meets the accuracy requirements; 6) Obtain the drilling fluid dynamic column pressure prediction model from step 5). 7) Based on step 6), input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure.
[0008] Furthermore, in step 1), the data preprocessing workflow includes cleaning, missing data filling, integration, and transformation, with the specific steps as follows: 1-1) Data cleaning: First, use the box plot method to identify noisy data in the drilling history data, and then delete irrelevant, duplicate, and noisy data from the original datasets of historical drilling data, logging data, drilling fluid data, and well logging data. 1-2) Data imputation: Use Lagrange interpolation to fill in the missing data during the data cleaning process to ensure data integrity; 1-3) Data integration: Merging drilling history data from multiple file or database operating environments; 1-4) Data Transformation: Standardize the historical drilling data and transform it into a vector {x}. (1) ,…,x (m) In the form of}, x represents the collected drilling history data parameter values of the target block, and m represents the maximum number of parameter values.
[0009] Furthermore, in step 2), the preprocessed historical drilling data, logging data, drilling fluid data, and well logging data are used as training samples, and drilling fluid dynamic column pressure cluster centers are randomly selected from the training samples. The specific parameters of the training samples include: formation lithology, formation temperature, formation pressure coefficient, well depth, plastic viscosity, drilling fluid type, drilling fluid density, drilling fluid static shear force, drilling fluid dynamic shear force, mud cake thickness, drilling fluid pH value, displacement, drilling speed, rotational speed, pump pressure, drill bit type, drill bit size, hook load, three-revolution reading, one-hundred-revolution reading, and hydrocarbon value detected by gas analysis.
[0010] Further, in step 3), the distance from each training sample point to the drilling fluid dynamic column pressure cluster center is calculated, and each training sample point is clustered into the drilling fluid dynamic column pressure cluster center closest to that point, forming the first cluster of the drilling fluid dynamic column pressure real-time prediction model.
[0011] Furthermore, in step 3), the specific method for calculating the distance from each training sample point to the drilling fluid dynamic column pressure cluster center, and clustering each training sample point to the nearest drilling fluid dynamic column pressure cluster center, is as follows: 3-1) Suppose that from all vectors {x} (1) ,…,x (m) The cluster centers for drilling fluid dynamic column pressure randomly selected from the training samples are μ. 1 ,μ 2 ,…,μ k ∈R n μ represents the center point of the drilling fluid dynamic column pressure cluster, R nRepresents the set of n-dimensional real numbers; 3-2) Starting from the first point in the dataset, traverse the dataset and calculate the distance c from each training sample point to the cluster center of the drilling fluid dynamic column pressure. (1) c (2) , ..., c (k) c (k) Let represent the distance from each training sample point to the cluster center of drilling fluid dynamic column pressure, satisfying the relation (1). (1), In equation (1), i, j is the input vector constant.
[0012] 3-3) Place c (1) c (2) c (k) Sort by data size; 3-4) Based on the sorting results of 3-3), each training sample point is clustered to the nearest drilling fluid dynamic column pressure cluster center, thus forming the first cluster of the drilling fluid dynamic column pressure real-time prediction model.
[0013] Furthermore, in step 4), based on the initial clustering in step 3), the average coordinates of all points in each cluster are calculated, and this average value is used as the new cluster center for drilling fluid dynamic column pressure. A second clustering of the real-time prediction model for drilling fluid dynamic column pressure is then formed based on this cluster center. The specific method is as follows: 4-1) Based on the initial clustering of the drilling fluid dynamic column pressure real-time prediction model, the average coordinates of all points in each cluster are obtained using the following relationship (2): (2), 4-2) Using the average value calculated in 4-1) as the new cluster center for drilling fluid dynamic column pressure, we re-enter 3-2), 3-3), and 3-4) to obtain the re-clustering of the real-time prediction model for drilling fluid dynamic column pressure.
[0014] Furthermore, in step 5), by repeatedly updating the drilling fluid dynamic column pressure cluster centers and re-clustering the drilling fluid dynamic column pressure real-time prediction model, a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements is finally formed under the control of a threshold. The specific method is as follows: 5-1) Based on the re-clustering results of the real-time prediction model of drilling fluid dynamic column pressure, repeat 4-1) and 4-2) to update the clustering center of drilling fluid dynamic column pressure and the re-clustering of the real-time prediction model of drilling fluid dynamic column pressure. 5-2) Set the threshold n according to the actual conditions at the drilling site; 5-3) After the threshold is set, continue to update the drilling fluid dynamic column pressure cluster center and the drilling fluid dynamic column pressure real-time prediction model again to obtain a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements.
[0015] Furthermore, in step 5-2), if the formation pressure coefficient is less than 0.8 or greater than 1.5, the threshold n is 0.1~1; if the formation pressure coefficient is greater than or equal to 0.8 and less than or equal to 1.5, the threshold n is 1~3.
[0016] Furthermore, in step 6), the real-time prediction model of drilling fluid dynamic column pressure from step 5) is connected to the real-time data acquisition platform for drilling, and the resulting model is the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm.
[0017] Furthermore, in step 7), the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm from step 6) is used to input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure.
[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects: This invention proposes a drilling fluid dynamic column pressure prediction method based on the K-means clustering algorithm. This method combines readily available data generated during the drilling process, such as drilling data, logging data, drilling fluid data, and well logging data, to predict the drilling fluid dynamic column pressure in real time for each well site within different blocks. The prediction results obtained by this method are closer to the real-time drilling fluid dynamic column pressure at the site. Workers can adjust drilling parameters appropriately based on these prediction results, thereby reducing the accident rate of well leakage.
[0019] Second, this invention proposes a drilling fluid dynamic column pressure prediction method based on the K-means clustering algorithm. Even in complex geological environments or when the available data samples are limited, the drilling fluid dynamic column pressure can still be predicted, and the real-time predicted drilling fluid dynamic column pressure is closer to the actual value. This provides drilling technicians and construction personnel with more accurate and effective decision-making basis, thereby reducing the number of well leakage accidents and increasing the success rate of plugging leaks after they occur. Attached Figure Description
[0020] Figure 1 This is a flowchart of the drilling fluid dynamic column pressure prediction method based on the K-means clustering algorithm in this invention.
[0021] Figure 2 This is a flowchart of the data preprocessing process of the present invention. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to embodiments, but the implementation of the present invention is not limited thereto.
[0023] Example 1 This embodiment is the most basic implementation method, a drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm, in the field of drilling fluid loss and plugging technology for oil and gas wells, including the following steps: 1) Collect historical drilling data, logging data, drilling fluid data, well logging data, and real-time drilling data of the target block, and perform data preprocessing; 2) Use the preprocessed data from step 1) as training samples and randomly select cluster centers for drilling fluid dynamic column pressure; 3) Obtain the first cluster of the drilling fluid dynamic column pressure real-time prediction model based on step 2); 4) Based on the initial clustering in step 3), obtain the re-clustering of the drilling fluid dynamic column pressure real-time prediction model; 5) Based on steps 2) to 4), obtain a real-time prediction model for drilling fluid dynamic column pressure that meets the accuracy requirements; 6) Obtain the drilling fluid dynamic column pressure prediction model from step 5). 7) Based on step 6), input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure.
[0024] This method combines readily available data generated during the drilling process, such as drilling data, logging data, drilling fluid data, and well logging data, to predict the dynamic fluid column pressure of drilling fluid in real time for each well site within a different block. The prediction results obtained by this method are closer to the real-time dynamic fluid column pressure at the site. Based on these prediction results, operators can make appropriate adjustments to drilling parameters, thereby reducing the accident rate of well leakage.
[0025] Example 2 This embodiment is a further optimization of embodiment 1, the difference being that... In step 1), the data preprocessing workflow includes cleaning, imputation, integration, and transformation. The specific steps are as follows: 1-1) Data cleaning: First, use the box plot method to identify noisy data in the drilling history data, and then delete irrelevant, duplicate, and noisy data from the original datasets of historical drilling data, logging data, drilling fluid data, and well logging data. 1-2) Data imputation: Use Lagrange interpolation to fill in the missing data during the data cleaning process to ensure data integrity; 1-3) Data integration: Merging drilling history data from multiple file or database operating environments; 1-4) Data Transformation: Standardize the historical drilling data and transform it into a vector {x}. (1) ,…,x (m) In the form of}, x represents the collected drilling history data parameter values of the target block, and m represents the maximum number of parameter values.
[0026] Example 3 The difference between this embodiment and embodiments 1 and 2 is that, In step 2), the preprocessed historical drilling data, logging data, drilling fluid data, and well logging data are used as training samples, and drilling fluid dynamic column pressure cluster centers are randomly selected from the training samples.
[0027] The specific parameters of the training samples include: formation lithology, formation temperature, formation pressure coefficient, well depth, plastic viscosity, drilling fluid type, drilling fluid density, drilling fluid static shear force, drilling fluid dynamic shear force, mud cake thickness, drilling fluid pH value, displacement, drilling speed, rotational speed, pump pressure, drill bit type, drill bit size, hook load, three-revolution reading, one-hundred-revolution reading, and hydrocarbon value detected by gas.
[0028] Example 4 The difference between this embodiment and embodiments 1-3 is that, In step 3), the distance from each training sample point to the drilling fluid dynamic column pressure cluster center is calculated, and each training sample point is clustered into the drilling fluid dynamic column pressure cluster center closest to that point, forming the first cluster of the real-time prediction model of drilling fluid dynamic column pressure.
[0029] Example 5 This embodiment is a further optimization of embodiment 4, the difference being that... In step 3), the specific method for calculating the distance from each training sample point to the drilling fluid dynamic column pressure cluster center and clustering each training sample point to the nearest drilling fluid dynamic column pressure cluster center is as follows: 3-1) Suppose that from all vectors {x} (1) ,…,x (m) The cluster centers for drilling fluid dynamic column pressure randomly selected from the training samples are μ. 1 ,μ 2 ,…,μ k ∈R n μ represents the center point of the drilling fluid dynamic column pressure cluster, R n Represents the set of n-dimensional real numbers; 3-2) Starting from the first point in the dataset, traverse the dataset and calculate the distance c from each training sample point to the cluster center of the drilling fluid dynamic column pressure. (1) c (2) , ..., c (k) c(k) Let represent the distance from each training sample point to the cluster center of drilling fluid dynamic column pressure, satisfying the relation (1). (1), In equation (1), i, j is the input vector constant.
[0030] 3-3) Place c (1) c (2) c (k) Sort by data size; 3-4) Based on the sorting results of 3-3), each training sample point is clustered to the nearest drilling fluid dynamic column pressure cluster center, thus forming the first cluster of the drilling fluid dynamic column pressure real-time prediction model.
[0031] Example 6 The difference between this embodiment and embodiments 1-5 is that, In step 4), based on the initial clustering in step 3), the average coordinates of all points in each cluster are calculated, and this average value is used as the new cluster center for drilling fluid dynamic column pressure. Based on this cluster center, a second clustering of the real-time prediction model for drilling fluid dynamic column pressure is formed.
[0032] The specific method is as follows: 4-1) Based on the initial clustering of the drilling fluid dynamic column pressure real-time prediction model, the average coordinates of all points in each cluster are obtained using the following relationship (2): (2), 4-2) Using the average value calculated in 4-1) as the new cluster center for drilling fluid dynamic column pressure, we re-enter 3-2), 3-3), and 3-4) to obtain the re-clustering of the real-time prediction model for drilling fluid dynamic column pressure.
[0033] Example 7 The difference between this embodiment and embodiments 1-6 is that, In step 5, by repeatedly updating the drilling fluid dynamic column pressure cluster centers and re-clustering the drilling fluid dynamic column pressure real-time prediction model, a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements is finally formed under the control of the threshold.
[0034] The specific method is as follows: 5-1) Based on the re-clustering results of the real-time prediction model of drilling fluid dynamic column pressure, repeat 4-1) and 4-2) to update the clustering center of drilling fluid dynamic column pressure and the re-clustering of the real-time prediction model of drilling fluid dynamic column pressure. 5-2) Set the threshold n according to the actual conditions at the drilling site; 5-3) After the threshold is set, continue to update the drilling fluid dynamic column pressure cluster center and the drilling fluid dynamic column pressure real-time prediction model again to obtain a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements.
[0035] Example 8 This embodiment is a further optimization of embodiment 7, the difference being that... In step 5-2), if the formation pressure coefficient is less than 0.8 or greater than 1.5, the threshold n is 0.1~1; if the formation pressure coefficient is greater than or equal to 0.8 and less than or equal to 1.5, the threshold n is 1~3.
[0036] Example 9 The difference between this embodiment and embodiments 1-8 is that, In step 6), the drilling fluid dynamic column pressure real-time prediction model from step 5) is connected to the real-time data acquisition platform for drilling. The resulting model is the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm.
[0037] Example 10 The difference between this embodiment and embodiments 1-9 is that, In step 7), the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm in step 6) is used to input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure.
[0038] Example 11 To facilitate public understanding of this technical solution, this embodiment uses a superior drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm as an example, and illustrates the technical solution with illustrations.
[0039] refer to Figure 1 It includes the following steps: 1) Collect historical drilling data, logging data, drilling fluid data, well logging data and real-time drilling data of the target block, and perform data preprocessing.
[0040] In this step, the data preprocessing workflow includes cleaning, missing data correction, integration, and transformation. (Refer to...) Figure 2 The specific process is as follows: 1-1) Data cleaning: First, use the box plot method to identify noisy data in the drilling history data, and then delete irrelevant, duplicate, and noisy data from the original datasets of historical drilling data, logging data, drilling fluid data, and well logging data. 1-2) Data imputation: Use Lagrange interpolation to fill in the missing data during the data cleaning process to ensure data integrity; 1-3) Data integration: Merging drilling history data from multiple file or database operating environments; 1-4) Data Transformation: Standardize the historical drilling data and transform it into a vector {x}. (1) ,…,x (m) In the form of}, x represents the collected drilling history data parameter values of the target block, and m represents the maximum number of parameter values, which is to convert it into a form that is easy to mine.
[0041] 2) Use the preprocessed historical drilling data, logging data, drilling fluid data, and well logging data as training samples, and randomly select drilling fluid dynamic column pressure cluster centers from the training samples.
[0042] In this step, preprocessed historical drilling data, logging data, drilling fluid data, and well logging data are used as training samples. The specific parameters of the training samples include: Formation lithology, formation temperature, formation pressure coefficient, well depth, plastic viscosity, drilling fluid type, drilling fluid density, drilling fluid static shear stress, drilling fluid dynamic shear stress, mud cake thickness, drilling fluid pH value, displacement, drilling speed, rotational speed, pump pressure, drill bit type, drill bit size, hook load, three-revolution reading, one-hundred-revolution reading, and hydrocarbon value measured by gas.
[0043] 3) Calculate the distance from each training sample point to the drilling fluid dynamic column pressure cluster center, and cluster each training sample point into the drilling fluid dynamic column pressure cluster center closest to that point, thus forming the first cluster of the drilling fluid dynamic column pressure real-time prediction model.
[0044] In this step, the distance from each training sample point to the drilling fluid dynamic column pressure cluster center is calculated, and the specific method for clustering each training sample point into the nearest drilling fluid dynamic column pressure cluster center is as follows: 3-1) Suppose that from all vectors {x} (1) ,…,x (m) The cluster centers for drilling fluid dynamic column pressure randomly selected from the training samples are μ. 1 ,μ 2 ,…,μ k ∈R n μ represents the center point of the drilling fluid dynamic column pressure cluster, R n Represents the set of n-dimensional real numbers; 3-2) Starting from the first point in the dataset, traverse the dataset and calculate the distance c from each training sample point to the cluster center of the drilling fluid dynamic column pressure. (1) c(2) , ..., c (k) c (k) Let represent the distance from each training sample point to the cluster center of drilling fluid dynamic column pressure, satisfying the relation (1). (1), In equation (1), i, j The input vector constant, 3-3) Sort c(1), c(2), ..., c(k) according to data size, for example, c (1) <c (2) <… <c (k) ; 3-4) Based on the sorting results in 3-3), each training sample point is clustered to the nearest drilling fluid dynamic column pressure cluster center, thus forming the first cluster of the drilling fluid dynamic column pressure real-time prediction model.
[0045] 4) Based on the initial clustering in step 3), calculate the average coordinates of all points in each cluster, and use this average value as the new cluster center for drilling fluid dynamic column pressure. Based on this cluster center, form a second clustering of the real-time prediction model for drilling fluid dynamic column pressure.
[0046] In this step, the specific method for further clustering of the drilling fluid dynamic column pressure real-time prediction model is as follows: 4-1) Based on the initial clustering of the drilling fluid dynamic column pressure real-time prediction model, the average coordinates of all points in each cluster are obtained using the following relationship (2): (2); 4-2) The average value calculated in 4-1) is used as the new cluster center of drilling fluid dynamic column pressure, and then enters 3-2), 3-3), and 3-4) again, thus forming a re-cluster of the real-time prediction model of drilling fluid dynamic column pressure.
[0047] 5) By repeatedly updating the drilling fluid dynamic column pressure cluster centers and re-clustering the drilling fluid dynamic column pressure real-time prediction model, a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements is finally formed under the control of the threshold.
[0048] In this step, the specific method for ultimately forming a real-time prediction model of drilling fluid dynamic column pressure under the control of a threshold is as follows: 5-1) Using the re-clustering results of the drilling fluid dynamic column pressure real-time prediction model as a condition, repeat 4-1) and 4-2) to repeatedly update the drilling fluid dynamic column pressure cluster center and the drilling fluid dynamic column pressure real-time prediction model re-clustering; 5-2) Set the threshold n according to the actual conditions at the drilling site; Generally, for formations with a formation pressure coefficient less than 0.8 or greater than 1.5, the threshold n can be 0.1 to 1; if the formation pressure coefficient is greater than or equal to 0.8 and less than or equal to 1.5, the threshold n can be 1 to 3. The specific threshold setting should be based on meeting the drilling site construction requirements. 5-3) After the threshold is set, continue to update the drilling fluid dynamic column pressure cluster center and the drilling fluid dynamic column pressure real-time prediction model again to form the drilling fluid dynamic column pressure real-time prediction model.
[0049] 6) Connect the drilling fluid dynamic column pressure real-time prediction model from step 5) with the real-time data acquisition platform for drilling. The resulting model is the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm. 7) Using the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm from step 6), input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure, thereby achieving the effect of real-time prediction of drilling fluid dynamic column pressure.
[0050] Compared to other existing drilling fluid dynamic column pressure prediction methods, this approach is no longer constrained by complex geological environments and the inability to predict drilling fluid dynamic column pressure in real time. This prediction method utilizes data mining of historical drilling data, logging data, drilling fluid data, and well logging data from the target block, and establishes a drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm. This achieves real-time prediction of drilling fluid dynamic column pressure, providing drilling technicians and construction personnel with more accurate and effective decision-making support, thereby reducing the frequency of well leakage accidents and increasing the success rate of plugging leaks after they occur.
[0051] This embodiment proposes a drilling fluid dynamic column pressure prediction method based on the K-means clustering algorithm. Even in complex geological environments or when the available data samples are limited, it can still predict the drilling fluid dynamic column pressure. Moreover, the real-time predicted drilling fluid dynamic column pressure is closer to the actual value, providing drilling technicians and construction personnel with more accurate and effective decision-making basis, thereby reducing the number of well leakage accidents and increasing the success rate of plugging leaks after they occur.
[0052] The above specific technical solutions are only used to illustrate the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to the above specific technical solutions, those skilled in the art should understand that the present invention can still be modified or some of its technical features can be equivalently replaced. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the present invention. The above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention fall within the protection scope of the present invention.
Claims
1. A method for predicting drilling fluid dynamic column pressure based on K-means clustering algorithm, characterized in that, Includes the following steps: 1) Collect historical drilling data, logging data, drilling fluid data, well logging data, and real-time drilling data of the target block, and perform data preprocessing; 2) Use the preprocessed data from step 1) as training samples and randomly select cluster centers for drilling fluid dynamic column pressure; 3) Obtain the first cluster of the drilling fluid dynamic column pressure real-time prediction model based on step 2); 4) Based on the initial clustering in step 3), obtain the re-clustering of the drilling fluid dynamic column pressure real-time prediction model; 5) Based on steps 2) to 4), obtain a real-time prediction model for drilling fluid dynamic column pressure that meets the accuracy requirements; 6) Obtain the drilling fluid dynamic column pressure prediction model from step 5). 7) Based on step 6), input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure.
2. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 1, characterized in that, In step 1), the data preprocessing workflow includes cleaning, imputation, integration, and transformation. The specific steps are as follows: 1-1) Data cleaning: First, use the box plot method to identify noisy data in the drilling history data, and then delete irrelevant, duplicate, and noisy data from the original datasets of historical drilling data, logging data, drilling fluid data, and well logging data. 1-2) Data imputation: Use Lagrange interpolation to fill in the missing data during the data cleaning process; 1-3) Data integration: Merging drilling history data from multiple file or database operating environments; 1-4) Data Transformation: Standardize the historical drilling data and transform it into a vector {x}. (1) ,…,x (m) In the form of}, x represents the collected drilling history data parameter values of the target block, and m represents the maximum number of parameter values.
3. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 1, characterized in that: In step 2), the preprocessed historical drilling data, logging data, drilling fluid data, and well logging data are used as training samples, and drilling fluid dynamic column pressure clustering centers are randomly selected from the training samples. The specific parameters of the training samples include: formation lithology, formation temperature, formation pressure coefficient, well depth, plastic viscosity, drilling fluid type, drilling fluid density, drilling fluid static shear force, drilling fluid dynamic shear force, mud cake thickness, drilling fluid pH value, displacement, drilling speed, rotational speed, pump pressure, drill bit type, drill bit size, hook load, three-revolution reading, one-hundred-revolution reading, and hydrocarbon value detected by gas analysis.
4. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 3, characterized in that, In step 3), the distance from each training sample point to the drilling fluid dynamic column pressure cluster center is calculated, and each training sample point is clustered into the drilling fluid dynamic column pressure cluster center closest to that point, forming the first cluster of the real-time prediction model of drilling fluid dynamic column pressure.
5. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 4, characterized in that, In step 3), the specific method for calculating the distance from each training sample point to the drilling fluid dynamic column pressure cluster center and clustering each training sample point to the nearest drilling fluid dynamic column pressure cluster center is as follows: 3-1) Suppose that from all vectors {x} (1) ,…,x (m) The cluster centers for drilling fluid dynamic column pressure randomly selected from the training samples are μ. 1 ,μ 2 ,…,μ k ∈R n μ represents the center point of the drilling fluid dynamic column pressure cluster, R n Represents the set of n-dimensional real numbers; 3-2) Starting from the first point in the dataset, traverse the dataset and calculate the distance c from each training sample point to the cluster center of the drilling fluid dynamic column pressure. (1) c (2) , ..., c (k) c (k) Let represent the distance from each training sample point to the cluster center of drilling fluid dynamic column pressure, satisfying the relation (1). (1), In equation (1), i, j The input vector constant; 3-3) Place c (1) c (2) c (k) Sort by data size; 3-4) Based on the sorting results of 3-3), each training sample point is clustered to the nearest drilling fluid dynamic column pressure cluster center, thus forming the first cluster of the drilling fluid dynamic column pressure real-time prediction model.
6. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 4, characterized in that: In step 4), based on the initial clustering in step 3), the average coordinates of all points in each cluster are calculated, and this average value is used as the new cluster center for drilling fluid dynamic column pressure. A second clustering of the real-time prediction model for drilling fluid dynamic column pressure is then formed based on this cluster center. The specific method is as follows: 4-1) Based on the initial clustering of the drilling fluid dynamic column pressure real-time prediction model, the average coordinates of all points in each cluster are obtained using the following relationship (2): (2), 4-2) Using the average value calculated in 4-1) as the new cluster center for drilling fluid dynamic column pressure, we re-enter 3-2), 3-3), and 3-4) to obtain the re-clustering of the real-time prediction model for drilling fluid dynamic column pressure.
7. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 6, characterized in that: In step 5), by repeatedly updating the drilling fluid dynamic column pressure cluster centers and re-clustering the drilling fluid dynamic column pressure real-time prediction model, a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements is finally formed under the control of a threshold. The specific method is as follows: 5-1) Based on the re-clustering results of the real-time prediction model of drilling fluid dynamic column pressure, repeat 4-1) and 4-2) to update the clustering center of drilling fluid dynamic column pressure and the re-clustering of the real-time prediction model of drilling fluid dynamic column pressure. 5-2) Set the threshold n according to the actual conditions at the drilling site; 5-3) After the threshold is set, continue to update the drilling fluid dynamic column pressure cluster center and the drilling fluid dynamic column pressure real-time prediction model again to obtain a drilling fluid dynamic column pressure real-time prediction model that meets the accuracy requirements.
8. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 7, characterized in that, In step 5-2), if the formation pressure coefficient is less than 0.8 or greater than 1.5, the threshold n is 0.1~1; if the formation pressure coefficient is greater than or equal to 0.8 and less than or equal to 1.5, the threshold n is 1~3.
9. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 7, characterized in that: In step 6), the drilling fluid dynamic column pressure real-time prediction model from step 5) is connected to the real-time data acquisition platform for drilling. The resulting model is the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm.
10. The drilling fluid dynamic column pressure prediction method based on K-means clustering algorithm according to claim 9, characterized in that: In step 7), the drilling fluid dynamic column pressure prediction model based on the K-means clustering algorithm in step 6) is used to input real-time drilling data to obtain the real-time predicted value of the drilling fluid dynamic column pressure.