Drilling fluid density determination method, device, equipment and medium

By fusing multiple historical data-based models in the drilling fluid density determination model and using candidate weight weighted fusion, the reliability and accuracy of drilling fluid density prediction under limited data are solved, and the safety and efficiency of drilling operations are improved.

CN119647231APending Publication Date: 2025-03-18CHINA NAT PETROLEUM CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311198555.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Drilling fluid density prediction is a complex and challenging problem. The prior art is difficult to provide reliable and accurate prediction results with limited experimental data, resulting in the impact of the safety and efficiency of drilling operations.

Method used

By determining the target temperature and target pressure, input it into multiple drilling fluid density determination models trained based on historical data, the candidate drilling fluid density is obtained, and weighted fusion is performed according to the candidate weights of each model to determine the final target drilling fluid density.

Benefits of technology

With limited experimental data, more reliable and accurate drilling fluid density prediction results are provided, which improves the safety and efficiency of drilling operations and avoids the problem of overfitting a single model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647231A_ABST
    Figure CN119647231A_ABST
Patent Text Reader

Abstract

The invention discloses a drilling fluid density determination method, device and equipment and a medium. The method comprises the following steps: determining a target temperature and a target pressure; inputting the target temperature and the target pressure into a drilling fluid density determination model to obtain candidate drilling fluid density; the number of the drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training a drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density; determining candidate weights of the drilling fluid density determination model; and determining a target drilling fluid density according to each candidate weight and each candidate drilling fluid density. By implementing the scheme, a more reliable and accurate drilling fluid density prediction result can be provided under the condition that experimental data is limited, so that the safety of drilling operation can be improved, and the drilling efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of petroleum engineering safety technology, and in particular to a method, device, equipment and medium for determining the density of drilling fluid. Background Art

[0002] As global energy demand continues to grow, the oil industry plays a vital role in meeting energy supply, and oil drilling is one of the main means of developing and producing oil resources. The density of drilling fluid is directly related to the pore pressure balance and wellbore stability downhole. Accurate control of drilling fluid density is a key factor in ensuring safe and efficient drilling operations. However, drilling fluid density prediction is a complex and challenging problem.

[0003] In related technologies, drilling fluid density is predicted by physical models or machine learning methods. Physical models often rely on complex mathematical formulas and a large amount of precise experimental data, but in practical applications, it is often difficult to obtain sufficient experimental data to support the accuracy of the model. Machine learning methods can improve prediction performance to a certain extent by learning nonlinear relationships from a large amount of experimental data. However, when there is less experimental data, machine learning models are prone to overfitting problems, resulting in instability in prediction results. Summary of the invention

[0004] The present invention provides a method, device, equipment and medium for determining drilling fluid density, which can provide more reliable and accurate drilling fluid density prediction results when experimental data is limited, thereby helping to improve the safety of drilling operations and improve drilling efficiency.

[0005] According to one aspect of the present invention, a method for determining drilling fluid density is provided, the method comprising:

[0006] Determine target temperature and target pressure;

[0007] Inputting the target temperature and the target pressure into a drilling fluid density determination model to obtain a candidate drilling fluid density; the number of the drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training a drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density;

[0008] determining candidate weights for the drilling fluid density determination model;

[0009] The target drilling fluid density is determined according to each of the candidate weights and each of the candidate drilling fluid densities.

[0010] According to another aspect of the present invention, there is provided a drilling fluid density determination device, the device comprising:

[0011] A temperature and pressure determination module, used for determining a target temperature and a target pressure;

[0012] A candidate drilling fluid density determination module is used to input the target temperature and target pressure into a drilling fluid density determination model to obtain a candidate drilling fluid density; the number of the drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training a drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density;

[0013] A candidate weight determination module, used to determine the candidate weights of the drilling fluid density determination model;

[0014] The target drilling fluid density determination module is used to determine the target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities.

