Preparation method and system of well killing fluid
Through the prediction model based on neural network, the problem of difficult cracks found in underground operations in oilfields is solved, automated prediction and optimization of well pressing fluid formulas are achieved, and operation efficiency and safety are improved.
Patent Information
- Application Number
- CN202311798146.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
Smart Images

Figure CN120211646A_ABST
Abstract
Description
Background Art
[0002] In downhole operations in oilfields, kill fluid is the fluid pumped into the well during workover and well killing operations to prevent blowout. The density of the kill fluid needs to be selected according to the reservoir pressure and depth. If there are fractures or large pores in the reservoir, a temporary plugging agent needs to be added to prevent the kill fluid from leaking into the formation. During actual construction, fractures or large pores in the formation are often found after the kill fluid has leaked. Remedial measures are often taken after the existence of fractures is discovered after the kill fluid has leaked, which causes problems such as time-consuming, laborious, and production safety. Moreover, it is difficult to judge the width of the fractures after they are discovered, and professional tools or on-site construction experience are required, which places too high requirements on on-site equipment and professional experience. Summary of the Invention
[0003] In order to solve the above problems in the prior art, that is, it is not easy to find whether there are fractures and the requirements for on-site equipment and professional experience are too high, the present invention provides a method for preparing kill fluid, including:
[0004] Step S100, collecting original formation data as input data;
[0005] Step S200, normalizing the input data to obtain preprocessed data;
[0006] Step S300, inputting the preprocessed input data into a trained neural network-based fracture width prediction model to output the predicted fracture width of the target formation;
[0007] Step S400, inputting the rigid mineral particle GZD parameters, plant fiber GDJ parameters, and the predicted fracture width of the target formation into a trained neural network-based kill fluid formula leakage amount prediction model to output the predicted leakage amount of the anti-leakage and plugging formula;
[0008] Step S500, conducting experiments on a pre-designed anti-leakage and plugging formula to obtain a set of leakage amounts of the pre-designed anti-leakage and plugging formula, selecting the difference between the leakage amount of the pre-designed anti-leakage and plugging formula and the predicted leakage amount of the anti-leakage and plugging formula, and taking the one with the smallest difference as the anti-leakage and plugging formula for the target formation;
[0009] Step S600, adding the anti-leakage and plugging formula for the target formation to the kill fluid base liquid for preparation to obtain a plugging kill fluid;
[0010] The neural network-based fracture width prediction model is composed of a first input layer, a first hidden layer, and a first output layer; the first input layer includes A1 first input layer neurons; the first hidden layer includes B1 first hidden layer neurons, and the output layer includes one first output layer neuron, that is, the predicted fracture width of the target formation;
[0011] The prediction model for the leakage volume of the kill fluid formula based on neural network consists of a second input layer, a second hidden layer, and a second output layer; the second input layer includes A2 neurons in the second input layer; the second hidden layer includes B2 neurons in the second hidden layer, and the output layer includes one neuron in the second output layer, that is, the leakage volume of the anti-leakage and plugging formula.
[0012] Further, the normalization process specifically includes:
[0013] Converting the input data parameters to be between [-1, 1] as:
[0014] where X i represents the processed value; x i represents the value before processing; x imin represents the minimum value before processing; x imax represents the maximum value before processing, and i represents the serial number of the data type.
[0015] Further, the prediction model for the crack width based on neural network specifically includes:
[0016] Using the genetic algorithm to optimize the weights of the prediction model for the crack width based on neural network and the thresholds of the prediction model for the crack width based on neural network. The transfer function from the first input layer to the first hidden layer adopts the S-shaped logsig function, the transfer function from the first hidden layer to the first output layer adopts the purelin function, and the model learning and training adopts the trainlm function.
[0017] Further, the prediction model for the leakage volume of the kill fluid formula based on neural network specifically includes:
[0018] The transfer function from the second input layer to the second hidden layer adopts the S-shaped logsig function, the transfer function from the second hidden layer to the second output layer adopts the purelin function, and the model learning and training adopts the trainlm function.
[0019] Further, the training method of the prediction model for the crack width based on neural network specifically includes:
[0020] Step A100, obtaining the first training data; the first training data includes plastic viscosity, leakage rate, leakage volume, static shear force of the kill fluid, drilling speed, well depth, pump pressure, and displacement;
[0021] Step A200, performing normalization processing on the first training data to obtain the first preprocessed training input data;
[0022] Step A300: Input the first preprocessed training input data into the neural network-based fracture width prediction model to output the predicted fracture width of the target formation in the training set.
[0023] Step A400: Calculate the first error based on the predicted fracture width of the target formation in the training set and the actual fracture width of the target formation.
[0024] Step A500: Repeat the method of steps A100 - A400 until the value of the first loss function is lower than the preset first threshold to obtain a trained neural network-based fracture width prediction model.
[0025] Furthermore, the training method of the neural network-based kill fluid formula leakage volume prediction model specifically includes:
[0026] Step B100: Obtain the second training data; the second training data includes rigid mineral particle GZD parameters, plant fiber GDJ parameters, and the predicted fracture width of the target formation.
[0027] Among them, the rigid mineral particle GZD parameters are divided into grades A, B, C, and D according to the particle size from large to small; the plant fiber GDJ parameters can be divided into grades 1, 2, 3, and 4 according to the particle size from large to small.
[0028] Step B200: Perform normalization processing on the second training data to obtain the second preprocessed training input data.
[0029] Step B300: Input the second preprocessed training input data into the neural network-based kill fluid formula leakage volume prediction model to output the leakage volume of the leak prevention and plugging formula in the training set.
[0030] Step B400: Calculate the second error based on the leakage volume of the leak prevention and plugging formula in the training set and the actual leakage volume of the leak prevention and plugging formula.
[0031] Step B500: Repeat the method of steps B100 - B400 until the value of the second loss function is lower than the preset second threshold to obtain a trained neural network-based kill fluid formula leakage volume prediction model.
[0032] Furthermore, the method also includes judging the leakage situation of the kill fluid in the target formation through the trained neural network-based well leakage prediction model.
[0033] The neural network-based fracture width prediction model consists of a third input layer, a third hidden layer, and a third output layer; the third input layer includes A3 third input layer neurons, that is, the parameters of the original formation; the third hidden layer includes B3 third hidden layer neurons, and the output layer includes two third output layer neurons, that is, the leakage situation of the kill fluid in the formation.
[0034] Further, the training method of the lost circulation prediction model based on a neural network specifically includes:
[0035] Step C100, obtaining third training data; the third training data includes kill fluid density, static shear force of kill fluid, viscosity of kill fluid, well depth, wellbore diameter, kill fluid displacement, pump pressure, nature of leakage channel, and formation pore pressure;
[0036] Step C200, performing normalization processing on the third training input data to obtain third preprocessed training input data;
[0037] Step C300, inputting the third preprocessed training input data into the lost circulation prediction model based on a neural network, and outputting a prediction result of whether the formation kill fluid leaks in the training set;
[0038] Step C400, calculating a third loss function value based on the prediction result of whether the formation kill fluid leaks in the training set and the actual result of whether the formation kill fluid leaks;
[0039] Step C500, repeating the methods of Steps C100 - C400 until the third loss function value is lower than a preset third threshold, to obtain a trained lost circulation prediction model based on a neural network.
[0040] On the other hand, the present invention proposes a preparation system for kill fluid, including a data acquisition module, a data preprocessing module, a target formation fracture width prediction module, a lost circulation amount prediction module for anti - leakage and plugging formula, an anti - leakage and plugging formula matching module, and a plugging kill fluid modulation module;
[0041] The data acquisition module is used to collect original formation data as input data;
[0042] The data preprocessing module is used to perform normalization processing on the input data to obtain preprocessed data;
[0043] The target formation fracture width prediction module is used to input the preprocessed input data into a trained fracture width prediction model based on a neural network, and output the predicted fracture width of the target formation;
[0044] The lost circulation amount prediction module for anti - leakage and plugging formula is used to input the predicted fracture width of the target formation into a trained lost circulation amount prediction model for kill fluid formula based on a neural network, and output the lost circulation amount of the anti - leakage and plugging formula;
[0045] The anti-leakage and plugging formula matching module is used to conduct experiments on pre-designed anti-leakage and plugging formulas, obtain the leakage volume sets of the pre-designed anti-leakage and plugging formulas, and select the pre-designed anti-leakage and plugging formula with the smallest error value between the leakage volume of the pre-designed anti-leakage and plugging formula and the leakage volume of the anti-leakage and plugging formula output by the neural network-based kill fluid formula leakage volume prediction model as the target formation anti-leakage and plugging formula;
[0046] The plugging kill fluid preparation module is used to prepare the target formation anti-leakage and plugging formula by adding the kill fluid base fluid to obtain the plugging kill fluid.
[0047] Furthermore, the system further includes a well leakage prediction module, which is used to input the preprocessed input data into the trained neural network-based well leakage prediction model and output the prediction of the formation break-pressure well fluid leakage situation.
[0048] Advantages of the present invention:
[0049] (1) The present invention can predict the formation break-pressure well leakage situation through the neural network-based well leakage prediction model;
[0050] (2) The present invention predicts the fracture width through the neural network-based fracture width prediction model, avoiding potential safety problems during manual measurement and replacing the previous method of predicting by experience;
[0051] (3) The present invention predicts the width of fractures in the reservoir through the prediction model, and then accurately guides the compounding and adjustment of plugging materials in the kill fluid. Description of the Drawings
[0052] By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, objectives, and advantages of the present application will become more apparent:
[0053] Figure 1 It is a flowchart of a method for preparing a kill fluid according to the present invention. Detailed Embodiments
[0054] The following further elaborates on the present application in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention and are not intended to limit the invention. Additionally, it should be noted that for the sake of description, only parts related to the relevant invention are shown in the drawings.
[0055] A method for preparing a kill fluid according to the first embodiment of the present invention includes:
[0056] Step S100, collecting original formation data as input data;
[0057] Step S200, normalizing the input data to obtain preprocessed data;
[0058] Step S300: Input the preprocessed input data into the trained neural network-based fracture width prediction model to output the predicted fracture width of the target formation.
[0059] Step S400: Input the rigid mineral particle GZD parameters, plant fiber GDJ parameters, and the predicted fracture width of the target formation into the trained neural network-based lost circulation volume prediction model for the kill fluid formulation to output the predicted lost circulation volume of the leak prevention and plugging formulation.
[0060] Step S500: Conduct experiments on the pre-designed leak prevention and plugging formulation to obtain the lost circulation volume set of the pre-designed leak prevention and plugging formulation. Select the pre-designed leak prevention and plugging formulation with the smallest difference calculated between the lost circulation volume of the pre-designed leak prevention and plugging formulation and the predicted lost circulation volume of the leak prevention and plugging formulation as the leak prevention and plugging formulation for the target formation.
[0061] Step S600: Prepare the leak prevention and plugging formulation for the target formation by adding the kill fluid base fluid to obtain the plugging kill fluid.
[0062] The neural network-based fracture width prediction model consists of a first input layer, a first hidden layer, and a first output layer; the first input layer includes A1 first input layer neurons; the first hidden layer includes B1 first hidden layer neurons, and the output layer includes one first output layer neuron, i.e., the predicted fracture width of the target formation.
[0063] The neural network-based lost circulation volume prediction model for the kill fluid formulation consists of a second input layer, a second hidden layer, and a second output layer; the second input layer includes A2 second input layer neurons; the second hidden layer includes B2 second hidden layer neurons, and the output layer includes one second output layer neuron, i.e., the lost circulation volume of the leak prevention and plugging formulation.
[0064] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the accompanying drawings and combine the embodiments to detail this application.
[0065] For a clearer description of a method for preparing a kill fluid according to the present invention, the following is combined with Figure 1 Details of each step in the embodiments of the present invention are elaborated.
[0066] The first embodiment of the present invention proposes a method for preparing a kill fluid, including:
[0067] Step S100: Collect the original formation data as input data.
[0068] Step S200: Normalize the input data to obtain preprocessed data.
[0069] In this embodiment, the normalization process specifically includes:
[0070] Convert the input data parameters to the range [-1, 1] as follows:
[0071] where X i represents the processed value; x i represents the value before processing; x imin represents the minimum value before processing; x imax represents the maximum value before processing, and i represents the serial number of the data type.
[0072] Step S300, input the preprocessed input data into the trained crack width prediction model based on neural network, and output the predicted crack width of the target formation;
[0073] In this embodiment, the crack width prediction model based on neural network specifically includes:
[0074] Use the genetic algorithm to optimize the weights and thresholds of the crack width prediction model based on neural network. Its population size is 10, the maximum number of generations is 15, the crossover probability is 0.6, and the mutation probability is 0.05;
[0075] The transfer function from the first input layer to the first hidden layer uses the S-shaped logsig function, the transfer function from the first hidden layer to the first output layer uses the purelin function, and the model learning and training uses the trainlm function.
[0076] Set the parameters as follows:
[0077] The network learning rate is 0.05; the target error is 0.001; the momentum coefficient value is 0.9; the maximum number of training times is 1000 times;
[0078] In this embodiment, the training method of the crack width prediction model based on neural network specifically includes:
[0079] Step A100, obtain the first training data; the first training data includes plastic viscosity, leakage rate, leakage volume, static shear force of kill fluid, drilling speed, well depth, pump pressure, and displacement;
[0080] Step A200, divide 100 groups of original data into two groups, and also perform normalization processing on the data. Among them, the original data from No. 90 to No. 100 is used as the first preprocessed training input data, and No. 1 to No. 10 are used as test samples.
[0081] Step A300, input the first preprocessed training input data into the crack width prediction model based on neural network, and output the predicted crack width of the target formation of the training set;
[0082] Step A400: Calculate the first error based on the predicted fracture width of the target formation in the training set and the actual fracture width of the target formation.
[0083] Step A500: Repeat the method of Steps A100 - A400 until the value of the first loss function is lower than the preset first threshold, and obtain a trained fracture width prediction model based on a neural network.
[0084] As shown in Table 1 Sample number BP predicted value / mm Actual value / mm Error / % 1 0.425 0.422 0.706 2 0.852 0.854 0.23 3 0.934 0.937 0.32 4 0.126 0.122 3.175 5 0.429 0.427 0.466 6 0.764 0.762 0.262 7 0.846 0.844 0.236 8 0.754 0.752 0.265 9 0.635 0.631 0.63 10 0.567 0.565 0.353 Table 1 Comparison between predicted values and true values
[0085] It can be seen that the prediction error of the fracture width is within 4%.
[0086] Step S400: Input the rigid mineral particle GZD parameters, plant fiber GDJ parameters, and the predicted fracture width of the target formation into the trained lost circulation volume prediction model of the kill fluid formula based on a neural network, and output the predicted value of the lost circulation volume of the leak - proof and plugging formula.
[0087] In this embodiment, the lost circulation volume prediction model of the kill fluid formula based on a neural network specifically includes:
[0088] The transfer function from the second input layer to the second hidden layer uses the sigmoid - type logsig function, and the transfer function from the second hidden layer to the second output layer uses the purelin function. The model learning and training use the trainlm function.
[0089] The parameter settings are as follows:
[0090] The learning rate is 0.04; the momentum term coefficient is 0.9; the maximum number of training times is 1000; the target error is 0.001;
[0091] In this embodiment, the training method of the lost circulation volume prediction model of the kill fluid formula based on a neural network specifically includes:
[0092] Step B100: Obtain the second training data; the second training data includes the rigid mineral particle GZD parameters, plant fiber GDJ parameters, and the predicted fracture width of the target formation. According to the range of different fracture widths, 60 leak - proof and plugging formulae are designed, and the experimental data of 60 different plugging formulae are respectively tested.
[0093] Among them, the GZD parameters of rigid mineral particles are classified into grades A (0 - 1 mm), B (1 - 2 mm), C (2 - 3 mm), and D (3 - 5 mm) in descending order of particle size; the GDJ parameters of plant fibers can be classified into grades 1 (0 - 0.1 mm), 2 (0.1 - 0.2 mm), 3 (0.2 - 0.3 mm), and 4 (0.3 - 0.5 mm) in descending order of particle size; numbers 1 - 50 are used as the second training data for the lost circulation prediction model of the kill fluid formula based on neural network, and numbers 51 - 60 are test samples. All sample data are normalized to the range [-1, 1] using the mapminmax function in MATLAB 2016a.
[0094] Step B200: Perform normalization processing on the second training data to obtain the second preprocessed training input data.
[0095] Step B300: Input the second preprocessed training input data into the lost circulation prediction model of the kill fluid formula based on neural network, and output the lost circulation of the leak prevention and plugging formula for the training set.
[0096] Step B400: Calculate the second error based on the lost circulation of the leak prevention and plugging formula for the training set and the actual lost circulation of the leak prevention and plugging formula.
[0097] Step B500: Repeat the method of steps B100 - B400 until the value of the second loss function is lower than the preset second threshold, and obtain the trained lost circulation prediction model of the kill fluid formula based on neural network.
[0098] As shown in Table 2, Predicted sample number True value / ml Predicted value / ml Relative error / % 51 121 101.5 16.52 52 33 37.6 12.12 53 28 42.3 33.13 54 174 156.2 10.22 55 126 120.6 4.76 56 70 82.9 17.14 57 61 73.6 20.49 58 47 38.1 19.14 59 58 75.6 29.31 60 47 41.6 13.68 Table 2 Lost Circulation Prediction
[0099] Step S500: Conduct experiments on the pre-designed leak prevention and plugging formula to obtain the lost circulation set of the pre-designed leak prevention and plugging formula. Select the difference between the lost circulation of the pre-designed leak prevention and plugging formula and the predicted value of the lost circulation of the leak prevention and plugging formula, and take the one with the smallest difference as the leak prevention and plugging formula for the target formation.
[0100] In the laboratory experiment part, plugging of different fractures was simulated, and 50 groups of experiments were conducted. The following are some of the experimental data: Experiment formula 1: 1% GZD - B + 1% GZD - C + 0.5% GZD - D + 2% GDJ - 2 + 1% GDJ - 4; Experiment formula 2: 2% GZD - B + 1% GZD - C + 0.5% GZD - D + 1.5% GDJ - 2 + 1% GDJ - 4; Experiment formula 3: 2% GZD - B + 1% GZD - C + 1% GZD - D + 1.5% GDJ - 2 + 1% GDJ - 4; 4# Experimental formula: 2% GZD-B + 1.5% GZD-C + 1% GZD-D + 1.5% GDJ-2 + 1% GDJ-4; 5# Experimental formula: 2% GZD-B + 1% GZD-C + 0.5% GZD-D + 1.5% GDJ-2 + 1% GDJ-4: 6# Experimental formula: 2% GZD-B + 1% GZD-C + 0.5% GZD-D + 1.0% GDJ-2 + 0.5% GDJ-4.
[0101] According to the prediction results of the lost circulation volume prediction model of the kill fluid formula based on the neural network, the formula for simulating fractures given by this model is as follows: 2% GZD-B + 1.5% GZD-C + 2% GZD-D + 1.5% GDJ-2 + 1% GDJ-4; Experiments were carried out according to the given lost circulation plugging formula, and the results showed that the lost circulation volume was 10 ml and it did not break through under a pressure bearing of 6.0 MPa. The experimental results indicate that the lost circulation plugging formula is consistent with the experimental results;
[0102] Step S600, formulate the target formation lost circulation prevention and plugging formula with the kill fluid base fluid to obtain the lost circulation prevention and plugging kill fluid;
[0103] The neural network-based fracture width prediction model consists of a first input layer, a first hidden layer, and a first output layer; The first input layer includes A1 first input layer neurons; The first hidden layer includes B1 first hidden layer neurons, and the output layer includes one first output layer neuron, that is, the predicted fracture width of the target formation; A1 = 8, B1 = 17;
[0104] The neural network-based lost circulation volume prediction model of the kill fluid formula consists of a second input layer, a second hidden layer, and a second output layer; The second input layer includes A2 second input layer neurons; The second hidden layer includes B2 second hidden layer neurons, and the output layer includes one second output layer neuron, that is, the lost circulation volume of the lost circulation prevention and plugging formula; A2 = 10, B2 = 21.
[0105] In this embodiment, the method further includes judging the lost circulation situation of the target formation kill fluid through the trained neural network-based lost circulation prediction model;
[0106] The neural network-based fracture width prediction model consists of a third input layer, a third hidden layer, and a third output layer; The third input layer includes A3 third input layer neurons, that is, the parameters of the original formation; The third hidden layer includes B3 third hidden layer neurons, and the output layer includes two third output layer neurons, that is, the lost circulation situation of the formation kill fluid; A3 = 9, B3 = 19;
[0107] When the output value is greater than 0.5, it is approximately regarded as 1; when the output value is less than 0.5, it is approximately regarded as 0. [0 1] represents well leakage, and [1 0] represents no leakage.
[0108] The transfer function from the third input layer to the third hidden layer selects tansig, and the transfer function from the third hidden layer to the third output layer selects the logsig function. Its mathematical formula is:
[0109]
[0110]
[0111] Among them, the total step size is 1000, and the error precision E = 0.001.
[0112] In this embodiment, the training method of the well leakage prediction model based on the neural network specifically includes:
[0113] Step C100, obtain the third training data; the third training data includes kill fluid density, static shear force of kill fluid, viscosity of kill fluid, well depth, wellbore diameter, kill fluid displacement, pump pressure, nature of leakage channel and formation pore pressure; divide 100 groups of original data into two groups, where the original data from No. 1 to No. 80 is used as the third training input data, and No. 81 - 100 is used as the test sample;
[0114] Step C200, perform normalization processing on the third training input data to obtain the third preprocessed training input data;
[0115] Step C300, input the third preprocessed training input data into the well leakage prediction model based on the neural network, and output the prediction result of whether the formation kill fluid leaks;
[0116] Step C400, calculate the third loss function value based on the prediction result of whether the formation kill fluid leaks in the training set and the actual result of whether the formation kill fluid leaks;
[0117] Step C500, repeat the methods of steps C100 - C400 until the third loss function value is lower than the preset third threshold, and obtain the trained well leakage prediction model based on the neural network.
[0118] As shown in Table 3, some diagnostic results are as follows: Table 3 Well Leakage Prediction Results
[0119] In the above embodiments, although the various steps are described in the above order, those skilled in the art can understand that, in order to achieve the effects of this embodiment, different steps do not have to be executed in such an order, and they can be executed simultaneously (in parallel) or in reverse order, and these simple changes are all within the protection scope of the present invention.
[0120] A kill fluid preparation system according to a second embodiment of the present invention includes a data acquisition module, a data preprocessing module, a target formation fracture width prediction module, a lost circulation prediction module for anti-loss and plugging formula, an anti-loss and plugging formula matching module, and a plugging kill fluid modulation module.
[0121] The data acquisition module is used to collect original formation data as input data.
[0122] The data preprocessing module is used to normalize the input data to obtain preprocessed data.
[0123] The target formation fracture width prediction module is used to input the preprocessed input data into a trained fracture width prediction model based on a neural network and output the predicted fracture width of the target formation.
[0124] The lost circulation prediction module for anti-loss and plugging formula is used to input the predicted fracture width of the target formation into a trained lost circulation prediction model of the kill fluid formula based on a neural network and output the lost circulation amount of the anti-loss and plugging formula.
[0125] The anti-loss and plugging formula matching module is used to experiment with a pre-designed anti-loss and plugging formula, obtain a set of lost circulation amounts of the pre-designed anti-loss and plugging formula, and select the pre-designed anti-loss and plugging formula with the smallest error value between the lost circulation amount of the pre-designed anti-loss and plugging formula and the lost circulation amount of the anti-loss and plugging formula output by the lost circulation prediction model of the kill fluid formula based on a neural network as the anti-loss and plugging formula for the target formation.
[0126] The plugging kill fluid modulation module is used to prepare the anti-loss and plugging formula for the target formation plus the kill fluid base fluid to obtain a plugging kill fluid.
[0127] In this embodiment, the system further includes a lost circulation prediction module, which is used to input the preprocessed input data into a trained lost circulation prediction model based on a neural network and output a prediction of the lost circulation situation of the formation fracture pressure kill fluid.
[0128] Those skilled in the art of the technical field can clearly understand that, for the sake of convenience and brevity of description, the specific working process and related descriptions of the system described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
[0129] It should be noted that, for the preparation system of a kill fluid provided in the above embodiments, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiments can be combined into one module, or further split into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only used to distinguish each module or step, and are not regarded as improper limitations of the present invention.
[0130] The terms "first", "second", etc. are used to distinguish similar objects, rather than to describe or represent a specific order or sequence.
[0131] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, so that a process, method, article or device / equipment comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent in these processes, methods, articles or devices / equipment.
[0132] So far, the technical solution of the present invention has been described in conjunction with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the protection scope of the present invention.
Claims
1. A method for preparing a kill fluid, characterized in that, The method includes: Step S100, collecting original formation data as input data; Step S200, performing normalization processing on the input data to obtain preprocessed data; Step S300, inputting the preprocessed input data into a trained neural network-based fracture width prediction model to output the predicted fracture width of the target formation; Step S400, inputting the rigid mineral particle GZD parameter, the plant fiber GDJ parameter, and the predicted fracture width of the target formation into a trained neural network-based lost circulation volume prediction model for the kill fluid formula to output the predicted lost circulation volume of the anti-leakage and plugging formula; Step S500, conducting experiments on a pre-designed anti-leakage and plugging formula to obtain a lost circulation volume set of the pre-designed anti-leakage and plugging formula, calculating the difference between the lost circulation volume of the pre-designed anti-leakage and plugging formula and the predicted lost circulation volume of the anti-leakage and plugging formula, and taking the one with the smallest difference as the anti-leakage and plugging formula for the target formation; Step S600, formulating the anti-leakage and plugging formula for the target formation with the kill fluid base fluid to obtain a plugging kill fluid; The neural network-based fracture width prediction model consists of a first input layer, a first hidden layer, and a first output layer; the first input layer includes A1 first input layer neurons; the first hidden layer includes B1 first hidden layer neurons, and the output layer includes one first output layer neuron, that is, the predicted fracture width of the target formation; The neural network-based lost circulation volume prediction model for the kill fluid formula consists of a second input layer, a second hidden layer, and a second output layer; the second input layer includes A2 second input layer neurons; the second hidden layer includes B2 second hidden layer neurons, and the output layer includes one second output layer neuron, that is, the lost circulation volume of the anti-leakage and plugging formula.
2. The preparation method of a kill fluid according to claim 1, characterized in that The normalization processing specifically includes: Converting the input data parameters to be between [-1, 1] as: Among them, X i represents the processed value; x i represents the value before processing; x imin represents the minimum value before processing; x imax represents the maximum value before processing, and i represents the serial number of the data type.
3. The preparation method of a kill fluid according to claim 1, characterized in that The neural network-based fracture width prediction model specifically includes: Using a genetic algorithm to optimize the weights and thresholds of the neural network-based fracture width prediction model. The transfer function from the first input layer to the first hidden layer uses the S-shaped logsig function, the transfer function from the first hidden layer to the first output layer uses the purelin function, and the model learning and training use the trainlm function.
4. The preparation method of a kill fluid according to claim 1, wherein, The neural network-based lost circulation volume prediction model for the kill fluid formula specifically includes: The transfer function from the second input layer to the second hidden layer uses the S-shaped logsig function, the transfer function from the second hidden layer to the second output layer uses the purelin function, and the model learning and training use the trainlm function.
5. The preparation method of a kill fluid according to claim 2, characterized in that The training method of the neural network-based fracture width prediction model specifically includes: Step A100, obtaining first training data; the first training data includes plastic viscosity, lost circulation rate, lost circulation volume, static shear force of the kill fluid, drilling rate, well depth, pump pressure, and displacement; Step A200, performing normalization processing on the first training data to obtain first preprocessed training input data; Step A300: Input the first preprocessed training input data into the neural network-based fracture width prediction model to output the predicted fracture width of the target formation in the training set. Step A400: Calculate the first error based on the predicted fracture width of the target formation in the training set and the actual fracture width of the target formation. Step A500: Repeat the method of Steps A100 - A400 until the value of the first loss function is lower than the preset first threshold to obtain a trained neural network-based fracture width prediction model.
6. The preparation method of a kill fluid according to claim 2, characterized in that The training method of the neural network-based lost circulation volume prediction model for kill fluid formulation specifically includes: Step B100: Obtain the second training data; the second training data includes the GZD parameters of rigid mineral particles, the GDJ parameters of plant fibers, and the predicted fracture width of the target formation. Among them, the GZD parameters of rigid mineral particles are divided into grades A, B, C, and D according to the particle size from large to small; the GDJ parameters of plant fibers can be divided into grades 1, 2, 3, and 4 according to the particle size from large to small. Step B200: Perform normalization processing on the second training data to obtain the second preprocessed training input data. Step B300: Input the second preprocessed training input data into the neural network-based lost circulation volume prediction model for kill fluid formulation to output the lost circulation volume of the leak prevention and plugging formulation in the training set. Step B400: Calculate the second error based on the lost circulation volume of the leak prevention and plugging formulation in the training set and the actual lost circulation volume of the leak prevention and plugging formulation. Step B500: Repeat the method of Steps B100 - B400 until the value of the second loss function is lower than the preset second threshold to obtain a trained neural network-based lost circulation volume prediction model for kill fluid formulation.
7. The preparation method of a kill fluid according to claim 2, characterized in that, The method further includes judging the lost circulation situation of the kill fluid in the target formation through the trained neural network-based lost circulation prediction model. The neural network-based fracture width prediction model consists of a third input layer, a third hidden layer, and a third output layer; the third input layer includes A3 third input layer neurons, that is, the parameters of the original formation; the third hidden layer includes B3 third hidden layer neurons, and the output layer includes two third output layer neurons, that is, the lost circulation situation of the kill fluid in the formation.
8. The preparation method of a kill fluid according to claim 7, characterized in that, The training method of the neural network-based lost circulation prediction model specifically includes: Step C100: Obtain the third training data; the third training data includes kill fluid density, kill fluid static shear force, kill fluid viscosity, well depth, wellbore diameter, kill fluid displacement, pump pressure, lost circulation channel properties, and formation pore pressure. Step C200: Perform normalization processing on the third training input data to obtain the third preprocessed training input data. Step C300: Input the third preprocessed training input data into the neural network-based lost circulation prediction model to output the prediction result of whether the kill fluid in the formation is lost in the training set. Step C400: Calculate the value of the third loss function based on the prediction result of whether the kill fluid in the formation is lost in the training set and the actual result of whether the kill fluid in the formation is lost. Step C500: Repeat the method of Steps C100 - C400 until the value of the third loss function is lower than the preset third threshold to obtain a trained neural network-based lost circulation prediction model.
9. A preparation system for kill fluid, characterized in that The system includes a data acquisition module, a data preprocessing module, a target formation fracture width prediction module, a lost circulation volume prediction module for lost circulation prevention and plugging formula, a lost circulation prevention and plugging formula matching module, and a lost circulation prevention and plugging kill fluid preparation module; The data acquisition module is used to collect original formation data as input data; The data preprocessing module is used to normalize the input data to obtain preprocessed data; The target formation fracture width prediction module is used to input the preprocessed input data into a trained fracture width prediction model based on a neural network and output the predicted fracture width of the target formation; The lost circulation volume prediction module for lost circulation prevention and plugging formula is used to input the predicted fracture width of the target formation into a trained lost circulation volume prediction model of the kill fluid formula based on a neural network and output the lost circulation volume of the lost circulation prevention and plugging formula; The lost circulation prevention and plugging formula matching module is used to conduct experiments on pre-designed lost circulation prevention and plugging formulas to obtain a set of lost circulation volumes of the pre-designed lost circulation prevention and plugging formulas, and select the pre-designed lost circulation prevention and plugging formula with the smallest error value between the lost circulation volume of the pre-designed lost circulation prevention and plugging formula and the lost circulation volume of the lost circulation prevention and plugging formula output by the lost circulation volume prediction model of the kill fluid formula based on a neural network as the lost circulation prevention and plugging formula for the target formation; The lost circulation prevention and plugging kill fluid preparation module is used to prepare the lost circulation prevention and plugging formula for the target formation plus the kill fluid base fluid to obtain the lost circulation prevention and plugging kill fluid.
10. The preparation system of a kill fluid according to claim 9, characterized in that, The system further includes a lost circulation prediction module, which is used to input the preprocessed input data into a trained lost circulation prediction model based on a neural network and output the prediction of the lost circulation situation of the formation break and kill fluid.