Method and device for predicting well bottom effusion of natural gas well
By using decision trees and gradient enhancement algorithms in the prediction of bottom-hole effusion of gas wells, combining the moisture content at different depths of the formation, the gradient enhancement decision tree model is constructed, which solves the problem of large prediction errors in the existing technology, and achieves more accurate and closeness Actual bottom-hole effusion prediction.
Patent Information
- Application Number
- CN202310741630.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
The calculation process of the prior art when predicting effusion in the bottom of the gas well is cumbersome and not accurate enough, and the factors of moisture content in the formation are not fully considered, resulting in large errors between the prediction results and the actual situation.
The decision tree is used as the base learner, and the model is trained in combination with the gradient enhancement algorithm. During the data set production process, the gradient enhancement decision tree model is constructed to predict bottom well effusion.
It improves the accuracy of the prediction results and the ability to be close to the actual results, reduces the data overfitting problem, and enhances the accuracy and interpretability of the prediction.
Smart Images

Figure CN119179962A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of oil and gas field development, and in particular to a method and device for predicting bottom liquid accumulation in a natural gas well. Background Art
[0002] Bottom hole liquid accumulation is a phenomenon in which the gas well production is lower than the minimum critical flow rate for the gas well to continuously carry liquid, resulting in the gas well being unable to carry the condensate or formation water out of the wellbore and accumulating at the bottom of the well. During gas production, as the bottom hole liquid accumulates, the bottom hole back pressure will gradually increase, causing the production pressure difference to decrease, which in turn leads to a decrease in gas production. The low gas production further leads to a decrease in gas velocity, forming a vicious cycle until the gas well is shut down. At present, there are many methods to solve the problem of bottom hole liquid accumulation, such as the commonly used foam drainage method, tubing drainage gas production technology, and gas lift drainage gas production technology. However, the problem of liquid accumulation is easy to solve but difficult to predict. How to predict the problem of liquid accumulation in advance is the current focus of research.
[0003] At present, the existing technologies include judging whether there is liquid accumulation and the position of the liquid level by judging whether there is a wellhead oil casing pressure difference, judging the occurrence of liquid accumulation by the gradual decrease of daily gas production, and judging by the critical flow rate of gas, etc. Although the existing prediction methods can predict whether liquid accumulation will occur, the calculation process is often cumbersome and not accurate enough, resulting in a large error between the predicted results and the actual results. In addition, there are two sources of liquid in gas wells. One is that free water or hydrocarbon condensate in the formation seeps into the wellbore together with the gas, and the other is that natural gas containing water vapor in the formation flows into the wellbore. Due to heat loss, the temperature gradually decreases along the wellbore and condensate water appears. The current methods are mostly predicted from the perspective of liquid accumulation caused by the gas production process, and the factor of water content in the formation has never been considered. Therefore, there is an urgent need for a method that combines the water content of the formation and can accurately predict the bottom hole liquid accumulation in a timely manner.
[0004] The invention patent with publication number CN110163442A discloses a gas well liquid accumulation prediction method based on ensemble learning. The gas well liquid accumulation prediction method based on ensemble learning has stronger pertinence and accuracy compared with the traditional universal gas well liquid accumulation prediction model. This not only can more accurately judge the liquid accumulation condition of the gas well, but also has better accuracy and convenience than the traditional gas well liquid accumulation model. At the same time, targeted gas well liquid accumulation analysis results are obtained for the production conditions of different gas fields, which better guides the construction of drainage gas production technology to discharge the bottom hole liquid, restore the production capacity of the gas well, further explore the later development potential of the gas reservoir, and achieve the purpose of improving the recovery rate of the gas reservoir.
[0005] For example, the invention patent with publication number CN113931621A discloses a method, device and storage medium for determining liquid accumulation information in a gas well. This patent can analyze the transient changes of the liquid in the target gas well from the near-wellbore formation to the wellhead through the gas-liquid flow characteristics of the gas-liquid mixture and the geological characteristics of the reservoir in which the target gas well is located, thereby taking into account various factors that affect the generation of liquid accumulation to the greatest extent and improving the accuracy of determining the liquid accumulation information in the gas well.
[0006] Both of the above existing technologies have achieved the prediction of bottom-hole liquid accumulation through prediction models, but both have some problems. First, the first existing technology uses three base classifiers, and also needs to vote into the aggregate classifier to achieve prediction, and the overall solution is very complicated; while the second existing technology can only predict whether there is liquid accumulation at the bottom of the gas well and the risk of liquid accumulation, but cannot predict the specific value of the bottom-hole liquid accumulation. Summary of the invention
[0007] In order to solve the problems and shortcomings existing in the above-mentioned prior art, the present application proposes a method and device for predicting bottom hole liquid accumulation in a natural gas well. The method uses a decision tree as a base learner and adopts a gradient enhancement algorithm to train the model. In the process of data set preparation, the influence of water content at different depths of the formation on the prediction result is taken into account. Therefore, the present application can predict bottom hole liquid accumulation well, and the prediction result is closer to the actual result.
[0008] In order to achieve the above-mentioned invention object, the technical solution of this application is as follows:
[0009] A method for predicting bottom liquid accumulation in a natural gas well, comprising:
[0010] Collect actual production data of gas fields in different regions and blocks or test data simulating liquid accumulation in gas wells as sample data;
[0011] The sample data of different blocks are randomly shuffled and combined into a data set, and the data set is divided into a training set and a test set;
[0012] Constructing a bottom hole liquid accumulation prediction model, wherein the prediction model is a gradient enhanced decision tree model structure, using a decision tree as a base learner, training the model using a data set based on a gradient enhanced algorithm, and saving the trained prediction model;
[0013] The actual production data of the gas field of the natural gas well to be tested or the experimental data of simulating liquid accumulation in the gas well are obtained, and sent as input to the saved prediction model, and finally the value of the bottom liquid accumulation of the natural gas well to be tested is obtained.
[0014] Preferably, the bottom hole liquid accumulation prediction model is constructed, the prediction model is a gradient enhanced decision tree model structure, the decision tree is used as a base learner, the model is trained using a data set based on a gradient enhancement algorithm, and the trained prediction model is saved, including:
[0015] The model is trained using the training set and tested on the test set to obtain the prediction model with the best performance during the training process;
[0016] A piece of data is randomly selected from the training set as the validation set to validate the model until all the data in the training set have been validated once, and the cross-validation is completed; the best model is selected as the final prediction model based on the performance of the model on the validation set, and the trained prediction model is saved.
[0017] Preferably, the model is trained using a training set and tested on a test set to obtain a prediction model with the best performance in the training process, including:
[0018] In the m-1th round of training, the mth decision tree is added to the bottom hole liquid accumulation prediction model, and the residual calculation is performed based on the loss function.
[0019]
[0020] in, Represents the loss value L(y i ,f m-1 (x i ))About f m-1 (x i )’s partial derivative; L(y i ,f m-1 (x i )) represents the output f of the bottom well liquid accumulation model in the m-1th round of training m-1 (x i ) and its corresponding y i The loss value between ; N represents the number of data groups in the training set;
[0021] Calculate the negative gradient of the loss function in the current model and use it as an estimate of the residual;
[0022] Fitting residual r mi Learn a regression tree and get the leaf node region R of the mth tree mj,j=1,2,…,J ;
[0023] Estimate the regression tree leaf area to fit the approximate value of the residual;
[0024] Find the tree with the smallest error, that is
[0025]
[0026] Among them, c m represents the optimal value, that is, the tree with the smallest error; j represents the jth feature;
[0027] Use linear search to estimate the value of the leaf node area to minimize the loss function, and finally update the regression tree to obtain the regression problem boosting tree
[0028]
[0029] Preferably, the sample data includes production dynamic data, gas critical flow rate, wellhead pressure, wellbore pressure and water content at different depths of the formation.
[0030] Preferably, the production dynamic data include water injection conditions, water content and gas-oil ratio.
[0031] Preferably, the data of the training set, test set and validation set have no intersection during the model training process.
[0032] A device for predicting bottom liquid accumulation in a natural gas well, which is used to implement the above-mentioned bottom liquid accumulation prediction method, mainly comprises:
[0033] The data acquisition module is used to collect actual production data of gas fields in different regions and blocks or test data of simulated gas well liquid accumulation as sample data;
[0034] The data set making module is used to randomly shuffle the sample data of different blocks into a data set, and divide the data set into a training set and a test set.
[0035] The model building and training module is used to build a bottom hole liquid accumulation prediction model. The prediction model is a gradient enhanced decision tree model structure. The decision tree is used as a base learner. The model is trained using a data set based on a gradient enhanced algorithm and the trained prediction model is saved.
[0036] The liquid accumulation prediction module is used to use the trained prediction model to predict the liquid accumulation of the newly input gas field actual production data of the natural gas well to be tested or the experimental data of the simulated gas well liquid accumulation, and finally obtain the value of the bottom hole liquid accumulation of the natural gas well to be tested.
[0037] A computer device comprises a memory, a processor and a computer program stored in the memory and executable in the processor. When the processor executes the computer program, the above-mentioned method for predicting bottom hole fluid accumulation is implemented.
[0038] A computer-readable storage medium stores a computer program, and when the computer program is executed in a computer processor, the method for predicting bottom hole fluid accumulation described above is implemented.
[0039] Beneficial effects of this application:
[0040] (1) This application uses a decision tree as the base learner, which has the advantages of easy understanding, strong interpretability and fast prediction speed. Furthermore, the gradient boosting algorithm is used to train the model, which effectively improves the utilization of data and can also solve the problem of data overfitting.
[0041] (2) When predicting bottom hole liquid accumulation, the present application additionally collects water content at different depths of the formation as a new parameter and introduces it into the data set. The parameter types of the data set are further expanded, making the prediction results of the model more accurate and closer to the actual results, further improving the overall prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The foregoing and following detailed description of the present application will become more apparent when read in conjunction with the following drawings, in which:
[0043] Figure 1 Flow chart of the prediction method for this application;
[0044] Figure 2 Predict the composition diagram of the device for this application;
[0045] In the figure:
[0046] 201. Data collection module; 202. Data set preparation module; 203. Model building and training module; 204. Effusion prediction module. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the technical solutions in this application, the following will further illustrate the technical solutions for achieving the invention purpose of this application through several specific embodiments. It should be noted that the technical solutions claimed for protection in this application include but are not limited to the following embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.
[0048] At present, the existing technologies include judging whether there is liquid accumulation and the position of the liquid level by judging whether there is a wellhead oil casing pressure difference, judging the occurrence of liquid accumulation by the gradual decrease of daily gas production, and judging by the critical flow rate of gas, etc. Although the existing prediction methods can predict whether liquid accumulation will occur, the calculation process is often cumbersome and not accurate enough, resulting in a large error between the predicted results and the actual results. In addition, there are two sources of liquid in gas wells. One is that free water or hydrocarbon condensate in the formation seeps into the wellbore together with the gas, and the other is that natural gas containing water vapor in the formation flows into the wellbore. Due to heat loss, the temperature gradually decreases along the wellbore and condensate water appears. The current methods are mostly predicted from the perspective of liquid accumulation caused by the gas production process, and the factor of water content in the formation has never been considered. Therefore, there is an urgent need for a method that combines the water content of the formation and can accurately predict the bottom hole liquid accumulation in a timely manner.
[0049] Based on this, the embodiments of the present application propose a method and device for predicting bottom liquid accumulation in a natural gas well. The prediction method of the present application constructs a gradient enhanced decision tree model, uses the decision tree as a base learner, and adopts a gradient enhanced algorithm to train the model. In the model training process, the water content at different depths of the formation is additionally collected as a new parameter and introduced into the data set. The parameter types of the data set are further expanded, making the prediction results of the model more accurate and closer to the actual results, further improving the overall prediction accuracy.
[0050] In order to facilitate the understanding of this embodiment, this embodiment first introduces and illustrates the bottom hole liquid accumulation prediction method in detail.
[0051] The embodiment of the present application discloses a method for predicting liquid accumulation at the bottom of a natural gas well. Figure 1 , the method mainly comprises the following steps:
[0052] Step S101: Collect actual production data of gas fields in different regions and blocks or experimental data of simulated gas well liquid accumulation as sample data.
[0053] In this embodiment, it should be noted that the sample data includes production dynamic data, gas critical flow, wellhead pressure, wellbore pressure and water content at different depths of the formation. Further, the production dynamic data includes water injection status, water content and gas-oil ratio.
[0054] In this embodiment, it should be noted that the critical gas flow rate refers to the minimum flow rate of the gas in the wellbore when liquid accumulation begins, which is the critical gas flow rate (or the critical gas-liquid carrying flow rate).
[0055] In this embodiment, it is necessary to further explain that the wellbore pressure includes the wellbore static pressure, the buoyancy acting on the drill string, and the fluctuating pressure of the wellbore.
[0056] Step S102: randomly shuffle the sample data of different blocks into a data set, and divide the data set into a training set and a test set.
[0057] In this embodiment, it should be noted that when dividing the data set, the data is generally randomly divided into ten equal parts, one of which is taken as the test set, and the remaining nine parts of the data are used as training sets for model training, that is, the ratio of training set to test set is 1:9.
[0058] Step S103: construct a bottom hole liquid accumulation prediction model, wherein the prediction model is a gradient enhanced decision tree model structure, with the decision tree as the base learner, and the model is trained using a data set based on a gradient enhanced algorithm, and the trained prediction model is saved.
[0059] In this embodiment, the model is first trained using a training set and tested on a test set to obtain the prediction model with the best performance in the training process; then a piece of data is randomly selected from the training set as a validation set to verify the model, until all the data in the training set has been verified once, and the cross-validation is completed; finally, the best model is selected as the final prediction model based on the performance of the model on the validation set, and the trained prediction model is saved.
[0060] Furthermore, the training and testing process of the model is as follows:
[0061] The input and output of the model are the training set T and the regression tree
[0062] Among them, the training set T = {(x1,y1),(x2,y2),……,(x m ,y m )},x i ∈R n ,y i ∈R, loss function L(y,f(x)), x1 is the independent variable, y1 is the dependent variable, and the numerical labels here refer to the groups; the regression tree is initialized as Assign m=1, 2, 3, ..., N;
[0063] Use the training set to train the model. In the m-1th round of training, add the mth decision tree to the bottom hole fluid accumulation prediction model and calculate the residual based on the loss function.
[0064]
[0065] in, Represents the loss value L(y i ,f m-1 (x i ))About f m-1 (xi )’s partial derivative; L(y i ,f m-1 (x i )) represents the output f of the bottom well liquid accumulation model in the m-1th round of training m-1 (x i ) and its corresponding y i The loss value between ; N represents the number of data groups in the training set;
[0066] Calculate the negative gradient of the loss function in the current model and use it as an estimate of the residual;
[0067] Fitting residual r mi Learn a regression tree and get the leaf node region R of the mth tree mj,j=1,2,…,J ;
[0068] Estimate the regression tree leaf area to fit the approximate value of the residual;
[0069] Find the tree with the smallest error, that is
[0070]
[0071] Among them, c m represents the optimal value, that is, the tree with the smallest error; j represents the jth feature;
[0072] Use linear search to estimate the value of the leaf node area to minimize the loss function. Finally, after updating the regression tree, the following regression problem boosting tree is obtained:
[0073]
[0074] Finally, a trained bottom hole fluid accumulation prediction model and corresponding learning parameters are obtained, and the learning parameters include weights and biases;
[0075] Use the test set to test the model, substitute the independent variables of the test set into the model to compare the dependent variables obtained with the actual values (the bottom hole liquid accumulation volume obtained by the model and the actual bottom hole liquid accumulation volume), and record the corresponding accuracy;
[0076] A piece of data is randomly selected from the training set as a validation set, and the dependent variable obtained by substituting the independent variable in the data into the model is compared with the actual value, and the accuracy is recorded until all training sets have been validated once. After the cross-validation is completed, the corresponding hyperparameters are obtained, including the number of iterations, learning rate and number of nodes;
[0077] Finally, the best model is selected according to the performance of the bottom hole fluid accumulation prediction model on the validation set as the final prediction model.
[0078] In this embodiment, the gradient boosting tree uses the negative gradient of the loss function in the current model as an approximate value of the residual to fit the regression tree. In this way, as long as the function can be calculated, we can solve it. For simplicity, remove the summation symbol and subscript, and use vectorization instead, then the loss function is:
[0079] loss=L(y,f m (x))=L(y,f m-1 (x)+h m (x; a m ));
[0080] Expand according to Taylor's first-order expansion:
[0081]
[0082] It can be seen that L(y,f m-1 (x)) is the loss corresponding to the previous step m-1
[0083] Order here
[0084]
[0085] This ensures that the part after the above formula minus a positive number must be a positive number, so taking the negative gradient can reduce the loss step by step.
[0086] Step S104: Acquire actual production data of the gas field of the natural gas well to be tested or test data of simulated gas well liquid accumulation, and send it as input to the saved prediction model to finally obtain the value of the bottom hole liquid accumulation of the natural gas well to be tested.
[0087] Based on the same inventive concept, the embodiments of the present application also disclose a natural gas well bottom liquid accumulation prediction device, which is used to implement the natural gas well bottom liquid accumulation prediction method described above. As described in the following embodiments, the terms "unit" or "module" used below can implement a combination of software and / or hardware with predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable. For details, refer to the attached manual. Figure 2 The device may include: a data acquisition module 201, a data set preparation module 202, a model building and training module 203 and an effusion prediction module 204; wherein,
[0088] The data acquisition module 201 is used to collect actual production data of gas fields in different regions and blocks or experimental data of simulated gas well liquid accumulation as sample data;
[0089] The data set making module 202 is used to randomly shuffle the sample data of different blocks into a data set, and divide the data set into a training set and a test set;
[0090] The model building and training module 203 is used to build a bottom hole liquid accumulation prediction model. The prediction model is a gradient enhanced decision tree model structure. The decision tree is used as a base learner. The model is trained using a data set based on a gradient enhanced algorithm and the trained prediction model is saved.
[0091] The liquid accumulation prediction module 204 is used to use the trained prediction model to perform liquid accumulation prediction on the newly input actual production data of the gas field of the natural gas well to be tested or the experimental data of simulating liquid accumulation in the gas well, and finally obtain the value of the bottom hole liquid accumulation of the natural gas well to be tested.
[0092] It should be noted that the systems, devices, models or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, in this specification, the above devices are described in various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0093] Furthermore, in the present specification, adjectives such as first and second may be used merely to distinguish one element or action from another, without necessarily or implying any actual such relationship or order.
[0094] Furthermore, an embodiment of the present application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable in the processor, and when the processor executes the computer program, the steps of any of the above methods are implemented.
[0095] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed in a computer processor, the steps of any of the above methods are implemented.
[0096] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a processor and a memory. For example, the computer device may also include an input and output device, a network access device, a bus, etc.
[0097] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The memory may be an internal storage unit of the electronic device, such as a hard disk or memory of a terminal device. The memory may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the memory may include both an internal storage unit and an external storage device of the electronic device. The memory is used to store the computer program and other programs and data required by the electronic device. The memory may also be used to temporarily store data that has been output or is to be output.
[0098] The devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by dividing them into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules. The device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0099] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0100] Example 2
[0101] This embodiment discloses a method for predicting liquid accumulation at the bottom of a natural gas well, which mainly includes the following steps:
[0102] Step S1. Establish a data set: collect actual production data of gas fields in different blocks in the Sichuan-Chongqing region and the South China Sea production area as sample data, and randomly shuffle the sample data of different blocks into a data set; wherein the collected data include production dynamic data, gas critical flow, wellhead pressure, wellbore pressure and water content at different depths of the formation.
[0103] Step S2. Dataset processing: Divide the data set described in step S1 into a training set and a test set.
[0104] Step S3. Construct and train a bottom hole fluid accumulation prediction model: First, randomly divide the data set described in step S2 into ten equal parts, take one of them as a test set, and the rest as training sets. Take the decision tree as the base learner, and use the gradient enhancement algorithm to train the model with eight of the training sets to obtain corresponding learning parameters, including weights and biases; then, after the training is completed, cross-validate it, use the test set to test the model, and obtain and record the accuracy; again, randomly select one of the nine training sets as a validation set, and obtain the accuracy of a model again, until all training sets have been used as validation sets once, the cross-validation is completed, and the corresponding hyperparameters, including the number of iterations, learning rate and number of nodes, are obtained, and finally a trained prediction model is obtained and the model is saved.
[0105] Step S4. Bottom hole liquid accumulation prediction: The actual production data of the natural gas well or the experimental data of the simulated gas well liquid accumulation are obtained and sent as input to the saved prediction model to finally obtain the value of the bottom hole liquid accumulation of the natural gas well.
[0106] Example 3
[0107] This embodiment discloses a method for predicting liquid accumulation at the bottom of a natural gas well, which mainly includes the following steps:
[0108] Step S1. Establish a data set: collect actual production data of gas fields in different blocks in the Sichuan-Chongqing region and the South China Sea production area as sample data, and randomly shuffle the sample data of different blocks into a data set; wherein the collected data include production dynamic data, gas critical flow, wellhead pressure and wellbore pressure.
[0109] Step S2. Dataset processing: Divide the data set described in step S1 into a training set and a test set.
[0110] Step S3. Construct and train a bottom hole fluid accumulation prediction model: First, randomly divide the data set described in step S2 into ten equal parts, take one of them as a test set, and the rest as training sets. Take the decision tree as the base learner, and use the gradient enhancement algorithm to train the model with eight of the training sets to obtain corresponding learning parameters, including weights and biases; then, after the training is completed, cross-validate it, use the test set to test the model, and obtain and record the accuracy; again, randomly select one of the nine training sets as a validation set, and obtain the accuracy of a model again, until all training sets have been used as validation sets once, the cross-validation is completed, and the corresponding hyperparameters, including the number of iterations, learning rate and number of nodes, are obtained, and finally a trained prediction model is obtained and the model is saved.
[0111] Step S4. Bottom hole liquid accumulation prediction: The actual production data of the natural gas well or the experimental data of the simulated gas well liquid accumulation are obtained and sent as input to the saved prediction model to finally obtain the value of the bottom hole liquid accumulation of the natural gas well.
[0112] The following table compares the accuracy of the collected data on whether it contains water content at different depths of the formation:
[0113]
[0114] Therefore, it can be seen from the above table that when the water content at different depths of the formation is also taken as one of the main factors affecting the bottom hole liquid accumulation, the accuracy of the prediction model is also significantly improved. When the prediction accuracy is improved, under actual working conditions, operators can predict the liquid accumulation in advance when drilling before mining, and can make better and faster judgments in the subsequent construction process. The above only selects some of my country's high-yield natural gas and humid gas fields as examples. Other regions can also use this model to predict bottom hole liquid accumulation.
[0115] The above is only a preferred embodiment of the present application and does not constitute any form of obstruction to the present application. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present application shall fall within the protection scope of the present application.
Claims
1. A method for predicting bottom liquid accumulation in a natural gas well, characterized in that: include: Collect actual production data of gas fields in different regions and blocks or test data simulating liquid accumulation in gas wells as sample data; The sample data of different blocks are randomly shuffled and combined into a data set, and the data set is divided into a training set and a test set; Constructing a bottom hole liquid accumulation prediction model, wherein the prediction model is a gradient enhanced decision tree model structure, using a decision tree as a base learner, training the model using a data set based on a gradient enhanced algorithm, and saving the trained prediction model; The actual production data of the gas field of the natural gas well to be tested or the experimental data of simulating liquid accumulation in the gas well are obtained, and sent as input to the saved prediction model, and finally the value of the bottom liquid accumulation of the natural gas well to be tested is obtained.
2. The method for predicting bottom liquid accumulation in a natural gas well according to claim 1, characterized in that: The bottom hole liquid accumulation prediction model is constructed, and the prediction model is a gradient enhanced decision tree model structure, with a decision tree as a base learner, and a data set is used to train the model based on a gradient enhanced algorithm, and the trained prediction model is saved, including: The model is trained using the training set and tested on the test set to obtain the prediction model with the best performance during the training process; A piece of data is randomly selected from the training set as the validation set to validate the model until all the data in the training set have been validated once, and the cross-validation is completed; the best model is selected as the final prediction model based on the performance of the model on the validation set, and the trained prediction model is saved.
3. A method for predicting bottom liquid accumulation in a natural gas well according to claim 2, characterized in that: The model is trained using a training set and tested on a test set to obtain the best prediction model during the training process, including: In the m-1th round of training, the mth decision tree is added to the bottom hole liquid accumulation prediction model, and the residual calculation is performed based on the loss function. in, Represents the loss value L(y i ,f m-1 (x i ))About f m-1 (x i )’s partial derivative; L(y i ,f m-1 (x i )) represents the output f of the bottom well liquid accumulation model in the m-1th round of training m-1 (x i ) and its corresponding y i The loss value between ; N represents the number of data groups in the training set; Calculate the negative gradient of the loss function in the current model and use it as an estimate of the residual; Fitting residual r mi Learn a regression tree and get the leaf node region R of the mth tree mj , j=1,,…, ; Estimate the regression tree leaf area to fit the approximate value of the residual; Find the tree with the smallest error, that is Among them, c m represents the optimal value, that is, the tree with the smallest error; j represents the jth feature; Use linear search to estimate the value of the leaf node area to minimize the loss function, and finally update the regression tree to obtain the regression problem boosting tree 4. A method for predicting bottom liquid accumulation in a natural gas well according to claim 1, characterized in that: The sample data include production dynamic data, gas critical flow rate, wellhead pressure, wellbore pressure and water content at different depths of the formation.
5. A method for predicting bottom liquid accumulation in a natural gas well according to claim 3, characterized in that: The production performance data include water injection status, water content and gas-oil ratio.
6. A method for predicting bottom liquid accumulation in a natural gas well according to claim 2, characterized in that: The data of the training set, test set and validation set have no intersection during the model training process.
7. A device for predicting bottom-hole liquid accumulation in a natural gas well, the device being used to implement the bottom-hole liquid accumulation prediction method according to any one of claims 1 to 6, characterized in that: include: The data acquisition module is used to collect actual production data of gas fields in different regions and blocks or test data of simulated gas well liquid accumulation as sample data; The data set making module is used to randomly shuffle the sample data of different blocks into a data set, and divide the data set into a training set and a test set. The model building and training module is used to build a bottom hole liquid accumulation prediction model. The prediction model is a gradient enhanced decision tree model structure. The decision tree is used as a base learner. The model is trained using a data set based on a gradient enhanced algorithm and the trained prediction model is saved. The liquid accumulation prediction module is used to use the trained prediction model to predict the liquid accumulation of the newly input gas field actual production data of the natural gas well to be tested or the experimental data of the simulated gas well liquid accumulation, and finally obtain the value of the bottom hole liquid accumulation of the natural gas well to be tested.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable in the processor, characterized in that: When the processor executes the computer program, the method described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed in a computer processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Gas well effusion prediction method based on ensemble learning
CN110163442A
Gas well hydrops information determination method and device and storage medium
CN113931621A