[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining the drilling fluid density described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the drilling fluid density described in any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention determines the target temperature and target pressure; inputs the target temperature and target pressure into the drilling fluid density determination model to obtain the candidate drilling fluid density; the number of drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training the drilling fluid density determination algorithm based on the historical temperature, historical pressure and historical drilling fluid density; determines the candidate weights of the drilling fluid density determination model; and determines the target drilling fluid density according to each candidate weight and each candidate drilling fluid density. By executing this solution, it is possible to provide a more reliable and accurate drilling fluid density prediction result when the experimental data is limited, which can help improve the safety of drilling operations and improve drilling efficiency.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1a is a flow chart of a method for determining drilling fluid density provided by an embodiment of the present invention;

[0024] Figure 1b is a schematic diagram of comparison results between the predicted value of drilling fluid density and the actual data provided by an embodiment of the present invention;

[0025] Figure 2 is a flow chart of another method for determining drilling fluid density provided by an embodiment of the present invention;

[0026] Figure 3 is a structural schematic diagram of a drilling fluid density determination device provided by an embodiment of the present invention;

[0027] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the method for determining the drilling fluid density according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present invention, the types, applicable scopes, and usage scenarios of the personal information involved in the present invention should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present invention according to the prompt message.

[0032] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0033] It is understandable that the above notification and user authorization process is only illustrative and does not constitute a limitation on the implementation of the present invention. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present invention.

[0034] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0035] Figure 1a: is a flow chart of a method for determining drilling fluid density provided by an embodiment of the present invention. This embodiment is applicable to the case of determining drilling fluid density. The method can be executed by a drilling fluid density determination device. The drilling fluid density determination device can be implemented in the form of hardware and / or software. The drilling fluid density determination device can be configured in an electronic device for determining drilling fluid density. Figure 1a As shown, the method includes:

[0036] S110: Determine the target temperature and target pressure.

[0037] Among them, since the density of the drilling fluid is related to both the temperature and the pressure, this solution can determine the target temperature and the target pressure, and then determine the density of the drilling fluid under the target temperature and the target pressure.

[0038] S120: Input the target temperature and target pressure into a drilling fluid density determination model to obtain a candidate drilling fluid density.

[0039] There are at least two drilling fluid density determination models; the drilling fluid density determination model is obtained by training a drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density.

[0040] Specifically, the historical temperature, historical pressure and historical drilling fluid density are actual experimental data obtained by statistics, that is, the historical drilling fluid density corresponding to the historical temperature and historical pressure. These experimental data can be obtained from the laboratory or on-site drilling operations. For example, in the laboratory, the experimental conditions can be set according to a certain temperature and pressure range, and then the drilling fluid density value under the corresponding temperature and pressure can be measured. In on-site drilling operations, the actual measurement value of the drilling fluid density can be obtained through sensors or other measuring devices.

[0041] Since there are multiple drilling fluid density determination models, the number of drilling fluid densities (i.e., candidate drilling fluid densities) obtained by inputting the target temperature and target pressure into the drilling fluid density determination model is also multiple. All drilling fluid density determination models selected in this solution cannot solve the same type of problem at the same time. For example, drilling fluid density determination model 1 is suitable for processing continuous target variables, and drilling fluid density determination model 1 is suitable for processing classification and regression problems.

[0042] In addition, before inputting the target temperature and the target pressure into the drilling fluid density determination model, the solution can also perform feature conversion on the target temperature and the target pressure, such as standardization or normalization, to ensure that they have the same dimension. The feature data after feature conversion is then input into the drilling fluid density determination model to obtain a candidate drilling fluid density.

[0043] S130: Determine candidate weights for the drilling fluid density determination model.

[0044] Among them, the candidate weight can be used to measure the accuracy or importance of the drilling fluid density determination model in determining the drilling fluid density. For example, the higher the accuracy of determining the drilling fluid density, the greater the contribution, and the greater the candidate weight of the corresponding drilling fluid density determination model. The lower the accuracy of determining the drilling fluid density, the smaller the contribution, and the smaller the candidate weight of the corresponding drilling fluid density determination model.

[0045] S140: Determine a target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities.

[0046] Among them, this scheme can determine the target drilling fluid density under the target temperature and target pressure according to the candidate weights of each drilling fluid density determination model and the candidate drilling fluid density determined by each drilling fluid density determination model, which can avoid the overfitting problem caused by a single machine learning model and determine a more accurate drilling fluid density.

[0047] In addition, in order to verify the effectiveness and superiority of this method, empirical research can be carried out by collecting experimental data on drilling fluid density at different temperatures and pressures. Figure 1b As shown in the figure, a bar chart is used to visualize the target drilling fluid density and the actual experimental data. The actual value and the predicted value are plotted on the same graph to observe the degree of proximity and deviation between them. The maximum error of the result is within 5%, which meets the requirements of engineering accuracy. The experimental results show that the drilling fluid density prediction method provided by this scheme can effectively improve the accuracy and robustness of the prediction when the data is limited. Compared with the traditional physical model and the single machine learning model, it has better prediction performance and stability.

[0048] The technical solution of the embodiment of the present invention determines the target temperature and target pressure; inputs the target temperature and target pressure into the drilling fluid density determination model to obtain the candidate drilling fluid density; the number of drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training the drilling fluid density determination algorithm based on the historical temperature, historical pressure and historical drilling fluid density; determines the candidate weights of the drilling fluid density determination model; and determines the target drilling fluid density according to each candidate weight and each candidate drilling fluid density. By executing this solution, it is possible to provide a more reliable and accurate drilling fluid density prediction result when the experimental data is limited, which can help improve the safety of drilling operations and improve drilling efficiency.

[0049] In this embodiment, optionally, determining the target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities includes:

[0050] The target drilling fluid density is determined based on the following formula:

[0051]

[0052] Among them, y ens represents the target drilling fluid density, w i represents the candidate weight of the i-th drilling fluid density determination model, y i represents the i-th candidate drilling fluid density, and N represents the total number of drilling fluid density determination models.

[0053] For example, assume that there are three drilling fluid density determination models for drilling fluid density prediction, and their candidate drilling fluid densities are y1=1.2, y2=1.4, and y3=0.9. In the previous step, the calculated candidate weights are w1=0.5, w2=0.2, and w3=0.3. Now we need to calculate the target drilling fluid density y ens , it is necessary to determine the target drilling fluid density and the weighted denominator. Among them, the weighted numerator is:

[0054] w1×y1=0.5×1.2=0.6

[0055] w2×y2=0.2×1.4=0.28,

[0056] w3×y3=0.3×0.9=0.27

[0057] Weighted denominator:

[0058]

[0059] Target drilling fluid density:

[0060] Therefore, the target drilling fluid density is 1.15, which is closer to y1 = 1.2, because drilling fluid density determination model 1 is given a larger weight w1 = 0.5, while other drilling fluid density determination models have smaller weights. This demonstrates the role of uncertainty weighting method in integrated prediction, which adjusts the contribution of drilling fluid density determination model according to the degree of uncertainty of drilling fluid density determination model to obtain more accurate prediction results.

[0061] In this embodiment, optionally, determining the candidate weight of the drilling fluid density determination model includes: determining an uncertainty degree value of the drilling fluid density determination model; and using the inverse of the uncertainty degree value as the candidate weight of the drilling fluid density determination model.

[0062] Among them, this scheme can determine the uncertainty degree value of each drilling fluid density determination model after obtaining each drilling fluid density determination model, and use the inverse of the uncertainty degree value as the candidate weight of the drilling fluid density determination model. It can provide a reliable data basis for the subsequent determination of a more accurate drilling fluid density.

[0063] In this embodiment, optionally, determining the uncertainty degree value of the drilling fluid density determination model includes: determining at least one set of verification sample data, inputting the verification sample data into the drilling fluid density determination model to obtain the predicted drilling fluid density; the verification sample data includes historical temperature and historical pressure; determining the actual drilling fluid density associated with the verification sample data; and determining the uncertainty degree value of the drilling fluid density determination model based on each of the actual drilling fluid densities and each of the predicted drilling fluid densities.

[0064] The verification sample data may be actual experimental data that has not participated in the model training, and may include historical temperature, historical pressure, and the corresponding actual drilling fluid density. For each drilling fluid density determination model, this solution may input the historical temperature and historical pressure in each set of verification sample data into the trained drilling fluid density determination model to obtain the predicted drilling fluid density, and determine the uncertainty value of the drilling fluid density determination model based on each predicted drilling fluid density and the actual drilling fluid density. This can provide a reliable data basis for the subsequent determination of a more accurate drilling fluid density.

[0065] In this embodiment, optionally, the uncertainty degree value of the drilling fluid density determination model is determined according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities, including: determining the confidence degree of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities; and using the confidence degree as the uncertainty degree value of the drilling fluid density determination model.

[0066] Among them, this scheme can determine the uncertainty degree value according to the type of drilling fluid density determination model. For example, the uncertainty degree value can be expressed by confidence or other uncertainty indicators. For example, taking the drilling fluid density determination model A as a decision tree model, in the regression problem, the confidence of the model output can be calculated, that is, Confidence[f(x;θ)]. The confidence degree can reflect the degree of certainty of the model for the prediction result. The higher the confidence degree, the lower the prediction uncertainty of the model.

[0067] For example, if the drilling fluid density determination model A is a support vector machine model, the confidence of the model can be estimated using methods such as cross-validation, similar to decision trees. The confidence of the support vector machine can reflect the confidence of the model in the prediction results.

[0068] Since the predicted drilling fluid density output by A based on each set of verification sample data has been determined in the above steps, and the actual drilling fluid density associated with each set of verification sample data is also known, this solution can determine the confidence of the drilling fluid density determination model A based on the confidence determination method in the relevant technology, and each actual drilling fluid density and each predicted drilling fluid density, and use the confidence as the uncertainty value of A. This can provide a reliable data basis for the subsequent determination of a more accurate drilling fluid density.

[0069] In a feasible embodiment, optionally, determining the uncertainty degree value of the drilling fluid density determination model based on each of the actual drilling fluid densities and each of the predicted drilling fluid densities includes: determining the variance of the drilling fluid density determination model based on each of the actual drilling fluid densities and each of the predicted drilling fluid densities; and using the variance as the uncertainty degree value of the drilling fluid density determination model.

[0070] Among them, the uncertainty value of the drilling fluid density determination model can also be expressed by variance. For example, taking the drilling fluid density determination model B as a linear regression model, the variance of the predicted value output by the model can be calculated by cross-validation and other methods, that is, Var[f(x;θ)]. The variance reflects the degree of fluctuation of the prediction results of the model on different data sets. The larger the variance, the higher the prediction uncertainty of the model.

[0071] Since the predicted drilling fluid density output by B according to each set of verification sample data has been determined in the above steps, and the actual drilling fluid density associated with each set of verification sample data is also known, this solution can determine the variance of the drilling fluid density determination model B based on the variance determination method in the relevant technology, and each actual drilling fluid density and each predicted drilling fluid density, and use the variance as the uncertainty value of B. This can provide a reliable data basis for the subsequent determination of a more accurate drilling fluid density.

[0072] In another feasible embodiment, optionally, the determination process of the drilling fluid density determination model includes: taking the historical temperature, historical pressure and historical drilling fluid density as training samples; and obtaining the drilling fluid density determination model based on the training samples, the drilling fluid density determination algorithm and the loss function of the drilling fluid density determination algorithm.

[0073] Exemplarily, selecting multiple different machine learning algorithms as drilling fluid density determination algorithms can provide more model differences and flexibility. Common choices include neural networks, support vector machines, decision trees, etc. Each algorithm has its advantages and applicable scenarios, so selecting diverse models in model fusion can increase the performance and robustness of the integrated model. This solution selects the following three machine learning algorithms as examples: Linear Regression, which is suitable for processing continuous target variables, such as drilling fluid density prediction. It establishes a linear relationship between input features and target variables and is a simple and effective model. Decision Trees, which can handle classification and regression problems, divide data through a series of decision nodes to form a tree structure. Decision trees are easy to understand and interpret and are suitable for modeling nonlinear relationships. Support Vector Machine (SVM) is a powerful classification and regression algorithm that separates different categories of data by finding the optimal hyperplane. SVM has good fitting ability for high-dimensional data and nonlinear data.

[0074] In this scheme, the drilling fluid density determination algorithm selects linear regression, decision tree and support vector machine, and these selected drilling fluid density determination algorithms need to be trained respectively. The specific steps are as follows: Use training samples to train the linear regression algorithm, decision tree algorithm and support vector machine algorithm respectively, find the optimal parameters so that the model can best fit the training samples, and obtain the trained drilling fluid density determination model.

[0075] Among them, for the linear regression model, the linear regression algorithm is trained using training samples to find the optimal parameter θ so that the model can best fit the training samples, that is, minimize the loss function. The form of the linear regression algorithm is:

[0076] f(x;θ)=θ0+θ1*x1+θ2*x2+...++θ n *x n ,

[0077] Where x is the input feature and θ is the model parameter. After training, a trained linear regression model is obtained.

[0078] For the decision tree model, the decision tree algorithm is trained using training samples. According to the characteristics of the training samples and the target variable, a decision tree is constructed so that the model can accurately classify or regress the training samples. After training, a trained decision tree model is obtained.

[0079] For the support vector machine model, the training samples are used to train the support vector machine algorithm to find the optimal hyperplane or kernel function so that the model can separate different types of data or regress the training samples. After training, a trained support vector machine model is obtained. By training a variety of drilling fluid density determination algorithms, a reliable training model can be provided for subsequent determination of more accurate drilling fluid density.

[0080] In addition, before inputting the training samples into the drilling fluid density determination algorithm, the solution can also perform feature conversion on the historical temperature and historical pressure in the training samples, such as standardization or normalization, to ensure that they have the same dimension. The feature data after feature conversion is then input into the drilling fluid density determination algorithm for training to obtain a drilling fluid density determination model.

[0081] Figure 2 is a flow chart of another method for determining drilling fluid density provided by an embodiment of the present invention. Figure 2 To more clearly describe the technical solution of the present invention, the technical solution provided by the embodiment of the present invention may include the following steps:

[0082] Step 1: Use the historical temperature, historical pressure and historical drilling fluid density as training samples.

[0083] Among them, this scheme can collect drilling fluid density experimental data at different temperatures and pressures as training data, preprocess and feature engineer the data, and select appropriate features for model training.

[0084] Step 2: obtaining the drilling fluid density determination model based on the training samples, the drilling fluid density determination algorithm and the loss function of the drilling fluid density determination algorithm.

[0085] Among them, this scheme can select multiple different machine learning models, such as neural network, support vector machine, decision tree, etc. Each selected model is trained using training data to obtain a drilling fluid density determination model.

[0086] Step 3, determine at least one set of verification sample data, input the verification sample data into the drilling fluid density determination model to obtain the predicted drilling fluid density; the verification sample data includes historical temperature and historical pressure; determine the actual drilling fluid density associated with the verification sample data; determine the uncertainty value of the drilling fluid density determination model according to each actual drilling fluid density and each predicted drilling fluid density.

[0087] Among them, this scheme can estimate the prediction uncertainty of each drilling fluid density determination model, such as confidence or variance, after the training is completed.

[0088] Step 4: Using the inverse of the uncertainty value as a candidate weight for the drilling fluid density determination model.

[0089] Among them, this scheme can calculate the candidate weight to adjust the contribution of each drilling fluid density determination model according to the prediction uncertainty of each drilling fluid density determination model. The drilling fluid density determination model with smaller uncertainty will be given a larger weight, and the drilling fluid density determination model with larger uncertainty will be given a smaller weight.

[0090] Step 5: Determine the target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities.

[0091] Among them, this scheme can use weighted average or other fusion methods to integrate the prediction results of multiple drilling fluid density determination models according to candidate weights to obtain the final drilling fluid density prediction result, that is, the target drilling fluid density.

[0092] Step 6: Accuracy comparison: Compare the target drilling fluid density with the actual experimental data to obtain the prediction accuracy.

[0093] The technical effects of the present invention are mainly reflected in the following aspects: 1) Improving prediction accuracy: By combining physical models and machine learning methods and considering the uncertainty of prediction, the present method can more accurately predict the density of drilling fluid. The uncertainty weighting strategy can adaptively adjust the weight of the model according to the uncertainty of each model prediction, making the prediction more reliable and accurate. 2) Adaptive model fusion: By introducing the uncertainty weighting strategy, the present invention can adaptively adjust the weight of the model according to the prediction performance of different models on different samples. In this way, the advantages of multiple models can be more accurately integrated to improve the robustness of the overall prediction. 3) Application in limited data: Due to the consideration of uncertainty and adaptive model fusion, the present invention can still show good prediction performance in limited data. In practical applications, especially in the case of difficult data collection, this method has great application potential. 4) Improving the safety and efficiency of drilling operations: Accurately predicting the density of drilling fluid can help drilling engineers better control the drilling operation process and avoid the complexity and time waste of the wellbore caused by unreasonable prediction of drilling fluid density. Therefore, the present invention helps to improve the safety and efficiency of drilling operations. 5) Optimizing drilling engineering design: By providing accurate prediction of drilling fluid density, the present invention provides an important reference for drilling engineering design. Drilling engineers can optimize drilling fluid formulation and downhole operations based on the prediction results, thereby better meeting the actual needs of drilling projects.

[0094] In summary, the uncertainty-based weighted drilling fluid density prediction method provided by this scheme combines physical models with machine learning and takes uncertainty into account. This method can provide more reliable and accurate drilling fluid density prediction results when data is limited, providing reliable support for the optimization and safe operation of drilling projects.

[0095] Figure 3 Schematic diagram of the structure of the drilling fluid density determination device provided by the embodiment of the present invention. Figure 3 As shown, the device comprises:

[0096] A temperature and pressure determination module 210, for determining a target temperature and a target pressure;

[0097] The candidate drilling fluid density determination module 220 is used to input the target temperature and the target pressure into a drilling fluid density determination model to obtain a candidate drilling fluid density; the number of the drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training a drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density;

[0098] A candidate weight determination module 230, for determining candidate weights of the drilling fluid density determination model;

[0099] The target drilling fluid density determination module 240 is used to determine the target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities.

[0100] Optionally, the target drilling fluid density determination module 240 is specifically configured to determine the target drilling fluid density based on the following formula:

[0101]

[0102] Among them, y ens represents the target drilling fluid density, w i represents the candidate weight of the i-th drilling fluid density determination model, y i represents the i-th candidate drilling fluid density, and N represents the total number of drilling fluid density determination models.

[0103] Optionally, the candidate weight determination module 230 includes an uncertainty degree value determination unit for determining the uncertainty degree value of the drilling fluid density determination model; and a candidate weight determination unit for using the inverse of the uncertainty degree value as the candidate weight of the drilling fluid density determination model.

[0104] Optionally, the uncertainty degree value determination unit includes a predicted drilling fluid density determination subunit, which is used to determine at least one set of verification sample data, and input the verification sample data into the drilling fluid density determination model to obtain the predicted drilling fluid density; the verification sample data includes historical temperature and historical pressure; an actual drilling fluid density determination subunit, which is used to determine the actual drilling fluid density associated with the verification sample data; and an uncertainty degree value determination subunit, which is used to determine the uncertainty degree value of the drilling fluid density determination model based on each of the actual drilling fluid densities and each of the predicted drilling fluid densities.

[0105] Optionally, the uncertainty degree value determination subunit is specifically used to determine the confidence of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities; and use the confidence as the uncertainty degree value of the drilling fluid density determination model.

[0106] Optionally, the uncertainty degree value determination subunit is further specifically used to determine the variance of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities; and use the variance as the uncertainty degree value of the drilling fluid density determination model.

[0107] Optionally, the candidate drilling fluid density determination module 220 is further specifically used to use the historical temperature, historical pressure and historical drilling fluid density as training samples; and obtain the drilling fluid density determination model based on the training samples, the drilling fluid density determination algorithm and the loss function of the drilling fluid density determination algorithm.

[0108] The drilling fluid density determination device provided in the embodiment of the present invention can execute the drilling fluid density determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0109] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0110] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0111] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0112] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a drilling fluid density determination method.

[0113] In some embodiments, the drilling fluid density determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the drilling fluid density determination method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the drilling fluid density determination method in any other suitable manner (e.g., by means of firmware).

[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0116] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0118] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0119] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for determining the density of a drilling fluid, characterized in that: include: Determine target temperature and target pressure; Inputting the target temperature and the target pressure into a drilling fluid density determination model to obtain a candidate drilling fluid density; The number of the drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training the drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density; determining candidate weights for the drilling fluid density determination model; The target drilling fluid density is determined according to each of the candidate weights and each of the candidate drilling fluid densities.

2. The method according to claim 1, characterized in that Determining a target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities includes: The target drilling fluid density is determined based on the following formula: Among them, y ens represents the target drilling fluid density, w i represents the candidate weight of the i-th drilling fluid density determination model, y i represents the i-th candidate drilling fluid density, and N represents the total number of drilling fluid density determination models.

3. The method according to claim 2, characterized in that Determining candidate weights of the drilling fluid density determination model includes: Determine the uncertainty value of the drilling fluid density determination model; The inverse of the uncertainty degree value is used as a candidate weight of the drilling fluid density determination model.

4. The method according to claim 3, characterized in that Determine the uncertainty value of the drilling fluid density determination model, including: Determine at least one set of verification sample data, and input the verification sample data into the drilling fluid density determination model to obtain a predicted drilling fluid density; the verification sample data includes historical temperature and historical pressure; determining an actual drilling fluid density associated with the verification sample data; The uncertainty degree value of the drilling fluid density determination model is determined according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities.

5. The method according to claim 4, determining the uncertainty value of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities, comprising: Determining the confidence of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities; The confidence level is used as the uncertainty value of the drilling fluid density determination model.

6. The method according to claim 4, determining the uncertainty value of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities, comprising: Determining the variance of the drilling fluid density determination model according to each of the actual drilling fluid densities and each of the predicted drilling fluid densities; The variance is used as the uncertainty value of the drilling fluid density determination model.

7. The method according to claim 1, characterized in that The process of determining the drilling fluid density determination model includes: Using the historical temperature, historical pressure and historical drilling fluid density as training samples; The drilling fluid density determination model is obtained based on the training samples, the drilling fluid density determination algorithm and the loss function of the drilling fluid density determination algorithm.

8. A drilling fluid density determination device, characterized in that: include: A temperature and pressure determination module, used for determining a target temperature and a target pressure; A candidate drilling fluid density determination module is used to input the target temperature and target pressure into a drilling fluid density determination model to obtain a candidate drilling fluid density; the number of the drilling fluid density determination models is at least two; the drilling fluid density determination model is obtained by training a drilling fluid density determination algorithm based on historical temperature, historical pressure and historical drilling fluid density; A candidate weight determination module, used to determine the candidate weights of the drilling fluid density determination model; The target drilling fluid density determination module is used to determine the target drilling fluid density according to each of the candidate weights and each of the candidate drilling fluid densities.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the drilling fluid density determination method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the drilling fluid density according to any one of claims 1 to 7 when executed.